yaml_vault 1.0.1 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/yaml_vault/rails.rb +9 -1
- data/lib/yaml_vault/version.rb +1 -1
- 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: a79d04cb3d8df1d8f24a3411fee8557b49244634
|
4
|
+
data.tar.gz: 1ab20b6c54798ea32f882c50eb0bbd03204124d4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 27f581f18b544b3b794024af3aa415660bd7d8974cffb19e7746806e9da3dc195e83a64e59e63700cdbe063cd49de75500a122c5aa434c66843f32a980b35bea
|
7
|
+
data.tar.gz: 0d4005e3c7722f0472f66e8f54429ab47def0647783f99ccbfca3b7f88199f423f16233ad45d4b4cf8d16447d9b2617945e9ec149a99c6ebd615b04da45c039e
|
data/lib/yaml_vault/rails.rb
CHANGED
@@ -9,7 +9,15 @@ module YamlVault
|
|
9
9
|
if File.exist?(yaml)
|
10
10
|
all_secrets = YamlVault::Main.from_content(IO.read(yaml), keys, cryptor_name, **options).decrypt_hash
|
11
11
|
env_secrets = all_secrets[::Rails.env]
|
12
|
-
|
12
|
+
if env_secrets
|
13
|
+
if Gem::Version.new(::Rails::VERSION::STRING) >= Gem::Version.new("5.1")
|
14
|
+
# In Rails 5.1, nested keys are also symbolized
|
15
|
+
# cf. https://github.com/rails/rails/pull/26929
|
16
|
+
secrets.merge!(env_secrets.deep_symbolize_keys)
|
17
|
+
else
|
18
|
+
secrets.merge!(env_secrets.symbolize_keys)
|
19
|
+
end
|
20
|
+
end
|
13
21
|
end
|
14
22
|
|
15
23
|
# Fallback to config.secret_key_base if secrets.secret_key_base isn't set
|
data/lib/yaml_vault/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yaml_vault
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- joker1007
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-12-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|