envin 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/lib/envin/converter.rb +2 -2
- data/lib/envin/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a8a0ce0ef887a10279f6ced064366c37455d03d1
|
4
|
+
data.tar.gz: 9da65e890dbb3894863f607bc1883245e59a748f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7afe1e28fb7c4bf813c5d835fcf3e16b28cd13ad816b00b9f50b1a45609742cc3137f30874e01d602dd970b8d9e458259d636ba543eb252a8845c4a2763d039c
|
7
|
+
data.tar.gz: 2739d554fd6d0625332212761697540e3ee34f0a3c651357375aba0f03fcd66f77a5deeaea4214981e36a8e1a70897dd7f958df661b659e0ae10da4f348b794b
|
data/Gemfile.lock
CHANGED
data/lib/envin/converter.rb
CHANGED
@@ -26,13 +26,13 @@ module Envin
|
|
26
26
|
end
|
27
27
|
|
28
28
|
def build_yaml_from_env prefix
|
29
|
-
env_prefix = ENV.select{|k,v| k =~
|
29
|
+
env_prefix = ENV.select{|k,v| k =~ /^#{prefix}/ }
|
30
30
|
coll = []
|
31
31
|
lines = ""
|
32
32
|
Hash[env_prefix.sort].each do |key, v|
|
33
33
|
key_split = key.split("__")
|
34
34
|
if key_split.length == 1
|
35
|
-
lines += "#{key.gsub(prefix
|
35
|
+
lines += "#{key.gsub(/^#{prefix}/, '').downcase}: #{v}\n"
|
36
36
|
elsif key_split.length > 1
|
37
37
|
key_split[0] = key_split[0].gsub(prefix, '').downcase
|
38
38
|
child_line, coll = build_child_split(key_split, v, coll)
|
data/lib/envin/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: envin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Zidni Mubarock
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-12-13 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Build yaml file from OS environment variables
|
14
14
|
email:
|
@@ -49,7 +49,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
49
49
|
version: '0'
|
50
50
|
requirements: []
|
51
51
|
rubyforge_project:
|
52
|
-
rubygems_version: 2.6.
|
52
|
+
rubygems_version: 2.6.14
|
53
53
|
signing_key:
|
54
54
|
specification_version: 4
|
55
55
|
summary: Build yaml file from OS environment variables
|