bibliotech 0.2.8 → 0.2.9

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/bibliotech/config.rb +12 -2
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b70db645dc570547b493dda820ee2de92ea533f5
4
- data.tar.gz: 0173bfc09213a275f488c02157b15a31eefec375
3
+ metadata.gz: 2bef8932a72d3173211274133436ae9101b112ef
4
+ data.tar.gz: 8737a3949dd830623f5d9826d03a48abee1c439e
5
5
  SHA512:
6
- metadata.gz: 9f20dfa5184e4e2e7c2858ce1f39eb74e3b4555f9b8d49b79be864a4fdbebb3a7e551874a1e00985584c9fdab8c9afee88a173bc7ee08d917c9830f8b8abb830
7
- data.tar.gz: 1174441ee8b6f34103df557508bfe4b066a336553f8c3f9705fdd5ee1c57ec81a6e7f3ad9cf86a5e67fee667d1d35ac5719d9111715d0d4d05094cd2f0ce0282
6
+ metadata.gz: d788782d1920d9cb1f19d58e7e71dce98bceffe4ab808f8fd1dc502299e89c123abc37d407656b52418e7fc92c04bf3565b72934db17a12b7905788c60588137
7
+ data.tar.gz: f717db558efacbcdcf592eec7081bea4feaef6cc616a4f4355b2b4aff2576ebd4a63d8bc4f42be1a0bff259428bff5a11ac3d891bed3e89be31e9703447572df
@@ -50,9 +50,19 @@ module BiblioTech
50
50
  hash
51
51
  end
52
52
 
53
+ def merge_hashes(left, right)
54
+ left.merge(right) do |key, ours, theirs|
55
+ if ours.is_a?(Hash) and theirs.is_a?(Hash)
56
+ merge_hashes(ours, theirs)
57
+ else
58
+ theirs
59
+ end
60
+ end
61
+ end
62
+
53
63
  def merge(other_hash)
54
64
  self.class.new(valise).tap do |newbie|
55
- newbie.hash = hash.merge(stringify_keys(other_hash))
65
+ newbie.hash = merge_hashes(hash, stringify_keys(other_hash))
56
66
  end
57
67
  end
58
68
 
@@ -76,7 +86,7 @@ module BiblioTech
76
86
  rescue KeyError
77
87
  end
78
88
  end
79
- raise MissingConfig, "No value configured at any of: #{steps_chain.map{|steps| steps.join(">")}}"
89
+ raise MissingConfig, "No value configured at any of: #{steps_chain.map{|steps| steps.join(">")}.join(", ")}"
80
90
  end
81
91
 
82
92
  def local
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bibliotech
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.8
4
+ version: 0.2.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Evan Dorn
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-08-20 00:00:00.000000000 Z
12
+ date: 2014-08-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: caliph
@@ -128,7 +128,7 @@ rdoc_options:
128
128
  - --main
129
129
  - doc/README
130
130
  - --title
131
- - bibliotech-0.2.8 Documentation
131
+ - bibliotech-0.2.9 Documentation
132
132
  require_paths:
133
133
  - lib/
134
134
  required_ruby_version: !ruby/object:Gem::Requirement