rudo 0.0.9 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/dun +1 -7
- data/lib/rudo.rb +2 -3
- metadata +3 -3
data/bin/dun
CHANGED
@@ -7,12 +7,6 @@ options = Trollop::options do
|
|
7
7
|
opt :color, "Print with colors", :default => true
|
8
8
|
end
|
9
9
|
|
10
|
-
begin
|
11
|
-
selection = Integer(ARGV[0]) - 1
|
12
|
-
rescue
|
13
|
-
selection = 0
|
14
|
-
end
|
15
|
-
|
16
10
|
r = Rudo.new(options)
|
17
|
-
r.remove(
|
11
|
+
r.remove(ARGV[0])
|
18
12
|
r.print(options)
|
data/lib/rudo.rb
CHANGED
@@ -29,13 +29,12 @@ class Rudo
|
|
29
29
|
write_tasks
|
30
30
|
end
|
31
31
|
|
32
|
-
def remove(position=
|
33
|
-
position ||= 0
|
32
|
+
def remove(position=1)
|
34
33
|
if position.is_a?(String) && position.match(/^(\d+)x/)
|
35
34
|
count = Integer($1)
|
36
35
|
count.times { @tasks.shift }
|
37
36
|
else
|
38
|
-
@tasks.delete_at(
|
37
|
+
@tasks.delete_at(position.to_i - 1)
|
39
38
|
end
|
40
39
|
write_tasks
|
41
40
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rudo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 11
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 10
|
10
|
+
version: 0.0.10
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Robert Fletcher
|