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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a0a4ba0aaa5c60c8524e4f0071cbc98a0885fdb3
4
- data.tar.gz: cbc542bff04e7fddbfd4e728e66bd5ce4e83ac80
3
+ metadata.gz: a8a0ce0ef887a10279f6ced064366c37455d03d1
4
+ data.tar.gz: 9da65e890dbb3894863f607bc1883245e59a748f
5
5
  SHA512:
6
- metadata.gz: 0a8fb948b302e96590058ebd4447be95d48808cea56c065f510b2e4a57ea764633702be0eb81312c60100240ec2f8be1f36b248b2ead4ea2d22072465a12dc23
7
- data.tar.gz: '098b3c7016f51a13b401640ab6fba5ab1bf3fff0ead5bdea3a70d95e7ee3c79b492be68f4e2105c0f83e9804df51fb8cc54ecd5942f4eb5c9f5551a354e14c73'
6
+ metadata.gz: 7afe1e28fb7c4bf813c5d835fcf3e16b28cd13ad816b00b9f50b1a45609742cc3137f30874e01d602dd970b8d9e458259d636ba543eb252a8845c4a2763d039c
7
+ data.tar.gz: 2739d554fd6d0625332212761697540e3ee34f0a3c651357375aba0f03fcd66f77a5deeaea4214981e36a8e1a70897dd7f958df661b659e0ae10da4f348b794b
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- envin (0.1.3)
4
+ envin (0.1.6)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -14,4 +14,4 @@ DEPENDENCIES
14
14
  envin!
15
15
 
16
16
  BUNDLED WITH
17
- 1.16.0.pre.2
17
+ 1.16.0
@@ -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 =~ /#{prefix}/ }
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, '').downcase}: #{v}\n"
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
@@ -1,3 +1,3 @@
1
1
  module Envin
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
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.5
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-10-25 00:00:00.000000000 Z
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.12
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