Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Commit

Permalink
Merge pull request #1125 from dhh/bundler
Browse files Browse the repository at this point in the history
---

Still needs tests, but the tests should be against a new dsl_spec.rb
  • Loading branch information
indirect committed Apr 28, 2011
2 parents e48440a + bd5f7a4 commit b459009
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/bundler/dsl.rb
Expand Up @@ -183,7 +183,7 @@ def _normalize_hash(opts)
def _normalize_options(name, version, opts)
_normalize_hash(opts)

invalid_keys = opts.keys - %w(group groups git path name branch ref tag require submodules platform platforms)
invalid_keys = opts.keys - %w(group groups git github path name branch ref tag require submodules platform platforms)
if invalid_keys.any?
plural = invalid_keys.size > 1
message = "You passed #{invalid_keys.map{|k| ':'+k }.join(", ")} "
Expand All @@ -209,7 +209,11 @@ def _normalize_options(name, version, opts)
raise DslError, "`#{p}` is not a valid platform. The available options are: #{VALID_PLATFORMS.inspect}"
end

# Normalize git and path options
if github = opts.delete(:github)
github = "#{github}/#{github}" unless github.include?("/")
opts["git"] = "git://github.com/#{github}.git"
end

["git", "path"].each do |type|
if param = opts[type]
if version.first && version.first =~ /^\s*=?\s*(\d[^\s]*)\s*$/
Expand Down

0 comments on commit b459009

Please sign in to comment.