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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e5fce80d6ea146e9d31c969019ccefb4a79789645ecbb1db17e1221e90d46e7e
4
- data.tar.gz: c1c4082e3a4b4305a530ed84f7a126c2f08872930ecc0df50e3fa20a9ece19cd
3
+ metadata.gz: 1b1e4e92365857b6d5d5be13e1d31a863b4c89bc9b845df4e54faebd0ffd4104
4
+ data.tar.gz: 0d320caef5e7ce0bbb751c1d5a7e1ec60c6c0d97d4d683649c19c84e16b2b733
5
5
  SHA512:
6
- metadata.gz: c3996a9546ab76d48a2cd1721612a6d1833c37715f9f4da957dbe584be5a5c8523c552989c766af1f1c72f83b8b20eede3721543f0db86e381a2e8c333d4526b
7
- data.tar.gz: 960d79206d07a0ec8b00cb48948dc6699c23693fcf64910a5469d728f6c2028a530f50d3f0079aa59acbd603544c29a88df659686bc8a4f3998bf4804af42a16
6
+ metadata.gz: 2fd31f60de5693ec4248852f4bbd8c73d5e5e86cadc6648028b3fcac794c4e66fd4b1a002eef8e24bffdc4a3100cd14965a093f9e1c0bfaacfd220611087708f
7
+ data.tar.gz: c183a0bd27ad2710f34e04b33f3a0e46f8abfbd573faafdbbcdbc8533a634a59e111d59fc14b23c7984da4ee5af1911b6a4c7f70a103ae8a7bc9448ca3f162de
@@ -0,0 +1,12 @@
1
+ name: Run rubocop
2
+ on: [push, pull_request]
3
+ jobs:
4
+ rubocop:
5
+ runs-on: ubuntu-latest
6
+ steps:
7
+ - uses: actions/checkout@v2
8
+ - uses: ruby/setup-ruby@v1
9
+ with:
10
+ ruby-version: 2.7
11
+ - run: bundle install
12
+ - run: bundle exec rake -t rubocop
@@ -1,14 +1,7 @@
1
- name: ruby-versions
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
- run:
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
- "2.2",
20
- "2.3",
21
- "2.4",
22
- "2.5",
23
- "2.6",
24
- "2.7",
25
- "head",
26
- "jruby",
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: "jruby"
32
- - os: windows-latest
33
- version: "jruby-head"
23
+ version: jruby
34
24
  steps:
35
- - name: checkout
36
- uses: actions/checkout@v2
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
- - name: ruby version
42
- run: ruby -v
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
@@ -1,5 +1,5 @@
1
1
  Gemspec/RequiredRubyVersion:
2
- Enabled: false # We support 1.9, but newer rubocops don't.
2
+ Enabled: false # We support 2.1+, but rubocop supports 2.4+.
3
3
 
4
4
  # Metrics.
5
5
 
@@ -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
@@ -264,7 +264,7 @@ to the client API, please see
264
264
 
265
265
  ## Requirements
266
266
 
267
- This gem works with Ruby 2.0 and above.
267
+ This gem works with Ruby 2.1 and above.
268
268
 
269
269
  ## Contributing
270
270
 
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. (Required)
14
+ # notation.
15
15
  #
16
16
  # @return [String, nil]
17
17
  attr_accessor :ip_address
@@ -136,6 +136,7 @@ module Minfraud
136
136
  :telerecargas,
137
137
  :towah,
138
138
  :transact_pro,
139
+ :tsys,
139
140
  :usa_epay,
140
141
  :vantiv,
141
142
  :verepay,
@@ -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
  ],
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Minfraud
4
4
  # The Gem version.
5
- VERSION = '1.3.0'
5
+ VERSION = '1.4.0'
6
6
  end
@@ -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.0'
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.3.0
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-09-25 00:00:00.000000000 Z
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.0'
237
+ version: '2.1'
238
238
  required_rubygems_version: !ruby/object:Gem::Requirement
239
239
  requirements:
240
240
  - - ">="
@@ -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"