lopata 0.1.34 → 0.1.35
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/lib/lopata/observers/console_output_observer.rb +4 -0
- data/lib/lopata/scenario.rb +11 -3
- data/lib/lopata/step.rb +14 -3
- data/lib/lopata/version.rb +1 -1
- metadata +4 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 00deece4cfbd1afee78d43329179f904c3bd2c5e1036123883b0f5eb2b4e2699
|
|
4
|
+
data.tar.gz: e56c9e4d1d174d0c267cd29a1b8cb40f78d319b824a08caa245cb50657dcad58
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 432da1597422542043252db0262fe66a5b4722c898331dd344f170bac76495fd5623cc0b6cae07eab9088993f0d42a7fbf7387b1907d069ea1a41627be1e70f0
|
|
7
|
+
data.tar.gz: befaa061e420494b632a6bd0db066f37e5349a7c5a55404925e7de8f317cd15253663c23d0972e81634cc5ad5d9008890e310db1f8cbbd563b3eb9eaa7076d68
|
|
@@ -53,6 +53,10 @@ module Lopata
|
|
|
53
53
|
else
|
|
54
54
|
log_steps(step.steps)
|
|
55
55
|
end
|
|
56
|
+
if step.exception
|
|
57
|
+
puts step.exception.inspect
|
|
58
|
+
puts indent(4, backtrace_formatter.error_message(step.exception, include_backtrace: true))
|
|
59
|
+
end
|
|
56
60
|
else
|
|
57
61
|
puts colored(" #{status_marker(step.status)} #{step.title}", step.status)
|
|
58
62
|
puts indent(4, backtrace_formatter.error_message(step.exception, include_backtrace: true)) if step.failed?
|
data/lib/lopata/scenario.rb
CHANGED
|
@@ -102,10 +102,18 @@ class Lopata::Scenario
|
|
|
102
102
|
@current_step = step
|
|
103
103
|
return :skipped if step.skipped?
|
|
104
104
|
return :ignored if step.ignored?
|
|
105
|
-
if step.condition&.dynamic
|
|
106
|
-
|
|
107
|
-
|
|
105
|
+
if step.condition&.dynamic
|
|
106
|
+
begin
|
|
107
|
+
unless step.condition.match_dynamic?(scenario)
|
|
108
|
+
step.ignored!
|
|
109
|
+
return :ignored
|
|
110
|
+
end
|
|
111
|
+
rescue Exception => e
|
|
112
|
+
step.failed! e
|
|
113
|
+
return :failed
|
|
114
|
+
end
|
|
108
115
|
end
|
|
116
|
+
|
|
109
117
|
if step.group?
|
|
110
118
|
skip_rest = false
|
|
111
119
|
step.steps.each do
|
data/lib/lopata/step.rb
CHANGED
|
@@ -106,7 +106,7 @@ module Lopata
|
|
|
106
106
|
# @private
|
|
107
107
|
# Abstract execution step. Composition, may be group or step.
|
|
108
108
|
class BaseExecution
|
|
109
|
-
attr_reader :step, :status, :parent, :condition
|
|
109
|
+
attr_reader :step, :status, :parent, :condition, :exception
|
|
110
110
|
extend Forwardable
|
|
111
111
|
def_delegators :step, :method_name
|
|
112
112
|
|
|
@@ -220,7 +220,7 @@ module Lopata
|
|
|
220
220
|
end
|
|
221
221
|
|
|
222
222
|
def status!
|
|
223
|
-
|
|
223
|
+
return :failed if exception
|
|
224
224
|
statuses = steps.map(&:status!).uniq
|
|
225
225
|
@status =
|
|
226
226
|
if statuses.length == 1
|
|
@@ -246,11 +246,17 @@ module Lopata
|
|
|
246
246
|
@status = :ignored
|
|
247
247
|
steps.each(&:ignored!)
|
|
248
248
|
end
|
|
249
|
+
|
|
250
|
+
def failed!(exception = nil)
|
|
251
|
+
@status = :failed
|
|
252
|
+
@exception = exception
|
|
253
|
+
steps.each(&:ignored!)
|
|
254
|
+
end
|
|
249
255
|
end
|
|
250
256
|
|
|
251
257
|
# @private
|
|
252
258
|
class StepExecution < BaseExecution
|
|
253
|
-
attr_reader :
|
|
259
|
+
attr_reader :block, :pending_message
|
|
254
260
|
|
|
255
261
|
class PendingStepFixedError < StandardError; end
|
|
256
262
|
|
|
@@ -291,5 +297,10 @@ module Lopata
|
|
|
291
297
|
@status = :pending
|
|
292
298
|
@pending_message = message
|
|
293
299
|
end
|
|
300
|
+
|
|
301
|
+
def failed!(exception = nil)
|
|
302
|
+
@status = :failed
|
|
303
|
+
@exception = exception
|
|
304
|
+
end
|
|
294
305
|
end
|
|
295
306
|
end
|
data/lib/lopata/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: lopata
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.35
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Alexey Volochnev
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: exe
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: httparty
|
|
@@ -120,7 +119,6 @@ homepage: https://github.com/avolochnev/lopata
|
|
|
120
119
|
licenses:
|
|
121
120
|
- MIT
|
|
122
121
|
metadata: {}
|
|
123
|
-
post_install_message:
|
|
124
122
|
rdoc_options: []
|
|
125
123
|
require_paths:
|
|
126
124
|
- lib
|
|
@@ -135,8 +133,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
135
133
|
- !ruby/object:Gem::Version
|
|
136
134
|
version: '0'
|
|
137
135
|
requirements: []
|
|
138
|
-
rubygems_version: 3.
|
|
139
|
-
signing_key:
|
|
136
|
+
rubygems_version: 3.6.8
|
|
140
137
|
specification_version: 4
|
|
141
|
-
summary: lopata-0.1.
|
|
138
|
+
summary: lopata-0.1.35
|
|
142
139
|
test_files: []
|