dot_hash 0.5.6 → 0.5.7

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: 4880ebd3cfd60e9c73204ddfc44ca99602a56e47
4
- data.tar.gz: aa6a8682da49c2cb0757ea72864967031731b414
3
+ metadata.gz: 6470ab371c8535a3339aaed17e5bac24ddba862b
4
+ data.tar.gz: e9f5dcb591ceef47f6cbbbb9b20ef03e74eec2d0
5
5
  SHA512:
6
- metadata.gz: 3a9f94f58436916025f0218d2167265b2ff613bf1f377cc130947baef331ebcb73f4d483e86df51870ed2ff51f19d7e8add24362a7031329cb171d1667f95675
7
- data.tar.gz: 633e130bd4032bda87ccfed2c1400fa2b4dd139647bcc71edaae9391c1ac90393efa8889adfa1fedb2cc674974d99ad6bac4dcf37d097fb6854250d4fbf00a37
6
+ metadata.gz: 7bbae3c691aa833263069eba3384c5bca5291dbecb9759a05dab2251bc6647c56b6c3b4cc435ce6b621475087bfbd8e94623216bdb0611d5550b1c8adc42886f
7
+ data.tar.gz: 18c7a8704cb1dde10320464d70acec2c7eba1095d18c51e9acddb8a05dd37c1e06ae517539699dce370a114fdf8c4c38a5224462c14b2d53541a496e80643c1c
@@ -5,6 +5,6 @@ require 'json'
5
5
  require 'erb'
6
6
  require 'dot_hash/properties'
7
7
  require 'dot_hash/hash_to_properties'
8
- require 'dot_hash/hash_loader'
8
+ require 'dot_hash/loader'
9
9
  require 'dot_hash/settings'
10
10
  require 'dot_hash/version'
@@ -1,5 +1,5 @@
1
1
  module DotHash
2
- class HashLoader
2
+ class Loader
3
3
  attr_reader :hashes
4
4
 
5
5
  def initialize *hashes
@@ -26,7 +26,7 @@ module DotHash
26
26
  end
27
27
 
28
28
  def load(*args)
29
- @instance = new HashLoader.new(*args).load
29
+ @instance = new Loader.new(*args).load
30
30
  end
31
31
 
32
32
  def namespace(namespace)
@@ -1,3 +1,3 @@
1
1
  module DotHash
2
- VERSION = "0.5.6"
2
+ VERSION = "0.5.7"
3
3
  end
@@ -1,11 +1,11 @@
1
1
  require_relative "../test_helper"
2
2
 
3
3
  module DotHash
4
- describe HashLoader do
4
+ describe Loader do
5
5
 
6
6
  describe "#load" do
7
7
  it "merges the given hashes" do
8
- loader = HashLoader.new(
8
+ loader = Loader.new(
9
9
  {a: 1, b: {c: 2}},
10
10
  {b: {x: {z: 10}}}
11
11
  )
@@ -13,7 +13,7 @@ module DotHash
13
13
  end
14
14
 
15
15
  it "loads from a file" do
16
- loader = HashLoader.new fixtures_path("configs1.yaml")
16
+ loader = Loader.new fixtures_path("configs1.yaml")
17
17
 
18
18
  loader.load.must_equal({
19
19
  "default" => {"attr" => {"speed"=>10, "power"=>11}},
@@ -22,7 +22,7 @@ module DotHash
22
22
  end
23
23
 
24
24
  it "loads from two files" do
25
- loader = HashLoader.new(
25
+ loader = Loader.new(
26
26
  fixtures_path("configs1.yaml"),
27
27
  fixtures_path("configs2.yaml")
28
28
  )
@@ -34,13 +34,13 @@ module DotHash
34
34
  end
35
35
 
36
36
  it "does not load files without the yaml extension" do
37
- loader = HashLoader.new fixtures_path("config.yaml.example")
37
+ loader = Loader.new fixtures_path("config.yaml.example")
38
38
 
39
39
  loader.load.must_equal({})
40
40
  end
41
41
 
42
42
  it "loads from a directory" do
43
- loader = HashLoader.new fixtures_path
43
+ loader = Loader.new fixtures_path
44
44
 
45
45
  loader.load.must_equal({
46
46
  "default"=>{"attr"=>{"speed"=>10, "power"=>11}},
@@ -50,7 +50,7 @@ module DotHash
50
50
  end
51
51
 
52
52
  it "loads ERB files" do
53
- loader = HashLoader.new fixtures_path("configs3.yaml.erb")
53
+ loader = Loader.new fixtures_path("configs3.yaml.erb")
54
54
 
55
55
  loader.load.must_equal({
56
56
  "hero"=>{"name"=>"Eden", "power"=>100, "location"=>TESTS_PATH}
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.5.6
4
+ version: 0.5.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcelo Eden
@@ -39,14 +39,14 @@ files:
39
39
  - Rakefile
40
40
  - dot_hash.gemspec
41
41
  - lib/dot_hash.rb
42
- - lib/dot_hash/hash_loader.rb
43
42
  - lib/dot_hash/hash_to_properties.rb
43
+ - lib/dot_hash/loader.rb
44
44
  - lib/dot_hash/properties.rb
45
45
  - lib/dot_hash/settings.rb
46
46
  - lib/dot_hash/version.rb
47
47
  - test/dot_hash/custom_settings_test.rb
48
- - test/dot_hash/hash_loader_test.rb
49
48
  - test/dot_hash/hash_to_properties_test.rb
49
+ - test/dot_hash/loader_test.rb
50
50
  - test/dot_hash/properties_test.rb
51
51
  - test/dot_hash/settings_test.rb
52
52
  - test/fixtures/config.yaml.example
@@ -79,8 +79,8 @@ specification_version: 4
79
79
  summary: Converts hash.to_properties so you can access values using properties.some_key
80
80
  test_files:
81
81
  - test/dot_hash/custom_settings_test.rb
82
- - test/dot_hash/hash_loader_test.rb
83
82
  - test/dot_hash/hash_to_properties_test.rb
83
+ - test/dot_hash/loader_test.rb
84
84
  - test/dot_hash/properties_test.rb
85
85
  - test/dot_hash/settings_test.rb
86
86
  - test/fixtures/config.yaml.example