atp 1.1.1 → 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/config/version.rb +1 -1
  3. data/lib/atp/flow.rb +25 -2
  4. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 30f27f563d7be5bb5ac2fdadeb075aff8254e631
4
- data.tar.gz: 116ddc493b873bb4680a559e488de2e65cb62698
3
+ metadata.gz: 69803282c2ed5e47a0166e8dd0a7a505d6752ed0
4
+ data.tar.gz: a8230d4c6ee3f1944ef89067ea0fa24d245c2343
5
5
  SHA512:
6
- metadata.gz: 1183ef2bc0e85b638c5d50c75b2dd9f433017ea71cdef4c92d7eadaf084d361448b3e36ba91fb674a1a145a1ca80e85bfaeec4d5be291b7cada572699813db15
7
- data.tar.gz: b4b41aca1916c7053bc91b5851caf18d4a47aeba3e25e0c794d6f79b9c45d5cf52db9ac75e2ba223bb73d844074cbdd13c24a7f8f6effbb355745daf81a5af6a
6
+ metadata.gz: 8d28660d722cf5f95d5d5ed748ceca675d8ce1e1a6582c0c6b257a3fac90e7256f510bee29aec489429acf634d68f13993cb0a32ca12e0f26e8d36ea7ccf251c
7
+ data.tar.gz: 65a339b165d89a1a73618999176f2735e1555c659a9bbf03c84b9a2e4bad1b0ca8f5a923d787cca7cd9cc93a6a2fa270eb2e445f5e553d4c6ecd0e855cfa895e
@@ -1,7 +1,7 @@
1
1
  module ATP
2
2
  MAJOR = 1
3
3
  MINOR = 1
4
- BUGFIX = 1
4
+ BUGFIX = 2
5
5
  DEV = nil
6
6
 
7
7
  VERSION = [MAJOR, MINOR, BUGFIX].join(".") + (DEV ? ".pre#{DEV}" : '')
@@ -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
- children << on_fail(options[:on_fail]) if options[:on_fail]
360
- children << on_pass(options[:on_pass]) if options[:on_pass]
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.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-03-23 00:00:00.000000000 Z
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.6.8
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