warn the user to update his DB files

This commit is contained in:
Christian Mehlmauer
2015-05-01 11:29:03 +02:00
parent 0d806e6d74
commit 202180909c
4 changed files with 37 additions and 1 deletions

View File

@@ -53,7 +53,7 @@ def puts(o = '')
temp = o.gsub(/\e\[\d+m/, '') # remove color for logging
File.open(LOG_FILE, 'a+') { |f| f.puts(temp) }
end
super(o)
end
@@ -106,3 +106,16 @@ class Numeric
s.sub(/\.?0*$/, ' ' + units[e])
end
end
# time calculations
class Fixnum
SECONDS_IN_DAY = 24 * 60 * 60
def days
self * SECONDS_IN_DAY
end
def ago
Time.now - self
end
end