attr_typed 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/attr_typed/version.rb +1 -1
- data/lib/attr_typed.rb +1 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 501dbacb5b454c928d5c5ec632670f4b4d6f380d
|
4
|
+
data.tar.gz: d180ae99d5503d7ed1ab696a2dec98355324c254
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a20972524b5bc82a43a4c9f69da979cf931f1eb725c65c41e1d9ea7fcadd291f9d4cae9d989774f2fafda700cb929430ea03b6c3054322c2d887e01931b6fe5
|
7
|
+
data.tar.gz: bee107282a4a528bc64381ff197909dc4e6c052d2ff3d3608ee5b87c0f053804236e4b8959987d964babfcee3a7c0ff71deebbc18af34d2f49d80edc5230589b
|
data/lib/attr_typed/version.rb
CHANGED
data/lib/attr_typed.rb
CHANGED
@@ -49,8 +49,7 @@ module AttrTyped
|
|
49
49
|
|
50
50
|
def parse_strict_integer(value)
|
51
51
|
return value if value.nil? || value.is_a?(Integer)
|
52
|
-
|
53
|
-
Integer(value.to_s.strip.gsub(/^0*([1-9][0-9]*|0)$/,'\1'))
|
52
|
+
Integer(value, 10)
|
54
53
|
rescue ArgumentError
|
55
54
|
nil
|
56
55
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: attr_typed
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Anthony Langhorne
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-
|
12
|
+
date: 2018-08-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: monetize
|
@@ -104,7 +104,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
104
104
|
version: '0'
|
105
105
|
requirements: []
|
106
106
|
rubyforge_project:
|
107
|
-
rubygems_version: 2.
|
107
|
+
rubygems_version: 2.6.11
|
108
108
|
signing_key:
|
109
109
|
specification_version: 4
|
110
110
|
summary: Enforce attribute types at assignment time
|