testkit123 0.2.3 → 0.2.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.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/testkit123.rb +11 -6
- data.tar.gz.sig +0 -0
- metadata +4 -4
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f614e8e95327241b534bbf266dad46525c6cd71adbedf8ca8044527cc9882a62
|
|
4
|
+
data.tar.gz: 0777ac2e0d3c01b7d4a6238a428be34496f2cb3910f5bcb86075af1f37329325
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c36ff119e0864242544c179d34a2674524873b2458a65b43384018a46bff12ea9f9ed8579fa76b31a22e1723656a38d23ecea3bb001ccf160ec70b3191e1eb54
|
|
7
|
+
data.tar.gz: 5596f0154676cb0893ad1db11bf20a35430ec566e5abd4f77f6208cce7af4f7d3ded1cff57848e55469a3d033669a2f1a2870a2124fda5b8e3277380328b20bc
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/lib/testkit123.rb
CHANGED
|
@@ -20,6 +20,7 @@ class TestKit123
|
|
|
20
20
|
debug: false, localpath: nil, datapath: nil,
|
|
21
21
|
gemtest_url: nil, rubyver: 'ruby-2.5.1')
|
|
22
22
|
|
|
23
|
+
@debug = debug
|
|
23
24
|
@h = templates
|
|
24
25
|
|
|
25
26
|
@project_config = if project =~ /\.txt$/ then
|
|
@@ -27,8 +28,9 @@ class TestKit123
|
|
|
27
28
|
elsif project
|
|
28
29
|
File.join(localpath, project + '.txt')
|
|
29
30
|
end
|
|
31
|
+
puts '@project_config: ' + @project_config.inspect if @debug
|
|
30
32
|
|
|
31
|
-
|
|
33
|
+
|
|
32
34
|
@localpath, @datapath, @gemtest_url = localpath, datapath, gemtest_url
|
|
33
35
|
@rubyver = rubyver
|
|
34
36
|
|
|
@@ -126,6 +128,7 @@ end
|
|
|
126
128
|
config = SimpleConfig.new(@project_config).to_h
|
|
127
129
|
|
|
128
130
|
proj = config[:project]
|
|
131
|
+
puts 'create_standalone: proj: ' + proj.inspect if @debug
|
|
129
132
|
datafilepath = config[:data_path] + '/' + proj
|
|
130
133
|
test_rbfile = File.join(datafilepath, "test_#{proj}.rb")
|
|
131
134
|
|
|
@@ -133,8 +136,10 @@ end
|
|
|
133
136
|
testdata_file = File.join(datafilepath, "testdata_#{proj}.#{ext}")
|
|
134
137
|
puts 'testdata_file: ' + testdata_file.inspect if @debug
|
|
135
138
|
|
|
136
|
-
s = File.read
|
|
139
|
+
s = File.read(test_rbfile).gsub(/^( )?end/,'')
|
|
137
140
|
require_gems = s.scan(/^require +['"]([^'"]+)/).map(&:first)
|
|
141
|
+
|
|
142
|
+
before_test = s[/(?<=def tests\(\)).*(?=\n test )/m].lstrip
|
|
138
143
|
|
|
139
144
|
a = s.split(/(?= test )/)
|
|
140
145
|
a.shift
|
|
@@ -166,7 +171,8 @@ end
|
|
|
166
171
|
end.join
|
|
167
172
|
|
|
168
173
|
args = testnode.xpath('records/input/summary/*').map do |input|
|
|
169
|
-
"test_%s
|
|
174
|
+
"test_%s =<<EOF\n%s\nEOF\n" % [input.name,
|
|
175
|
+
input.texts.join.gsub(/'/,"\'").strip]
|
|
170
176
|
end
|
|
171
177
|
|
|
172
178
|
vars = testnode.xpath('records/input/summary/*').map(&:name)
|
|
@@ -181,10 +187,10 @@ end
|
|
|
181
187
|
|
|
182
188
|
"# Test %d. Type: %s\n# Description: %s\n" \
|
|
183
189
|
% [n, title, testnode.text('summary/type')] + \
|
|
184
|
-
"#
|
|
190
|
+
"# --------------------------------------------\n\n" + \
|
|
185
191
|
"require '#{proj}'\n" + require_gems.map {|x| "require '%s'" \
|
|
186
192
|
% x}.join("\n") + "\n\n\n" \
|
|
187
|
-
+ args.join("\n") + testcode
|
|
193
|
+
+ before_test.gsub(/^ /,'') + "\n" + args.join("\n") + testcode
|
|
188
194
|
|
|
189
195
|
end
|
|
190
196
|
|
|
@@ -284,4 +290,3 @@ EOF
|
|
|
284
290
|
end
|
|
285
291
|
|
|
286
292
|
end
|
|
287
|
-
|
data.tar.gz.sig
CHANGED
|
Binary file
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: testkit123
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- James Robertson
|
|
@@ -30,7 +30,7 @@ cert_chain:
|
|
|
30
30
|
MBi32Noiyau3znLWYXucwnOR8dh4RhcwxaP82ZX6Up19+qVqJqravkDQ+OBff6o+
|
|
31
31
|
m3U=
|
|
32
32
|
-----END CERTIFICATE-----
|
|
33
|
-
date: 2018-08-
|
|
33
|
+
date: 2018-08-19 00:00:00.000000000 Z
|
|
34
34
|
dependencies:
|
|
35
35
|
- !ruby/object:Gem::Dependency
|
|
36
36
|
name: rxfhelper
|
|
@@ -41,7 +41,7 @@ dependencies:
|
|
|
41
41
|
version: '0.8'
|
|
42
42
|
- - ">="
|
|
43
43
|
- !ruby/object:Gem::Version
|
|
44
|
-
version: 0.8.
|
|
44
|
+
version: 0.8.5
|
|
45
45
|
type: :runtime
|
|
46
46
|
prerelease: false
|
|
47
47
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -51,7 +51,7 @@ dependencies:
|
|
|
51
51
|
version: '0.8'
|
|
52
52
|
- - ">="
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
|
-
version: 0.8.
|
|
54
|
+
version: 0.8.5
|
|
55
55
|
- !ruby/object:Gem::Dependency
|
|
56
56
|
name: simple-config
|
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
metadata.gz.sig
CHANGED
|
Binary file
|