timetrap 1.8.10 → 1.8.11
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/timetrap/cli.rb +1 -0
- data/lib/timetrap/version.rb +1 -1
- data/spec/timetrap_spec.rb +16 -0
- data/timetrap.gemspec +4 -2
- metadata +154 -126
- checksums.yaml +0 -7
data/lib/timetrap/cli.rb
CHANGED
@@ -259,6 +259,7 @@ COMMAND is one of:
|
|
259
259
|
|
260
260
|
def resume
|
261
261
|
last_entry = Timer.entries(Timer.current_sheet).last
|
262
|
+
last_entry ||= Timer.entries("_#{Timer.current_sheet}").last
|
262
263
|
warn "No entry yet on this sheet yet. Started a new entry." unless last_entry
|
263
264
|
note = (last_entry ? last_entry.note : nil)
|
264
265
|
warn "Resuming #{note.inspect} from entry ##{last_entry.id}" if note
|
data/lib/timetrap/version.rb
CHANGED
data/spec/timetrap_spec.rb
CHANGED
@@ -951,6 +951,22 @@ END:VCALENDAR
|
|
951
951
|
end
|
952
952
|
end
|
953
953
|
|
954
|
+
describe "with only archived entries" do
|
955
|
+
before(:each) do
|
956
|
+
$stdin.string = "yes\n"
|
957
|
+
invoke "archive"
|
958
|
+
Timetrap::Timer.entries(Timetrap::Timer.current_sheet).should be_empty
|
959
|
+
Timetrap::Timer.active_entry.should be_nil
|
960
|
+
end
|
961
|
+
|
962
|
+
it "retrieves the note of the most recent archived entry" do
|
963
|
+
invoke "resume"
|
964
|
+
Timetrap::Timer.active_entry.should_not be_nil
|
965
|
+
Timetrap::Timer.active_entry.note.should == @last_active.note
|
966
|
+
Timetrap::Timer.active_entry.start.to_s.should == @time.to_s
|
967
|
+
end
|
968
|
+
end
|
969
|
+
|
954
970
|
describe "with auto_checkout config option set" do
|
955
971
|
before do
|
956
972
|
with_stubbed_config 'auto_checkout' => true
|
data/timetrap.gemspec
CHANGED
@@ -22,9 +22,11 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.add_development_dependency "rake"
|
23
23
|
spec.add_development_dependency "rspec", '~> 2.13'
|
24
24
|
spec.add_development_dependency "fakefs"
|
25
|
-
|
25
|
+
# More recent versions of icalendar drop support for Ruby 1.8.7
|
26
|
+
spec.add_development_dependency "icalendar", "~> 1.3.0"
|
26
27
|
spec.add_development_dependency "json"
|
27
28
|
spec.add_dependency "sequel", "~> 4.0.0"
|
28
29
|
spec.add_dependency "sqlite3", "~> 1.3.3"
|
29
|
-
|
30
|
+
|
31
|
+
spec.add_dependency "chronic", "~> 0.10.2"
|
30
32
|
end
|
metadata
CHANGED
@@ -1,150 +1,169 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: timetrap
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 33
|
5
|
+
prerelease:
|
6
|
+
segments:
|
7
|
+
- 1
|
8
|
+
- 8
|
9
|
+
- 11
|
10
|
+
version: 1.8.11
|
5
11
|
platform: ruby
|
6
|
-
authors:
|
12
|
+
authors:
|
7
13
|
- Sam Goldstein
|
8
14
|
autorequire:
|
9
15
|
bindir: bin
|
10
16
|
cert_chain: []
|
11
|
-
|
12
|
-
|
13
|
-
|
17
|
+
|
18
|
+
date: 2013-12-07 00:00:00 Z
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
14
21
|
name: bundler
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - ~>
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '1.3'
|
20
|
-
type: :development
|
21
22
|
prerelease: false
|
22
|
-
|
23
|
-
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
+
none: false
|
25
|
+
requirements:
|
24
26
|
- - ~>
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
- - '>='
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
hash: 9
|
29
|
+
segments:
|
30
|
+
- 1
|
31
|
+
- 3
|
32
|
+
version: "1.3"
|
34
33
|
type: :development
|
34
|
+
version_requirements: *id001
|
35
|
+
- !ruby/object:Gem::Dependency
|
36
|
+
name: rake
|
35
37
|
prerelease: false
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
- - ~>
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '2.13'
|
38
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
40
|
+
requirements:
|
41
|
+
- - ">="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
hash: 3
|
44
|
+
segments:
|
45
|
+
- 0
|
46
|
+
version: "0"
|
48
47
|
type: :development
|
48
|
+
version_requirements: *id002
|
49
|
+
- !ruby/object:Gem::Dependency
|
50
|
+
name: rspec
|
49
51
|
prerelease: false
|
50
|
-
|
51
|
-
|
52
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
53
|
+
none: false
|
54
|
+
requirements:
|
52
55
|
- - ~>
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
- - '>='
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
56
|
+
- !ruby/object:Gem::Version
|
57
|
+
hash: 25
|
58
|
+
segments:
|
59
|
+
- 2
|
60
|
+
- 13
|
61
|
+
version: "2.13"
|
62
62
|
type: :development
|
63
|
+
version_requirements: *id003
|
64
|
+
- !ruby/object:Gem::Dependency
|
65
|
+
name: fakefs
|
63
66
|
prerelease: false
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
- - '>='
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '0'
|
67
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
68
|
+
none: false
|
69
|
+
requirements:
|
70
|
+
- - ">="
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
hash: 3
|
73
|
+
segments:
|
74
|
+
- 0
|
75
|
+
version: "0"
|
76
76
|
type: :development
|
77
|
+
version_requirements: *id004
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
name: icalendar
|
77
80
|
prerelease: false
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
version: '0'
|
81
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
82
|
+
none: false
|
83
|
+
requirements:
|
84
|
+
- - ~>
|
85
|
+
- !ruby/object:Gem::Version
|
86
|
+
hash: 27
|
87
|
+
segments:
|
88
|
+
- 1
|
89
|
+
- 3
|
90
|
+
- 0
|
91
|
+
version: 1.3.0
|
90
92
|
type: :development
|
93
|
+
version_requirements: *id005
|
94
|
+
- !ruby/object:Gem::Dependency
|
95
|
+
name: json
|
91
96
|
prerelease: false
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
97
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
98
|
+
none: false
|
99
|
+
requirements:
|
100
|
+
- - ">="
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
hash: 3
|
103
|
+
segments:
|
104
|
+
- 0
|
105
|
+
version: "0"
|
106
|
+
type: :development
|
107
|
+
version_requirements: *id006
|
108
|
+
- !ruby/object:Gem::Dependency
|
98
109
|
name: sequel
|
99
|
-
requirement: !ruby/object:Gem::Requirement
|
100
|
-
requirements:
|
101
|
-
- - ~>
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
version: 4.0.0
|
104
|
-
type: :runtime
|
105
110
|
prerelease: false
|
106
|
-
|
107
|
-
|
111
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
112
|
+
none: false
|
113
|
+
requirements:
|
108
114
|
- - ~>
|
109
|
-
- !ruby/object:Gem::Version
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
hash: 63
|
117
|
+
segments:
|
118
|
+
- 4
|
119
|
+
- 0
|
120
|
+
- 0
|
110
121
|
version: 4.0.0
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
name: sqlite3
|
113
|
-
requirement: !ruby/object:Gem::Requirement
|
114
|
-
requirements:
|
115
|
-
- - ~>
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
version: 1.3.3
|
118
122
|
type: :runtime
|
123
|
+
version_requirements: *id007
|
124
|
+
- !ruby/object:Gem::Dependency
|
125
|
+
name: sqlite3
|
119
126
|
prerelease: false
|
120
|
-
|
121
|
-
|
127
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
128
|
+
none: false
|
129
|
+
requirements:
|
122
130
|
- - ~>
|
123
|
-
- !ruby/object:Gem::Version
|
131
|
+
- !ruby/object:Gem::Version
|
132
|
+
hash: 29
|
133
|
+
segments:
|
134
|
+
- 1
|
135
|
+
- 3
|
136
|
+
- 3
|
124
137
|
version: 1.3.3
|
125
|
-
- !ruby/object:Gem::Dependency
|
126
|
-
name: chronic
|
127
|
-
requirement: !ruby/object:Gem::Requirement
|
128
|
-
requirements:
|
129
|
-
- - ~>
|
130
|
-
- !ruby/object:Gem::Version
|
131
|
-
version: 0.9.1
|
132
138
|
type: :runtime
|
139
|
+
version_requirements: *id008
|
140
|
+
- !ruby/object:Gem::Dependency
|
141
|
+
name: chronic
|
133
142
|
prerelease: false
|
134
|
-
|
135
|
-
|
143
|
+
requirement: &id009 !ruby/object:Gem::Requirement
|
144
|
+
none: false
|
145
|
+
requirements:
|
136
146
|
- - ~>
|
137
|
-
- !ruby/object:Gem::Version
|
138
|
-
|
147
|
+
- !ruby/object:Gem::Version
|
148
|
+
hash: 51
|
149
|
+
segments:
|
150
|
+
- 0
|
151
|
+
- 10
|
152
|
+
- 2
|
153
|
+
version: 0.10.2
|
154
|
+
type: :runtime
|
155
|
+
version_requirements: *id009
|
139
156
|
description: Command line time tracker
|
140
|
-
email:
|
157
|
+
email:
|
141
158
|
- sgrock@gmail.org
|
142
|
-
executables:
|
159
|
+
executables:
|
143
160
|
- dev_t
|
144
161
|
- t
|
145
162
|
extensions: []
|
163
|
+
|
146
164
|
extra_rdoc_files: []
|
147
|
-
|
165
|
+
|
166
|
+
files:
|
148
167
|
- .gitignore
|
149
168
|
- .rspec
|
150
169
|
- .travis.yml
|
@@ -177,28 +196,37 @@ files:
|
|
177
196
|
- spec/timetrap_spec.rb
|
178
197
|
- timetrap.gemspec
|
179
198
|
homepage: https://github.com/samg/timetrap
|
180
|
-
licenses:
|
199
|
+
licenses:
|
181
200
|
- MIT
|
182
|
-
metadata: {}
|
183
201
|
post_install_message:
|
184
202
|
rdoc_options: []
|
185
|
-
|
203
|
+
|
204
|
+
require_paths:
|
186
205
|
- lib
|
187
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
206
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
207
|
+
none: false
|
208
|
+
requirements:
|
209
|
+
- - ">="
|
210
|
+
- !ruby/object:Gem::Version
|
211
|
+
hash: 3
|
212
|
+
segments:
|
213
|
+
- 0
|
214
|
+
version: "0"
|
215
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
216
|
+
none: false
|
217
|
+
requirements:
|
218
|
+
- - ">="
|
219
|
+
- !ruby/object:Gem::Version
|
220
|
+
hash: 3
|
221
|
+
segments:
|
222
|
+
- 0
|
223
|
+
version: "0"
|
197
224
|
requirements: []
|
225
|
+
|
198
226
|
rubyforge_project:
|
199
|
-
rubygems_version:
|
227
|
+
rubygems_version: 1.8.15
|
200
228
|
signing_key:
|
201
|
-
specification_version:
|
229
|
+
specification_version: 3
|
202
230
|
summary: Command line time tracker
|
203
|
-
test_files:
|
231
|
+
test_files:
|
204
232
|
- spec/timetrap_spec.rb
|
checksums.yaml
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
metadata.gz: 79ab53a429f5f42025e0f262c00d985ff01e5ceb
|
4
|
-
data.tar.gz: 1312375ff25e715b71f78bca87ec4380a5e97867
|
5
|
-
SHA512:
|
6
|
-
metadata.gz: 3e9f9c54e829c5ec5d9a6ce3d753a2c4bac35eab4227fc2c242b3df084690b9649f7ad72bfc0ddce5f078ddc6c096298e0e23c28b0978d6eb54ff84cfbee4993
|
7
|
-
data.tar.gz: 99e92a3d25285833f9dc4ede7291ed3361c767d66b58db960438b945eb12fc0640fb1ac180c9fd7ad517d36ff0cdddace1b207746953977ee4e5cb11e8f6e695
|