pomo 0.3.1 → 0.4.0
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/History.md +6 -0
- data/bin/pomo +41 -5
- data/lib/pomo/task.rb +3 -3
- data/lib/pomo/version.rb +1 -1
- data/pomo.gemspec +1 -1
- metadata +1 -1
data/History.md
CHANGED
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
|
124
|
-
c.description = 'Remove
|
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
|
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
|
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
|
-
|
14
|
+
attr_accessor :name
|
15
15
|
|
16
16
|
##
|
17
17
|
# Length in minutes.
|
18
18
|
|
19
|
-
|
19
|
+
attr_accessor :length
|
20
20
|
|
21
21
|
##
|
22
22
|
# Verbose task description.
|
23
23
|
|
24
|
-
|
24
|
+
attr_accessor :description
|
25
25
|
|
26
26
|
##
|
27
27
|
# Task completion bool.
|
data/lib/pomo/version.rb
CHANGED
data/pomo.gemspec
CHANGED