Module: Bundler::Github

Defined in:
lib/bundler/github.rb,
lib/bundler/github/dsl_patch.rb

Defined Under Namespace

Modules: DslPatch

Constant Summary collapse

HTTP =
lambda { |user, repo| "https://github.com/#{user}/#{repo}.git" }
SSH =
lambda { |user, repo| "[email protected]:#{user}/#{repo}.git" }

Class Method Summary collapse

Class Method Details

.expand_options(name, version, opts) ⇒ Object



11
12
13
14
15
# File 'lib/bundler/github.rb', line 11

def self.expand_options(name, version, opts)
  user, repo  = opts.delete('github').split('/')
  transport   = user =~ /^:/ ? (user.slice!(0); SSH) : HTTP
  opts['git'] = transport.call(user, repo || name)
end