class GithubCommit

Attributes

application[RW]
branch[RW]
github_account[R]

Public Class Methods

new(application, branch, github_account) click to toggle source
# File lib/deploy_nanny/github_commit.rb, line 5
def initialize(application, branch, github_account)
  @github_account = github_account
  @application    = application
  @branch         = branch
end

Public Instance Methods

fetch_sha() click to toggle source
# File lib/deploy_nanny/github_commit.rb, line 15
def fetch_sha
  @sha = `git ls-remote git@github.com:#{github_account}/#{@application}.git | grep "refs/heads/#{@branch}"`[0...7]
end
sha() click to toggle source
# File lib/deploy_nanny/github_commit.rb, line 11
def sha
  @sha.nil? ? '       ' : @sha
end