diff options
author | Keith Shook <keith.shook@ontariosystems.com> | 2015-03-06 09:57:04 -0500 |
---|---|---|
committer | Keith Shook <keith.shook@ontariosystems.com> | 2015-03-06 09:57:04 -0500 |
commit | 1f0e5c19e19b2a2d83a67da4e5d38fff26a4d4c5 (patch) | |
tree | d953cd492d4af62fc1829c0e8ad87e4d70649f3d /spec/support/indexes.rb | |
parent | 1c6ed5a9629851613aee87c454d64f15bc80fa12 (diff) | |
download | bundler-1f0e5c19e19b2a2d83a67da4e5d38fff26a4d4c5.tar.gz |
Added a test that exposes a scenario in some versions of bundler where a bundle install gets a lower version of a direct requirement than it should. See https://github.com/bundler/bundler/issues/3459
Diffstat (limited to 'spec/support/indexes.rb')
-rw-r--r-- | spec/support/indexes.rb | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/spec/support/indexes.rb b/spec/support/indexes.rb index 5aba3e2133..5b98bf458e 100644 --- a/spec/support/indexes.rb +++ b/spec/support/indexes.rb @@ -29,6 +29,14 @@ module Spec expect(got).to eq(specs.sort) end + def should_resolve_and_include(specs) + got = resolve + got = got.map { |s| s.full_name }.sort + specs.each do |s| + expect(got).to include(s) + end + end + def should_conflict_on(names) begin got = resolve @@ -197,6 +205,70 @@ module Spec end end + # Issue #3459 + def a_complicated_index + build_index do + + gem "foo", %w{3.0.0 3.0.5} do + dep "qux", ["~> 3.1"] + dep "baz", ["< 9.0", ">= 5.0"] + dep "bar", ["~> 1.0"] + dep "grault", ["~> 3.1"] + end + + gem "foo", "1.2.1" do + dep "baz", ["~> 4.2"] + dep "bar", ["~> 1.0"] + dep "qux", ["~> 3.1"] + dep "grault", ["~> 2.0"] + end + + gem "bar", "1.0.5" do + dep "grault", ["~> 3.1"] + dep "baz", ["< 9", ">= 4.2"] + end + + gem "bar", "1.0.3" do + dep "baz", ["< 9", ">= 4.2"] + dep "grault", ["~> 2.0"] + end + + gem "baz", "8.2.10" do + dep "grault", ["~> 3.0"] + dep "garply", [">= 0.5.1", "~> 0.5"] + end + + gem "baz", "5.0.2" do + dep "grault", ["~> 2.0"] + dep "garply", [">= 0.3.1"] + end + + gem "baz", "4.2.0" do + dep "grault", ["~> 2.0"] + dep "garply", [">= 0.3.1"] + end + + gem "grault", %w{2.6.3 3.1.1} + + gem "garply", "0.5.1" do + dep "waldo", ["~> 0.1.3"] + end + + gem "waldo", "0.1.5" do + dep "plugh", ["~> 0.6.0"] + end + + gem "plugh", %w(0.6.3 0.6.11 0.7.0) + + gem "qux", "3.2.21" do + dep "plugh", [">= 0.6.4", "~> 0.6"] + dep "corge", ["~> 1.0"] + end + + gem "corge", "1.10.1" + end + end + def a_unresovable_child_index build_index do gem "json", %w(1.8.0) |