summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Giddins <segiddins@segiddins.me>2016-04-15 19:54:07 -0500
committerSamuel Giddins <segiddins@segiddins.me>2016-06-04 23:53:37 -0500
commit17df6d6003d5f9df3bbe3bb811d5329687808049 (patch)
tree54e697b439e9efb06574424ab86965533e5aa925
parent388febddd67945ed09cf5fcd30d1b9bfed2bda50 (diff)
downloadbundler-17df6d6003d5f9df3bbe3bb811d5329687808049.tar.gz
add spec for allowing conflicts
-rw-r--r--lib/bundler/source_list.rb2
-rw-r--r--spec/install/gemfile/gemspec_spec.rb19
2 files changed, 20 insertions, 1 deletions
diff --git a/lib/bundler/source_list.rb b/lib/bundler/source_list.rb
index 418834b29b..0595cbdcf4 100644
--- a/lib/bundler/source_list.rb
+++ b/lib/bundler/source_list.rb
@@ -12,7 +12,7 @@ module Bundler
end
def add_path_source(options = {})
- if options['gemspec']
+ if options["gemspec"]
add_source_to_list Source::Gemspec.new(options), path_sources
else
add_source_to_list Source::Path.new(options), path_sources
diff --git a/spec/install/gemfile/gemspec_spec.rb b/spec/install/gemfile/gemspec_spec.rb
index 36c7353045..f860f55f13 100644
--- a/spec/install/gemfile/gemspec_spec.rb
+++ b/spec/install/gemfile/gemspec_spec.rb
@@ -143,6 +143,25 @@ describe "bundle install from an existing gemspec" do
expect(@err).not_to match(/ahh/)
end
+ it "allows conflicts" do
+ build_lib("foo", :path => tmp.join("foo")) do |s|
+ s.version = "1.0.0"
+ s.add_dependency "bar", "= 1.0.0"
+ end
+ build_gem "deps", :to_system => true do |s|
+ s.add_dependency "foo", "= 0.0.1"
+ end
+ build_gem "foo", "0.0.1", :to_system => true
+
+ install_gemfile <<-G
+ source "file://#{gem_repo2}"
+ gem "deps"
+ gemspec :path => '#{tmp.join("foo")}', :name => 'foo'
+ G
+
+ should_be_installed "foo 1.0.0"
+ end
+
context "when child gemspecs conflict with a released gemspec" do
before do
# build the "parent" gem that depends on another gem in the same repo