timetrap 1.7.5 → 1.7.6
Sign up to get free protection for your applications and to get access to all the features.
- data/CONTRIBUTORS +1 -0
- data/Gemfile +1 -1
- data/Rakefile +7 -1
- data/VERSION.yml +1 -1
- data/lib/timetrap/models.rb +6 -12
- data/lib/timetrap/timer.rb +1 -1
- data/timetrap.gemspec +8 -8
- metadata +14 -14
data/CONTRIBUTORS
CHANGED
data/Gemfile
CHANGED
data/Rakefile
CHANGED
@@ -1,6 +1,12 @@
|
|
1
1
|
require 'rake/rdoctask'
|
2
2
|
require 'rubygems/package_task'
|
3
3
|
require 'rspec/core/rake_task'
|
4
|
+
begin
|
5
|
+
# use psych for YAML parsing if available
|
6
|
+
require 'psych'
|
7
|
+
rescue LoadError
|
8
|
+
# use syck
|
9
|
+
end
|
4
10
|
|
5
11
|
desc 'Default: run specs.'
|
6
12
|
task :default => :spec
|
@@ -35,7 +41,7 @@ begin
|
|
35
41
|
s.summary = %q{Command line time tracker}
|
36
42
|
s.add_dependency("sequel", ">= 3.9.0")
|
37
43
|
s.add_dependency("sqlite3", "~> 1.3.3")
|
38
|
-
s.add_dependency("chronic", "
|
44
|
+
s.add_dependency("chronic", ">= 0.6.4")
|
39
45
|
s.add_dependency("getopt-declare", ">= 1.28")
|
40
46
|
end
|
41
47
|
rescue LoadError
|
data/VERSION.yml
CHANGED
data/lib/timetrap/models.rb
CHANGED
@@ -29,12 +29,6 @@ module Timetrap
|
|
29
29
|
round? ? rounded_end : self[:end]
|
30
30
|
end
|
31
31
|
|
32
|
-
# work around sequel's behavior of returning numeric values in string
|
33
|
-
# fields as integers
|
34
|
-
def sheet
|
35
|
-
self[:sheet].to_s
|
36
|
-
end
|
37
|
-
|
38
32
|
def duration
|
39
33
|
@duration ||= self.end_or_now.to_i - self.start.to_i
|
40
34
|
end
|
@@ -73,10 +67,10 @@ module Timetrap
|
|
73
67
|
# do a quick pseudo migration. This should only get executed on the first run
|
74
68
|
set_schema do
|
75
69
|
primary_key :id
|
76
|
-
column :note,
|
77
|
-
column :start,
|
78
|
-
column :end,
|
79
|
-
column :sheet,
|
70
|
+
column :note, String
|
71
|
+
column :start, DateTime
|
72
|
+
column :end, DateTime
|
73
|
+
column :sheet, String
|
80
74
|
end
|
81
75
|
create_table unless table_exists?
|
82
76
|
end
|
@@ -86,8 +80,8 @@ module Timetrap
|
|
86
80
|
|
87
81
|
set_schema do
|
88
82
|
primary_key :id
|
89
|
-
column :key,
|
90
|
-
column :value,
|
83
|
+
column :key, String
|
84
|
+
column :value, String
|
91
85
|
end
|
92
86
|
create_table unless table_exists?
|
93
87
|
end
|
data/lib/timetrap/timer.rb
CHANGED
data/timetrap.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{timetrap}
|
8
|
-
s.version = "1.7.
|
8
|
+
s.version = "1.7.6"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Sam Goldstein"]
|
12
|
-
s.date = %q{2011-
|
12
|
+
s.date = %q{2011-09-30}
|
13
13
|
s.default_executable = %q{t}
|
14
14
|
s.description = %q{Command line time tracker}
|
15
15
|
s.email = %q{sgrock@gmail.com}
|
@@ -56,7 +56,7 @@ Gem::Specification.new do |s|
|
|
56
56
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
57
57
|
s.add_runtime_dependency(%q<sequel>, [">= 3.9.0"])
|
58
58
|
s.add_runtime_dependency(%q<sqlite3>, ["~> 1.3.3"])
|
59
|
-
s.add_runtime_dependency(%q<chronic>, ["
|
59
|
+
s.add_runtime_dependency(%q<chronic>, [">= 0.6.4"])
|
60
60
|
s.add_runtime_dependency(%q<getopt-declare>, [">= 1.28"])
|
61
61
|
s.add_runtime_dependency(%q<json>, ["~> 1.4.6"])
|
62
62
|
s.add_runtime_dependency(%q<icalendar>, ["~> 1.1.5"])
|
@@ -64,12 +64,12 @@ Gem::Specification.new do |s|
|
|
64
64
|
s.add_development_dependency(%q<jeweler>, [">= 0"])
|
65
65
|
s.add_runtime_dependency(%q<sequel>, [">= 3.9.0"])
|
66
66
|
s.add_runtime_dependency(%q<sqlite3>, ["~> 1.3.3"])
|
67
|
-
s.add_runtime_dependency(%q<chronic>, ["
|
67
|
+
s.add_runtime_dependency(%q<chronic>, [">= 0.6.4"])
|
68
68
|
s.add_runtime_dependency(%q<getopt-declare>, [">= 1.28"])
|
69
69
|
else
|
70
70
|
s.add_dependency(%q<sequel>, [">= 3.9.0"])
|
71
71
|
s.add_dependency(%q<sqlite3>, ["~> 1.3.3"])
|
72
|
-
s.add_dependency(%q<chronic>, ["
|
72
|
+
s.add_dependency(%q<chronic>, [">= 0.6.4"])
|
73
73
|
s.add_dependency(%q<getopt-declare>, [">= 1.28"])
|
74
74
|
s.add_dependency(%q<json>, ["~> 1.4.6"])
|
75
75
|
s.add_dependency(%q<icalendar>, ["~> 1.1.5"])
|
@@ -77,13 +77,13 @@ Gem::Specification.new do |s|
|
|
77
77
|
s.add_dependency(%q<jeweler>, [">= 0"])
|
78
78
|
s.add_dependency(%q<sequel>, [">= 3.9.0"])
|
79
79
|
s.add_dependency(%q<sqlite3>, ["~> 1.3.3"])
|
80
|
-
s.add_dependency(%q<chronic>, ["
|
80
|
+
s.add_dependency(%q<chronic>, [">= 0.6.4"])
|
81
81
|
s.add_dependency(%q<getopt-declare>, [">= 1.28"])
|
82
82
|
end
|
83
83
|
else
|
84
84
|
s.add_dependency(%q<sequel>, [">= 3.9.0"])
|
85
85
|
s.add_dependency(%q<sqlite3>, ["~> 1.3.3"])
|
86
|
-
s.add_dependency(%q<chronic>, ["
|
86
|
+
s.add_dependency(%q<chronic>, [">= 0.6.4"])
|
87
87
|
s.add_dependency(%q<getopt-declare>, [">= 1.28"])
|
88
88
|
s.add_dependency(%q<json>, ["~> 1.4.6"])
|
89
89
|
s.add_dependency(%q<icalendar>, ["~> 1.1.5"])
|
@@ -91,7 +91,7 @@ Gem::Specification.new do |s|
|
|
91
91
|
s.add_dependency(%q<jeweler>, [">= 0"])
|
92
92
|
s.add_dependency(%q<sequel>, [">= 3.9.0"])
|
93
93
|
s.add_dependency(%q<sqlite3>, ["~> 1.3.3"])
|
94
|
-
s.add_dependency(%q<chronic>, ["
|
94
|
+
s.add_dependency(%q<chronic>, [">= 0.6.4"])
|
95
95
|
s.add_dependency(%q<getopt-declare>, [">= 1.28"])
|
96
96
|
end
|
97
97
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: timetrap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 7
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 7
|
9
|
-
-
|
10
|
-
version: 1.7.
|
9
|
+
- 6
|
10
|
+
version: 1.7.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Sam Goldstein
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-09-30 00:00:00 -07:00
|
19
19
|
default_executable: t
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -55,14 +55,14 @@ dependencies:
|
|
55
55
|
version_requirements: &id003 !ruby/object:Gem::Requirement
|
56
56
|
none: false
|
57
57
|
requirements:
|
58
|
-
- -
|
58
|
+
- - ">="
|
59
59
|
- !ruby/object:Gem::Version
|
60
|
-
hash:
|
60
|
+
hash: 15
|
61
61
|
segments:
|
62
62
|
- 0
|
63
|
-
-
|
64
|
-
-
|
65
|
-
version: 0.
|
63
|
+
- 6
|
64
|
+
- 4
|
65
|
+
version: 0.6.4
|
66
66
|
prerelease: false
|
67
67
|
type: :runtime
|
68
68
|
requirement: *id003
|
@@ -178,14 +178,14 @@ dependencies:
|
|
178
178
|
version_requirements: &id011 !ruby/object:Gem::Requirement
|
179
179
|
none: false
|
180
180
|
requirements:
|
181
|
-
- -
|
181
|
+
- - ">="
|
182
182
|
- !ruby/object:Gem::Version
|
183
|
-
hash:
|
183
|
+
hash: 15
|
184
184
|
segments:
|
185
185
|
- 0
|
186
|
-
-
|
187
|
-
-
|
188
|
-
version: 0.
|
186
|
+
- 6
|
187
|
+
- 4
|
188
|
+
version: 0.6.4
|
189
189
|
prerelease: false
|
190
190
|
type: :runtime
|
191
191
|
requirement: *id011
|