зеркало из https://github.com/github/ruby.git
[rubygems/rubygems] Show the exact name of the gem that was deleted
If a non exact name (matched as a regexp) is passed to `bundle info`, these strings might not match. https://github.com/rubygems/rubygems/commit/831edf1edf
This commit is contained in:
Родитель
62d1deb0d1
Коммит
607efe9154
|
@ -40,12 +40,13 @@ module Bundler
|
|||
end
|
||||
|
||||
def print_gem_path(spec)
|
||||
if spec.name == "bundler"
|
||||
name = spec.name
|
||||
if name == "bundler"
|
||||
path = File.expand_path("../../../..", __FILE__)
|
||||
else
|
||||
path = spec.full_gem_path
|
||||
unless File.directory?(path)
|
||||
return Bundler.ui.warn "The gem #{gem_name} has been deleted. It was installed at: #{path}"
|
||||
return Bundler.ui.warn "The gem #{name} has been deleted. It was installed at: #{path}"
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -62,6 +62,10 @@ RSpec.describe "bundle info" do
|
|||
|
||||
expect(err).to match(/The gem rails has been deleted/i)
|
||||
expect(err).to match(default_bundle_path("gems", "rails-2.3.2").to_s)
|
||||
|
||||
bundle "info rail --path"
|
||||
expect(err).to match(/The gem rails has been deleted/i)
|
||||
expect(err).to match(default_bundle_path("gems", "rails-2.3.2").to_s)
|
||||
end
|
||||
|
||||
context "given a default gem shippped in ruby", :ruby_repo do
|
||||
|
|
Загрузка…
Ссылка в новой задаче