gwtf 0.6.0 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/gwtf/commands/remind_command.rb +3 -1
- data/lib/gwtf/item.rb +11 -3
- data/lib/gwtf/version.rb +1 -1
- metadata +8 -8
@@ -58,7 +58,9 @@ command [:remind, :rem] do |c|
|
|
58
58
|
reminder.subject = args.join(" ")
|
59
59
|
|
60
60
|
print "Creating reminder at job for item #{reminder.item_id}: "
|
61
|
-
reminder.schedule_reminer(options[:at], options[:recipient], true, true)
|
61
|
+
out = reminder.schedule_reminer(options[:at], options[:recipient], true, true)
|
62
|
+
|
63
|
+
reminder.record_work "Scheduled reminder for %s: %s" % [ options[:at], out.chomp ]
|
62
64
|
|
63
65
|
reminder.save
|
64
66
|
|
data/lib/gwtf/item.rb
CHANGED
@@ -130,7 +130,7 @@ module Gwtf
|
|
130
130
|
summary.puts " Due Date: %s" % [ colorize_by_due_date(due) ]
|
131
131
|
end
|
132
132
|
|
133
|
-
summary.puts "Time Worked: %s" % [ Gwtf.seconds_to_human(time_worked) ]
|
133
|
+
summary.puts "Time Worked: %s" % [ Gwtf.seconds_to_human(time_worked) ] if time_worked > 0
|
134
134
|
summary.puts " Created: %s" % [ Time.parse(created_at.to_s).strftime("%F %R") ]
|
135
135
|
summary.puts " Closed: %s" % [ Time.parse(closed_at.to_s).strftime("%F %R") ] if closed?
|
136
136
|
summary.puts " ID: %s" % [ item_id ]
|
@@ -153,7 +153,11 @@ module Gwtf
|
|
153
153
|
summary.puts "Work Log: " if idx == 0
|
154
154
|
|
155
155
|
# we used to automatically embed this into the description which was dumb
|
156
|
-
|
156
|
+
if log["elapsed"] > 0
|
157
|
+
elapsed = "(%s)" % [Gwtf.seconds_to_human(log["elapsed"])] unless log["text"] =~ /\(.+?\)$/
|
158
|
+
else
|
159
|
+
elapsed = ""
|
160
|
+
end
|
157
161
|
|
158
162
|
summary.puts "%27s %s %s" % [Time.parse(log["time"]).strftime("%F %R"), log["text"], elapsed]
|
159
163
|
end
|
@@ -187,7 +191,11 @@ module Gwtf
|
|
187
191
|
command_args << "--done" if done
|
188
192
|
command_args << "--ifopen" if ifopen
|
189
193
|
|
190
|
-
|
194
|
+
command = "echo gwtf --project='%s' remind %s %s | at %s 2>&1" % [ @project, command_args.join(" "), item_id, timespec]
|
195
|
+
out = %x[#{command}]
|
196
|
+
|
197
|
+
puts out
|
198
|
+
out
|
191
199
|
end
|
192
200
|
|
193
201
|
def send_reminder(recipient, mark_as_done, klass)
|
data/lib/gwtf/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gwtf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 5
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 6
|
9
|
-
-
|
10
|
-
version: 0.6.
|
9
|
+
- 1
|
10
|
+
version: 0.6.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- R.I.Pienaar
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-04-
|
18
|
+
date: 2012-04-10 00:00:00 +01:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -68,12 +68,12 @@ dependencies:
|
|
68
68
|
requirements:
|
69
69
|
- - ~>
|
70
70
|
- !ruby/object:Gem::Version
|
71
|
-
hash:
|
71
|
+
hash: 15
|
72
72
|
segments:
|
73
73
|
- 1
|
74
|
-
-
|
75
|
-
-
|
76
|
-
version: 1.
|
74
|
+
- 6
|
75
|
+
- 0
|
76
|
+
version: 1.6.0
|
77
77
|
type: :runtime
|
78
78
|
version_requirements: *id004
|
79
79
|
- !ruby/object:Gem::Dependency
|