diff options
author | Carlhuda <carlhuda@engineyard.com> | 2010-03-09 15:36:26 -0800 |
---|---|---|
committer | Carlhuda <carlhuda@engineyard.com> | 2010-03-09 15:36:26 -0800 |
commit | 3685d0ba3740af853943aabab3d2e56ae8a9e7d7 (patch) | |
tree | c9631abbf7454a9333264f0ac891e92ecbfe200e /lib/bundler/dsl.rb | |
parent | f278f83d1de4caa8b745e8189b26393e0a08e72f (diff) | |
download | bundler-3685d0ba3740af853943aabab3d2e56ae8a9e7d7.tar.gz |
Add the ability to specify a gem in multiple groups
Diffstat (limited to 'lib/bundler/dsl.rb')
-rw-r--r-- | lib/bundler/dsl.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/bundler/dsl.rb b/lib/bundler/dsl.rb index 309058a5..dffa4d8e 100644 --- a/lib/bundler/dsl.rb +++ b/lib/bundler/dsl.rb @@ -12,14 +12,14 @@ module Bundler @source = nil @sources = [] @dependencies = [] - @group = nil + @group = [:default] end def gem(name, *args) options = Hash === args.last ? args.pop : {} version = args.last || ">= 0" - if options[:group] - options[:group] = options[:group].to_sym + if group = options[:groups] || options[:group] + options[:group] = group end _deprecated_options(options) @@ -55,8 +55,8 @@ module Bundler Definition.new(@dependencies, @sources) end - def group(name, options = {}, &blk) - old, @group = @group, name.to_sym + def group(*args, &blk) + old, @group = @group, args yield ensure @group = old |