active_publisher 1.4.0 → 1.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +2 -2
- data/lib/active_publisher/configuration.rb +12 -2
- data/lib/active_publisher/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 29d5272d509cc5f9a8e2ff0de59457ef5de1a98e57db0d777feb9e27f6e4e75d
|
4
|
+
data.tar.gz: 97b72119524a26af0caf2536f71e08547dbc3785ce6aacf3143a848a325a9cee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 83072d8997f470c99b02c683cddc669b57e6087576fae90ef957b79d414652785a1e4c9b1de384aa35a8c89be2276f539f1abcd17a88a67598496162c2bab4c1
|
7
|
+
data.tar.gz: e388ff6b32215969e32f437f7663216e703ef53ccd03e792ac427604629e4e658313b095aec14ae18c2bd6b35c6a8e147e22f5130c776d50f7d6a459d164e63b
|
data/.circleci/config.yml
CHANGED
@@ -83,11 +83,13 @@ module ActivePublisher
|
|
83
83
|
yaml_config = {}
|
84
84
|
absolute_config_path = ::File.expand_path(::File.join("config", "active_publisher.yml"))
|
85
85
|
action_subscriber_config_file = ::File.expand_path(::File.join("config", "action_subscriber.yml"))
|
86
|
+
|
86
87
|
if ::File.exists?(absolute_config_path)
|
87
|
-
yaml_config =
|
88
|
+
yaml_config = load_yaml_config_from_file(absolute_config_path)[env]
|
88
89
|
elsif ::File.exists?(action_subscriber_config_file)
|
89
|
-
yaml_config =
|
90
|
+
yaml_config = load_yaml_config_from_file(action_subscriber_config_file)[env]
|
90
91
|
end
|
92
|
+
|
91
93
|
yaml_config
|
92
94
|
end
|
93
95
|
private_class_method :attempt_to_load_yaml_file
|
@@ -101,6 +103,14 @@ module ActivePublisher
|
|
101
103
|
end
|
102
104
|
private_class_method :fetch_config_value
|
103
105
|
|
106
|
+
def self.load_yaml_config_from_file(file_path)
|
107
|
+
erb_yaml = ::ERB.new(::File.read(file_path)).result
|
108
|
+
# Defined in Psych 3.2+ and the new canonical way to load trusted documents:
|
109
|
+
# https://github.com/ruby/psych/issues/533#issuecomment-1019363688
|
110
|
+
::YAML.respond_to?(:unsafe_load) ? ::YAML.unsafe_load(erb_yaml) : ::YAML.load(erb_yaml)
|
111
|
+
end
|
112
|
+
private_class_method :load_yaml_config_from_file
|
113
|
+
|
104
114
|
##
|
105
115
|
# Instance Methods
|
106
116
|
#
|
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.4.
|
4
|
+
version: 1.4.2
|
5
5
|
platform: ruby
|
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: 2022-
|
15
|
+
date: 2022-05-10 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: bunny
|
@@ -223,7 +223,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
223
223
|
- !ruby/object:Gem::Version
|
224
224
|
version: '0'
|
225
225
|
requirements: []
|
226
|
-
rubygems_version: 3.
|
226
|
+
rubygems_version: 3.3.13
|
227
227
|
signing_key:
|
228
228
|
specification_version: 4
|
229
229
|
summary: Aims to make publishing work across MRI and jRuby painless and add some nice
|