settings-env-loader 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/settings-env-loader.rb +6 -3
  2. metadata +3 -3
@@ -1,7 +1,7 @@
1
1
  require "enumerator"
2
2
 
3
3
  module SettingsEnvLoader
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.1"
5
5
 
6
6
  # Merges ENV and modify the hash directly
7
7
  def merge_env(prefix = nil, separator = '_')
@@ -10,10 +10,13 @@ module SettingsEnvLoader
10
10
  end
11
11
 
12
12
  # Iterates the Hash as ENV key value pairs
13
- def each_env(prefix = nil, separator = '_')
14
- Enumerator.new do |y|
13
+ def each_env(prefix = nil, separator = '_', &block)
14
+ enumerator = Enumerator.new do |y|
15
15
  Exporter.new(prefix, separator, self).each(y)
16
16
  end
17
+
18
+ enumerator(block) if block
19
+ enumerator
17
20
  end
18
21
 
19
22
  class Merger
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: settings-env-loader
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -75,7 +75,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
75
75
  version: '0'
76
76
  segments:
77
77
  - 0
78
- hash: -4257699166367919171
78
+ hash: 2641321664759405278
79
79
  required_rubygems_version: !ruby/object:Gem::Requirement
80
80
  none: false
81
81
  requirements:
@@ -84,7 +84,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
84
84
  version: '0'
85
85
  segments:
86
86
  - 0
87
- hash: -4257699166367919171
87
+ hash: 2641321664759405278
88
88
  requirements: []
89
89
  rubyforge_project:
90
90
  rubygems_version: 1.8.23