module RepoTimetracker
Constants
- VERSION
Public Class Methods
current_commit_time(directory)
click to toggle source
# File lib/repo_timetracker.rb, line 23 def current_commit_time(directory) repo_timeline = RepoTimeline.load_or_initialize_for(directory) if repo_timeline.nil? 'no repo' else time = repo_timeline.current_commit_time Time.at(time).utc.strftime("%H:%M:%S") end end
project_time(directory)
click to toggle source
# File lib/repo_timetracker.rb, line 34 def project_time(directory) repo_timeline = RepoTimeline.load_or_initialize_for(directory) if repo_timeline.nil? 'no repo' else time = repo_timeline.project_time Time.at(time).utc.strftime("%H:%M:%S") end end
record(event_string, directory)
click to toggle source
# File lib/repo_timetracker.rb, line 9 def record(event_string, directory) kill_reporter_daemons repo_timeline = RepoTimeline.load_or_initialize_for(directory) if repo_timeline.nil? 'no repo' else repo_timeline.add_event(event_string) end become_reporter_daemon(directory) end