diff options
author | Daniel Teixeira <daniel.t.dt@gmail.com> | 2015-07-09 17:42:52 -0300 |
---|---|---|
committer | Andre Arko <andre@arko.net> | 2015-07-10 13:14:50 -0700 |
commit | 54ead324ce37f7ae5be7695ee4253d96e3542bb4 (patch) | |
tree | dc7ff222682b890b9c3b2fabb8363ebb46ac87bc | |
parent | 856ef24897a4a5c18999f8231b2379b416242760 (diff) | |
download | bundler-54ead324ce37f7ae5be7695ee4253d96e3542bb4.tar.gz |
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 |