atp 0.3.2 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: de3a4282f251dd1dca4bbc42c90514646b390ecb
4
- data.tar.gz: 7b7adde092bf2c0c24b6908808de1bdfa64600fe
3
+ metadata.gz: d20477f1e1e9f17a369fd66bab80a6d281ba14aa
4
+ data.tar.gz: a1e3578e7ce467f355d3d977a8892dba404602bb
5
5
  SHA512:
6
- metadata.gz: 754e3251438749ead9645225e612753284f77dec2e468e376d2c6dba8be75e9b5f9a6374a801b7032bb0af0f0a6b6969f44a0725e6c55172f8f0a8534f4c8b42
7
- data.tar.gz: cad825d6fe405ff8cfa77d941a8acec72822a99b4325df4c1bb9449b334adcb8980e93bf1ef8e048b44a80c1539eb4759d00c379ddceaaeb9a5d346e84d41abc
6
+ metadata.gz: 24ef6ffa11c6694d9d35c9919c824dab356a60626d44e5ea24fc66eab5838c169407bd0d15d3903830a1ceee49a26f5962eedda59da0cd3e0399367e3ed9f5f2
7
+ data.tar.gz: 2eb38eebf9358bb09fd17b1f08e67aecf30a1d21f3831bc06361e0bd81f942aedaa7e9e23a0c1523954ae989bc8d858b0186d3eb0957561b662137fcef6bed7e
data/config/version.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  module ATP
2
2
  MAJOR = 0
3
3
  MINOR = 3
4
- BUGFIX = 2
4
+ BUGFIX = 3
5
5
  DEV = nil
6
6
 
7
7
  VERSION = [MAJOR, MINOR, BUGFIX].join(".") + (DEV ? ".pre#{DEV}" : '')
@@ -51,6 +51,10 @@ module ATP
51
51
  n(:job, id, enabled, node)
52
52
  end
53
53
 
54
+ def set_run_flag(flag)
55
+ n(:set_run_flag, flag)
56
+ end
57
+
54
58
  def enable_flow_flag(var, options = {})
55
59
  test = n(:enable_flow_flag, var)
56
60
  if options[:conditions]
@@ -203,6 +207,9 @@ module ATP
203
207
  if options[:bin] || options[:softbin]
204
208
  children << set_result(:fail, bin: options[:bin], softbin: options[:softbin], bin_description: options[:bin_description])
205
209
  end
210
+ if options[:set_run_flag] || options[:set_flag]
211
+ children << set_run_flag(options[:set_run_flag] || options[:set_flag])
212
+ end
206
213
  children << continue if options[:continue]
207
214
  n(:on_fail, *children)
208
215
  end
@@ -212,6 +219,9 @@ module ATP
212
219
  if options[:bin] || options[:softbin]
213
220
  children << set_result(:pass, bin: options[:bin], softbin: options[:softbin], bin_description: options[:bin_description])
214
221
  end
222
+ if options[:set_run_flag] || options[:set_flag]
223
+ children << set_run_flag(options[:set_run_flag] || options[:set_flag])
224
+ end
215
225
  children << continue if options[:continue]
216
226
  n(:on_pass, *children)
217
227
  end
data/lib/atp/flow.rb CHANGED
@@ -79,6 +79,14 @@ module ATP
79
79
  options[:on_fail] ||= {}
80
80
  options[:on_fail][:continue] = true
81
81
  end
82
+ if f = options.delete(:flag_pass)
83
+ options[:on_pass] ||= {}
84
+ options[:on_pass][:set_run_flag] = f
85
+ end
86
+ if f = options.delete(:flag_fail)
87
+ options[:on_fail] ||= {}
88
+ options[:on_fail][:set_run_flag] = f
89
+ end
82
90
  builder.test(instance, options)
83
91
  end
84
92
  append(t) unless r
data/lib/atp/formatter.rb CHANGED
@@ -4,6 +4,11 @@ module ATP
4
4
  process(node)
5
5
  end
6
6
 
7
+ def run_and_format(node, options = {})
8
+ ast = Runner.new.run(node, options)
9
+ format(ast, options)
10
+ end
11
+
7
12
  def self.format(node, options = {})
8
13
  new.format(node, options)
9
14
  end
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: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen McGinty
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-09 00:00:00.000000000 Z
11
+ date: 2016-02-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: origen