diff options
author | Andre Arko <andre@arko.net> | 2010-10-11 09:33:06 -0700 |
---|---|---|
committer | Andre Arko <andre@arko.net> | 2010-10-11 09:33:06 -0700 |
commit | a30ac39a5a63dab5bdf5513727d15044995e5db5 (patch) | |
tree | 587fca191105c10a8cc27378f1cc0e4853ca2650 /lib/bundler/dsl.rb | |
parent | 84dd4d401a9bb9ca5fa46ac8411e2011c497d833 (diff) | |
download | bundler-a30ac39a5a63dab5bdf5513727d15044995e5db5.tar.gz |
Make inline :groups work, with tests.
When you have _normalize_options(), you should only normalize options inside it, or things can get really confusing.
Closes #757
Diffstat (limited to 'lib/bundler/dsl.rb')
-rw-r--r-- | lib/bundler/dsl.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/bundler/dsl.rb b/lib/bundler/dsl.rb index 5cf4b751f6..ea4de1e3bf 100644 --- a/lib/bundler/dsl.rb +++ b/lib/bundler/dsl.rb @@ -53,9 +53,6 @@ module Bundler options = Hash === args.last ? args.pop : {} version = args || [">= 0"] - if group = options[:groups] || options[:group] - options[:group] = group - end _deprecated_options(options) _normalize_options(name, version, options) @@ -187,7 +184,7 @@ module Bundler def _normalize_options(name, version, opts) _normalize_hash(opts) - invalid_keys = opts.keys - %w(group git path name branch ref tag require submodules platforms) + invalid_keys = opts.keys - %w(group groups git path name branch ref tag require submodules platforms) if invalid_keys.any? plural = invalid_keys.size > 1 message = "You passed #{invalid_keys.map{|k| ':'+k }.join(", ")} " @@ -200,6 +197,7 @@ module Bundler end groups = @groups.dup + opts["group"] = opts.delete("groups") || opts["group"] groups.concat Array(opts.delete("group")) groups = [:default] if groups.empty? |