tod-gem 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/bin/tod +6 -1
  3. data/tod-gem.gemspec +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: efb1e220bf30b78e97fa7d885beee28dd3276d5c
4
- data.tar.gz: d009b05dc2942296479f09f28f18e700c520bad5
3
+ metadata.gz: f26b23a399d5d6482d6e59d7b7e995bc4daa088d
4
+ data.tar.gz: 3f8d2f218fc7e1a2fda110ac5439085197ea1ae9
5
5
  SHA512:
6
- metadata.gz: 154f49571c3f77247ae6bbbf049787efce92cb15eb02b8efb499f49efd568e08b6799f740145656a2319c4f5a07d1839f10e2420b27e743312b59a7cf71cde1c
7
- data.tar.gz: 65c34b2ffc1301f6ec03e48fa13e4a70bdba36541bb27b87d9cc2a81b02739e8f92d03ffebe78b91de89360114eab233fccdff05daa4151bfea231d06a4a138e
6
+ metadata.gz: 69bf6a59c21818402fc8aa2e32128578dec1249c055ea8cc72b054bee4fa0a25f370b4134057f40ef4d8f3312e594c155eafb66afdaefb3b1281a08065d3e12f
7
+ data.tar.gz: 801cc8cadf3bbdcc0578ff4b200d301f7b2fb11706b493c2b949e7d6ecbd46de851f6527fec32b06b744a9060596881167bc015a83667a7a78c7743a72df412c
data/bin/tod CHANGED
@@ -8,11 +8,14 @@ def find_todfile(path)
8
8
  end
9
9
 
10
10
  def list(kind = 'left')
11
+ @taskcount = 0
12
+
11
13
  if @todfile_exists
12
14
  File.open(@todfile_path).each_line do |line|
13
15
  unless kind == 'done'
14
16
  if line.chars.first == '-'
15
17
  puts '*'.yellow + line.reverse.chop.reverse
18
+ @taskcount += 1
16
19
  end
17
20
  end
18
21
 
@@ -25,7 +28,9 @@ def list(kind = 'left')
25
28
  end
26
29
  end
27
30
  end
28
- else
31
+ end
32
+
33
+ unless @taskcount > 0
29
34
  puts 'Nothing to do here.'
30
35
  puts '`tod add "name"` to create new todo.'
31
36
  end
data/tod-gem.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'tod-gem'
3
- s.version = '0.2.1'
3
+ s.version = '0.2.2'
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.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michal Siwek