action_subscriber 5.2.1-java → 5.2.2-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: bca78c71253cc0e0b3c8f4c7b2ba62bc9b98919b5f66f057f14e29b6d646aba4
4
- data.tar.gz: 38e3d342e82a51bbfc07cc6f8cf48d273723553b0946b3d00802269ad0ddb783
3
+ metadata.gz: 69350b95fb8b203e390c3aac19dc9d53af00b2c517bd465b47c415633109b107
4
+ data.tar.gz: 5d93a16416a0cd14595ae0e0e029988154496575501862b4ecdd7469754004e6
5
5
  SHA512:
6
- metadata.gz: c4beea316e1c5f47b62ee9d49a450fd47c1b166e426cbdb625d96e198e2b995d76682144857ef62b114dafea062001b6bd329598b8830950980c8d0733ed3ebc
7
- data.tar.gz: 1f6daf1342da85dca5c9b19054c4d801cc0c94781fe36cd4a1bbdbafb13901d9b827ae18b60677a0b2528b39eca06a2b984eb38083d4f88ae83a0d77f51db076
6
+ metadata.gz: 95909a21c18bdf27b56646b3431f200918618d30610dbab37d6afa6ca032e78695f603d9c8e3014f278346ce6493ee8e32f75526c3c51e71636d3d8595189b18
7
+ data.tar.gz: 680505cffe5b8b404b22e22246b104b58ef3e02cea0d0c501e56acb03d7daa3de03167067a9a26fa8147d89a8c12b89aab1b0cc98e3fd03f5bf6f0da21dd474b
@@ -77,8 +77,8 @@ module ActionSubscriber
77
77
  end
78
78
 
79
79
  ::ActionSubscriber::Configuration::DEFAULTS.each_pair do |key, value|
80
- setting = cli_options[key] || yaml_config[key.to_s]
81
- ::ActionSubscriber.config.__send__("#{key}=", setting) if setting
80
+ exists, setting = fetch_config_value(key, cli_options, yaml_config)
81
+ ::ActionSubscriber.config.__send__("#{key}=", setting) if exists
82
82
  end
83
83
 
84
84
  true
@@ -86,6 +86,15 @@ module ActionSubscriber
86
86
  end
87
87
  end
88
88
 
89
+ def self.fetch_config_value(key, cli_options, yaml_config)
90
+ return [true, cli_options[key]] if cli_options.key?(key)
91
+ return [true, cli_options[key.to_s]] if cli_options.key?(key.to_s)
92
+ return [true, yaml_config[key]] if yaml_config.key?(key)
93
+ return [true, yaml_config[key.to_s]] if yaml_config.key?(key.to_s)
94
+ [false, nil]
95
+ end
96
+ private_class_method :fetch_config_value
97
+
89
98
  ##
90
99
  # Instance Methods
91
100
  #
@@ -1,3 +1,3 @@
1
1
  module ActionSubscriber
2
- VERSION = "5.2.1"
2
+ VERSION = "5.2.2"
3
3
  end
@@ -24,6 +24,13 @@ describe ::ActionSubscriber::Configuration do
24
24
  ::ActionSubscriber::Configuration.configure_from_yaml_and_cli({}, true)
25
25
  end
26
26
  end
27
+
28
+ it "can override a true value with a false value" do
29
+ expect(::ActionSubscriber.configuration.verify_peer).to eq(true)
30
+ expect(::ActionSubscriber.configuration).to receive(:verify_peer=).with(false).and_call_original
31
+ ::ActionSubscriber::Configuration.configure_from_yaml_and_cli({"verify_peer" => false}, true)
32
+ expect(::ActionSubscriber.configuration.verify_peer).to eq(false)
33
+ end
27
34
  end
28
35
 
29
36
  describe "add_decoder" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: action_subscriber
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.2.1
4
+ version: 5.2.2
5
5
  platform: java
6
6
  authors:
7
7
  - Brian Stien
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
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