hashie_mappy 0.3.0 → 0.4.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9ba4d0ece8c4ca9c48eab3d744413e822cee6418ee8bd10ae3ab809af2a97a32
4
- data.tar.gz: 35dec5980d7e368d423a948eef8a81731707e9ab6c2f51c2c359dbb427a2034e
3
+ metadata.gz: f4da4de7b30ce12fcc422c32ef0a894c84e0050b89010ebe4f25a258aaff4431
4
+ data.tar.gz: 594cc7b371c291f24f6c7f6995c7d9a21860060b2702f8db604a06a6976aa494
5
5
  SHA512:
6
- metadata.gz: b8b444bacc366c41c24c27c1f5b8c14292e4b40d59049b5046f607ffd956325bc2ca10b438a345cbb2431a214f574ec5bead4f763e48feb783852e033ac76acc
7
- data.tar.gz: eb9cc2cbecfa75ea77a7fe4bf0e6cd05e186bb545982f730866e4c14e82d79713121d850a1134ee0e2a1c795198ea8d1c9287d32f3775334c1744c2ef0c615c0
6
+ metadata.gz: 49027baa2d4fb62472fac07faa48a4c71b1390c8861ce04fe4caa0b1fe61b3acedea621064c321f57b1129a8e0bcb79f1feb88188a0d14a43061a6923084c42e
7
+ data.tar.gz: ca31b29c7950c30590c3d33cf332aa0745a481a4543642ef91179924c789be15c0ae15be5cfb3c8cb29276036df355d02f18183ff68715b0fb05ee349146388d
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- hashie_mappy (0.3.0)
4
+ hashie_mappy (0.4.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -1,3 +1,3 @@
1
1
  module HashieMappy
2
- VERSION = "0.3.0"
2
+ VERSION = "0.4.0"
3
3
  end
data/lib/hashie_mappy.rb CHANGED
@@ -4,7 +4,7 @@ require "active_support/core_ext/hash"
4
4
  module HashieMappy
5
5
  attr_accessor :target_map, :output, :after
6
6
 
7
- ALLOWED_TYPES = [Fixnum, String, Float, Bignum]
7
+ ALLOWED_TYPES = [Integer, String, Float]
8
8
 
9
9
  def self.extended(base)
10
10
  base.class_eval do
@@ -22,6 +22,7 @@ module HashieMappy
22
22
 
23
23
  def normalize(input_hash)
24
24
  input_hash = convert_to_hash(input_hash) unless input_hash.is_a?(Hash)
25
+ input_hash.deep_stringify_keys!
25
26
  output = normalize_hash(self.target_map, input_hash) if input_hash.keys.any?
26
27
  output = after.call(input_hash, output) if after
27
28
  output.with_indifferent_access
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hashie_mappy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nik Weinmeister