allure-ruby-commons 2.30.2 → 2.31.0
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6bb3d41a92d2a5f31e4a1e183324d39762a4b470c063e681487d5e3a25b1a43d
|
|
4
|
+
data.tar.gz: 94f52c299af1494c6e6c372f562a196ba7c9000cb489f9b7effea335c2f8e9e7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 456d7632df840169a22ad9f632646b31c6154a3c6840731acd7994353a4cecb7555d89e22cbe25e7fd83422eb60235db271f5b4ca9de425881b5ab1daf53c526
|
|
7
|
+
data.tar.gz: 3d80679f0439e64299f62948621db0931ddbc34125e59c47722d2891468ca4810c00f58df0422772857d0a9a13acbe8dd2bb72cadd70aa118a591ff2495b921a
|
|
@@ -12,12 +12,13 @@ module Allure
|
|
|
12
12
|
# @option options [Boolean] :flaky
|
|
13
13
|
# @option options [String] :message
|
|
14
14
|
# @option options [String] :trace
|
|
15
|
-
def initialize(timestamp:, **options)
|
|
15
|
+
def initialize(timestamp:, status: nil, **options)
|
|
16
16
|
super(**options)
|
|
17
17
|
|
|
18
|
+
@status = status
|
|
18
19
|
@timestamp = timestamp
|
|
19
20
|
end
|
|
20
21
|
|
|
21
|
-
attr_accessor :timestamp
|
|
22
|
+
attr_accessor :timestamp, :status
|
|
22
23
|
end
|
|
23
24
|
end
|
|
@@ -157,9 +157,13 @@ module Allure
|
|
|
157
157
|
|
|
158
158
|
# Get exception status detail
|
|
159
159
|
# @param [Exception] exception
|
|
160
|
+
# @param [Hash] options
|
|
161
|
+
# @option options [Boolean] :known
|
|
162
|
+
# @option options [Boolean] :muted
|
|
163
|
+
# @option options [Boolean] :flaky
|
|
160
164
|
# @return [Allure::StatusDetails]
|
|
161
|
-
def status_details(exception)
|
|
162
|
-
StatusDetails.new(message: exception&.message, trace: exception&.backtrace&.join("\n"))
|
|
165
|
+
def status_details(exception, **options)
|
|
166
|
+
StatusDetails.new(message: exception&.message, trace: exception&.backtrace&.join("\n"), **options)
|
|
163
167
|
end
|
|
164
168
|
|
|
165
169
|
# Allure attachment object
|
|
@@ -190,15 +194,18 @@ module Allure
|
|
|
190
194
|
|
|
191
195
|
# Allure global error object
|
|
192
196
|
# @param [Number] timestamp
|
|
197
|
+
# @param [StandardError] :exception
|
|
193
198
|
# @param [Hash] options
|
|
194
199
|
# @option options [Boolean] :known
|
|
195
200
|
# @option options [Boolean] :muted
|
|
196
201
|
# @option options [Boolean] :flaky
|
|
197
|
-
# @option options [String] :message
|
|
198
|
-
# @option options [String] :trace
|
|
199
202
|
# @return [Allure::GlobalError]
|
|
200
|
-
def prepare_global_error(timestamp: self.timestamp, **options)
|
|
201
|
-
GlobalError.new(
|
|
203
|
+
def prepare_global_error(timestamp: self.timestamp, exception: nil, **options)
|
|
204
|
+
GlobalError.new(
|
|
205
|
+
timestamp: timestamp,
|
|
206
|
+
status: status(exception),
|
|
207
|
+
**status_details(exception, **options).to_hash.transform_keys(&:to_sym)
|
|
208
|
+
)
|
|
202
209
|
end
|
|
203
210
|
|
|
204
211
|
private
|