Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Commit

Permalink
Opt in to the new public method if available
Browse files Browse the repository at this point in the history
  • Loading branch information
deivid-rodriguez committed Mar 27, 2019
1 parent 5c71a1f commit 1239c8c
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion lib/bundler/rubygems_integration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ def replace_entrypoints(specs)
h
end

Gem::Specification.send(:default_stubs, "*.gemspec").each do |stub|
Bundler.rubygems.default_stubs.each do |stub|
default_spec = stub.to_spec
default_spec_name = default_spec.name
next if specs_by_name.key?(default_spec_name)
Expand Down Expand Up @@ -857,6 +857,16 @@ def find_name(name)
end
end

if Gem::Specification.respond_to?(:default_stubs)
def default_stubs
Gem::Specification.default_stubs("*.gemspec")
end
else
def default_stubs
Gem::Specification.send(:default_stubs, "*.gemspec")
end
end

def use_gemdeps(gemfile)
ENV["BUNDLE_GEMFILE"] ||= File.expand_path(gemfile)
require "bundler/gemdeps"
Expand Down

0 comments on commit 1239c8c

Please sign in to comment.