Skip to content

Commit

Permalink
Better meaning for slashless :github arg.
Browse files Browse the repository at this point in the history
  • Loading branch information
rking authored and indirect committed Oct 1, 2012
1 parent 8fca868 commit 7c8c58e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/bundler/dsl.rb
Expand Up @@ -231,7 +231,7 @@ def _normalize_options(name, version, opts)
end

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

Expand Down
7 changes: 7 additions & 0 deletions spec/bundler/dsl_spec.rb
Expand Up @@ -18,6 +18,13 @@
github_uri = "git://github.com/rails/rails.git"
subject.dependencies.first.source.uri.should == github_uri
end

it "should interpret slashless 'github:' value as account name" do
subject.gem("bundler", :github => "carlhuda")
github_uri = "git://github.com/carlhuda/bundler.git"
subject.dependencies.first.source.uri.should == github_uri
end

end

describe '#method_missing' do
Expand Down

0 comments on commit 7c8c58e

Please sign in to comment.