diff options
author | Carlhuda <carlhuda@engineyard.com> | 2010-02-01 15:40:33 -0800 |
---|---|---|
committer | Carlhuda <carlhuda@engineyard.com> | 2010-02-01 15:40:33 -0800 |
commit | 98e8489593aa7ebaa41f3c5e3958b402e35c74d6 (patch) | |
tree | dc137b548967e2935bdec3b76954f1433cd98c7f | |
parent | 70c1e93f8652029e053c16dc7cc9a268ddb25f94 (diff) | |
download | bundler-98e8489593aa7ebaa41f3c5e3958b402e35c74d6.tar.gz |
If system gems exist for a pinned git or path, use git or the path, NOT system gems
-rw-r--r-- | lib/bundler/definition.rb | 4 | ||||
-rw-r--r-- | spec/install/git_spec.rb | 2 | ||||
-rw-r--r-- | spec/install/path_spec.rb | 2 |
3 files changed, 6 insertions, 2 deletions
diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb index b8865528fa..038b46a337 100644 --- a/lib/bundler/definition.rb +++ b/lib/bundler/definition.rb @@ -28,14 +28,14 @@ module Bundler def local_index @local_index ||= begin - index = Index.from_installed_gems + index = Index.new sources.each do |source| next unless source.respond_to?(:local_specs) index = source.local_specs.merge(index) end - index + Index.from_installed_gems.merge(index) end end diff --git a/spec/install/git_spec.rb b/spec/install/git_spec.rb index d1f1218eda..00346e455e 100644 --- a/spec/install/git_spec.rb +++ b/spec/install/git_spec.rb @@ -80,6 +80,8 @@ describe "gemfile install with git sources" do end it "installs dependencies from git even if a newer gem is available elsewhere" do + system_gems "rack-1.0.0" + build_lib "rack", "1.0", :path => lib_path('nested/bar') do |s| s.write "lib/rack.rb", "puts 'WIN OVERRIDE'" end diff --git a/spec/install/path_spec.rb b/spec/install/path_spec.rb index 52a85ce434..bffacd7874 100644 --- a/spec/install/path_spec.rb +++ b/spec/install/path_spec.rb @@ -23,6 +23,8 @@ describe "gemfile install with git sources" do end it "installs dependencies from the path even if a newer gem is available elsewhere" do + system_gems "rack-1.0.0" + build_lib "rack", "1.0", :path => lib_path('nested/bar') do |s| s.write "lib/rack.rb", "puts 'WIN OVERRIDE'" end |