Module: Kamal::Git

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

Instance Method Summary collapse

Instance Method Details

#emailObject



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

def email
  `git config user.email`.strip
end

#revisionObject



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

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

#rootObject



24
25
26
# File 'lib/kamal/git.rb', line 24

def root
  `git rev-parse --show-toplevel`.strip
end

#uncommitted_changesObject



20
21
22
# File 'lib/kamal/git.rb', line 20

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