kumo_config 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/VERSION +1 -1
- data/lib/kumo_config/environment_config.rb +4 -11
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 057d0c96fdd473d060942939db4b8592a1f82f03
|
4
|
+
data.tar.gz: 55a029b3e3f9b39341beae46e02bbb1e2a342b02
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a4c3eb97c6b39a14f9f7db8a10a8309080574d3d557f778d2e877705ada09c5064f07fc3e9364a5521282700658c022808f0391b9a950573b26b077102e1a110
|
7
|
+
data.tar.gz: b6e7016fcb5bf81243052efd4ca3781e0a2c821a82e0a71dae04cd2a79eabc538b43301388fc8b4ff552c138e8ea57daad43385c9418bf8b8fc51bb82736eea9
|
data/.gitignore
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.2
|
@@ -5,7 +5,7 @@ require 'yaml'
|
|
5
5
|
require_relative 'file_loader'
|
6
6
|
|
7
7
|
module KumoConfig
|
8
|
-
# Environment Configuration for
|
8
|
+
# Environment Configuration for an infrastructure stack
|
9
9
|
class EnvironmentConfig
|
10
10
|
class ConfigurationError < StandardError; end
|
11
11
|
|
@@ -15,15 +15,14 @@ module KumoConfig
|
|
15
15
|
|
16
16
|
def initialize(options, logger = LOGGER)
|
17
17
|
@env_name = options[:env_name]
|
18
|
-
@params_template_file_path = options[:params_template_file_path]
|
19
18
|
@injected_config = options[:injected_config] || {}
|
20
19
|
@log = logger
|
21
20
|
|
22
21
|
if options[:config_path]
|
23
|
-
|
22
|
+
@config_file_loader = KumoConfig::FileLoader.new(config_dir_path: options[:config_path])
|
24
23
|
elsif options[:config_dir_path]
|
25
|
-
|
26
|
-
|
24
|
+
@log.warn "[DEPRECATION] `:config_dir_path` is deprecated, please pass in `:config_path` instead"
|
25
|
+
@config_file_loader = KumoConfig::FileLoader.new(config_dir_path: options[:config_dir_path])
|
27
26
|
end
|
28
27
|
|
29
28
|
end
|
@@ -55,12 +54,6 @@ module KumoConfig
|
|
55
54
|
@kms ||= KumoKi::KMS.new
|
56
55
|
end
|
57
56
|
|
58
|
-
def params_template_erb
|
59
|
-
return nil unless @params_template_file_path && File.exist?(@params_template_file_path)
|
60
|
-
template_file_loader = KumoConfig::FileLoader.new(config_dir_path: File.dirname(@params_template_file_path))
|
61
|
-
template_file_loader.load_erb(File.basename(@params_template_file_path))
|
62
|
-
end
|
63
|
-
|
64
57
|
def decrypt_secrets(secrets)
|
65
58
|
Hash[
|
66
59
|
secrets.map do |name, cipher_text|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kumo_config
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Redbubble
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-09-
|
11
|
+
date: 2016-09-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: kumo_ki
|