mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[rubygems/rubygems] Fix bundle info
sometimes claiming that bundler has been deleted
https://github.com/rubygems/rubygems/commit/fe1a31db31
This commit is contained in:
parent
b6f543d4ae
commit
f3320f164f
2 changed files with 9 additions and 1 deletions
|
@ -70,7 +70,7 @@ module Bundler
|
||||||
gem_info << "\tPath: #{spec.full_gem_path}\n"
|
gem_info << "\tPath: #{spec.full_gem_path}\n"
|
||||||
gem_info << "\tDefault Gem: yes" if spec.respond_to?(:default_gem?) && spec.default_gem?
|
gem_info << "\tDefault Gem: yes" if spec.respond_to?(:default_gem?) && spec.default_gem?
|
||||||
|
|
||||||
if spec.deleted_gem?
|
if name != "bundler" && spec.deleted_gem?
|
||||||
return Bundler.ui.warn "The gem #{name} has been deleted. Gemspec information is still available though:\n#{gem_info}"
|
return Bundler.ui.warn "The gem #{name} has been deleted. Gemspec information is still available though:\n#{gem_info}"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -50,6 +50,14 @@ RSpec.describe "bundle info" do
|
||||||
expect(out).to eq(root.to_s)
|
expect(out).to eq(root.to_s)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it "doesn't claim that bundler has been deleted, even if using a custom path without bundler there" do
|
||||||
|
bundle "config set --local path vendor/bundle"
|
||||||
|
bundle "install"
|
||||||
|
bundle "info bundler"
|
||||||
|
expect(out).to include("\tPath: #{root}")
|
||||||
|
expect(err).not_to match(/The gem bundler has been deleted/i)
|
||||||
|
end
|
||||||
|
|
||||||
it "complains if gem not in bundle" do
|
it "complains if gem not in bundle" do
|
||||||
bundle "info missing", :raise_on_error => false
|
bundle "info missing", :raise_on_error => false
|
||||||
expect(err).to eq("Could not find gem 'missing'.")
|
expect(err).to eq("Could not find gem 'missing'.")
|
||||||
|
|
Loading…
Reference in a new issue