allure-ruby-commons 2.21.2 → 2.22.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: '099ba3dddaa422aadd6805174b9ea6355be15b89b0587baf39d379dfda0763ad'
|
4
|
+
data.tar.gz: 066eb591f740c700e09f712b86b83c28bac6fd903321d8643426872a0ba61bbe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c6f36b3ecdc794f0ddb952e125a9cd55600763478038dd7634ff40e7131f75f246a726bf189871f6581a4a051b5c095b605ffcc464389dcb8538eed5bcdf3cf5
|
7
|
+
data.tar.gz: 94efb6010db9cbca76f4136567a6c4330108ec6b2d140f36d007dcb5c64ae53fd5ed4dd05cb7184119af04d894f4eea1f5da78238bf7377c823e947d614edd56
|
@@ -6,9 +6,9 @@ module Allure
|
|
6
6
|
# Return object hash represantation
|
7
7
|
# @return [Hash]
|
8
8
|
def to_hash
|
9
|
-
|
10
|
-
key = camelcase(
|
11
|
-
value =
|
9
|
+
json_attributes.each_with_object({}) do |attribute, map|
|
10
|
+
key = camelcase(attribute)
|
11
|
+
value = send(attribute) # fetch via reader for dynamically generated attributes
|
12
12
|
map[key] = value unless value.nil?
|
13
13
|
end
|
14
14
|
end
|
@@ -33,7 +33,7 @@ module Allure
|
|
33
33
|
# Object state
|
34
34
|
# @return [Array]
|
35
35
|
def state
|
36
|
-
|
36
|
+
json_attributes.map { |attribute| send(attribute) }
|
37
37
|
end
|
38
38
|
|
39
39
|
private
|
@@ -45,5 +45,12 @@ module Allure
|
|
45
45
|
str = str.gsub(/(?:_+)([a-z])/) { Regexp.last_match(1).upcase }
|
46
46
|
str.gsub(/(\A|\s)([A-Z])/) { Regexp.last_match(1) + Regexp.last_match(2).downcase }
|
47
47
|
end
|
48
|
+
|
49
|
+
# Json attribute names
|
50
|
+
#
|
51
|
+
# @return [Array<String>]
|
52
|
+
def json_attributes
|
53
|
+
@json_attributes ||= instance_variables.map { |attribute| attribute.to_s.delete_prefix("@") }
|
54
|
+
end
|
48
55
|
end
|
49
56
|
end
|
@@ -24,7 +24,7 @@ module Allure
|
|
24
24
|
|
25
25
|
@name = options[:name]
|
26
26
|
@uuid = uuid
|
27
|
-
@history_id =
|
27
|
+
@history_id = history_id
|
28
28
|
@full_name = options[:full_name] || "Unnamed"
|
29
29
|
@labels = options[:labels] || []
|
30
30
|
@links = options[:links] || []
|
@@ -32,9 +32,26 @@ module Allure
|
|
32
32
|
end
|
33
33
|
|
34
34
|
attr_accessor :uuid,
|
35
|
-
:history_id,
|
36
35
|
:full_name,
|
37
36
|
:labels,
|
38
37
|
:links
|
38
|
+
|
39
|
+
attr_writer :history_id
|
40
|
+
|
41
|
+
# History id
|
42
|
+
#
|
43
|
+
# @return [String]
|
44
|
+
def history_id
|
45
|
+
Digest::MD5.hexdigest("#{@history_id}#{parameters_string}")
|
46
|
+
end
|
47
|
+
|
48
|
+
private
|
49
|
+
|
50
|
+
# All parameters string
|
51
|
+
#
|
52
|
+
# @return [String]
|
53
|
+
def parameters_string
|
54
|
+
parameters.map { |p| "#{p.name}=#{p.value}" }.join(";")
|
55
|
+
end
|
39
56
|
end
|
40
57
|
end
|
@@ -14,6 +14,15 @@ module Allure
|
|
14
14
|
@links = []
|
15
15
|
end
|
16
16
|
|
17
|
-
attr_accessor :uuid,
|
17
|
+
attr_accessor :uuid,
|
18
|
+
:name,
|
19
|
+
:description,
|
20
|
+
:description_html,
|
21
|
+
:start,
|
22
|
+
:stop,
|
23
|
+
:children,
|
24
|
+
:befores,
|
25
|
+
:afters,
|
26
|
+
:links
|
18
27
|
end
|
19
28
|
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.22.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: 2023-
|
11
|
+
date: 2023-06-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mime-types
|
@@ -133,14 +133,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
133
133
|
requirements:
|
134
134
|
- - ">="
|
135
135
|
- !ruby/object:Gem::Version
|
136
|
-
version:
|
136
|
+
version: 3.0.0
|
137
137
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
138
138
|
requirements:
|
139
139
|
- - ">="
|
140
140
|
- !ruby/object:Gem::Version
|
141
141
|
version: '0'
|
142
142
|
requirements: []
|
143
|
-
rubygems_version: 3.
|
143
|
+
rubygems_version: 3.4.10
|
144
144
|
signing_key:
|
145
145
|
specification_version: 4
|
146
146
|
summary: Common library for allure results generation
|