allure-ruby-commons 2.16.1 → 2.18.0
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 314e5c35dcf53752370133d6a56074fe13e31f26556f211ac11dc47d2ca2d0d6
|
4
|
+
data.tar.gz: b0ae5fa88b721235c401ec1233a9146679b1f69bb2af6d3b1747b426fe4154b0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b285dd476289abb6bb747855bfd68fb0a352e23bdb1735cafb891017d374f06aa672b86f39be0fcfa9ca7ad1511e1738c6a3cd86c0876bbcf5650a2fa412cf6
|
7
|
+
data.tar.gz: 68a63215797e89056297baf408e052851a8ae61fc7bde97ea5ea9366d6dc22c3626ce1f6db52cefa8c50fe6b3a8de03cef7b2337fa186427066274ba1c875fce
|
data/README.md
CHANGED
@@ -104,23 +104,3 @@ class TestHelper
|
|
104
104
|
def standard_method; end
|
105
105
|
end
|
106
106
|
```
|
107
|
-
|
108
|
-
## Testing
|
109
|
-
|
110
|
-
Install dependencies:
|
111
|
-
|
112
|
-
```bash
|
113
|
-
bundle install
|
114
|
-
```
|
115
|
-
|
116
|
-
Run tests:
|
117
|
-
|
118
|
-
```bash
|
119
|
-
bundle exec rspec
|
120
|
-
```
|
121
|
-
|
122
|
-
## Building
|
123
|
-
|
124
|
-
```bash
|
125
|
-
gem build allure-ruby-commons.gemspec
|
126
|
-
```
|
@@ -16,7 +16,6 @@ module Allure
|
|
16
16
|
@step_context = []
|
17
17
|
@config = config
|
18
18
|
@logger = config.logger
|
19
|
-
@file_writer = FileWriter.new(config.results_directory)
|
20
19
|
end
|
21
20
|
|
22
21
|
attr_reader :config
|
@@ -259,7 +258,11 @@ module Allure
|
|
259
258
|
|
260
259
|
private
|
261
260
|
|
262
|
-
attr_reader :logger
|
261
|
+
attr_reader :logger
|
262
|
+
|
263
|
+
def file_writer
|
264
|
+
@file_writer ||= FileWriter.new(config.results_directory)
|
265
|
+
end
|
263
266
|
|
264
267
|
def current_executable
|
265
268
|
current_test_step || @current_fixture || @current_test_case
|
@@ -13,6 +13,8 @@ module Allure
|
|
13
13
|
ENVIRONMENT_FILE = "environment.properties"
|
14
14
|
# @return [String] categories definition json
|
15
15
|
CATEGORIES_FILE = "categories.json"
|
16
|
+
# @return [Hash] Oj json options
|
17
|
+
OJ_OPTIONS = { mode: :custom, use_to_hash: true, ascii_only: true }.freeze
|
16
18
|
|
17
19
|
# File writer instance
|
18
20
|
#
|
@@ -25,14 +27,14 @@ module Allure
|
|
25
27
|
# @param [Allure::TestResult] test_result
|
26
28
|
# @return [void]
|
27
29
|
def write_test_result(test_result)
|
28
|
-
write("#{test_result.uuid}#{TEST_RESULT_SUFFIX}", Oj.dump(test_result))
|
30
|
+
write("#{test_result.uuid}#{TEST_RESULT_SUFFIX}", Oj.dump(test_result, OJ_OPTIONS))
|
29
31
|
end
|
30
32
|
|
31
33
|
# Write test result container
|
32
34
|
# @param [Allure::TestResultContainer] test_container_result
|
33
35
|
# @return [void]
|
34
36
|
def write_test_result_container(test_container_result)
|
35
|
-
write("#{test_container_result.uuid}#{TEST_RESULT_CONTAINER_SUFFIX}", Oj.dump(test_container_result))
|
37
|
+
write("#{test_container_result.uuid}#{TEST_RESULT_CONTAINER_SUFFIX}", Oj.dump(test_container_result, OJ_OPTIONS))
|
36
38
|
end
|
37
39
|
|
38
40
|
# Write allure attachment file
|
@@ -59,7 +61,7 @@ module Allure
|
|
59
61
|
if categories.is_a?(File)
|
60
62
|
copy(categories.path, CATEGORIES_FILE)
|
61
63
|
else
|
62
|
-
write(CATEGORIES_FILE, Oj.dump(categories))
|
64
|
+
write(CATEGORIES_FILE, Oj.dump(categories, OJ_OPTIONS))
|
63
65
|
end
|
64
66
|
end
|
65
67
|
|
@@ -33,7 +33,7 @@ module AllureStepAnnotation
|
|
33
33
|
@allure_step = nil
|
34
34
|
|
35
35
|
define_method(method_name) do |*args, &block|
|
36
|
-
Allure.run_step(step_name) { original_method.
|
36
|
+
Allure.run_step(step_name) { original_method.bind_call(self, *args, &block) }
|
37
37
|
end
|
38
38
|
end
|
39
39
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: allure-ruby-commons
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.18.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrejs Cunskis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-05-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mime-types
|
@@ -138,14 +138,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
138
138
|
requirements:
|
139
139
|
- - ">="
|
140
140
|
- !ruby/object:Gem::Version
|
141
|
-
version: 2.
|
141
|
+
version: 2.7.0
|
142
142
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
143
143
|
requirements:
|
144
144
|
- - ">="
|
145
145
|
- !ruby/object:Gem::Version
|
146
146
|
version: '0'
|
147
147
|
requirements: []
|
148
|
-
rubygems_version: 3.3.
|
148
|
+
rubygems_version: 3.3.7
|
149
149
|
signing_key:
|
150
150
|
specification_version: 4
|
151
151
|
summary: Common library for allure results generation
|