active_publisher 1.2.2 → 1.2.3

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: 0a22dd5fbe130fe45df2633fb93b3d9f348010ebbbd57ad10901ff8ef497c772
4
- data.tar.gz: a9bdc1b37c19ea0b84d6769e33624d3118c6b6138587e6ca652b6a715a01dfa8
3
+ metadata.gz: 7d07df691c4875cf4b99d301fc9cc3113a83b8ecaf888b6d2b6320b887c74f2d
4
+ data.tar.gz: 5b15565ea6e5d191bd251d527bf5f32377ec27e6642453b9fee3942538edca2e
5
5
  SHA512:
6
- metadata.gz: 66b80f57c49e3bdfbb460956696742450dbe8c214ab3672017b70393767ca70e22b980d92c3df2168b9a162bbd72bb9d2e8a791d37217fe2f239e956762e2fba
7
- data.tar.gz: 367add67720237a0ee85514f460b41ceab2633c9729f6676260702eef6709d8e8f8a010fed59f015fac82f64bb8e4dad6ef2b20327032a7d89a1f1f6b6228c47
6
+ metadata.gz: 7517b881037d04cb66effd45d49e16b39adbbdd76dbc0568d49440e9fd6e0ba8c960c5abd0b0c8df38209efe3c40d751a92e4b469746e764ebf04c5be01de58d
7
+ data.tar.gz: fd049283784c2a6eca92fdf7ab008364edf1c4e691b7a2f8adf2a724a4478576c91c5375633f6253fb16f9e7c84e379ff5b6fdb8d02caf4ff8227252d1168df2
@@ -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: ruby
6
6
  authors:
7
7
  - Brian Stien
@@ -9,10 +9,10 @@ authors:
9
9
  - Brandon Dewitt
10
10
  - Devin Christensen
11
11
  - Michael Ries
12
- autorequire:
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
  name: bunny
@@ -208,7 +208,7 @@ homepage: https://github.com/mxenabled/active_publisher
208
208
  licenses:
209
209
  - MIT
210
210
  metadata: {}
211
- post_install_message:
211
+ post_install_message:
212
212
  rdoc_options: []
213
213
  require_paths:
214
214
  - lib
@@ -223,9 +223,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
223
223
  - !ruby/object:Gem::Version
224
224
  version: '0'
225
225
  requirements: []
226
- rubyforge_project:
227
- rubygems_version: 2.7.6
228
- signing_key:
226
+ rubygems_version: 3.1.2
227
+ signing_key:
229
228
  specification_version: 4
230
229
  summary: Aims to make publishing work across MRI and jRuby painless and add some nice
231
230
  features like automatially publishing lifecycle events for ActiveRecord models.