Permalink
Browse files

Merge fixes for Rubygems 1.8.10.dev from branch '1-0-stable'

Conflicts:
	.travis.yml
	lib/bundler.rb
	lib/bundler/source.rb
  • Loading branch information...
2 parents f31d4de + 9868a04 commit ccfa996466c3595c0486160badd46fb4f4b4ae8e @indirect indirect committed Sep 2, 2011
View
@@ -1,12 +1,13 @@
before_script:
- sudo apt-get install groff -y
- rake spec:deps
+
script: rake spec:travis
rvm:
- 1.8.7
- 1.9.2
- - rbx-2.0
+
env:
- RGV=v1.3.6
- RGV=v1.3.7
View
@@ -22,6 +22,7 @@ module Bundler
autoload :Environment, 'bundler/environment'
autoload :Fetcher, 'bundler/fetcher'
autoload :GemHelper, 'bundler/gem_helper'
+ autoload :GemInstaller, 'bundler/gem_installer'
autoload :Graph, 'bundler/graph'
autoload :Index, 'bundler/index'
autoload :Installer, 'bundler/installer'
@@ -0,0 +1,9 @@
+require 'rubygems/installer'
+
+module Bundler
+ class GemInstaller < Gem::Installer
+ def check_executable_overwrite(filename)
+ # Bundler needs to install gems regardless of binstub overwriting
+ end
+ end
+end
@@ -417,7 +417,7 @@ def error_message
# If the origin is "bundler", the conflict is us
if origin.name == "bundler"
o << " Current Bundler version:\n"
- newer_bundler_required = requirement.requirement > Gem::Requirement.new(origin.version)
+ other_bundler_required = !requirement.requirement.satisfied_by?(origin.version)
# If the origin is a LockfileParser, it does not respond_to :required_by
elsif !origin.respond_to?(:required_by) || !(origin.required_by.first)
o << " In snapshot (Gemfile.lock):\n"
@@ -426,9 +426,9 @@ def error_message
o << gem_message(origin)
# If the bundle wants a newer bundler than the running bundler, explain
- if origin.name == "bundler" && newer_bundler_required
- o << "Your version of Bundler is older than the one requested by the Gemfile.\n"
- o << "Perhaps you need to update Bundler by running `gem install bundler`."
+ if origin.name == "bundler" && other_bundler_required
+ o << "This Gemfile requires a different version of Bundler.\n"
+ o << "Perhaps you need to update Bundler by running `gem install bundler`?"
end
# origin is nil if the required gem and version cannot be found in any of
@@ -81,7 +81,7 @@ def install(spec)
install_path = Bundler.requires_sudo? ? Bundler.tmp : Bundler.rubygems.gem_dir
Bundler.rubygems.preserve_paths do
- Gem::Installer.new(path,
+ Bundler::GemInstaller.new(path,
:install_dir => install_path,
:ignore_dependencies => true,
:wrappers => true,
@@ -604,7 +604,7 @@ def set_bundle_path(type, location)
Current Bundler version:
bundler (#{Bundler::VERSION})
E
- out.should == nice_error
+ out.should include(nice_error)
end
it "works for gems with multiple versions in its dependencies" do
@@ -115,7 +115,8 @@
it "should explain that bundler conflicted" do
bundle "update"
- out.should_not =~ /In snapshot/
- out.should =~ /Current Bundler version/
+ out.should_not =~ /in snapshot/i
+ out.should =~ /current Bundler version/i
+ out.should =~ /perhaps you need to update bundler/i
end
end

0 comments on commit ccfa996

Please sign in to comment.