erb-yaml 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'erb-yaml'
3
- s.version = '1.0.0'
4
- s.date = '2011-09-14'
3
+ s.version = '1.0.1'
4
+ s.date = '2011-10-25'
5
5
  s.platform = Gem::Platform::RUBY
6
6
  s.authors = ['Lee Henson', 'Guy Boertje']
7
7
  s.email = ['lee.m.henson@gmail.com', 'guyboertje@gmail.com']
@@ -5,6 +5,10 @@ require 'yaml'
5
5
  module ErbYaml
6
6
  def self.read(path, env)
7
7
  yaml = ERB.new(IO.read path).result
8
+ load yaml, env
9
+ end
10
+
11
+ def self.load(yaml, env)
8
12
  hash = YAML.load(yaml)[env.to_s]
9
13
  raise "No content at: #{path} for key: #{env}" if hash.nil?
10
14
  hash.recursive_symbolize_keys!
@@ -1,3 +1,3 @@
1
1
  module ErbYaml
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: erb-yaml
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,11 +10,11 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2011-09-14 00:00:00.000000000 Z
13
+ date: 2011-10-25 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: hash-keys
17
- requirement: &8986800 !ruby/object:Gem::Requirement
17
+ requirement: &82404180 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ! '>='
@@ -25,7 +25,7 @@ dependencies:
25
25
  version: 2.0.0
26
26
  type: :runtime
27
27
  prerelease: false
28
- version_requirements: *8986800
28
+ version_requirements: *82404180
29
29
  description: ''
30
30
  email:
31
31
  - lee.m.henson@gmail.com
@@ -59,7 +59,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
59
59
  version: '0'
60
60
  requirements: []
61
61
  rubyforge_project:
62
- rubygems_version: 1.8.6
62
+ rubygems_version: 1.8.10
63
63
  signing_key:
64
64
  specification_version: 3
65
65
  summary: ''