atp 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/version.rb +1 -1
- data/lib/atp/ast/builder.rb +17 -2
- data/lib/atp/processors/condition_extractor.rb +1 -0
- data/lib/atp/processors/marshal.rb +4 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3ade09fa87d4ff3f63b38bb3ba4dca6524d7e5dd
|
4
|
+
data.tar.gz: 05379db576550d3b423c28bb084ab170a6f96f9b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 56c43e8a9054f69982ea469dac331dffc32dce19861dbb5a8ecff0508311e800e32cda904d15944010f5a078dd437b1dc2cd0b62397fcd2b53450cf0839500ab
|
7
|
+
data.tar.gz: 6b14b723b4efdb50a951711780158738228cafda516cdfd9efa10739633a7de45359a17c22777c75202aae7e59ca74e7175b7d8251ad909cd933a8198790c38d
|
data/config/version.rb
CHANGED
data/lib/atp/ast/builder.rb
CHANGED
@@ -28,7 +28,7 @@ module ATP
|
|
28
28
|
end
|
29
29
|
|
30
30
|
def render(str)
|
31
|
-
n(:render, str
|
31
|
+
n(:render, str)
|
32
32
|
end
|
33
33
|
|
34
34
|
def id(symbol)
|
@@ -51,6 +51,10 @@ module ATP
|
|
51
51
|
n(:job, id, enabled, node)
|
52
52
|
end
|
53
53
|
|
54
|
+
def run_flag(id, enabled, node)
|
55
|
+
n(:run_flag, id, enabled, node)
|
56
|
+
end
|
57
|
+
|
54
58
|
def set_run_flag(flag)
|
55
59
|
n(:set_run_flag, flag)
|
56
60
|
end
|
@@ -118,7 +122,8 @@ module ATP
|
|
118
122
|
:if_any_failed, :unless_all_passed,
|
119
123
|
:if_all_failed, :unless_any_passed,
|
120
124
|
:if_any_passed, :unless_all_failed,
|
121
|
-
:if_all_passed, :unless_any_failed
|
125
|
+
:if_all_passed, :unless_any_failed,
|
126
|
+
:if_flag, :unless_flag
|
122
127
|
]
|
123
128
|
|
124
129
|
def apply_conditions(node, conditions)
|
@@ -172,6 +177,16 @@ module ATP
|
|
172
177
|
node = job(value, true, node)
|
173
178
|
when :unless_job, :unless_jobs
|
174
179
|
node = job(value, false, node)
|
180
|
+
when :if_flag
|
181
|
+
if value.is_a?(Array)
|
182
|
+
fail 'if_flag only accepts one flag'
|
183
|
+
end
|
184
|
+
node = run_flag(value, true, node)
|
185
|
+
when :unless_flag
|
186
|
+
if value.is_a?(Array)
|
187
|
+
fail 'unless_flag only accepts one flag'
|
188
|
+
end
|
189
|
+
node = run_flag(value, false, node)
|
175
190
|
else
|
176
191
|
fail "Unknown test condition attribute - #{key} (#{value})"
|
177
192
|
end
|
@@ -22,6 +22,7 @@ module ATP
|
|
22
22
|
alias_method :on_test_result, :on_boolean_condition
|
23
23
|
alias_method :on_test_executed, :on_boolean_condition
|
24
24
|
alias_method :on_job, :on_boolean_condition
|
25
|
+
alias_method :on_run_flag, :on_boolean_condition
|
25
26
|
|
26
27
|
def on_group(node)
|
27
28
|
sig = node.children.select { |n| [:id, :name, :on_fail, :on_pass].include?(n.try(:type)) }
|
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.4.
|
4
|
+
version: 0.4.1
|
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-
|
11
|
+
date: 2016-03-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: origen
|