rubdo 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
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
- cli.send methods[ARGV[0]] unless ARGV[0].nil?
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.items.each_with_index { |item, index| puts "#{index + 1}: #{item.description}" }
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
@@ -8,7 +8,7 @@ module Rubdo
8
8
  end
9
9
 
10
10
  def to_s
11
- description
11
+ self.description
12
12
  end
13
13
  end
14
14
  end
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, :archive
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
@@ -1,3 +1,3 @@
1
1
  module Rubdo
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
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.1
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-08 00:00:00.000000000 Z
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: