dot_hash 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,6 @@
1
1
  $:.push File.expand_path('../', __FILE__)
2
2
 
3
+ require 'yaml'
3
4
  require 'dot_hash/properties'
4
5
  require 'dot_hash/hash_to_properties'
5
6
  require 'dot_hash/settings'
@@ -1,3 +1,3 @@
1
1
  module DotHash
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
@@ -88,8 +88,8 @@ module DotHash
88
88
  describe "loading from files" do
89
89
  it "loads from a file" do
90
90
  Settings.load fixtures_path("configs1.yaml")
91
- Settings.rogue.speed.must_equal 20
92
- Settings.rogue.power.must_equal 11
91
+ Settings.rogue.attr.speed.must_equal 20
92
+ Settings.rogue.attr.power.must_equal 11
93
93
  end
94
94
 
95
95
  it "loads from two files" do
@@ -98,14 +98,14 @@ module DotHash
98
98
  fixtures_path("configs2.yaml")
99
99
  )
100
100
 
101
- Settings.rogue.speed.must_equal 25
102
- Settings.rogue.power.must_equal 11
101
+ Settings.rogue.attr.speed.must_equal 25
102
+ Settings.rogue.attr.power.must_equal 11
103
103
  end
104
104
 
105
105
  it "loads from a directory" do
106
106
  Settings.load fixtures_path
107
- Settings.rogue.speed.must_equal 25
108
- Settings.rogue.power.must_equal 11
107
+ Settings.rogue.attr.speed.must_equal 25
108
+ Settings.rogue.attr.power.must_equal 11
109
109
  end
110
110
  end
111
111
  end
@@ -1,7 +1,10 @@
1
1
  default: &default
2
- speed: 10
3
- power: 11
2
+ attr: &attr
3
+ speed: 10
4
+ power: 11
4
5
 
5
6
  rogue:
6
7
  <<: *default
7
- speed: 20
8
+ attr:
9
+ <<: *attr
10
+ speed: 20
@@ -1,2 +1,3 @@
1
1
  rogue:
2
- speed: 25
2
+ attr:
3
+ speed: 25
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dot_hash
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-25 00:00:00.000000000 Z
12
+ date: 2013-01-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -66,7 +66,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
66
66
  version: '0'
67
67
  segments:
68
68
  - 0
69
- hash: -618655920888708363
69
+ hash: -4486145246178492294
70
70
  required_rubygems_version: !ruby/object:Gem::Requirement
71
71
  none: false
72
72
  requirements:
@@ -75,7 +75,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
75
75
  version: '0'
76
76
  segments:
77
77
  - 0
78
- hash: -618655920888708363
78
+ hash: -4486145246178492294
79
79
  requirements: []
80
80
  rubyforge_project:
81
81
  rubygems_version: 1.8.24