intent 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/intent/todo/manager.rb +16 -4
- data/lib/intent/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ce0b88fd80778617997ce2f5fad117a7446684a8
|
4
|
+
data.tar.gz: 51d22691339272b86187ae85938bcf94fb129291
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3831a0bac8af5cf9eab8e23eb293381067609d5838c5267760525fb6d7f281fb8f9ac8045df7fa090d98872c471e3c259bd97d174549987ffc2e2c2cdf493419
|
7
|
+
data.tar.gz: 4ef8977e5606a1795e5165b81db9d61a8354bc309b4affa07fdbe845fbe0a26773c6f821fdf642084c1cea9b854439d168b221284ea7172d7900b917c7a6df91
|
data/lib/intent/todo/manager.rb
CHANGED
@@ -1,12 +1,23 @@
|
|
1
1
|
module Intent
|
2
2
|
module Todo
|
3
|
+
Task = ::Todo::Task
|
4
|
+
List = ::Todo::List
|
5
|
+
Syntax = ::Todo::Syntax
|
6
|
+
|
3
7
|
class Manager
|
8
|
+
include Syntax
|
9
|
+
|
4
10
|
def self.run(args)
|
5
11
|
if args.empty?
|
6
12
|
print_help
|
7
13
|
else
|
8
|
-
list =
|
14
|
+
list = List.new(ENV['TODO_TXT'])
|
9
15
|
case args.first.to_sym
|
16
|
+
when :add
|
17
|
+
print "add task: $ "
|
18
|
+
input = STDIN.readline.chop
|
19
|
+
list.unshift(Task.new("#{Date.today} #{input}")) if input
|
20
|
+
list.save!
|
10
21
|
when :list
|
11
22
|
filtered_list = list.by_not_done
|
12
23
|
|
@@ -80,9 +91,10 @@ module Intent
|
|
80
91
|
puts
|
81
92
|
puts "A set of tasks for managing a plain text todo list."
|
82
93
|
puts
|
83
|
-
puts "todo list
|
84
|
-
puts "todo
|
85
|
-
puts "todo
|
94
|
+
puts "todo list - list all items in the list"
|
95
|
+
puts "todo add - add a new task to the list"
|
96
|
+
puts "todo focus - find focus by randomly selecting a task"
|
97
|
+
puts "todo archive - archive completed tasks in the nearest `done.txt`"
|
86
98
|
end
|
87
99
|
end
|
88
100
|
end
|
data/lib/intent/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: intent
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark Rickerby
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-04-
|
11
|
+
date: 2016-04-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: todo-txt
|