class Dokkufy::Git

Public Instance Methods

clear() click to toggle source
# File lib/dokkufy/git.rb, line 17
def clear
  `git remote remove dokku`
end
dokku_remote() click to toggle source
# File lib/dokkufy/git.rb, line 8
def dokku_remote
  @dokku_remote ||= git_remote
end
dokku_remote=(remote) click to toggle source
# File lib/dokkufy/git.rb, line 12
def dokku_remote=(remote)
  @dokku_remote = remote
  self.git_remote=(remote)
end
dokku_remote_present?() click to toggle source
# File lib/dokkufy/git.rb, line 4
def dokku_remote_present?
  !dokku_remote.nil?
end

Private Instance Methods

git_remote() click to toggle source
# File lib/dokkufy/git.rb, line 23
def git_remote
  output = `git remote -v`
  output.lines.each do |line|
    return line.split(" ")[1] if line.include?("dokku@")
  end
  nil
end
git_remote=(remote) click to toggle source
# File lib/dokkufy/git.rb, line 31
def git_remote=(remote)
  puts "Setting git remote"
  `git remote add dokku #{remote}`
end