DEV: Fix rubocop warnings (#199)

This commit is contained in:
Jarek Radosz 2021-12-03 16:44:32 +01:00 committed by GitHub
parent cef3529800
commit 7c59d3cc30
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -88,7 +88,7 @@ def run
end
if custom_collector_filename
eval File.read(custom_collector_filename), nil, File.expand_path(custom_collector_filename)
require File.expand_path(custom_collector_filename)
found = false
base_klass = PrometheusExporter::Server::CollectorBase
@ -108,7 +108,7 @@ def run
if custom_type_collectors_filenames.length > 0
custom_type_collectors_filenames.each do |t|
eval File.read(t), nil, File.expand_path(t)
require File.expand_path(t)
end
ObjectSpace.each_object(Class) do |klass|

View File

@ -73,7 +73,7 @@ module PrometheusExporter::Instrumentation
# of the delayed extensions
# https://github.com/mperham/sidekiq/blob/master/lib/sidekiq/extensions/class_methods.rb
begin
(target, method_name, _args) = YAML.load(msg['args'].first)
(target, method_name, _args) = YAML.safe_load(msg['args'].first)
if target.class == Class
"#{target.name}##{method_name}"
else