tod-gem 0.2.2 → 0.2.3

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 (5) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +8 -6
  3. data/bin/tod +6 -0
  4. data/tod-gem.gemspec +1 -1
  5. metadata +7 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f26b23a399d5d6482d6e59d7b7e995bc4daa088d
4
- data.tar.gz: 3f8d2f218fc7e1a2fda110ac5439085197ea1ae9
3
+ metadata.gz: 50777090119b892a430934c44ef957474f68cbf1
4
+ data.tar.gz: 650f285eefcf5fc8a2f58469bc1322bafa13fc81
5
5
  SHA512:
6
- metadata.gz: 69bf6a59c21818402fc8aa2e32128578dec1249c055ea8cc72b054bee4fa0a25f370b4134057f40ef4d8f3312e594c155eafb66afdaefb3b1281a08065d3e12f
7
- data.tar.gz: 801cc8cadf3bbdcc0578ff4b200d301f7b2fb11706b493c2b949e7d6ecbd46de851f6527fec32b06b744a9060596881167bc015a83667a7a78c7743a72df412c
6
+ metadata.gz: d89c16f5deed84cab071559473b89df66957d9b663e3e65c95c8198e59012cd348555299e3e0c9d6fb19aa2d12c3aee330bd192065156929fce3019e5039ad0d
7
+ data.tar.gz: 30fcaecf0a23c5107b588ed92d8cdb4dcd515158133286612ae42eb2387f76086f939303e299c3afb282f6beb4fa687c1e17918d483ecc098f79c1a2fa87ff86
data/README.md CHANGED
@@ -17,21 +17,23 @@ Installation
17
17
 
18
18
  Usage
19
19
  -----
20
- * Simply running `tod` will list current pending todos in current directory.
20
+ * Simply running `tod` will list current pending todos
21
21
 
22
22
  * `tod add 'buy a new pen'` creates a new todo named 'buy a new pen'.
23
23
 
24
24
  * `tod done 'buy a new'` finds the first todo containing the provided string in its name and marks it as done.
25
25
 
26
- * `tod all` lists all todos in current directory - including marked as done.
26
+ * `tod all` lists all todos - including marked as done.
27
27
 
28
- * `tod finished` lists only marked as done todos in current directory.
28
+ * `tod finished` lists only marked as done todos
29
29
 
30
- * `tod clear` permanently deletes todos marked as done from the register of current directory.
30
+ * `tod clear` permanently deletes todos marked as done from the register
31
31
 
32
- * `tod local` creates a '.todfile' in your current directory. Useful when you don't want to use a shared .todfile in a parent dir.
32
+ * `tod purge` permanently deletes pending as well as done todos from the register
33
33
 
34
- The todo register is kept in the file named `.todfile` once you create at least one todo in given directory. This way you can add the file to a git or svn repository and distribute it between machines.
34
+ * `tod local` creates a '.todfile' in your current directory (instead of using a global one). Useful when you don't want to use a shared .todfile in a parent dir.
35
+
36
+ The todo register is kept in the file named `.todfile` once you create at least one todo. This way you can add the file to a git or svn repository and distribute it between machines.
35
37
 
36
38
  *Note* by default, the `.todfile` will be created in your home dir, unless you run `tod local` to force the creation of the file in your current directory.
37
39
 
data/bin/tod CHANGED
@@ -70,6 +70,10 @@ def clear_done
70
70
  end
71
71
  end
72
72
 
73
+ def purge
74
+ File.open(@todfile_path, "w") {} if @todfile_exists
75
+ end
76
+
73
77
  def replace_todfile_with(lines)
74
78
  File.open(@todfile_path, 'w') do |todfile|
75
79
  lines.each { |line| todfile.puts line }
@@ -99,6 +103,8 @@ when 'done'
99
103
  done @query
100
104
  when 'clear'
101
105
  clear_done
106
+ when 'purge'
107
+ purge
102
108
  when 'local'
103
109
  touch_todfile('.')
104
110
  end
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'tod-gem'
3
- s.version = '0.2.2'
3
+ s.version = '0.2.3'
4
4
  s.summary = 'Simple command line todo manager'
5
5
  s.authors = ['Michal Siwek', 'Carl Furrow']
6
6
  s.email = 'mike21@aol.pl'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tod-gem
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michal Siwek
@@ -9,20 +9,20 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-12-15 00:00:00.000000000 Z
12
+ date: 2014-03-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: colorize
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - ">="
18
+ - - '>='
19
19
  - !ruby/object:Gem::Version
20
20
  version: '0'
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - ">="
25
+ - - '>='
26
26
  - !ruby/object:Gem::Version
27
27
  version: '0'
28
28
  description:
@@ -45,17 +45,17 @@ require_paths:
45
45
  - lib
46
46
  required_ruby_version: !ruby/object:Gem::Requirement
47
47
  requirements:
48
- - - ">="
48
+ - - '>='
49
49
  - !ruby/object:Gem::Version
50
50
  version: '0'
51
51
  required_rubygems_version: !ruby/object:Gem::Requirement
52
52
  requirements:
53
- - - ">="
53
+ - - '>='
54
54
  - !ruby/object:Gem::Version
55
55
  version: '0'
56
56
  requirements: []
57
57
  rubyforge_project:
58
- rubygems_version: 2.1.10
58
+ rubygems_version: 2.0.3
59
59
  signing_key:
60
60
  specification_version: 4
61
61
  summary: Simple command line todo manager