diff options
author | Carl Lerche <carllerche@mac.com> | 2010-02-03 22:36:35 -0800 |
---|---|---|
committer | Carl Lerche <carllerche@mac.com> | 2010-02-03 22:48:37 -0800 |
commit | 4582d39bf9b6c4a2cda880daee646a0bfb2ea8d5 (patch) | |
tree | da1b55e42ad1358cc9050c14c9f91934c4e1ba8e /lib/bundler/environment.rb | |
parent | f50ccd9e12006731383a1ed6c791e6a371693529 (diff) | |
download | bundler-4582d39bf9b6c4a2cda880daee646a0bfb2ea8d5.tar.gz |
Allow Bundler::Dependency to have multiple groups
Diffstat (limited to 'lib/bundler/environment.rb')
-rw-r--r-- | lib/bundler/environment.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/bundler/environment.rb b/lib/bundler/environment.rb index a4d98a0a..32c6de37 100644 --- a/lib/bundler/environment.rb +++ b/lib/bundler/environment.rb @@ -61,7 +61,7 @@ module Bundler if groups.empty? dependencies else - dependencies.select { |d| groups.include?(d.group) } + dependencies.select { |d| (groups & d.groups).any? } end end @@ -172,7 +172,7 @@ module Bundler end def autorequires_for_groups(*groups) - groups = dependencies.map { |dep| dep.group }.uniq if groups.empty? + groups = dependencies.map { |dep| dep.groups }.flatten.uniq if groups.empty? groups.inject({}) do |hash, group| hash[group] = dependencies_for(group).map { |dep| dep.autorequire }.flatten hash |