active_publisher 1.2.2-java → 1.2.3-java

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: 8b9c83ffe7b068d340c60ce3487b409eff93776ef7e1a431f7493aede45c7098
4
- data.tar.gz: 9a5019a2d7be9a60ca2afa5e1b60b2dd122c599da029f5908c0933116801dd0f
3
+ metadata.gz: 15d88cf40d6d054ecdb12cf8d079fb8e09fedd02e19aab629e4034cbbb667979
4
+ data.tar.gz: 6c6e47f2d49b035c433a9fc400f83aa0b96ac5d1b0a8a926730476bbe5250b66
5
5
  SHA512:
6
- metadata.gz: 586bca9328785ab472ce142fa2224dd20c16a3d2ddc1105b5dc8a98f67ed5d6fe23751074991a16ec6162327512373220bf11a84577eed62bc0027e8aa62c460
7
- data.tar.gz: 7d4bfc3de040b8d27232f01c89794976667f3e607a30f01f6c99a747de6f42477168d775fdd749d797b15af9ad6814a6338ed3f98a299ba0c6b8a137773a8490
6
+ metadata.gz: a9d25a3231071ff71ebc32d0e98b362ae1c558b67e568df50806930567d334a57783a428007e95504d7c14e0a7deebf7b864457e008dabfb7a715b51b8fe8358
7
+ data.tar.gz: e90cd0c23105cd8ededa04d3bc0636e76d589b60f7060f8784720c2c7cd594e33d27063581b7787babd1cf87878deacea39a34269344257809ec46676143cfd6
@@ -63,8 +63,8 @@ module ActivePublisher
63
63
 
64
64
  yaml_config = attempt_to_load_yaml_file(env)
65
65
  DEFAULTS.each_pair do |key, value|
66
- setting = cli_options[key] || cli_options[key.to_s] || yaml_config[key] || yaml_config[key.to_s]
67
- ::ActivePublisher.configuration.public_send("#{key}=", setting) if setting
66
+ exists, setting = fetch_config_value(key, cli_options, yaml_config)
67
+ ::ActivePublisher.configuration.public_send("#{key}=", setting) if exists
68
68
  end
69
69
 
70
70
  true
@@ -88,6 +88,15 @@ module ActivePublisher
88
88
  end
89
89
  private_class_method :attempt_to_load_yaml_file
90
90
 
91
+ def self.fetch_config_value(key, cli_options, yaml_config)
92
+ return [true, cli_options[key]] if cli_options.key?(key)
93
+ return [true, cli_options[key.to_s]] if cli_options.key?(key.to_s)
94
+ return [true, yaml_config[key]] if yaml_config.key?(key)
95
+ return [true, yaml_config[key.to_s]] if yaml_config.key?(key.to_s)
96
+ [false, nil]
97
+ end
98
+ private_class_method :fetch_config_value
99
+
91
100
  ##
92
101
  # Instance Methods
93
102
  #
@@ -1,3 +1,3 @@
1
1
  module ActivePublisher
2
- VERSION = "1.2.2"
2
+ VERSION = "1.2.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_publisher
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
4
+ version: 1.2.3
5
5
  platform: java
6
6
  authors:
7
7
  - Brian Stien
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: exe
14
14
  cert_chain: []
15
- date: 2020-05-19 00:00:00.000000000 Z
15
+ date: 2020-07-29 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  requirement: !ruby/object:Gem::Requirement