atp 1.1.1 → 1.1.2
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/config/version.rb +1 -1
- data/lib/atp/flow.rb +25 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 69803282c2ed5e47a0166e8dd0a7a505d6752ed0
|
4
|
+
data.tar.gz: a8230d4c6ee3f1944ef89067ea0fa24d245c2343
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8d28660d722cf5f95d5d5ed748ceca675d8ce1e1a6582c0c6b257a3fac90e7256f510bee29aec489429acf634d68f13993cb0a32ca12e0f26e8d36ea7ccf251c
|
7
|
+
data.tar.gz: 65a339b165d89a1a73618999176f2735e1555c659a9bbf03c84b9a2e4bad1b0ca8f5a923d787cca7cd9cc93a6a2fa270eb2e445f5e553d4c6ecd0e855cfa895e
|
data/config/version.rb
CHANGED
data/lib/atp/flow.rb
CHANGED
@@ -239,6 +239,12 @@ module ATP
|
|
239
239
|
def test(instance, options = {})
|
240
240
|
extract_meta!(options) do
|
241
241
|
apply_conditions(options) do
|
242
|
+
if options[:on_fail].is_a?(Proc)
|
243
|
+
before_on_fail = options.delete(:on_fail)
|
244
|
+
end
|
245
|
+
if options[:on_pass].is_a?(Proc)
|
246
|
+
before_on_pass = options.delete(:on_pass)
|
247
|
+
end
|
242
248
|
# Allows any continue, bin, or soft bin argument passed in at the options top-level to be assumed
|
243
249
|
# to be the action to take if the test fails
|
244
250
|
if b = options.delete(:bin)
|
@@ -356,8 +362,25 @@ module ATP
|
|
356
362
|
end
|
357
363
|
end
|
358
364
|
|
359
|
-
|
360
|
-
|
365
|
+
if before_on_fail
|
366
|
+
on_fail_node = on_fail(before_on_fail)
|
367
|
+
if options[:on_fail]
|
368
|
+
on_fail_node = on_fail_node.updated(nil, on_fail_node.children + on_fail(options[:on_fail]).children)
|
369
|
+
end
|
370
|
+
children << on_fail_node
|
371
|
+
else
|
372
|
+
children << on_fail(options[:on_fail]) if options[:on_fail]
|
373
|
+
end
|
374
|
+
|
375
|
+
if before_on_pass
|
376
|
+
on_pass_node = on_pass(before_on_pass)
|
377
|
+
if options[:on_pass]
|
378
|
+
on_pass_node = on_pass_node.updated(nil, on_pass_node.children + on_pass(options[:on_pass]).children)
|
379
|
+
end
|
380
|
+
children << on_pass_node
|
381
|
+
else
|
382
|
+
children << on_pass(options[:on_pass]) if options[:on_pass]
|
383
|
+
end
|
361
384
|
|
362
385
|
save_conditions
|
363
386
|
n(:test, children)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: atp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stephen McGinty
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-05-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: origen
|
@@ -126,7 +126,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
126
126
|
version: 1.8.11
|
127
127
|
requirements: []
|
128
128
|
rubyforge_project:
|
129
|
-
rubygems_version: 2.
|
129
|
+
rubygems_version: 2.5.1
|
130
130
|
signing_key:
|
131
131
|
specification_version: 4
|
132
132
|
summary: An abstract test program model for Origen
|