module Twingly::Git

Public Instance Methods

current_branch() click to toggle source
# File lib/capistrano/twingly/current_git_branch.rb, line 16
def current_branch
  `git symbolic-ref HEAD 2> /dev/null`.strip.gsub(/^refs\/heads\//, '')
end
info() click to toggle source
# File lib/capistrano/twingly/current_git_branch.rb, line 12
def info
  "branch #{red(fetch(:branch))} to stage #{red(fetch(:stage))}"
end
red(str) click to toggle source

Colors are pretty!

# File lib/capistrano/twingly/current_git_branch.rb, line 8
def red(str)
  "\e[31m#{str}\e[0m"
end