allure-ruby-commons 2.15.0 → 2.16.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: 284b37ad75460156a0b06aa8725ae5687b69a6ee7aa9a59691cf5148e51b1db0
4
- data.tar.gz: e635323b10208124ee787334132bde0c714fb70e42b1b969595e6c35e0eb989e
3
+ metadata.gz: 1693932b785f983a4fbf0578d91210b32cb01d9a54d2e75867d484bdaa5e3017
4
+ data.tar.gz: 63903a5a5e38fef5f5db1a4b263a6aa0da6ab18cd7217530fa448c626684d257
5
5
  SHA512:
6
- metadata.gz: 2c90af87fa423669ec1bf027bbd32f316a567df317f9d07ea03a9dab86107f2753609f00208510bb1ca9b4f5c4f71a20cfda08f4332ad2f667bfb8053be4fb08
7
- data.tar.gz: 56bf9f7d9ea0ae31d8b35749d999a9b2a98d3dca0de6ee27124a428402a2d152a2c6b7874faa2f3b97e363155debfcea9b7ad2d76b40199eed7e6f663f322059
6
+ metadata.gz: 9f4bdd16a55c95f1c8c47751d7123eec6d3fd6edb9bd4e0064e657b23a4791eb5c00753f5381079122d6630d7cb726ed3f1d8f3e6c384070a513943af056d3e0
7
+ data.tar.gz: d371fb2e1e508e1f5959ba0dd88eb61fa0a10ba00a767607a59c86af6d8a996cf2ef964d320a7bb994b000890d69ad4d57e9042321fb1a5a32ff52d3a1832df3
@@ -207,5 +207,15 @@ module Allure
207
207
  ensure
208
208
  lifecycle.stop_test_step
209
209
  end
210
+
211
+ # Add parameter to current test step
212
+ # @param [String] name
213
+ # @param [String] value
214
+ # @return [void]
215
+ def step_parameter(name, value)
216
+ lifecycle.update_test_step do |step|
217
+ step.parameters.push(Parameter.new(name, value))
218
+ end
219
+ end
210
220
  end
211
221
  # rubocop:enable Naming/FileName
@@ -73,7 +73,7 @@ module Allure
73
73
 
74
74
  def write(name, source)
75
75
  filename = File.join(output_dir, name)
76
- File.open(filename, "w") { |file| file.write(source) }
76
+ File.write(filename, source)
77
77
  end
78
78
 
79
79
  def copy(from, to)
@@ -24,6 +24,7 @@ module Allure
24
24
  @stage = options[:stage] || Stage::SCHEDULED
25
25
  @steps = options[:steps] || []
26
26
  @attachments = options[:attachments] || []
27
+ @parameters = options[:parameters] || []
27
28
  end
28
29
 
29
30
  attr_accessor :name,
@@ -34,6 +35,7 @@ module Allure
34
35
  :description_html,
35
36
  :steps,
36
37
  :attachments,
38
+ :parameters,
37
39
  :start,
38
40
  :stop
39
41
  end
@@ -28,27 +28,13 @@ module Allure
28
28
  @full_name = options[:full_name] || "Unnamed"
29
29
  @labels = options[:labels] || []
30
30
  @links = options[:links] || []
31
- @parameters = updated_parameters(options[:parameters] || [], environment)
31
+ @parameters << Parameter.new("environment", environment) if environment
32
32
  end
33
33
 
34
34
  attr_accessor :uuid,
35
35
  :history_id,
36
36
  :full_name,
37
37
  :labels,
38
- :links,
39
- :parameters
40
-
41
- private
42
-
43
- # Test name prefixed with allure environment
44
- #
45
- # @param [Array] parameters
46
- # @param [String] environment
47
- # @return [Array]
48
- def updated_parameters(parameters, environment)
49
- return parameters unless environment
50
-
51
- parameters << Parameter.new("environment", environment)
52
- end
38
+ :links
53
39
  end
54
40
  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.15.0
4
+ version: 2.16.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: 2021-10-04 00:00:00.000000000 Z
11
+ date: 2022-01-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mime-types
@@ -129,6 +129,7 @@ metadata:
129
129
  documentation_uri: https://github.com/allure-framework/allure-ruby/blob/master/allure-ruby-commons/README.md
130
130
  source_code_uri: https://github.com/allure-framework/allure-ruby/tree/master/allure-ruby-commons
131
131
  wiki_uri: https://github.com/allure-framework/allure-ruby/wiki
132
+ rubygems_mfa_required: 'false'
132
133
  post_install_message:
133
134
  rdoc_options: []
134
135
  require_paths:
@@ -144,7 +145,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
144
145
  - !ruby/object:Gem::Version
145
146
  version: '0'
146
147
  requirements: []
147
- rubygems_version: 3.2.22
148
+ rubygems_version: 3.3.3
148
149
  signing_key:
149
150
  specification_version: 4
150
151
  summary: Common library for allure results generation