class AuPair::Github

Constants

BASEURL

Public Instance Methods

add_remote(name:, username:, repo:) click to toggle source
# File lib/au_pair/github.rb, line 5
def add_remote(name:, username:, repo:)
  repo_url = "#{BASEURL}/#{username}/#{repo}.git"
  if has_remote?(name)
    `git remote remove #{name}`
  end
  `git remote add #{name} #{repo_url}`
end
has_remote?(name) click to toggle source
# File lib/au_pair/github.rb, line 13
def has_remote?(name)
  !!(remotes =~ /^#{name}\s/)
end
remotes() click to toggle source
# File lib/au_pair/github.rb, line 17
def remotes
  `git remote -v`
end