diff options
author | Carlhuda <carlhuda@engineyard.com> | 2010-07-02 13:06:43 -0700 |
---|---|---|
committer | Carlhuda <carlhuda@engineyard.com> | 2010-07-02 13:06:43 -0700 |
commit | 7d3cb65c41e964e23a9c760b390696b1823409f6 (patch) | |
tree | 41ff926fb8eae2d8fda78475485ccf1c6c1242a8 | |
parent | e2aa7ab4404c90518e0b5aaa14ab0aea06b65747 (diff) | |
download | bundler-7d3cb65c41e964e23a9c760b390696b1823409f6.tar.gz |
If bundler is in the lockfile, you should be able to #gem to it
-rw-r--r-- | lib/bundler/resolver.rb | 1 | ||||
-rw-r--r-- | spec/install/gems/simple_case_spec.rb | 10 |
2 files changed, 11 insertions, 0 deletions
diff --git a/lib/bundler/resolver.rb b/lib/bundler/resolver.rb index 0910d44fd8..f95f4a6d37 100644 --- a/lib/bundler/resolver.rb +++ b/lib/bundler/resolver.rb @@ -196,6 +196,7 @@ module Bundler # Force the current if current.name == 'bundler' && !existing existing = search(DepProxy.new(Gem::Dependency.new('bundler', VERSION), Gem::Platform::RUBY)).first + activated['bundler'] = existing raise GemNotFound, %Q{Bundler could not find gem "bundler" (#{VERSION})} unless existing end diff --git a/spec/install/gems/simple_case_spec.rb b/spec/install/gems/simple_case_spec.rb index 7e0174a1a9..edc0ae6bec 100644 --- a/spec/install/gems/simple_case_spec.rb +++ b/spec/install/gems/simple_case_spec.rb @@ -468,6 +468,16 @@ describe "bundle install with gem sources" do out.should == nice_error end + it "includes bundler in the bundle when it's a child dependency" do + install_gemfile <<-G + source "file://#{gem_repo2}" + gem "rails", "3.0" + G + + run "begin; gem 'bundler'; puts 'WIN'; rescue Gem::LoadError; puts 'FAIL'; end" + out.should == "WIN" + end + it "causes a conflict if child dependencies conflict" do install_gemfile <<-G source "file://#{gem_repo2}" |