stringify-hash 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MjJiNzRkMWZlNjMyNjEyNTRhZjExMDY1ODQ5MDM2Zjg3ZGQ4ZWU4NA==
4
+ ZjcyNjJkOWM3OGQ0ZjljODQzMmQwOTQyZWM4NTNlZmEwODk2ZjM3MQ==
5
5
  data.tar.gz: !binary |-
6
- YzQ3NzBjNzQ3MmQyNGRmNzQwYjZmMzY1MGEzN2E1YWE0YTdkZjlmOQ==
6
+ ZjdhZTM4YTQxYjQ1ZDZhMDU1YjJiMjUzMmJiZjE3YTQyZjdlN2UwOA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- OTc0MmVjNzk2MWQwZjhlMjkwOWU1ZTlmNTk2Zjk1OGE1ZDA0MzllNzM4Nzhh
10
- NmI4YmQwOTU1YzAwMzk3OWQ3MjczNzg1N2YxZWE5ZjUwMjRjYjU5M2JkMWRj
11
- NDZlNzIyMDhhYmFlYWYzYjg4OTg2ZmQyMTI0MjQ3MzFjNDg2OGY=
9
+ ZTU3OTVkYjc3OTExZDk0NjA0MTVlOWZiYzBjN2VhOGM0MWMwYTBlODU0OTQx
10
+ ZTViZWY4MDMyZjRhMWZlMTNjM2I3NDlmMjI0OTdhYzJkNTBlMTBiZDFlNTJj
11
+ OWNkMTY3YWQ3ZDM0MTg3NGU2ODI5MzIyNjViNjE5NzYyZTM5Mjg=
12
12
  data.tar.gz: !binary |-
13
- MmNmYjJlMWY3NWM4NDk3MzEyNmY2MzVkMzkzYmQ0MDRiZDkzYmNjZDlmMzkw
14
- NGQ5YjNiYjIwY2QyMmZjNTdmMGY0ZjZhOWE4MTg2ZGYxMTY0N2ZiMjJlMjUz
15
- ZTFkMGJmNzhlODZiNDhlN2I1MTAxMjg5ZTU0OTk2MDU0YTU3NWI=
13
+ ZjI0NjgzYjdhOGViOGQ5ZGM0ZWRmZjlhNWYxMjQ5NDZhMmU0NGNiMzNhNWQy
14
+ M2ZhMjBkYzMwZWMzNzdhY2Y1M2I0MDFmNzg1OTUwZDE5NzgxOTdmM2U1MzFi
15
+ YzQ4YWZjNWZiZjc4NjAxYTQyOTlkOGY5YmE1ZjE4NmJkOGU5NzU=
@@ -83,12 +83,12 @@ class StringifyHash < Hash
83
83
  #
84
84
  # @return [StringifyHash] The combined bash and hash
85
85
  def rmerge base, hash
86
- return base unless hash.is_a?(Hash) || hash.is_a?(StringifyHash)
86
+ return base unless hash.is_a?(Hash) || hash.is_a?(self.class)
87
87
  hash.each do |key, v|
88
- if (base[key].is_a?(Hash) || base[key].is_a?(StringifyHash)) && (hash[key].is_a?(Hash) || hash[key].is_a?(OptionsHash))
88
+ if (base[key].is_a?(Hash) || base[key].is_a?(self.class)) && (hash[key].is_a?(Hash) || hash[key].is_a?(self.class))
89
89
  rmerge(base[key], hash[key])
90
90
  elsif hash[key].is_a?(Hash)
91
- base[key] = StringifyHash.new.merge(hash[key])
91
+ base[key] = self.class.new.merge(hash[key])
92
92
  else
93
93
  base[key]= hash[key]
94
94
  end
@@ -112,7 +112,7 @@ class StringifyHash < Hash
112
112
  # @return [StringifyHash] The combined hash
113
113
  def merge hash
114
114
  #make a deep copy into an empty hash object
115
- merged_hash = rmerge(StringifyHash.new, self)
115
+ merged_hash = rmerge(self.class.new, self)
116
116
  rmerge(merged_hash, hash)
117
117
  end
118
118
 
@@ -1,5 +1,5 @@
1
1
  class StringifyHash < Hash
2
2
  module Version
3
- STRING = '0.0.1'
3
+ STRING = '0.0.2'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stringify-hash
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppetlabs
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-07-16 00:00:00.000000000 Z
12
+ date: 2015-07-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec