envin 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/envin/converter.rb +1 -2
- data/lib/envin/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: b247477885281e306ceedc6791893172ee3f22ee
|
4
|
+
data.tar.gz: 96436c818c428c66ec8a300d5a5c4d1d41fd8e72
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 60a701d36eca08409d22a8b30c9e75f3ac3c75a668e3391ab28c7d24c3318b23ef35fa96570dccea55fb712dce401e592129f194038b779d6d1caf24a01b2668
|
7
|
+
data.tar.gz: 0a18549271823913faea4d7feeddcb4bb640d5eeb94027652d49f88bc139460b609bcd17c745180150fb06ff59f7455823760f084551baf09c383287733f275c
|
data/lib/envin/converter.rb
CHANGED
@@ -51,7 +51,7 @@ module Envin
|
|
51
51
|
target_file = source_file if !target_file
|
52
52
|
config_content = File.exist?(source_file) ? load_yaml(source_file, root_element) : {}
|
53
53
|
config_env = build_yaml_from_env(prefix)
|
54
|
-
|
54
|
+
return if config_env.blank?
|
55
55
|
root = {}
|
56
56
|
if root_element
|
57
57
|
root[root_element] = config_content.merge(config_env)
|
@@ -59,7 +59,6 @@ module Envin
|
|
59
59
|
root = config_content.merge(config_env)
|
60
60
|
end
|
61
61
|
|
62
|
-
File.delete(target_file) if File.exist?(target_file)
|
63
62
|
File.write(target_file, YAML.dump(root))
|
64
63
|
end
|
65
64
|
end
|
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.4
|
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-10-
|
11
|
+
date: 2017-10-25 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Build yaml file from OS environment variables
|
14
14
|
email:
|