Sha256: 65d551e4c5ddec1c9a174d863387ea029b91c19b3e020dbed41cda9760a75a6b

Contents?: true

Size: 403 Bytes

Versions: 13

Compression:

Stored size: 403 Bytes

Contents

load File.expand_path("../tasks/current_git_branch.rake", __FILE__)

module Twingly
  module Git
    module_function

    # Colors are pretty!
    def red(str)
      "\e[31m#{str}\e[0m"
    end

    def info
      "branch #{red(fetch(:branch))} to stage #{red(fetch(:stage))}"
    end

    def current_branch
      `git symbolic-ref HEAD 2> /dev/null`.strip.gsub(/^refs\/heads\//, '')
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
capistrano-twingly-4.2.0 lib/capistrano/twingly/current_git_branch.rb
capistrano-twingly-4.1.0 lib/capistrano/twingly/current_git_branch.rb
capistrano-twingly-4.0.4 lib/capistrano/twingly/current_git_branch.rb
capistrano-twingly-4.0.3 lib/capistrano/twingly/current_git_branch.rb
capistrano-twingly-4.0.2 lib/capistrano/twingly/current_git_branch.rb
capistrano-twingly-4.0.1 lib/capistrano/twingly/current_git_branch.rb
capistrano-twingly-4.0.0 lib/capistrano/twingly/current_git_branch.rb
capistrano-twingly-3.0.0 lib/capistrano/twingly/current_git_branch.rb
capistrano-twingly-2.4.1 lib/capistrano/twingly/current_git_branch.rb
capistrano-twingly-2.4.0 lib/capistrano/twingly/current_git_branch.rb
capistrano-twingly-2.3.0 lib/capistrano/twingly/current_git_branch.rb
capistrano-twingly-2.2.0 lib/capistrano/twingly/current_git_branch.rb
capistrano-twingly-2.1.0 lib/capistrano/twingly/current_git_branch.rb