minfraud 1.3.0 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rubocop.yml +12 -0
- data/.github/workflows/test.yml +17 -31
- data/.rubocop.yml +1 -1
- data/CHANGELOG.md +8 -0
- data/README.md +1 -1
- data/Rakefile +1 -10
- data/lib/minfraud/components/device.rb +1 -1
- data/lib/minfraud/components/payment.rb +1 -0
- data/lib/minfraud/error_handler.rb +3 -9
- data/lib/minfraud/version.rb +1 -1
- data/minfraud.gemspec +1 -1
- metadata +4 -4
- data/.travis.yml +0 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1b1e4e92365857b6d5d5be13e1d31a863b4c89bc9b845df4e54faebd0ffd4104
|
4
|
+
data.tar.gz: 0d320caef5e7ce0bbb751c1d5a7e1ec60c6c0d97d4d683649c19c84e16b2b733
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2fd31f60de5693ec4248852f4bbd8c73d5e5e86cadc6648028b3fcac794c4e66fd4b1a002eef8e24bffdc4a3100cd14965a093f9e1c0bfaacfd220611087708f
|
7
|
+
data.tar.gz: c183a0bd27ad2710f34e04b33f3a0e46f8abfbd573faafdbbcdbc8533a634a59e111d59fc14b23c7984da4ee5af1911b6a4c7f70a103ae8a7bc9448ca3f162de
|
data/.github/workflows/test.yml
CHANGED
@@ -1,14 +1,7 @@
|
|
1
|
-
name:
|
2
|
-
on:
|
3
|
-
push:
|
4
|
-
paths-ignore:
|
5
|
-
- "**.md"
|
6
|
-
pull_request:
|
7
|
-
paths-ignore:
|
8
|
-
- "**.md"
|
1
|
+
name: Run tests
|
2
|
+
on: [push, pull_request]
|
9
3
|
jobs:
|
10
|
-
|
11
|
-
name: ruby
|
4
|
+
test:
|
12
5
|
runs-on: ${{ matrix.os }}
|
13
6
|
strategy:
|
14
7
|
fail-fast: false
|
@@ -16,31 +9,24 @@ jobs:
|
|
16
9
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
17
10
|
version:
|
18
11
|
[
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
"jruby-head",
|
12
|
+
2.1,
|
13
|
+
2.2,
|
14
|
+
2.3,
|
15
|
+
2.4,
|
16
|
+
2.5,
|
17
|
+
2.6,
|
18
|
+
2.7,
|
19
|
+
jruby,
|
28
20
|
]
|
29
21
|
exclude:
|
30
22
|
- os: windows-latest
|
31
|
-
version:
|
32
|
-
- os: windows-latest
|
33
|
-
version: "jruby-head"
|
23
|
+
version: jruby
|
34
24
|
steps:
|
35
|
-
-
|
36
|
-
|
37
|
-
|
25
|
+
- uses: actions/checkout@v2
|
26
|
+
with:
|
27
|
+
submodules: true
|
38
28
|
- uses: ruby/setup-ruby@v1
|
39
29
|
with:
|
40
30
|
ruby-version: ${{ matrix.version }}
|
41
|
-
-
|
42
|
-
|
43
|
-
- run: bundler install
|
44
|
-
name: install
|
45
|
-
- run: bundler exec rake -t
|
46
|
-
name: test
|
31
|
+
- run: bundle install
|
32
|
+
- run: bundle exec rake -t spec
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
# Minfraud Changelog
|
2
2
|
|
3
|
+
## v1.4.0 (2020-10-13)
|
4
|
+
|
5
|
+
* IMPORTANT: Ruby 2.0 is no longer supported. If you're using Ruby 2.0,
|
6
|
+
please use version 1.3.0.
|
7
|
+
* Add handling for the `REQUEST_INVALID` error code.
|
8
|
+
* The IP address is no longer a required input.
|
9
|
+
* Adds new payment processor `:tsys` to `Minfraud::Components::Payment`.
|
10
|
+
|
3
11
|
## v1.3.0 (2020-09-25)
|
4
12
|
|
5
13
|
* Adds support for persistent HTTP connections. Connections persist
|
data/README.md
CHANGED
data/Rakefile
CHANGED
@@ -9,13 +9,4 @@ RSpec::Core::RakeTask.new(:spec)
|
|
9
9
|
RuboCop::RakeTask.new
|
10
10
|
|
11
11
|
task default: :spec
|
12
|
-
|
13
|
-
# The current version of rubocop supports Ruby 2.4+. While we could run its
|
14
|
-
# older versions, the config isn't backwards compatible. Let's run it only for
|
15
|
-
# 2.4+. This isn't perfect, but as long as 1.9+ tests pass we should be okay.
|
16
|
-
version_pieces = RUBY_VERSION.split('.')
|
17
|
-
major_version = version_pieces[0]
|
18
|
-
minor_version = version_pieces[1]
|
19
|
-
if major_version == '2' && minor_version.to_i >= 4
|
20
|
-
task default: :rubocop
|
21
|
-
end
|
12
|
+
task default: :rubocop
|
@@ -11,7 +11,7 @@ module Minfraud
|
|
11
11
|
# The IP address associated with the device used by the customer in the
|
12
12
|
# transaction. The IP address must be in IPv4 or IPv6 presentation
|
13
13
|
# format, i.e., dotted-quad notation or the IPv6 hexadecimal-colon
|
14
|
-
# notation.
|
14
|
+
# notation.
|
15
15
|
#
|
16
16
|
# @return [String, nil]
|
17
17
|
attr_accessor :ip_address
|
@@ -27,15 +27,6 @@ module Minfraud
|
|
27
27
|
|
28
28
|
# @!visibility private
|
29
29
|
STATUS_CODES = {
|
30
|
-
IP_ADDRESS_INVALID: [
|
31
|
-
ClientError, 'You have not supplied a valid IPv4 or IPv6 address'
|
32
|
-
],
|
33
|
-
IP_ADDRESS_REQUIRED: [
|
34
|
-
ClientError, 'You have not supplied an IP address which is a required field'
|
35
|
-
],
|
36
|
-
IP_ADDRESS_RESERVED: [
|
37
|
-
ClientError, 'You have supplied an IP address which is reserved'
|
38
|
-
],
|
39
30
|
JSON_INVALID: [
|
40
31
|
ClientError, 'JSON body cannot be decoded'
|
41
32
|
],
|
@@ -48,6 +39,9 @@ module Minfraud
|
|
48
39
|
PARAMETER_UNKNOWN: [
|
49
40
|
ClientError, 'You have supplied an unknown parameter'
|
50
41
|
],
|
42
|
+
REQUEST_INVALID: [
|
43
|
+
ClientError, 'The request did not contain any valid input values.'
|
44
|
+
],
|
51
45
|
TAG_REQUIRED: [
|
52
46
|
ClientError, 'You have not supplied a tag, which is a required field'
|
53
47
|
],
|
data/lib/minfraud/version.rb
CHANGED
data/minfraud.gemspec
CHANGED
@@ -15,7 +15,7 @@ Gem::Specification.new do |spec|
|
|
15
15
|
spec.homepage = 'https://github.com/maxmind/minfraud-api-ruby'
|
16
16
|
spec.license = 'MIT'
|
17
17
|
|
18
|
-
spec.required_ruby_version = '>= 2.
|
18
|
+
spec.required_ruby_version = '>= 2.1'
|
19
19
|
|
20
20
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
21
21
|
spec.bindir = 'exe'
|
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
|
+
version: 1.4.0
|
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-10-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -147,11 +147,11 @@ executables: []
|
|
147
147
|
extensions: []
|
148
148
|
extra_rdoc_files: []
|
149
149
|
files:
|
150
|
+
- ".github/workflows/rubocop.yml"
|
150
151
|
- ".github/workflows/test.yml"
|
151
152
|
- ".gitignore"
|
152
153
|
- ".rspec"
|
153
154
|
- ".rubocop.yml"
|
154
|
-
- ".travis.yml"
|
155
155
|
- CHANGELOG.md
|
156
156
|
- CODE_OF_CONDUCT.md
|
157
157
|
- Gemfile
|
@@ -234,7 +234,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
234
234
|
requirements:
|
235
235
|
- - ">="
|
236
236
|
- !ruby/object:Gem::Version
|
237
|
-
version: '2.
|
237
|
+
version: '2.1'
|
238
238
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
239
239
|
requirements:
|
240
240
|
- - ">="
|
data/.travis.yml
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
language: ruby
|
2
|
-
|
3
|
-
rvm:
|
4
|
-
- 2.0
|
5
|
-
- 2.1
|
6
|
-
- 2.2
|
7
|
-
- 2.3
|
8
|
-
- 2.4
|
9
|
-
- 2.5
|
10
|
-
- 2.6
|
11
|
-
- 2.7
|
12
|
-
|
13
|
-
notifications:
|
14
|
-
email:
|
15
|
-
on_failure: always
|
16
|
-
on_success: change
|
17
|
-
recipients:
|
18
|
-
- dev-ci@maxmind.com
|
19
|
-
slack:
|
20
|
-
rooms:
|
21
|
-
secure: "wuwMo+BWnaBtkt1uGAi4Zd0EARX3B2TXDmBGCtn8r4PLfehh61S6nLQDASNXSk200PmniFM8PyOUNVGVJqWpYQAEMn32WWdy4vTK2c8CsjwfsMhgnOI2YDCzw+jiP+8EfIGBsPO4xA7yrzweP8gkzBtplb3LbaCiW83WfFo9+402yr0/0F9gfWi8qvuIw29XAS1XWhTY4itqGfkSPdOHQz/45ElpLkGlgreuRrih3tAgn9YLb/Uh/6McHfHkL74YwQU3p0NiZcoleWYM0CLpPzyrN8EsbmIT+L75nIVwXnh62Gx2jJWayj7ZzvyKtVKHtLb/LKRs4Dg0UEg65xX1EcBAkC5fn4KG1jQHvi/tdOx1Sfh3hO6OK+68q1R6cQQYy+uG84q8RUjpO6dzFcWpE1yMdbQ5XMKfTh56ZdhXJ803LD2gGeIgcMwJp6HK9tnf0vaPPI9kbr8fqJBUUkciUoqpYzFd5m0ZCUbJsMD0oPY19FSRtfCNQvCbmhYrLy1sQ5FeMzbF0bi2oaUv+JD/A5RKokNMrrwv3nnTtG4vN1hJklQk2VW3sZWl6UjYgzhrbmKABtvPuB+xcYywIu4+JSworpfDwM/PZAKOfd6n+r8OdNV256l8WaNeF6osvXkUR7yxYpytywdQPA0d/z8mxTVoATE3wat7pnmTrqI5fqw=\n"
|