minfraud 1.4.0 → 1.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/maxmind/geoip2/record/traits.rb +3 -3
- data/lib/minfraud/model/ip_address.rb +5 -1
- data/lib/minfraud/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aa255a8f579aa729b4ceeb84db99f283bafdc2276fc6eba3d52e6133a8e2d4ea
|
4
|
+
data.tar.gz: 1d9717004f0f07eadf3d986f4f697f4d2c41ef7c08c21b9b1f3b7e6291c36286
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a57eac0733d6c1d64319c80f458f00585897030433414ab0b4888606fedafac833e5fd1298fe608f8a343b87536ad2974bc794bba9317a5043980aa689c2e0cd
|
7
|
+
data.tar.gz: 0ef9a279e2ed6d9a08b3f972338f7ade34ecf1f2c409e6777333c9a6afcf1dbab3c03927b8e6a350c54ed4dd2c86bdd64672a36f51caa2087bfb8e53ab824b2a
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# Minfraud Changelog
|
2
2
|
|
3
|
+
## v1.4.1 (2020-12-01)
|
4
|
+
|
5
|
+
* Do not throw an exception if the response does not include IP address
|
6
|
+
information. Previously we would incorrectly try to retrieve fields from
|
7
|
+
`nil`, leading to a `NoMethodError`.
|
8
|
+
|
3
9
|
## v1.4.0 (2020-10-13)
|
4
10
|
|
5
11
|
* IMPORTANT: Ruby 2.0 is no longer supported. If you're using Ruby 2.0,
|
@@ -33,7 +33,7 @@ module MaxMind
|
|
33
33
|
# @!visibility private
|
34
34
|
def initialize(record)
|
35
35
|
super(record)
|
36
|
-
if !record.key?('network') && record.key?('ip_address') &&
|
36
|
+
if record && !record.key?('network') && record.key?('ip_address') &&
|
37
37
|
record.key?('prefix_length')
|
38
38
|
ip = IPAddr.new(record['ip_address']).mask(record['prefix_length'])
|
39
39
|
# We could use ip.prefix instead of record['prefix_length'], but that
|
@@ -89,7 +89,7 @@ module MaxMind
|
|
89
89
|
# NAT, this may differ from the IP address locally assigned to it. This
|
90
90
|
# attribute is returned by all end points.
|
91
91
|
#
|
92
|
-
# @return [String]
|
92
|
+
# @return [String, nil]
|
93
93
|
def ip_address
|
94
94
|
get('ip_address')
|
95
95
|
end
|
@@ -169,7 +169,7 @@ module MaxMind
|
|
169
169
|
# this is the largest network where all of the fields besides ip_address
|
170
170
|
# have the same value.
|
171
171
|
#
|
172
|
-
# @return [String]
|
172
|
+
# @return [String, nil]
|
173
173
|
def network
|
174
174
|
get('network')
|
175
175
|
end
|
@@ -15,7 +15,11 @@ module Minfraud
|
|
15
15
|
|
16
16
|
# @!visibility private
|
17
17
|
def initialize(record, locales)
|
18
|
-
|
18
|
+
if record
|
19
|
+
super(record, locales)
|
20
|
+
else
|
21
|
+
super({}, locales)
|
22
|
+
end
|
19
23
|
|
20
24
|
if record
|
21
25
|
@location = Minfraud::Model::GeoIP2Location.new(record.fetch('location', nil))
|
data/lib/minfraud/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: minfraud
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kushnir.yb
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-12-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|