allure-report-publisher 1.8.0 → 1.8.1

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: 4115ac96bf1ba67b88667f692f4d679badba58b771446fc6b31d814aee152367
4
- data.tar.gz: 4d3b7cf9834063ee9ccac56bcb1c81fe0b690a369929230255b7715106b43bc2
3
+ metadata.gz: 28ab75e7680995e9117eb144cb3091561c5149f2fca4e93b89ed7dc06bbbf5fb
4
+ data.tar.gz: ad1ef5249b916969807efb60619261ba3e24e2063d5914204fe17ded16abb928
5
5
  SHA512:
6
- metadata.gz: f904533b0677eeb3222689567663e26c828d6f14410a91cb87b031dc5b66b83db3c71becc56049c7ff43f3ea6c09f14800544e8530134aad0283a8a34b66179d
7
- data.tar.gz: 4cab5ad6c6965715e8a1a33a47cbe040bab2724f57225a3d7cd7fc99e7c1e8499f9eef7d8a4f671dc19468d988077f43b64fbaee77e1956ac9da95f8629f1519
6
+ metadata.gz: fada5ee179171b07a3387bd56abdff395413824d8819210c176e7b683fbd8caf3fab58d367c1ec33be89353324395ed6230ad3f763155f4d73a5b2ba95196f47
7
+ data.tar.gz: bc06329051f0d2a8317202e9e91b8438225e905beab68ef3ea735547e1c4167b67fe05e3bcb19eca82d577b4ec2d67e54af2d403b09b5e8f43f560f5c1738698
@@ -44,15 +44,21 @@ module Dry
44
44
  end.compact
45
45
  end
46
46
 
47
- def option_from_env(option) # rubocop:disable Metrics/CyclomaticComplexity
47
+ def option_from_env(option)
48
48
  name = "ALLURE_REPORT_#{option.name.to_s.upcase}"
49
49
  value = ENV[name]
50
50
  return if value.nil? || value.empty?
51
51
  return if option.boolean? && !%w[true false].include?(value)
52
- raise(InvalidEnvValue, "#{name} contains invalid value: '#{value}'") if option.values&.none?(value)
53
52
 
53
+ validate_accepted_values(option, value)
54
54
  option.boolean? ? value == "true" : value
55
55
  end
56
+
57
+ def validate_accepted_values(option, value)
58
+ return unless option.values&.none? { |v| v.to_s == value }
59
+
60
+ raise(InvalidEnvValue, "#{name} contains invalid value: '#{value}'")
61
+ end
56
62
  end
57
63
  end
58
64
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Publisher
4
- VERSION = "1.8.0"
4
+ VERSION = "1.8.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: allure-report-publisher
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.0
4
+ version: 1.8.1
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-01 00:00:00.000000000 Z
11
+ date: 2023-11-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-s3