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 +7 -0
- data/lib/gwtf/commands/done_command.rb +1 -1
- data/lib/gwtf/commands/edit_command.rb +2 -2
- data/lib/gwtf/commands/new_command.rb +1 -1
- data/lib/gwtf/commands/open_command.rb +1 -1
- data/lib/gwtf/items.rb +1 -1
- data/lib/gwtf/version.rb +1 -1
- metadata +4 -4
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)
|
@@ -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
|
data/lib/gwtf/items.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: 7
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 4
|
9
|
-
-
|
10
|
-
version: 0.4.
|
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-
|
18
|
+
date: 2012-04-04 00:00:00 +01:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|