testdata 0.8.12 → 0.8.13
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.tar.gz.sig +0 -0
- data/lib/testdata.rb +10 -6
- metadata +20 -8
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f37a7ac7117e4069f4bdb53e02fbbc1687454ac9
|
|
4
|
+
data.tar.gz: 4dae9b91de259f202ec3756e3787f1ce2fcab752
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dcf6724564a0b22eb19f8515610d171c8e1e621d9c168243e136680b43c9459c699dedb4d1341a41debde349c6cd50a7ebebe2d78bed690860764acad2622059
|
|
7
|
+
data.tar.gz: aff6845ab2d06ef1f5cf4969922a117b78a5abbf841d3551e623d7600cfa6547e945be59371e698eeb3f94d62b6035ced85b17488fc4de5242ac9a68eafcfdfa
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data.tar.gz.sig
CHANGED
|
Binary file
|
data/lib/testdata.rb
CHANGED
|
@@ -6,6 +6,7 @@ require 'rexml/document'
|
|
|
6
6
|
require 'app-routes'
|
|
7
7
|
require 'testdata_text'
|
|
8
8
|
|
|
9
|
+
|
|
9
10
|
class Testdata
|
|
10
11
|
include REXML
|
|
11
12
|
include AppRoutes
|
|
@@ -13,7 +14,9 @@ class Testdata
|
|
|
13
14
|
attr_accessor :debug
|
|
14
15
|
|
|
15
16
|
def initialize(s, options={})
|
|
17
|
+
|
|
16
18
|
super()
|
|
19
|
+
|
|
17
20
|
@params = {}
|
|
18
21
|
#routes()
|
|
19
22
|
|
|
@@ -36,8 +39,9 @@ class Testdata
|
|
|
36
39
|
}
|
|
37
40
|
|
|
38
41
|
buffer = procs[s.class.to_s.to_sym].call(s)
|
|
42
|
+
|
|
39
43
|
@doc = Document.new(buffer)
|
|
40
|
-
|
|
44
|
+
|
|
41
45
|
o = {log: false}.merge(options)
|
|
42
46
|
@log = o[:log] == true ? Document.new(tests) : nil
|
|
43
47
|
end
|
|
@@ -55,8 +59,8 @@ class Testdata
|
|
|
55
59
|
|
|
56
60
|
path_no = node.text('summary/path').to_s
|
|
57
61
|
|
|
58
|
-
xpath = "records/
|
|
59
|
-
input_nodes = XPath.match(node, xpath)[1..-1]
|
|
62
|
+
xpath = "records/input/summary/*"
|
|
63
|
+
input_nodes = XPath.match(node, xpath) #[1..-1]
|
|
60
64
|
input_values = input_nodes.map(&stringify) + []
|
|
61
65
|
|
|
62
66
|
input_names = input_nodes.map(&:name)
|
|
@@ -64,9 +68,9 @@ class Testdata
|
|
|
64
68
|
summary = XPath.first node, 'summary'
|
|
65
69
|
type, desc = summary.text('type'), summary.text('description')
|
|
66
70
|
|
|
67
|
-
xpath = "records/
|
|
71
|
+
xpath = "records/output/summary/*"
|
|
68
72
|
raw_output = XPath.match(node, xpath)
|
|
69
|
-
output_values = raw_output.length > 0 ? raw_output
|
|
73
|
+
output_values = raw_output.length > 0 ? raw_output.map(&stringify) : []
|
|
70
74
|
|
|
71
75
|
[path_no, input_values, input_names, type, output_values, desc]
|
|
72
76
|
end
|
|
@@ -111,7 +115,7 @@ class Testdata
|
|
|
111
115
|
|
|
112
116
|
a = raw_actual.is_a?(String) ? [raw_actual].flatten.map(&:strip) : raw_actual
|
|
113
117
|
b = expected.map(&:strip)
|
|
114
|
-
|
|
118
|
+
|
|
115
119
|
if @debug == true or @debug2 == true then
|
|
116
120
|
|
|
117
121
|
inputs = input_names.zip(inputs).map{|x| ' ' + x.join(": ")}\
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: testdata
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.8.
|
|
4
|
+
version: 0.8.13
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- James Robertson
|
|
@@ -31,36 +31,48 @@ cert_chain:
|
|
|
31
31
|
vWFtb5VPsjLRwClW20j7R9zEUv5XjYoyxcUn1W1xQINMVIQMtvMhouLBeWTXF7g4
|
|
32
32
|
ab2xQAvsYawLTw==
|
|
33
33
|
-----END CERTIFICATE-----
|
|
34
|
-
date: 2014-
|
|
34
|
+
date: 2014-09-08 00:00:00.000000000 Z
|
|
35
35
|
dependencies:
|
|
36
36
|
- !ruby/object:Gem::Dependency
|
|
37
37
|
name: app-routes
|
|
38
38
|
requirement: !ruby/object:Gem::Requirement
|
|
39
39
|
requirements:
|
|
40
|
+
- - "~>"
|
|
41
|
+
- !ruby/object:Gem::Version
|
|
42
|
+
version: '0.1'
|
|
40
43
|
- - ">="
|
|
41
44
|
- !ruby/object:Gem::Version
|
|
42
|
-
version:
|
|
45
|
+
version: 0.1.18
|
|
43
46
|
type: :runtime
|
|
44
47
|
prerelease: false
|
|
45
48
|
version_requirements: !ruby/object:Gem::Requirement
|
|
46
49
|
requirements:
|
|
50
|
+
- - "~>"
|
|
51
|
+
- !ruby/object:Gem::Version
|
|
52
|
+
version: '0.1'
|
|
47
53
|
- - ">="
|
|
48
54
|
- !ruby/object:Gem::Version
|
|
49
|
-
version:
|
|
55
|
+
version: 0.1.18
|
|
50
56
|
- !ruby/object:Gem::Dependency
|
|
51
57
|
name: testdata_text
|
|
52
58
|
requirement: !ruby/object:Gem::Requirement
|
|
53
59
|
requirements:
|
|
60
|
+
- - "~>"
|
|
61
|
+
- !ruby/object:Gem::Version
|
|
62
|
+
version: '0.1'
|
|
54
63
|
- - ">="
|
|
55
64
|
- !ruby/object:Gem::Version
|
|
56
|
-
version:
|
|
65
|
+
version: 0.1.3
|
|
57
66
|
type: :runtime
|
|
58
67
|
prerelease: false
|
|
59
68
|
version_requirements: !ruby/object:Gem::Requirement
|
|
60
69
|
requirements:
|
|
70
|
+
- - "~>"
|
|
71
|
+
- !ruby/object:Gem::Version
|
|
72
|
+
version: '0.1'
|
|
61
73
|
- - ">="
|
|
62
74
|
- !ruby/object:Gem::Version
|
|
63
|
-
version:
|
|
75
|
+
version: 0.1.3
|
|
64
76
|
description:
|
|
65
77
|
email: james@r0bertson.co.uk
|
|
66
78
|
executables: []
|
|
@@ -80,7 +92,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
80
92
|
requirements:
|
|
81
93
|
- - ">="
|
|
82
94
|
- !ruby/object:Gem::Version
|
|
83
|
-
version:
|
|
95
|
+
version: 2.1.2
|
|
84
96
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
85
97
|
requirements:
|
|
86
98
|
- - ">="
|
|
@@ -88,7 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
88
100
|
version: '0'
|
|
89
101
|
requirements: []
|
|
90
102
|
rubyforge_project:
|
|
91
|
-
rubygems_version: 2.
|
|
103
|
+
rubygems_version: 2.2.2
|
|
92
104
|
signing_key:
|
|
93
105
|
specification_version: 4
|
|
94
106
|
summary: testdata
|
metadata.gz.sig
CHANGED
|
Binary file
|