diff options
author | André Arko <mail@arko.net> | 2015-07-10 13:14:37 -0700 |
---|---|---|
committer | André Arko <mail@arko.net> | 2015-07-10 13:14:37 -0700 |
commit | 53d5c710e6e362613d88d5048fc77f559eda912a (patch) | |
tree | f49c05c0874b5480aaac37b2b82149e0fde3be35 | |
parent | efcb5e240a6652a0aec57c097350eb4c765f9b17 (diff) | |
parent | 29be03a8c77c127fe8693467c49f89c9814fc393 (diff) | |
download | bundler-53d5c710e6e362613d88d5048fc77f559eda912a.tar.gz |
Merge pull request #3819 from danieltdt/fix-install-if
Fix install_if not clearing install conditions
-rw-r--r-- | lib/bundler/dsl.rb | 2 | ||||
-rw-r--r-- | spec/install/gems/install_if.rb | 8 |
2 files changed, 8 insertions, 2 deletions
diff --git a/lib/bundler/dsl.rb b/lib/bundler/dsl.rb index 9924faad15..e5432fa467 100644 --- a/lib/bundler/dsl.rb +++ b/lib/bundler/dsl.rb @@ -186,7 +186,7 @@ module Bundler @install_conditionals.concat args blk.call ensure - args.each { @groups.pop } + args.each { @install_conditionals.pop } end def platforms(*platforms) diff --git a/spec/install/gems/install_if.rb b/spec/install/gems/install_if.rb index 11c7a8a1cd..32b04d1cc4 100644 --- a/spec/install/gems/install_if.rb +++ b/spec/install/gems/install_if.rb @@ -4,21 +4,26 @@ describe "bundle install with install_if conditionals" do it "follows the install_if DSL" do install_gemfile <<-G source "file://#{gem_repo1}" - gem "rack" install_if(lambda { true }) do gem "activesupport", "2.3.5" end gem "thin", :install_if => false + install_if(lambda { false }) do + gem "foo" + end + gem "rack" G should_be_installed("rack 1.0", "activesupport 2.3.5") should_not_be_installed("thin") + should_not_be_installed("foo") lockfile_should_be <<-L GEM remote: file:#{gem_repo1}/ specs: activesupport (2.3.5) + foo (1.0) rack (1.0.0) thin (1.0) rack @@ -28,6 +33,7 @@ describe "bundle install with install_if conditionals" do DEPENDENCIES activesupport (= 2.3.5) + foo rack thin |