Module: Kamal::Git

Extended by:
Git
Included in:
Git
Defined in:
lib/kamal/git.rb

Instance Method Summary collapse

Instance Method Details

#revisionObject



12
13
14
# File 'lib/kamal/git.rb', line 12

def revision
  `git rev-parse HEAD`.strip
end

#uncommitted_changesObject



16
17
18
# File 'lib/kamal/git.rb', line 16

def uncommitted_changes
  `git status --porcelain`.strip
end

#used?Boolean

Returns:

  • (Boolean)


4
5
6
# File 'lib/kamal/git.rb', line 4

def used?
  system("git rev-parse")
end

#user_nameObject



8
9
10
# File 'lib/kamal/git.rb', line 8

def user_name
  `git config user.name`.strip
end