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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7f64914b7c8843db8db3ad65544769c34244a2be
4
- data.tar.gz: 69ad71f98a175f843a851863d00937aa93c6d52a
3
+ metadata.gz: 3ade09fa87d4ff3f63b38bb3ba4dca6524d7e5dd
4
+ data.tar.gz: 05379db576550d3b423c28bb084ab170a6f96f9b
5
5
  SHA512:
6
- metadata.gz: 22d183c262e97d8218ebd96db88c0c2b5a5b3dc1131240243e56e729ba358b08730fdce8db67b116ecc1a8e21934806cf8bbda95339a5a2934f14fd50e00f00a
7
- data.tar.gz: 3659a5efe9ee71d5f4cad2df39b5c72e3d13523fff03602087d2dcdb19f8ba74e62c2931619085904cbfdd72ef7c574a627d996c89b8d61e70acbdb818599b92
6
+ metadata.gz: 56c43e8a9054f69982ea469dac331dffc32dce19861dbb5a8ecff0508311e800e32cda904d15944010f5a078dd437b1dc2cd0b62397fcd2b53450cf0839500ab
7
+ data.tar.gz: 6b14b723b4efdb50a951711780158738228cafda516cdfd9efa10739633a7de45359a17c22777c75202aae7e59ca74e7175b7d8251ad909cd933a8198790c38d
data/config/version.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  module ATP
2
2
  MAJOR = 0
3
3
  MINOR = 4
4
- BUGFIX = 0
4
+ BUGFIX = 1
5
5
  DEV = nil
6
6
 
7
7
  VERSION = [MAJOR, MINOR, BUGFIX].join(".") + (DEV ? ".pre#{DEV}" : '')
@@ -28,7 +28,7 @@ module ATP
28
28
  end
29
29
 
30
30
  def render(str)
31
- n(:render, str.to_s)
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)) }
@@ -11,6 +11,10 @@ module ATP
11
11
  node.updated(nil, [{ 'Test' => node.value.name }])
12
12
  end
13
13
  end
14
+
15
+ def on_render(node)
16
+ node.updated(nil, [node.value.to_s])
17
+ end
14
18
  end
15
19
  end
16
20
  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.4.0
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-02-25 00:00:00.000000000 Z
11
+ date: 2016-03-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: origen