profigure 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,4 +2,4 @@
2
2
  :major: 0
3
3
  :minor: 0
4
4
  :build:
5
- :patch: 3
5
+ :patch: 4
@@ -16,7 +16,7 @@ class Profigure
16
16
  def file_contents(environment, configs_dir)
17
17
  file = "#{configs_dir}/#{environment}.yml"
18
18
  content = run_erb IO.read(file)
19
- YAML.load content
19
+ YAML.load( content ) || {}
20
20
  end
21
21
 
22
22
  def run_erb(data)
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{profigure}
8
- s.version = "0.0.3"
8
+ s.version = "0.0.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Joel Friedman"]
12
- s.date = %q{2010-05-18}
12
+ s.date = %q{2010-05-25}
13
13
  s.description = %q{profigure aims to be a drop in replacement for configuring your apps in a railsy way.}
14
14
  s.email = %q{asher.friedman@gmail.com}
15
15
  s.extra_rdoc_files = [
@@ -32,6 +32,7 @@ Gem::Specification.new do |s|
32
32
  "spec/spec_helper.rb",
33
33
  "spec/test_config/arrays.yml",
34
34
  "spec/test_config/defaults.yml",
35
+ "spec/test_config/empty.yml",
35
36
  "spec/test_config/erb.yml",
36
37
  "spec/test_config/like_nested.yml",
37
38
  "spec/test_config/nested.yml",
@@ -23,6 +23,10 @@ describe "Profigure" do
23
23
  config.foo.should == "overridden"
24
24
  end
25
25
 
26
+ it "should not die if file is empty" do
27
+ lambda { Profigure.load @config_dir, "empty" }.should_not raise_error
28
+ end
29
+
26
30
  it "should properly handle nested hashes" do
27
31
  config = Profigure.load @config_dir, "nested"
28
32
 
File without changes
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 3
9
- version: 0.0.3
8
+ - 4
9
+ version: 0.0.4
10
10
  platform: ruby
11
11
  authors:
12
12
  - Joel Friedman
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-05-18 00:00:00 -05:00
17
+ date: 2010-05-25 00:00:00 -05:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -68,6 +68,7 @@ files:
68
68
  - spec/spec_helper.rb
69
69
  - spec/test_config/arrays.yml
70
70
  - spec/test_config/defaults.yml
71
+ - spec/test_config/empty.yml
71
72
  - spec/test_config/erb.yml
72
73
  - spec/test_config/like_nested.yml
73
74
  - spec/test_config/nested.yml