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 4ceb3ee
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
4 changes: 1 addition & 3 deletions lib/http/options.rb
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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
3 changes: 1 addition & 2 deletions spec/support/dummy_server/servlet.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
# frozen_string_literal: true

class DummyServer < WEBrick::HTTPServer
# rubocop:disable Metrics/ClassLength
class Servlet < WEBrick::HTTPServlet::AbstractServlet
class Servlet < WEBrick::HTTPServlet::AbstractServlet # rubocop:disable Metrics/ClassLength
def self.sockets
@sockets ||= []
end
Expand Down

0 comments on commit 4ceb3ee

Please sign in to comment.