Module: Git

Defined in:
lib/coral_core/util/git.rb,
lib/coral_core/util/git/lib.rb,
lib/coral_core/util/git/base.rb,
lib/coral_core/util/git/remote.rb

Defined Under Namespace

Classes: Base, GitDirectoryError, Lib, Remote

Class Method Summary collapse

Class Method Details

.url(host, repo, options = {}) ⇒ Object


Utilities



9
10
11
12
13
14
# File 'lib/coral_core/util/git.rb', line 9

def self.url(host, repo, options = {})
  options[:user] = ( options[:user] ? options[:user] : 'git' )
  options[:auth] = ( options[:auth] ? options[:auth] : true )
  
  return options[:user] + ( options[:auth] ? '@' : '://' ) + host + ( options[:auth] ? ':' : '/' ) + repo
end