Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Commit

Permalink
Don't compare Path sources by the unexpanded directory name
Browse files Browse the repository at this point in the history
  • Loading branch information
carllerche committed Feb 13, 2011
1 parent 2c9d479 commit 0527f48
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
1 change: 0 additions & 1 deletion lib/bundler/source.rb
Expand Up @@ -317,7 +317,6 @@ def hash
def eql?(o)
o.instance_of?(Path) &&
path.expand_path(Bundler.root) == o.path.expand_path(Bundler.root) &&
name == o.name &&
version == o.version
end

Expand Down
20 changes: 20 additions & 0 deletions spec/install/path_spec.rb
Expand Up @@ -141,6 +141,26 @@
should_be_installed "rack 1.0"
end

it "doesn't automatically unlock dependencies when using the gemspec syntax" do
build_lib "foo", "1.0", :path => lib_path("foo") do |s|
s.add_dependency "rack", ">= 1.0"
end

Dir.chdir lib_path("foo")

install_gemfile lib_path("foo/Gemfile"), <<-G
source "file://#{gem_repo1}"
gemspec
G

build_gem "rack", "1.0.1", :to_system => true

bundle "install"

should_be_installed "foo 1.0"
should_be_installed "rack 1.0"
end

it "raises if there are multiple gemspecs" do
build_lib "foo", "1.0", :path => lib_path("foo") do |s|
s.write "bar.gemspec"
Expand Down

0 comments on commit 0527f48

Please sign in to comment.