mapping 1.0.0 → 1.0.1

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: 9ec2c35a62c7b930aa17c5947cbe9c9801f3e789
4
- data.tar.gz: 3bcea9b342572056d969e9f5d902c77e0eadca6a
3
+ metadata.gz: 518729390fbe28863bc436cefe3393ec40d10a87
4
+ data.tar.gz: e4f1954ce1c52b3081b6e660566cf92ae2116380
5
5
  SHA512:
6
- metadata.gz: 860b19eb22e25a0a8ed437fa7b73623f7964da1120c63459a8d4a09aa5d0a467ef812eade6b665c87a9b977036a34a3e6d32640b07bf09e13c61821d8d2133f5
7
- data.tar.gz: 3cc993ec244884087615ad250d7299f9f84a9b0f6ed7c73123d3e2d117eac2cca897e3b89da0a7859e4565c9815dcf81c7dd507d17b1d68e032246f126638868
6
+ metadata.gz: 5fbd2d73f546d8ebde886914c10d2ec4e7b6828553d3411b014833864b3a398bc3f1ad5e9bb037c15ec283e2c1d33adffe7139e62c66d6ba915217f092ff414e
7
+ data.tar.gz: e89ea99b339695029eebb3ae0daa4008579dd287ff55ef98a5a00eb7f58aff566c9bc4c808d133cd613b50b64499440a1b0d6482a8a66be821108eed9e50b191
@@ -23,7 +23,15 @@ require_relative 'model'
23
23
  module Mapping
24
24
  # Provides a useful starting point for object based mappings. Handles, true, false, nil, Array and Hash by default, simply by passing through.
25
25
  class ObjectModel < Model
26
- map_identity(NilClass, TrueClass, FalseClass, Fixnum, Bignum, Float, Rational, String)
26
+ map_identity(NilClass, TrueClass, FalseClass, Float, Rational, String)
27
+
28
+ if 0.class == Integer
29
+ # Ruby 2.4+ Integer unification
30
+ map_identity(Integer)
31
+ else
32
+ # Ruby < 2.4
33
+ map_identity(Fixnum, Bignum)
34
+ end
27
35
 
28
36
  map(Array) do |items|
29
37
  items.collect{|object| map(object)}
@@ -19,5 +19,5 @@
19
19
  # THE SOFTWARE.
20
20
 
21
21
  module Mapping
22
- VERSION = "1.0.0"
22
+ VERSION = "1.0.1"
23
23
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mapping
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-03-10 00:00:00.000000000 Z
11
+ date: 2017-02-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -92,7 +92,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
92
92
  version: '0'
93
93
  requirements: []
94
94
  rubyforge_project:
95
- rubygems_version: 2.5.2
95
+ rubygems_version: 2.6.10
96
96
  signing_key:
97
97
  specification_version: 4
98
98
  summary: Map an input model to an output model using a mapping model.