action_subscriber 4.5.0 → 4.5.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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1256ef323e57f2381a127ec5a92b9a0e58004391
|
4
|
+
data.tar.gz: a4ba006c1307a92285397c36e443aa34a5cdbea9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bedc36d8710447385bf380a8c19df7327a073d61f02573149772ef455cceb9d51ce67256475e0cb6d56e122310417e8bd21332a75705e4323316966493d99782
|
7
|
+
data.tar.gz: 71c085717ca4b9c9fd9b90dbae6a35bb9895e7b11a435653723f15f2a4248b5f8b775633609de561ec2c9beab59abe32f254119dc27e086075a3cc4c64b27a64
|
@@ -63,7 +63,7 @@ module ActionSubscriber
|
|
63
63
|
yaml_config = {}
|
64
64
|
absolute_config_path = ::File.expand_path(::File.join("config", "action_subscriber.yml"))
|
65
65
|
if ::File.exists?(absolute_config_path)
|
66
|
-
yaml_config = ::YAML.
|
66
|
+
yaml_config = ::YAML.load(::ERB.new(::File.read(absolute_config_path)).result)[env]
|
67
67
|
end
|
68
68
|
|
69
69
|
::ActionSubscriber::Configuration::DEFAULTS.each_pair do |key, value|
|
@@ -12,6 +12,19 @@ describe ::ActionSubscriber::Configuration do
|
|
12
12
|
specify { expect(subject.tls).to eq(false) }
|
13
13
|
end
|
14
14
|
|
15
|
+
describe ".configure_from_yaml_and_cli" do
|
16
|
+
context "when using a yaml file" do
|
17
|
+
let!(:sample_yaml_location) { ::File.expand_path(::File.join("spec", "support", "sample_config.yml")) }
|
18
|
+
|
19
|
+
before { allow(::File).to receive(:expand_path) { sample_yaml_location } }
|
20
|
+
|
21
|
+
it "parses any ERB in the yaml" do
|
22
|
+
expect(::ActionSubscriber.configuration).to receive(:password=).with("WAT").and_return(true)
|
23
|
+
::ActionSubscriber::Configuration.configure_from_yaml_and_cli({}, true)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
15
28
|
describe "add_decoder" do
|
16
29
|
it "add the decoder to the registry" do
|
17
30
|
subject.add_decoder({"application/protobuf" => lambda { |payload| "foo"} })
|
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: 4.5.
|
4
|
+
version: 4.5.1
|
5
5
|
platform: ruby
|
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: 2017-
|
15
|
+
date: 2017-09-24 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: activesupport
|
@@ -261,6 +261,7 @@ files:
|
|
261
261
|
- spec/lib/action_subscriber/router_spec.rb
|
262
262
|
- spec/lib/action_subscriber/subscribable_spec.rb
|
263
263
|
- spec/spec_helper.rb
|
264
|
+
- spec/support/sample_config.yml
|
264
265
|
- spec/support/user_subscriber.rb
|
265
266
|
homepage: https://github.com/mxenabled/action_subscriber
|
266
267
|
licenses:
|
@@ -282,7 +283,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
282
283
|
version: '0'
|
283
284
|
requirements: []
|
284
285
|
rubyforge_project:
|
285
|
-
rubygems_version: 2.
|
286
|
+
rubygems_version: 2.6.13
|
286
287
|
signing_key:
|
287
288
|
specification_version: 4
|
288
289
|
summary: ActionSubscriber is a DSL that allows a rails app to consume messages from
|
@@ -311,4 +312,5 @@ test_files:
|
|
311
312
|
- spec/lib/action_subscriber/router_spec.rb
|
312
313
|
- spec/lib/action_subscriber/subscribable_spec.rb
|
313
314
|
- spec/spec_helper.rb
|
315
|
+
- spec/support/sample_config.yml
|
314
316
|
- spec/support/user_subscriber.rb
|