todo.rb 0.0.4 → 0.0.5

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.
Files changed (4) hide show
  1. data/bin/todo.rb +9 -5
  2. data/lib/todo.rb.rb +1 -1
  3. data/todo.rb.gemspec +2 -2
  4. metadata +5 -5
data/bin/todo.rb CHANGED
@@ -9,9 +9,13 @@ if ARGV[0] == '-C'
9
9
  elsif ARGV[0] == '--html'
10
10
  opts[:formatter] = :html
11
11
  ARGV.shift
12
+ elsif ARGV[0] == '-v'
13
+ require 'todo.rb/version'
14
+ puts TodoRb::VERSION
15
+ exit
12
16
  end
13
17
 
14
- t = Todo.new opts
18
+ t = TodoRb.new opts
15
19
 
16
20
  args = ARGV.dup
17
21
 
@@ -26,15 +30,15 @@ has_args = !args.empty?
26
30
  tag = command && command[/^(@|\+)\S+$/,0]
27
31
 
28
32
  if tag && has_args
29
- t.ed_command!('a', [Todo.expand_tag(tag)] + args)
33
+ t.ed_command!('a', [TodoRb.expand_tag(tag)] + args)
30
34
  elsif tag
31
- t.filter Todo.expand_tag(tag)
35
+ t.filter TodoRb.expand_tag(tag)
32
36
  elsif command == 'done' && args[0] =~ /^(@|\+)/
33
- t.filter_done_file Todo.expand_tag(args[0])
37
+ t.filter_done_file TodoRb.expand_tag(args[0])
34
38
  elsif command == 'done'
35
39
  t.filter_done_file nil
36
40
  elsif command == 'all'
37
- t.list_all Todo.expand_tag(args[0])
41
+ t.list_all TodoRb.expand_tag(args[0])
38
42
  elsif command == 'do'
39
43
  t.mark_done! args[0]
40
44
  elsif command == 'undo'
data/lib/todo.rb.rb CHANGED
@@ -2,7 +2,7 @@
2
2
  COLORIZER = File.join(File.dirname(__FILE__), 'colorizer.rb')
3
3
  HTML = File.join(File.dirname(__FILE__), 'html.rb')
4
4
 
5
- class Todo
5
+ class TodoRb
6
6
 
7
7
  attr_accessor :todo_file, :done_file, :backup_file, :formatter
8
8
 
data/todo.rb.gemspec CHANGED
@@ -1,11 +1,11 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
- require 'todo'
4
+ require 'todo.rb/version'
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "todo.rb"
8
- s.version = "0.0.4"
8
+ s.version = TodoRb::VERSION
9
9
  s.platform = Gem::Platform::RUBY
10
10
  s.required_ruby_version = '>= 1.9.0'
11
11
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: todo.rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-01-30 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: highline
16
- requirement: &70200402466340 !ruby/object:Gem::Requirement
16
+ requirement: &70276018514320 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 1.6.11
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70200402466340
24
+ version_requirements: *70276018514320
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: color-tools
27
- requirement: &70200402464160 !ruby/object:Gem::Requirement
27
+ requirement: &70276018513700 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: '1.3'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70200402464160
35
+ version_requirements: *70276018513700
36
36
  description: Finger GitHub users
37
37
  email:
38
38
  - dhchoi@gmail.com