pomo 0.3.1 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
data/History.md CHANGED
@@ -1,4 +1,10 @@
1
1
 
2
+ 0.4.0 / 2009-11-23
3
+ ==================
4
+
5
+ * Added `pomo edit` [thanks noonat]
6
+ * Added `pomo incomplete` [thanks noonat]
7
+
2
8
  0.3.1 / 2009-11-23
3
9
  ==================
4
10
 
data/bin/pomo CHANGED
@@ -103,6 +103,27 @@ command :add do |c|
103
103
  end
104
104
  end
105
105
 
106
+ command :edit do |c|
107
+ c.syntax = 'pomo edit [task ...] [options]'
108
+ c.summary = 'Edit tasks'
109
+ c.description = 'Edit the given task(s) or the first task'
110
+ c.example 'Changes the description for the first task', 'pomo edit first -d "fix IE styling issues"'
111
+ c.example 'Changes the description and length for the third task', 'pomo edit 3 -d "fix IE styling issues" -l 60'
112
+ c.example 'Changes the length of several tasks', 'pomo edit 1..5 -l 10'
113
+ c.option '-n', '--name string', 'Change the task name'
114
+ c.option '-d', '--description string', 'Change the task description'
115
+ c.option '-l', '--length minutes', Integer, 'Change the task length'
116
+ c.action do |args, options|
117
+ list.find(*args) do |task, i|
118
+ options.__hash__.each do |key, value|
119
+ task.send :"#{key}=", value
120
+ end
121
+ say " - Updated #{task}"
122
+ end
123
+ list.save
124
+ end
125
+ end
126
+
106
127
  command :break do |c|
107
128
  c.syntax = 'pomo break [length] [options]'
108
129
  c.summary = 'Take a break'
@@ -120,8 +141,8 @@ end
120
141
 
121
142
  command :remove do |c|
122
143
  c.syntax = 'pomo [remove|rm] [task ...] [options]'
123
- c.summary = 'Remove a task'
124
- c.description = 'Remove a task, given the task(s) or the first task'
144
+ c.summary = 'Remove tasks'
145
+ c.description = 'Remove task(s) or the first task'
125
146
  c.example 'Remove the first task', 'pomo remove first'
126
147
  c.example 'Remove the last task', 'pomo remove last'
127
148
  c.example 'Remove the fifth task', 'pomo remove 5'
@@ -142,7 +163,7 @@ alias_command :clear, :remove, 'all'
142
163
 
143
164
  command :view do |c|
144
165
  c.syntax = 'pomo view [task ...] [options]'
145
- c.summary = 'View a task'
166
+ c.summary = 'View verbose task information'
146
167
  c.description = 'View verbose information for the given task(s) or the first task'
147
168
  c.example 'View the first task', 'pomo view first'
148
169
  c.example 'View the last task', 'pomo view last'
@@ -166,7 +187,7 @@ end
166
187
 
167
188
  command :complete do |c|
168
189
  c.syntax = 'pomo complete [task ...] [options]'
169
- c.summary = 'Mark a task as completed'
190
+ c.summary = 'Mark tasks as completed'
170
191
  c.description = 'Mark the given task(s) or the first task to complete'
171
192
  c.example 'Mark first task as complete', 'pomo complete first'
172
193
  c.example 'Mark last task as complete', 'pomo complete last'
@@ -180,6 +201,22 @@ command :complete do |c|
180
201
  end
181
202
  end
182
203
 
204
+ command :incomplete do |c|
205
+ c.syntax = 'pomo incomplete [task ...] [options]'
206
+ c.summary = 'Mark tasks as incompleted'
207
+ c.description = 'Mark the given task(s) or the first task as not completed'
208
+ c.example 'Mark first task as not completed', 'pomo incomplete first'
209
+ c.example 'Mark last task as not completed', 'pomo incomplete last'
210
+ c.example 'Mark fifth task as not completed', 'pomo incomplete 5'
211
+ c.action do |args, options|
212
+ list.find(*args) do |task, i|
213
+ task.complete = false
214
+ say " - #{task} marked incomplete"
215
+ end
216
+ list.save
217
+ end
218
+ end
219
+
183
220
  command :list do |c|
184
221
  c.syntax = 'pomo list [options]'
185
222
  c.description = 'List all tasks'
@@ -198,4 +235,3 @@ command :list do |c|
198
235
  end
199
236
  end
200
237
 
201
-
data/lib/pomo/task.rb CHANGED
@@ -11,17 +11,17 @@ module Pomo
11
11
  ##
12
12
  # Task name.
13
13
 
14
- attr_reader :name
14
+ attr_accessor :name
15
15
 
16
16
  ##
17
17
  # Length in minutes.
18
18
 
19
- attr_reader :length
19
+ attr_accessor :length
20
20
 
21
21
  ##
22
22
  # Verbose task description.
23
23
 
24
- attr_reader :description
24
+ attr_accessor :description
25
25
 
26
26
  ##
27
27
  # Task completion bool.
data/lib/pomo/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
 
2
2
  module Pomo
3
- VERSION = '0.3.1'
3
+ VERSION = '0.4.0'
4
4
  end
data/pomo.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{pomo}
5
- s.version = "0.3.1"
5
+ s.version = "0.4.0"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["TJ Holowaychuk"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pomo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - TJ Holowaychuk