Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #1125 from dhh/bundler

---

Still needs tests, but the tests should be against a new dsl_spec.rb
  • Loading branch information...
commit b4590099e30558313d485a0883abd29538d2244b 2 parents e48440a + bd5f7a4
@indirect indirect authored
Showing with 6 additions and 2 deletions.
  1. +6 −2 lib/bundler/dsl.rb
View
8 lib/bundler/dsl.rb
@@ -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(", ")} "
@@ -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*$/
Please sign in to comment.
Something went wrong with that request. Please try again.