Skip to content

Commit

Permalink
Selectively disabled cops for methods and classes
Browse files Browse the repository at this point in the history
Rubocop now requires that cops are scoped tighter. This reformats it so
that only the specific method or class has the cop disabled.
  • Loading branch information
natesholland committed May 7, 2019
1 parent fb6d66e commit 4a05be6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
4 changes: 1 addition & 3 deletions lib/http/options.rb
@@ -1,14 +1,12 @@
# frozen_string_literal: true

# rubocop:disable Metrics/ClassLength

require "http/headers"
require "openssl"
require "socket"
require "http/uri"

module HTTP
class Options
class Options # rubocop:disable Metrics/ClassLength
@default_socket_class = TCPSocket
@default_ssl_socket_class = OpenSSL::SSL::SSLSocket
@default_timeout_class = HTTP::Timeout::Null
Expand Down
4 changes: 1 addition & 3 deletions spec/support/black_hole.rb
Expand Up @@ -2,11 +2,9 @@

module BlackHole
class << self
# rubocop:disable Style/MethodMissingSuper
def method_missing(*)
def method_missing(*) # rubocop:disable Style/MethodMissingSuper
self
end
# rubocop:enable Style/MethodMissingSuper

def respond_to_missing?(*)
true
Expand Down
1 change: 1 addition & 0 deletions spec/support/dummy_server/servlet.rb
Expand Up @@ -174,4 +174,5 @@ def do_#{method.upcase}(req, res)
end
end
end
# rubocop:enable Metrics/ClassLength
end

0 comments on commit 4a05be6

Please sign in to comment.