judges 0.33.0 → 0.34.0
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
- data/README.md +4 -0
- data/features/test.feature +1 -1
- data/fixtures/repeat/repeat.rb +6 -0
- data/fixtures/repeat/repeated.yml +9 -0
- data/judges.gemspec +1 -1
- data/lib/judges/commands/test.rb +10 -8
- data/lib/judges.rb +1 -1
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0e26309233bda6e09c9673cc9b17b3a6309897e2e2a19505288889fe947af3d7
|
4
|
+
data.tar.gz: 895a20352dd34b430f3001de0ba8c5eb97e0f1fd2de77386ad63d9282831e021
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7bb06d82f69a67972774c2a7ef92bfc1655bcd30f4c162cae6d1669192725a3e7fc28efecaab9fda0bf3ac4a31b84725412248009ff22a7c77e289ae0699947c
|
7
|
+
data.tar.gz: 621ea22a9b604c2433e07ff6a5c241c86d8559de17b59def8d2878477fe5c4340a565090daa38770b054d81960ec45250db10282dd356b05367397fba066e65c
|
data/README.md
CHANGED
@@ -40,6 +40,7 @@ before:
|
|
40
40
|
category: slow
|
41
41
|
runs: 1
|
42
42
|
skip: false
|
43
|
+
repeat: 20
|
43
44
|
input:
|
44
45
|
-
|
45
46
|
foo: 42
|
@@ -65,6 +66,9 @@ when the test is finished.
|
|
65
66
|
The `category` (default: `[]`) may have one or an array of categories,
|
66
67
|
which then may be turned on via the `--category` command line flag.
|
67
68
|
|
69
|
+
The `repeat` (default: `1`) makes `input` to be repeated multiple times
|
70
|
+
(mostly useful for speed measuring on big data inputs).
|
71
|
+
|
68
72
|
The `runs` (default: `1`) is the number of times the `.rb` script should
|
69
73
|
be executed. After each execution, all expected XPath expressions are validated.
|
70
74
|
|
data/features/test.feature
CHANGED
@@ -7,7 +7,7 @@ Feature: Test
|
|
7
7
|
Scenario: Simple test of a few judges
|
8
8
|
Given I run bin/judges with "test ./fixtures"
|
9
9
|
Then Stdout contains "👉 Testing"
|
10
|
-
Then Stdout contains "All
|
10
|
+
Then Stdout contains "All 3 judge(s) and 3 tests passed"
|
11
11
|
And Exit code is zero
|
12
12
|
|
13
13
|
Scenario: Simple test of just one judge
|
data/judges.gemspec
CHANGED
@@ -9,7 +9,7 @@ Gem::Specification.new do |s|
|
|
9
9
|
s.required_rubygems_version = Gem::Requirement.new('>= 0') if s.respond_to? :required_rubygems_version=
|
10
10
|
s.required_ruby_version = '>=3.2'
|
11
11
|
s.name = 'judges'
|
12
|
-
s.version = '0.
|
12
|
+
s.version = '0.34.0'
|
13
13
|
s.license = 'MIT'
|
14
14
|
s.summary = 'Command-Line Tool for a Factbase'
|
15
15
|
s.description =
|
data/lib/judges/commands/test.rb
CHANGED
@@ -126,15 +126,17 @@ class Judges::Test
|
|
126
126
|
|
127
127
|
def prepare(fb, yaml)
|
128
128
|
inputs = yaml['input']
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
vv.
|
134
|
-
|
129
|
+
(yaml['repeat']&.to_i || 1).times do
|
130
|
+
inputs&.each do |i|
|
131
|
+
f = fb.insert
|
132
|
+
i.each do |k, vv|
|
133
|
+
if vv.is_a?(Array)
|
134
|
+
vv.each do |v|
|
135
|
+
f.send(:"#{k}=", v)
|
136
|
+
end
|
137
|
+
else
|
138
|
+
f.send(:"#{k}=", vv)
|
135
139
|
end
|
136
|
-
else
|
137
|
-
f.send(:"#{k}=", vv)
|
138
140
|
end
|
139
141
|
end
|
140
142
|
end
|
data/lib/judges.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: judges
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.34.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yegor Bugayenko
|
@@ -272,6 +272,8 @@ files:
|
|
272
272
|
- fixtures/guess/guess.rb
|
273
273
|
- fixtures/guess/guess_made.yml
|
274
274
|
- fixtures/guess/skipped.yml
|
275
|
+
- fixtures/repeat/repeat.rb
|
276
|
+
- fixtures/repeat/repeated.yml
|
275
277
|
- fixtures/try/tried.yml
|
276
278
|
- fixtures/try/try.rb
|
277
279
|
- judges.gemspec
|