зеркало из https://github.com/github/ruby.git
[rubygems/rubygems] Cleanup old legacy code
https://github.com/rubygems/rubygems/commit/531d6b5fee
This commit is contained in:
Родитель
0161dc3edc
Коммит
00e5e827b1
|
@ -283,11 +283,7 @@ module Bundler
|
|||
|
||||
e = Gem::LoadError.new(message)
|
||||
e.name = dep.name
|
||||
if e.respond_to?(:requirement=)
|
||||
e.requirement = dep.requirement
|
||||
elsif e.respond_to?(:version_requirement=)
|
||||
e.version_requirement = dep.requirement
|
||||
end
|
||||
e.requirement = dep.requirement
|
||||
raise e
|
||||
end
|
||||
|
||||
|
|
|
@ -301,11 +301,7 @@ module Bundler
|
|||
e = Gem::LoadError.new "You have already activated #{activated_spec.name} #{activated_spec.version}, " \
|
||||
"but your Gemfile requires #{spec.name} #{spec.version}. #{suggestion}"
|
||||
e.name = spec.name
|
||||
if e.respond_to?(:requirement=)
|
||||
e.requirement = Gem::Requirement.new(spec.version.to_s)
|
||||
else
|
||||
e.version_requirement = Gem::Requirement.new(spec.version.to_s)
|
||||
end
|
||||
e.requirement = Gem::Requirement.new(spec.version.to_s)
|
||||
raise e
|
||||
end
|
||||
end
|
||||
|
|
|
@ -341,19 +341,6 @@ RSpec.describe "Bundler.setup" do
|
|||
expect(out).to eq("WIN")
|
||||
end
|
||||
|
||||
it "version_requirement is now deprecated in rubygems 1.4.0+ when gem is missing" do
|
||||
run <<-R
|
||||
begin
|
||||
gem "activesupport"
|
||||
puts "FAIL"
|
||||
rescue LoadError
|
||||
puts "WIN"
|
||||
end
|
||||
R
|
||||
|
||||
expect(err).to be_empty
|
||||
end
|
||||
|
||||
it "replaces #gem but raises when the version is wrong" do
|
||||
run <<-R
|
||||
begin
|
||||
|
@ -366,19 +353,6 @@ RSpec.describe "Bundler.setup" do
|
|||
|
||||
expect(out).to eq("WIN")
|
||||
end
|
||||
|
||||
it "version_requirement is now deprecated in rubygems 1.4.0+ when the version is wrong" do
|
||||
run <<-R
|
||||
begin
|
||||
gem "rack", "1.0.0"
|
||||
puts "FAIL"
|
||||
rescue LoadError
|
||||
puts "WIN"
|
||||
end
|
||||
R
|
||||
|
||||
expect(err).to be_empty
|
||||
end
|
||||
end
|
||||
|
||||
describe "by hiding system gems" do
|
||||
|
|
Загрузка…
Ссылка в новой задаче