Skip to content

Commit

Permalink
fix deprecation warning Bundler.rubygems.all_specs (#500)
Browse files Browse the repository at this point in the history
  • Loading branch information
neumayr authored Dec 23, 2024
1 parent 3eeb7a2 commit 392dbb8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/scout_apm/utils/installed_gems.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ def logger
end

def run
Bundler.rubygems.all_specs.map {|spec| [spec.name, spec.version.to_s] }
specs = Bundler.rubygems.public_send(Bundler.rubygems.respond_to?(:installed_specs) ? :installed_specs : :all_specs)
specs.map { |spec| [spec.name, spec.version.to_s] }
rescue => e
logger.warn("Couldn't fetch Gem information: #{e.message}")
[]
Expand Down

0 comments on commit 392dbb8

Please sign in to comment.