gwtf 0.4.3 → 0.4.4

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/bin/gwtf CHANGED
@@ -40,7 +40,14 @@ Gwtf.each_command do |command|
40
40
  load command
41
41
  end
42
42
 
43
+ def setup_default(data_dir)
44
+ project_dir = File.join(data_dir, "default")
45
+ Gwtf::Items.setup(project_dir) unless File.directory?(project_dir)
46
+ end
47
+
43
48
  pre do |global,command,options,args|
49
+ setup_default(global[:data])
50
+
44
51
  project_dir = File.join(global[:data], global[:project])
45
52
 
46
53
  unless File.directory?(project_dir)
@@ -8,6 +8,6 @@ command [:done, :d] do |c|
8
8
  item.close
9
9
  item.save
10
10
 
11
- puts item
11
+ puts item.to_s
12
12
  end
13
13
  end
@@ -39,7 +39,7 @@ command [:edit, :vi, :e] do |c|
39
39
 
40
40
  item.save
41
41
 
42
- puts item
42
+ puts item.to_s
43
43
  else
44
44
  editor = args[1..-1].join(" ")
45
45
  delim = editor[0,1]
@@ -49,7 +49,7 @@ command [:edit, :vi, :e] do |c|
49
49
 
50
50
  item.subject = item.subject.gsub(splits[1], splits[2])
51
51
  item.save
52
- puts item
52
+ puts item.to_s
53
53
  end
54
54
  end
55
55
  end
@@ -53,6 +53,6 @@ command [:new, :add, :n, :a, :c] do |c|
53
53
  item.schedule_reminer(options[:remind], options[:recipient], options[:done], options[:ifopen])
54
54
  end
55
55
 
56
- puts item
56
+ puts item.to_s
57
57
  end
58
58
  end
@@ -11,6 +11,6 @@ command [:open, :o] do |c|
11
11
  item.open
12
12
  item.save
13
13
 
14
- puts item
14
+ puts item.to_s
15
15
  end
16
16
  end
@@ -100,7 +100,7 @@ module Gwtf
100
100
  each_item do |item|
101
101
  count[ item[:status] ] += 1
102
102
 
103
- items.puts item if (all || item.open?)
103
+ items.puts item.to_s if (all || item.open?)
104
104
  end
105
105
 
106
106
  count["total"] = count["open"] + count["closed"]
@@ -1,3 +1,3 @@
1
1
  module Gwtf
2
- VERSION = '0.4.3'
2
+ VERSION = '0.4.4'
3
3
  end
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: 9
4
+ hash: 7
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
- - 3
10
- version: 0.4.3
9
+ - 4
10
+ version: 0.4.4
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-03 00:00:00 +01:00
18
+ date: 2012-04-04 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency