rubdo 0.2.1 → 0.2.2
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/bin/rubdo +5 -1
- data/lib/rubdo/cli.rb +1 -1
- data/lib/rubdo/item.rb +1 -1
- data/lib/rubdo/list.rb +5 -1
- data/lib/rubdo/version.rb +1 -1
- metadata +2 -2
data/bin/rubdo
CHANGED
@@ -6,4 +6,8 @@ require 'abbrev'
|
|
6
6
|
cli = Rubdo::CLI.new
|
7
7
|
methods = Rubdo::CLI.public_instance_methods(false).map(&:to_s).abbrev
|
8
8
|
cli.list if ARGV[0].nil?
|
9
|
-
|
9
|
+
begin
|
10
|
+
cli.send methods[ARGV[0]] unless ARGV[0].nil?
|
11
|
+
rescue
|
12
|
+
puts "cowardly refuses"
|
13
|
+
end
|
data/lib/rubdo/cli.rb
CHANGED
@@ -29,7 +29,7 @@ module Rubdo
|
|
29
29
|
end
|
30
30
|
|
31
31
|
def list
|
32
|
-
@list.
|
32
|
+
@list.to_s.each_with_index { |item, index| puts "#{index + 1}: #{item.description}" }
|
33
33
|
puts "no tasks" if @list.items.empty?
|
34
34
|
end
|
35
35
|
|
data/lib/rubdo/item.rb
CHANGED
data/lib/rubdo/list.rb
CHANGED
@@ -4,7 +4,7 @@ require 'fileutils'
|
|
4
4
|
|
5
5
|
module Rubdo
|
6
6
|
class List
|
7
|
-
attr_reader :items, :completed, :storage
|
7
|
+
attr_reader :items, :completed, :storage
|
8
8
|
|
9
9
|
def initialize
|
10
10
|
@storage = File.expand_path('~/.tasks/Todo.yml')
|
@@ -30,6 +30,10 @@ module Rubdo
|
|
30
30
|
@items.delete_at id
|
31
31
|
end
|
32
32
|
|
33
|
+
def to_s
|
34
|
+
return @items
|
35
|
+
end
|
36
|
+
|
33
37
|
alias_method :<<, :add
|
34
38
|
end
|
35
39
|
end
|
data/lib/rubdo/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubdo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-10-
|
12
|
+
date: 2012-10-29 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: A quick and dirty todo application
|
15
15
|
email:
|