parallel_report_portal 2.5.0 → 3.0.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: dca25702756ef6361e293e078cbca0e4a7b3e58e01a172729f49a319fa43fd15
4
- data.tar.gz: 81397b39a9131c2ef601e782da487c7ec5be55cb6a90e8ba98d00de5c95248b5
3
+ metadata.gz: bdb8752fe04d7457a3333f818ee74af105d17f1cb32ae0c6ecd8daa897d11f7f
4
+ data.tar.gz: ef6b77445231d20740f515f046c35fd39266361fd6637b524958907c974b8014
5
5
  SHA512:
6
- metadata.gz: 8b1fd11d745dbba815364eadb751c9d8c15ff23fa36fd3c40490d1e2d718c125cc7d83cd7d4f8ca1540114ee86898b2fafc1405809506a92857840adc260d801
7
- data.tar.gz: ef8ba69e9d7cf3f61f78e56b3df1e8e256541192f22c1656267268c5c97a0878bb76ddc5f0411184f12a14d89bdc4396a99aaca2b267e92620204393fb38668d
6
+ metadata.gz: 19864c308420494e6dd7c0cd6321fc53aaafba70b1fe6d0ea0caf9957c69b308aaf9034e1c48551d4a06ae2580c827975489dcf6d22f5523d13c251bb966dce6
7
+ data.tar.gz: c70a9b840d9d9cb2e2b1ecb071d6b2ff65e5479faacdea9bcf2307cc4edde7d8f768e4cbde5d18fadd7e4d637ed2a50fe6ba0483031cb68bb869a4d34b521532
data/README.md CHANGED
@@ -46,7 +46,7 @@ read_timeout: 60
46
46
 
47
47
  It will search for the following environment variables which may be in upper or lowercase (the official client defers to lower case, this is available here for compatibility).
48
48
 
49
- - `RP_UUID` - the user's UUID for this Report Portal instance which must be created in advance
49
+ - `REPORT_PORTAL_API_KEY` - the API Key for this Report Portal instance which must be created in advance
50
50
  - `RP_ENDPOINT` - the endpoint for this Report Portal instance
51
51
  - `RP_PROJECT` - the Report Portal project name which must be created in advance and this user added as a member
52
52
  - `RP_LAUNCH` - the name of this 'launch'
@@ -14,7 +14,7 @@ module ParallelReportPortal
14
14
  #
15
15
  # == Environment variables
16
16
  #
17
- # RP_UUID:: The UUID of the user associated with this launch
17
+ # REPORT_PORTAL_API_KEY:: The API key required for authentication
18
18
  # RP_ENDPOINT:: the URL of the Report Portal API endpoint
19
19
  # RP_PROJECT:: the Report Portal project name -- this must already exist within Report Port and this user must be a member of the project
20
20
  # RP_LAUNCH:: The name of this launch
@@ -22,10 +22,10 @@ module ParallelReportPortal
22
22
  # RP_TAGS:: A set of tags to pass to Report Portal for this launch. If these are set via an environment variable, provide a comma-separated string of tags
23
23
  # RP_ATTRIBUTES:: A set of attribute tags to pass to Report Portal for this launch. If these are set via an environment variable, provide a comma-separated string of attributes
24
24
  class Configuration
25
- ATTRIBUTES = [:uuid, :endpoint, :project, :launch, :debug, :description, :tags, :attributes, :open_timeout, :idle_timeout, :read_timeout]
25
+ ATTRIBUTES = [:api_key, :endpoint, :project, :launch, :debug, :description, :tags, :attributes, :open_timeout, :idle_timeout, :read_timeout]
26
26
 
27
- # @return [String] the Report Portal user UUID
28
- attr_accessor :uuid
27
+ # @return [String] the Report Portal API key required for authorization
28
+ attr_accessor :api_key
29
29
  # @return [String] the Report Portal URI - this should include the scheme
30
30
  # e.g. +https://reportportal.local/api/v1+
31
31
  attr_accessor :endpoint
@@ -56,14 +56,21 @@ module ParallelReportPortal
56
56
  #
57
57
  # The initializer will first attempt to load a configuration files called
58
58
  # +report_portal.yml+ (case insensitive) in the both the +config+ and current
59
- # working directory (the former takes precidence). It will then apply
59
+ # working directory (the former takes precedence). It will then apply
60
60
  # any of the environment variable values.
61
61
  def initialize
62
62
  load_configuration_file
63
63
  ATTRIBUTES.each do |attr|
64
- env_value = get_env("rp_#{attr.to_s}")
64
+ env_value = get_env("rp_#{attr.to_s}") || get_env("report_portal_#{attr.to_s}")
65
65
  send(:"#{attr}=", env_value) if env_value
66
66
  end
67
+
68
+ # If this is compiled against OpenSSL v3, we need to turn off the exception raising
69
+ # when the server closes the stream without sending an EOF message in advance
70
+ if OpenSSL::SSL.const_defined?(:OP_IGNORE_UNEXPECTED_EOF)
71
+ # Assign the additional parameter with a bitwise 'or' assignment
72
+ OpenSSL::SSL::SSLContext::DEFAULT_PARAMS[:options] |= OpenSSL::SSL::OP_IGNORE_UNEXPECTED_EOF
73
+ end
67
74
  end
68
75
 
69
76
  # Sets the tags for the launch. If an array is provided, the array is used,
@@ -146,6 +153,8 @@ module ParallelReportPortal
146
153
  ATTRIBUTES.each do |attr|
147
154
  yaml_key = if yaml.has_key?("rp_#{attr}".to_sym)
148
155
  "rp_#{attr}".to_sym
156
+ elsif yaml.has_key?("report_portal_#{attr}".to_sym)
157
+ "report_portal_#{attr}".to_sym
149
158
  else
150
159
  attr
151
160
  end
@@ -1,5 +1,6 @@
1
1
  require 'logger'
2
2
  require 'tempfile'
3
+ require 'pry'
3
4
 
4
5
  module ParallelReportPortal
5
6
  # A collection of methods for communicating with the ReportPortal
@@ -22,7 +23,7 @@ module ParallelReportPortal
22
23
  #
23
24
  # @return [String] header the bearer header value
24
25
  def authorization_header
25
- "Bearer #{ParallelReportPortal.configuration.uuid}"
26
+ "Bearer #{ParallelReportPortal.configuration.api_key}"
26
27
  end
27
28
 
28
29
  # Get a preconstructed Faraday HTTP connection
@@ -81,7 +82,11 @@ module ParallelReportPortal
81
82
  mode: (ParallelReportPortal.configuration.debug ? 'DEBUG' : 'DEFAULT' ),
82
83
  attributes: ParallelReportPortal.configuration.attributes
83
84
  }.to_json
84
- end
85
+ end
86
+
87
+ pp "#########################"
88
+ pp resp
89
+
85
90
  if resp.success?
86
91
  JSON.parse(resp.body)['id']
87
92
  else
@@ -1,3 +1,3 @@
1
1
  module ParallelReportPortal
2
- VERSION = "2.5.0"
2
+ VERSION = "3.0.0"
3
3
  end
@@ -1,3 +1,4 @@
1
+ require 'openssl'
1
2
  require 'parallel_report_portal/after_launch'
2
3
  require "parallel_report_portal/clock"
3
4
  require "parallel_report_portal/configuration"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: parallel_report_portal
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.0
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nigel Brookes-Thomas
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2023-03-06 00:00:00.000000000 Z
12
+ date: 2023-12-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: appraisal
@@ -255,7 +255,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
255
255
  - !ruby/object:Gem::Version
256
256
  version: '0'
257
257
  requirements: []
258
- rubygems_version: 3.4.1
258
+ rubygems_version: 3.2.3
259
259
  signing_key:
260
260
  specification_version: 4
261
261
  summary: Run Cucumber Tests in parallel and with Cucumber 3 and 4+