lib/timetrap/config.rb in timetrap-1.2.0 vs lib/timetrap/config.rb in timetrap-1.2.1

- old
+ new

@@ -1,12 +1,21 @@ module Timetrap module Config extend self PATH = ENV['TIMETRAP_CONFIG_FILE'] || File.join(ENV['HOME'], '.timetrap.yml') + # Application defaults. + # + # These are written to a config file by invoking: + # <code> + # t configure + # </code> def defaults { - 'database_file' => "#{ENV['HOME']}/.timetrap.db" + # Path to the sqlite db + 'database_file' => "#{ENV['HOME']}/.timetrap.db", + # Unit of time for rounding (-r) in seconds + 'round_in_seconds' => 900 } end def [](key) overrides = File.exist?(PATH) ? YAML.load(File.read(PATH)) : {}