module Utilities
Public Instance Methods
default_git_email()
click to toggle source
# File lib/git/worklog.rb, line 12 def default_git_email `git config user.email`.strip end
default_git_user()
click to toggle source
# File lib/git/worklog.rb, line 16 def default_git_user "#{default_git_username} <#{default_git_email}>" end
default_git_username()
click to toggle source
# File lib/git/worklog.rb, line 8 def default_git_username `git config user.name`.strip end
pwd()
click to toggle source
# File lib/git/worklog.rb, line 24 def pwd `pwd` end
repos()
click to toggle source
# File lib/git/worklog.rb, line 20 def repos `find . -type d -exec test -e '{}/.git' ';' -print -prune`.split("\n") end
root_repository_name()
click to toggle source
# File lib/git/worklog.rb, line 28 def root_repository_name pwd.split('/').last end
user(name)
click to toggle source
# File lib/git/worklog.rb, line 32 def user(name) if !name.nil? return name else return default_git_user end end