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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b17f029845b4706e253b801404dd382e9ad1f9cb
4
- data.tar.gz: 8f4960fabd8dfe06d265561aee877000ced526a8
3
+ metadata.gz: b247477885281e306ceedc6791893172ee3f22ee
4
+ data.tar.gz: 96436c818c428c66ec8a300d5a5c4d1d41fd8e72
5
5
  SHA512:
6
- metadata.gz: 39d251d521fc2ca9e9dbee13679e6b8a9f543422b98173759db2de874c7f79bb8b310d64996001f9299b1a45bfe901ef37d06876d83f2dc037d65f2d735fb1ea
7
- data.tar.gz: 7627c47cca3bad5ef83bf2053cbe06f3d0f8ec96a9aefb1b59f66bcc595908653a6c61f06550a50fac8dc84ffde3d45d5a201ee05361f7927f34de7577e1b10a
6
+ metadata.gz: 60a701d36eca08409d22a8b30c9e75f3ac3c75a668e3391ab28c7d24c3318b23ef35fa96570dccea55fb712dce401e592129f194038b779d6d1caf24a01b2668
7
+ data.tar.gz: 0a18549271823913faea4d7feeddcb4bb640d5eeb94027652d49f88bc139460b609bcd17c745180150fb06ff59f7455823760f084551baf09c383287733f275c
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Envin
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
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.3
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-18 00:00:00.000000000 Z
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: