gwtf 0.4.5 → 0.5.0
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/lib/gwtf/commands/list_command.rb +18 -2
- data/lib/gwtf/item.rb +8 -0
- data/lib/gwtf/version.rb +1 -1
- metadata +4 -4
@@ -12,6 +12,10 @@ command [:list, :ls, :l] do |c|
|
|
12
12
|
c.default_value false
|
13
13
|
c.switch [:overview, :o]
|
14
14
|
|
15
|
+
c.desc 'Show due and overdue items for all projects'
|
16
|
+
c.default_value false
|
17
|
+
c.switch [:due]
|
18
|
+
|
15
19
|
c.action do |global_options,options,args|
|
16
20
|
if options[:summary]
|
17
21
|
projects = Gwtf.projects(global_options[:data])
|
@@ -37,15 +41,27 @@ command [:list, :ls, :l] do |c|
|
|
37
41
|
end
|
38
42
|
puts
|
39
43
|
|
44
|
+
elsif options[:due]
|
45
|
+
Gwtf.projects(global_options[:data]).each do |project|
|
46
|
+
items = Gwtf::Items.new(File.join(global_options[:data], project), project)
|
47
|
+
|
48
|
+
items.each_item do |item|
|
49
|
+
puts "%s: %s" % [ project, item.to_s ] if item.due?
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
40
53
|
elsif options[:overview]
|
41
54
|
Gwtf.projects(global_options[:data]).each do |project|
|
42
55
|
items = Gwtf::Items.new(File.join(global_options[:data], project), project)
|
43
56
|
|
44
57
|
if items.item_ids.size > 0
|
45
|
-
text = items.list_text(options[:all], true)
|
46
|
-
|
58
|
+
if text = items.list_text(options[:all], true)
|
59
|
+
puts text
|
60
|
+
puts
|
61
|
+
end
|
47
62
|
end
|
48
63
|
end
|
64
|
+
|
49
65
|
else
|
50
66
|
puts
|
51
67
|
puts @items.list_text(options[:all])
|
data/lib/gwtf/item.rb
CHANGED
data/lib/gwtf/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gwtf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 11
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
- 4
|
9
8
|
- 5
|
10
|
-
|
9
|
+
- 0
|
10
|
+
version: 0.5.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- R.I.Pienaar
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-04-
|
18
|
+
date: 2012-04-08 00:00:00 +01:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|