Skip to content

Commit

Permalink
Unsafe Rubocop updates
Browse files Browse the repository at this point in the history
  • Loading branch information
kaylareopelle committed Nov 22, 2023
1 parent 19e3370 commit 4479b16
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion instrumentation/all/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ gemspec
group :test do
Dir.entries('../')
.select { |entry| File.directory?(File.join('../', entry)) }
.reject { |entry| %w[. .. all].include?(entry) }
.reject { |entry| %w[. .. all].include?(entry) } # rubocop:disable Performance/CollectionLiteralInLoop
.sort
.each { |dir| gem "opentelemetry-instrumentation-#{dir}", path: "../#{dir}" }
end
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,10 @@ def job_queue(job)
end

callbacks do |lifecycle|
# rubocop:disable Performance/MethodObjectAsBlock
lifecycle.around(:enqueue, &method(:instrument_enqueue))
lifecycle.around(:invoke_job, &method(:instrument_invoke))
# rubocop:enable Performance/MethodObjectAsBlock
end
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def initialize(request)
end

def call
@request.on(:response, &method(:finish))
@request.on(:response, &method(:finish)) # rubocop:disable Performance/MethodObjectAsBlock

uri = @request.uri
request_method = @request.verb
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def build_pipeline
pipeline = command['pipeline']
return unless pipeline

payload['pipeline'] = pipeline.map(&method(:mask))
payload['pipeline'] = pipeline.map { |x| mask(x) }
end

def add_val(payload, command, key)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def strip_console_codes(string)
end

def multiple_failure_message(exception)
exception.failures.map(&:message).map(&method(:strip_console_codes)).join("\n\n")
exception.failures.map(&:message).map { |x| strip_console_codes(x) }.join("\n\n")
end
end
end
Expand Down

0 comments on commit 4479b16

Please sign in to comment.