falsework 0.2.7 → 0.2.8
Sign up to get free protection for your applications and to get access to all the features.
- data/doc/NEWS.rdoc +6 -0
- data/doc/TODO.rdoc +3 -5
- data/lib/falsework/meta.rb +1 -1
- data/lib/falsework/templates/naive/lib/%%@project%%/trestle.rb.erb +5 -5
- data/lib/falsework/templates/naive/test/helper_trestle.rb.erb +2 -2
- data/lib/falsework/templates/naive/test/rake_git.rb.erb +1 -1
- data/lib/falsework/trestle.rb +4 -4
- data/test/helper_trestle.rb +1 -1
- metadata +3 -3
data/doc/NEWS.rdoc
CHANGED
data/doc/TODO.rdoc
CHANGED
@@ -1,9 +1,7 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
+ check for every generated file in naive test template generation
|
4
|
-
+ an ability to upgrade project from a newest template
|
1
|
+
-*-text-*-
|
2
|
+
|
5
3
|
- more templates (a lighter one?)
|
6
4
|
- write a small tutorial 'how to write a template'
|
7
5
|
- release to rubygems.org (it must run test, pull to github, tag, create
|
8
6
|
gem & upload it)
|
9
|
-
|
7
|
+
|
data/lib/falsework/meta.rb
CHANGED
@@ -43,13 +43,13 @@ module <%= @project.capitalize %>
|
|
43
43
|
|
44
44
|
# Print an error message _t_ and exit if _ec_ > 0.
|
45
45
|
def self.errx(ec, t)
|
46
|
-
|
46
|
+
$stderr.puts File.basename($0) + ' error: ' + t.to_s
|
47
47
|
exit ec if ec > 0
|
48
48
|
end
|
49
49
|
|
50
50
|
# Print a warning.
|
51
51
|
def self.warnx(t)
|
52
|
-
|
52
|
+
$stderr.puts File.basename($0) + ' warning: ' + t.to_s
|
53
53
|
end
|
54
54
|
|
55
55
|
# #veputs uses this to decide to put a newline or not to put.
|
@@ -90,7 +90,7 @@ module <%= @project.capitalize %>
|
|
90
90
|
|
91
91
|
if @conf[:verbose] >= level
|
92
92
|
nnl ? print(t) : print("#{t}\n")
|
93
|
-
|
93
|
+
$stdout.flush
|
94
94
|
end
|
95
95
|
end
|
96
96
|
|
@@ -194,7 +194,7 @@ module <%= @project.capitalize %>
|
|
194
194
|
o.on('--config-dirs', 'Show possible config locations.') {
|
195
195
|
@conf[:config_dirs].each { |j|
|
196
196
|
f = j + '/' + @conf[:config]
|
197
|
-
puts
|
197
|
+
puts((File.readable?(f) ? '* ' : ' ') + f)
|
198
198
|
}
|
199
199
|
exit 0
|
200
200
|
}
|
@@ -219,4 +219,4 @@ module <%= @project.capitalize %>
|
|
219
219
|
end # trestle
|
220
220
|
end
|
221
221
|
|
222
|
-
# Don't remove this: falsework/0.2.
|
222
|
+
# Don't remove this: falsework/0.2.8/naive/2011-08-05T17:12:36+03:00
|
@@ -15,7 +15,7 @@ def cmd(c)
|
|
15
15
|
when Meta::NAME.downcase
|
16
16
|
# test probably is executed from the Rakefile
|
17
17
|
Dir.chdir('test')
|
18
|
-
|
18
|
+
$stderr.puts('*** chdir to ' + Dir.pwd)
|
19
19
|
when 'test'
|
20
20
|
# we are in the test directory, there is nothing special to do
|
21
21
|
else
|
@@ -31,4 +31,4 @@ def cmd(c)
|
|
31
31
|
File.absolute_path('../bin/' + c)
|
32
32
|
end
|
33
33
|
|
34
|
-
# Don't remove this: falsework/0.2.
|
34
|
+
# Don't remove this: falsework/0.2.8/naive/2011-08-05T17:12:36+03:00
|
data/lib/falsework/trestle.rb
CHANGED
@@ -43,13 +43,13 @@ module Falsework
|
|
43
43
|
|
44
44
|
# Print an error message _t_ and exit if _ec_ > 0.
|
45
45
|
def self.errx(ec, t)
|
46
|
-
|
46
|
+
$stderr.puts File.basename($0) + ' error: ' + t.to_s
|
47
47
|
exit ec if ec > 0
|
48
48
|
end
|
49
49
|
|
50
50
|
# Print a warning.
|
51
51
|
def self.warnx(t)
|
52
|
-
|
52
|
+
$stderr.puts File.basename($0) + ' warning: ' + t.to_s
|
53
53
|
end
|
54
54
|
|
55
55
|
# #veputs uses this to decide to put a newline or not to put.
|
@@ -90,7 +90,7 @@ module Falsework
|
|
90
90
|
|
91
91
|
if @conf[:verbose] >= level
|
92
92
|
nnl ? print(t) : print("#{t}\n")
|
93
|
-
|
93
|
+
$stdout.flush
|
94
94
|
end
|
95
95
|
end
|
96
96
|
|
@@ -194,7 +194,7 @@ module Falsework
|
|
194
194
|
o.on('--config-dirs', 'Show possible config locations.') {
|
195
195
|
@conf[:config_dirs].each { |j|
|
196
196
|
f = j + '/' + @conf[:config]
|
197
|
-
puts
|
197
|
+
puts((File.readable?(f) ? '* ' : ' ') + f)
|
198
198
|
}
|
199
199
|
exit 0
|
200
200
|
}
|
data/test/helper_trestle.rb
CHANGED
@@ -15,7 +15,7 @@ def cmd(c)
|
|
15
15
|
when Meta::NAME.downcase
|
16
16
|
# test probably is executed from the Rakefile
|
17
17
|
Dir.chdir('test')
|
18
|
-
|
18
|
+
$stderr.puts('*** chdir to ' + Dir.pwd)
|
19
19
|
when 'test'
|
20
20
|
# we are in the test directory, there is nothing special to do
|
21
21
|
else
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: falsework
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.2.
|
5
|
+
version: 0.2.8
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Alexander Gromnitsky
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-
|
13
|
+
date: 2011-08-05 00:00:00 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: git
|
@@ -103,7 +103,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
103
103
|
requirements: []
|
104
104
|
|
105
105
|
rubyforge_project:
|
106
|
-
rubygems_version: 1.8.
|
106
|
+
rubygems_version: 1.8.7
|
107
107
|
signing_key:
|
108
108
|
specification_version: 3
|
109
109
|
summary: A primitive scaffold generator for writing CLI programs in Ruby
|