Skip to content

Commit

Permalink
chore: update anyway_config usage, new cops
Browse files Browse the repository at this point in the history
  • Loading branch information
dsalahutdinov committed Dec 19, 2017
1 parent ea99adb commit f316587
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/sniffer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ module Sniffer
class << self
def new(options = {})
raise ArgumentError, "Only one instance is allowed" unless captures.empty?
capture = Capture.new(Sniffer::Config.new(config: options))
capture = Capture.new(Sniffer::Config.new(explicit_values: options))
captures.push(capture)
capture
end

def capture(options = {})
capture = Capture.new(Sniffer::Config.new(config: options))
capture = Capture.new(Sniffer::Config.new(explicit_values: options))
captures.push(capture)
yield if block_given?
capture
Expand Down
1 change: 1 addition & 0 deletions lib/sniffer/adapters/curb_adapter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ def sniffer_response(timing)

Sniffer.log(data_item)
end
# rubocop:enable Metrics/AbcSize, Metrics/MethodLength
end
end
end
Expand Down
1 change: 1 addition & 0 deletions lib/sniffer/data_item_logger.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,6 @@ def logify_response(response)
hash[:response_body] = response.body if log_settings["response_body"]
end
end
# rubocop:enable Metrics/MethodLength,Metrics/CyclomaticComplexity,Metrics/AbcSize
end
end

0 comments on commit f316587

Please sign in to comment.