module OpenGit::Open

Public Class Methods

github(remote = nil) click to toggle source
# File lib/open_git/open.rb, line 3
def self.github(remote = nil)
  raise OpenGit::Git::NoGitRepoError unless OpenGit::Git.is_git_repo
  match = OpenGit::Github.parse(OpenGit::Git.url(remote))
  protocol = match[:protocol]
  protocol = "https" if protocol == "ssh"
  "#{protocol}://#{match[:domain]}/#{match[:org]}/#{match[:repo]}"
end
github_new_pull_request(remote = nil) click to toggle source
# File lib/open_git/open.rb, line 15
def self.github_new_pull_request(remote = nil)
  "#{self.github(remote)}/pull/new/#{OpenGit::Git.branch}"
end
github_pull_request(remote = nil) click to toggle source
# File lib/open_git/open.rb, line 11
def self.github_pull_request(remote = nil)
  "#{self.github(remote)}/pull/#{OpenGit::Git.branch}"
end