posto 0.3.5 → 0.4.0.SNAPSHOT
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/posto/application.rb +5 -2
- data/lib/posto/file.rb +1 -6
- data/lib/posto/list.rb +4 -0
- data/test/list_test.rb +5 -0
- metadata +20 -23
data/lib/posto/application.rb
CHANGED
@@ -43,16 +43,19 @@ module Posto
|
|
43
43
|
|
44
44
|
def start(todo)
|
45
45
|
add(todo)
|
46
|
-
@file.commit_alone("
|
46
|
+
@file.commit_alone("scheduled '#{todo}'")
|
47
47
|
end
|
48
48
|
alias :schedule :start
|
49
49
|
|
50
50
|
def commit(n = 1)
|
51
|
-
@file.commit("
|
51
|
+
@file.commit("#{done(n)}")
|
52
52
|
end
|
53
53
|
|
54
54
|
def oops
|
55
|
+
add(`git log -1 --pretty=%B`.strip)
|
56
|
+
@file.write @todos = @list_utility.do_bottom(todos)
|
55
57
|
@file.oops
|
58
|
+
@list_utility.lookup(todos, 1)
|
56
59
|
end
|
57
60
|
|
58
61
|
def init
|
data/lib/posto/file.rb
CHANGED
@@ -20,12 +20,7 @@ module Posto
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def oops
|
23
|
-
|
24
|
-
if /^\[posto\]/ =~ commit_msg
|
25
|
-
`git reset --soft HEAD^`
|
26
|
-
else
|
27
|
-
"last commit was not made by posto: #{commit_msg}"
|
28
|
-
end
|
23
|
+
`git reset --soft HEAD^`
|
29
24
|
end
|
30
25
|
|
31
26
|
def touch
|
data/lib/posto/list.rb
CHANGED
data/test/list_test.rb
CHANGED
@@ -67,4 +67,9 @@ class ListTest < MiniTest::Unit::TestCase
|
|
67
67
|
assert_equal(["1. this is another", "2. this is one", "* card molly"],
|
68
68
|
Posto::List.top(["1. this is one", "2. this is another", "* card molly"], 2))
|
69
69
|
end
|
70
|
+
|
71
|
+
def test_do_bottom
|
72
|
+
assert_equal(["1. jingle bells", "2. this is one", "3. this is another", "* card molly"],
|
73
|
+
Posto::List.do_bottom(["1. this is one", "2. this is another", "* card molly", "* jingle bells"]))
|
74
|
+
end
|
70
75
|
end
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: posto
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.4.0.SNAPSHOT
|
5
|
+
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Matt J Raibert
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-12-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
@@ -134,23 +134,23 @@ files:
|
|
134
134
|
- README.md
|
135
135
|
- LICENSE.txt
|
136
136
|
- bin/posto
|
137
|
-
- lib/posto
|
138
|
-
- lib/posto/application.rb
|
139
|
-
- lib/posto/list.rb
|
137
|
+
- lib/posto.rb
|
140
138
|
- lib/posto/help.rb
|
141
|
-
- lib/posto/
|
139
|
+
- lib/posto/monkeypatch_array.rb
|
142
140
|
- lib/posto/file.rb
|
141
|
+
- lib/posto/todo.rb
|
142
|
+
- lib/posto/application.rb
|
143
|
+
- lib/posto/human_comparison.rb
|
143
144
|
- lib/posto/help.md
|
145
|
+
- lib/posto/list.rb
|
144
146
|
- lib/posto/arguments.rb
|
145
|
-
-
|
146
|
-
-
|
147
|
-
- test/list_test.rb
|
148
|
-
- test/arguments_test.rb
|
147
|
+
- test/monkeypatch_array_test.rb
|
148
|
+
- test/help_test.rb
|
149
149
|
- test/test_helper.rb
|
150
|
+
- test/arguments_test.rb
|
150
151
|
- test/application_test.rb
|
151
|
-
- test/
|
152
|
+
- test/list_test.rb
|
152
153
|
- test/todo_test.rb
|
153
|
-
- test/help_test.rb
|
154
154
|
homepage: http://github.com/mattraibert/posto
|
155
155
|
licenses:
|
156
156
|
- GPLv3
|
@@ -166,16 +166,13 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
166
166
|
version: '0'
|
167
167
|
segments:
|
168
168
|
- 0
|
169
|
-
hash:
|
169
|
+
hash: 2193702014575093908
|
170
170
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
171
171
|
none: false
|
172
172
|
requirements:
|
173
|
-
- - ! '
|
173
|
+
- - ! '>'
|
174
174
|
- !ruby/object:Gem::Version
|
175
|
-
version:
|
176
|
-
segments:
|
177
|
-
- 0
|
178
|
-
hash: -1910736030221862158
|
175
|
+
version: 1.3.1
|
179
176
|
requirements: []
|
180
177
|
rubyforge_project:
|
181
178
|
rubygems_version: 1.8.24
|
@@ -183,10 +180,10 @@ signing_key:
|
|
183
180
|
specification_version: 3
|
184
181
|
summary: CLI to sort your todo list.
|
185
182
|
test_files:
|
186
|
-
- test/
|
187
|
-
- test/
|
183
|
+
- test/monkeypatch_array_test.rb
|
184
|
+
- test/help_test.rb
|
188
185
|
- test/test_helper.rb
|
186
|
+
- test/arguments_test.rb
|
189
187
|
- test/application_test.rb
|
190
|
-
- test/
|
188
|
+
- test/list_test.rb
|
191
189
|
- test/todo_test.rb
|
192
|
-
- test/help_test.rb
|