gwtf 0.6.0 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -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
 
@@ -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
- elapsed = "(%s)" % [Gwtf.seconds_to_human(log["elapsed"])] unless log["text"] =~ /\(.+?\)$/
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
- system "echo gwtf --project='%s' remind %s %s | at %s" % [ @project, command_args.join(" "), item_id, timespec]
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)
@@ -1,3 +1,3 @@
1
1
  module Gwtf
2
- VERSION = '0.6.0'
2
+ VERSION = '0.6.1'
3
3
  end
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: 7
4
+ hash: 5
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 6
9
- - 0
10
- version: 0.6.0
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-09 00:00:00 +01:00
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: 1
71
+ hash: 15
72
72
  segments:
73
73
  - 1
74
- - 5
75
- - 1
76
- version: 1.5.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