minfraud 2.8.0 → 2.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +55 -0
  3. data/LICENSE.txt +1 -1
  4. data/README.md +15 -10
  5. data/lib/minfraud/assessments.rb +1 -1
  6. data/lib/minfraud/components/account.rb +1 -1
  7. data/lib/minfraud/components/base.rb +3 -0
  8. data/lib/minfraud/components/billing.rb +1 -1
  9. data/lib/minfraud/components/credit_card.rb +8 -7
  10. data/lib/minfraud/components/custom_inputs.rb +1 -1
  11. data/lib/minfraud/components/device.rb +8 -1
  12. data/lib/minfraud/components/email.rb +3 -3
  13. data/lib/minfraud/components/event.rb +23 -6
  14. data/lib/minfraud/components/order.rb +2 -2
  15. data/lib/minfraud/components/payment.rb +29 -1
  16. data/lib/minfraud/components/report/transaction.rb +8 -7
  17. data/lib/minfraud/components/shipping.rb +1 -1
  18. data/lib/minfraud/components/shopping_cart.rb +2 -2
  19. data/lib/minfraud/components/shopping_cart_item.rb +4 -4
  20. data/lib/minfraud/enum.rb +9 -0
  21. data/lib/minfraud/http_service/response.rb +4 -2
  22. data/lib/minfraud/model/abstract.rb +3 -0
  23. data/lib/minfraud/model/device.rb +1 -1
  24. data/lib/minfraud/model/email.rb +2 -1
  25. data/lib/minfraud/model/email_domain.rb +36 -3
  26. data/lib/minfraud/model/email_domain_visit.rb +46 -0
  27. data/lib/minfraud/model/factors.rb +1 -1
  28. data/lib/minfraud/model/geoip2_location.rb +1 -1
  29. data/lib/minfraud/model/insights.rb +1 -1
  30. data/lib/minfraud/model/ip_address.rb +1 -1
  31. data/lib/minfraud/model/reason.rb +1 -1
  32. data/lib/minfraud/model/risk_score_reason.rb +2 -2
  33. data/lib/minfraud/model/shipping_address.rb +3 -1
  34. data/lib/minfraud/model/warning.rb +13 -2
  35. data/lib/minfraud/report.rb +1 -1
  36. data/lib/minfraud/validates.rb +142 -5
  37. data/lib/minfraud/version.rb +1 -1
  38. data/lib/minfraud.rb +11 -0
  39. metadata +78 -19
  40. data/.rspec +0 -2
  41. data/.rubocop.yml +0 -90
  42. data/CODE_OF_CONDUCT.md +0 -49
  43. data/Gemfile +0 -5
  44. data/README.dev.md +0 -28
  45. data/Rakefile +0 -12
  46. data/bin/console +0 -15
  47. data/bin/setup +0 -8
  48. data/minfraud.gemspec +0 -38
metadata CHANGED
@@ -1,12 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minfraud
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.8.0
4
+ version: 2.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - kushnir.yb
8
8
  - William Storey
9
- bindir: exe
9
+ bindir: bin
10
10
  cert_chain: []
11
11
  date: 1980-01-02 00:00:00.000000000 Z
12
12
  dependencies:
@@ -14,16 +14,22 @@ dependencies:
14
14
  name: connection_pool
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '2.2'
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: '4.0'
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - "~>"
27
+ - - ">="
25
28
  - !ruby/object:Gem::Version
26
29
  version: '2.2'
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: '4.0'
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: http
29
35
  requirement: !ruby/object:Gem::Requirement
@@ -33,7 +39,7 @@ dependencies:
33
39
  version: '4.3'
34
40
  - - "<"
35
41
  - !ruby/object:Gem::Version
36
- version: '6.0'
42
+ version: '7.0'
37
43
  type: :runtime
38
44
  prerelease: false
39
45
  version_requirements: !ruby/object:Gem::Requirement
@@ -43,21 +49,21 @@ dependencies:
43
49
  version: '4.3'
44
50
  - - "<"
45
51
  - !ruby/object:Gem::Version
46
- version: '6.0'
52
+ version: '7.0'
47
53
  - !ruby/object:Gem::Dependency
48
54
  name: maxmind-geoip2
49
55
  requirement: !ruby/object:Gem::Requirement
50
56
  requirements:
51
57
  - - "~>"
52
58
  - !ruby/object:Gem::Version
53
- version: '1.3'
59
+ version: '1.6'
54
60
  type: :runtime
55
61
  prerelease: false
56
62
  version_requirements: !ruby/object:Gem::Requirement
57
63
  requirements:
58
64
  - - "~>"
59
65
  - !ruby/object:Gem::Version
60
- version: '1.3'
66
+ version: '1.6'
61
67
  - !ruby/object:Gem::Dependency
62
68
  name: simpleidn
63
69
  requirement: !ruby/object:Gem::Requirement
@@ -134,6 +140,62 @@ dependencies:
134
140
  - - "~>"
135
141
  - !ruby/object:Gem::Version
136
142
  version: '1.23'
143
+ - !ruby/object:Gem::Dependency
144
+ name: rubocop-performance
145
+ requirement: !ruby/object:Gem::Requirement
146
+ requirements:
147
+ - - ">="
148
+ - !ruby/object:Gem::Version
149
+ version: '0'
150
+ type: :development
151
+ prerelease: false
152
+ version_requirements: !ruby/object:Gem::Requirement
153
+ requirements:
154
+ - - ">="
155
+ - !ruby/object:Gem::Version
156
+ version: '0'
157
+ - !ruby/object:Gem::Dependency
158
+ name: rubocop-rake
159
+ requirement: !ruby/object:Gem::Requirement
160
+ requirements:
161
+ - - ">="
162
+ - !ruby/object:Gem::Version
163
+ version: '0'
164
+ type: :development
165
+ prerelease: false
166
+ version_requirements: !ruby/object:Gem::Requirement
167
+ requirements:
168
+ - - ">="
169
+ - !ruby/object:Gem::Version
170
+ version: '0'
171
+ - !ruby/object:Gem::Dependency
172
+ name: rubocop-rspec
173
+ requirement: !ruby/object:Gem::Requirement
174
+ requirements:
175
+ - - ">="
176
+ - !ruby/object:Gem::Version
177
+ version: '0'
178
+ type: :development
179
+ prerelease: false
180
+ version_requirements: !ruby/object:Gem::Requirement
181
+ requirements:
182
+ - - ">="
183
+ - !ruby/object:Gem::Version
184
+ version: '0'
185
+ - !ruby/object:Gem::Dependency
186
+ name: rubocop-thread_safety
187
+ requirement: !ruby/object:Gem::Requirement
188
+ requirements:
189
+ - - ">="
190
+ - !ruby/object:Gem::Version
191
+ version: '0'
192
+ type: :development
193
+ prerelease: false
194
+ version_requirements: !ruby/object:Gem::Requirement
195
+ requirements:
196
+ - - ">="
197
+ - !ruby/object:Gem::Version
198
+ version: '0'
137
199
  - !ruby/object:Gem::Dependency
138
200
  name: webmock
139
201
  requirement: !ruby/object:Gem::Requirement
@@ -154,17 +216,9 @@ executables: []
154
216
  extensions: []
155
217
  extra_rdoc_files: []
156
218
  files:
157
- - ".rspec"
158
- - ".rubocop.yml"
159
219
  - CHANGELOG.md
160
- - CODE_OF_CONDUCT.md
161
- - Gemfile
162
220
  - LICENSE.txt
163
- - README.dev.md
164
221
  - README.md
165
- - Rakefile
166
- - bin/console
167
- - bin/setup
168
222
  - lib/minfraud.rb
169
223
  - lib/minfraud/assessments.rb
170
224
  - lib/minfraud/components/account.rb
@@ -194,6 +248,7 @@ files:
194
248
  - lib/minfraud/model/disposition.rb
195
249
  - lib/minfraud/model/email.rb
196
250
  - lib/minfraud/model/email_domain.rb
251
+ - lib/minfraud/model/email_domain_visit.rb
197
252
  - lib/minfraud/model/error.rb
198
253
  - lib/minfraud/model/factors.rb
199
254
  - lib/minfraud/model/geoip2_location.rb
@@ -213,12 +268,16 @@ files:
213
268
  - lib/minfraud/resolver.rb
214
269
  - lib/minfraud/validates.rb
215
270
  - lib/minfraud/version.rb
216
- - minfraud.gemspec
217
271
  homepage: https://github.com/maxmind/minfraud-api-ruby
218
272
  licenses:
219
273
  - MIT
220
274
  metadata:
275
+ bug_tracker_uri: https://github.com/maxmind/minfraud-api-ruby/issues
276
+ changelog_uri: https://github.com/maxmind/minfraud-api-ruby/blob/main/CHANGELOG.md
277
+ documentation_uri: https://www.rubydoc.info/gems/minfraud
278
+ homepage_uri: https://github.com/maxmind/minfraud-api-ruby
221
279
  rubygems_mfa_required: 'true'
280
+ source_code_uri: https://github.com/maxmind/minfraud-api-ruby
222
281
  rdoc_options: []
223
282
  require_paths:
224
283
  - lib
@@ -226,14 +285,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
226
285
  requirements:
227
286
  - - ">="
228
287
  - !ruby/object:Gem::Version
229
- version: '3.0'
288
+ version: '3.2'
230
289
  required_rubygems_version: !ruby/object:Gem::Requirement
231
290
  requirements:
232
291
  - - ">="
233
292
  - !ruby/object:Gem::Version
234
293
  version: '0'
235
294
  requirements: []
236
- rubygems_version: 3.6.7
295
+ rubygems_version: 4.0.16
237
296
  specification_version: 4
238
297
  summary: Ruby API for the minFraud Score, Insights, Factors, and Report Transactions
239
298
  services
data/.rspec DELETED
@@ -1,2 +0,0 @@
1
- --format documentation
2
- --color
data/.rubocop.yml DELETED
@@ -1,90 +0,0 @@
1
- AllCops:
2
- TargetRubyVersion: '3.0'
3
- NewCops: enable
4
-
5
- # Metrics.
6
-
7
- Metrics/BlockLength:
8
- Enabled: false # Default is true, but mostly hit in tests.
9
-
10
- Metrics/AbcSize:
11
- Enabled: false # To allow for pre-existing code.
12
-
13
- Metrics/ClassLength:
14
- Enabled: false # To allow for pre-existing code.
15
-
16
- Metrics/CyclomaticComplexity:
17
- Enabled: false # To allow for pre-existing code.
18
-
19
- Metrics/MethodLength:
20
- Enabled: false # To allow for pre-existing code.
21
-
22
- Metrics/PerceivedComplexity:
23
- Enabled: false # To allow for pre-existing code.
24
-
25
- # Layout.
26
-
27
- Layout/LineLength:
28
- Max: 150 # Default is 120.
29
-
30
- Layout/HashAlignment:
31
- EnforcedHashRocketStyle: table # Default is key.
32
- EnforcedColonStyle: table # Default is key.
33
-
34
- Layout/ExtraSpacing:
35
- ForceEqualSignAlignment: true # Default is false.
36
-
37
- Layout/IndentationStyle:
38
- IndentationWidth: 2 # Default is <none>.
39
-
40
- # Style.
41
-
42
- Style/HashSyntax:
43
- EnforcedStyle: ruby19_no_mixed_keys # Default is ruby19. This one is better.
44
-
45
- Style/CollectionMethods:
46
- Enabled: true # Default is false.
47
-
48
- Style/NumericLiterals:
49
- MinDigits: 4 # Default is 5.
50
-
51
- Style/NegatedIf: # I disagree with this.
52
- Enabled: false
53
-
54
- Style/IfUnlessModifier: # This doesn't always make sense.
55
- Enabled: false
56
-
57
- # Trailing commas are often good.
58
- Style/TrailingCommaInArguments:
59
- Enabled: false
60
- Style/TrailingCommaInArrayLiteral:
61
- Enabled: false
62
- Style/TrailingCommaInHashLiteral:
63
- Enabled: false
64
-
65
- # Default is both which is probably fine, but it changes code and I don't want
66
- # to investigate any possible behavior change right now.
67
- Style/EmptyElse:
68
- EnforcedStyle: empty
69
-
70
- Style/ConditionalAssignment:
71
- Enabled: false # This produces kind of strange results.
72
-
73
- Style/GuardClause:
74
- Enabled: false # Doesn't always make sense.
75
-
76
- Style/FormatStringToken:
77
- Enabled: false # Seems unnecessary.
78
-
79
- # Seems unnecessary. Asks us to call super in a bunch of places when there's no
80
- # need.
81
- Lint/MissingSuper:
82
- Enabled: false
83
-
84
- # Naming.
85
-
86
- Naming/VariableNumber:
87
- Enabled: false # Doesn't always make sense.
88
-
89
- Gemspec/DevelopmentDependencies:
90
- Enabled: false
data/CODE_OF_CONDUCT.md DELETED
@@ -1,49 +0,0 @@
1
- # Contributor Code of Conduct
2
-
3
- As contributors and maintainers of this project, and in the interest of
4
- fostering an open and welcoming community, we pledge to respect all people who
5
- contribute through reporting issues, posting feature requests, updating
6
- documentation, submitting pull requests or patches, and other activities.
7
-
8
- We are committed to making participation in this project a harassment-free
9
- experience for everyone, regardless of level of experience, gender, gender
10
- identity and expression, sexual orientation, disability, personal appearance,
11
- body size, race, ethnicity, age, religion, or nationality.
12
-
13
- Examples of unacceptable behavior by participants include:
14
-
15
- * The use of sexualized language or imagery
16
- * Personal attacks
17
- * Trolling or insulting/derogatory comments
18
- * Public or private harassment
19
- * Publishing other's private information, such as physical or electronic
20
- addresses, without explicit permission
21
- * Other unethical or unprofessional conduct
22
-
23
- Project maintainers have the right and responsibility to remove, edit, or
24
- reject comments, commits, code, wiki edits, issues, and other contributions
25
- that are not aligned to this Code of Conduct, or to ban temporarily or
26
- permanently any contributor for other behaviors that they deem inappropriate,
27
- threatening, offensive, or harmful.
28
-
29
- By adopting this Code of Conduct, project maintainers commit themselves to
30
- fairly and consistently applying these principles to every aspect of managing
31
- this project. Project maintainers who do not follow or enforce the Code of
32
- Conduct may be permanently removed from the project team.
33
-
34
- This code of conduct applies both within project spaces and in public spaces
35
- when an individual is representing the project or its community.
36
-
37
- Instances of abusive, harassing, or otherwise unacceptable behavior may be
38
- reported by contacting a project maintainer at support@maxmind.com. All
39
- complaints will be reviewed and investigated and will result in a response that
40
- is deemed necessary and appropriate to the circumstances. Maintainers are
41
- obligated to maintain confidentiality with regard to the reporter of an
42
- incident.
43
-
44
- This Code of Conduct is adapted from the [Contributor Covenant][homepage],
45
- version 1.3.0, available at
46
- [https://contributor-covenant.org/version/1/3/0/][version]
47
-
48
- [homepage]: https://contributor-covenant.org
49
- [version]: https://contributor-covenant.org/version/1/3/0/
data/Gemfile DELETED
@@ -1,5 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- source 'https://rubygems.org'
4
-
5
- gemspec
data/README.dev.md DELETED
@@ -1,28 +0,0 @@
1
- # Prereqs
2
-
3
- * You must have a local Ruby environment that can run the tests
4
- via `rake`.
5
- * You must have the [GitHub CLI tool (gh)](https://cli.github.com/)
6
- installed, in your path, and logged into an account that can
7
- make GitHub releases on the repo.
8
- * Your environment also must have `bash`, `git`, `perl`, and `sed`
9
- available.
10
-
11
- # How to release
12
-
13
- * Review open issues and PRs to see if anything needs to be addressed
14
- before release.
15
- * Create a branch e.g. `horgh/release` and switch to it.
16
- * `main` is protected.
17
- * Set the release version and release date in `CHANGELOG.md`. Be sure
18
- the version follows [Semantic Versioning](https://semver.org/).
19
- * Commit these changes.
20
- * Run `dev-bin/release.sh`.
21
- * Verify the release on the GitHub Releases page.
22
- * If everything goes well, the authorized releasers will receive an email
23
- to review the pending deployment. If you are an authorized releaser,
24
- you will need to approve the release deployment run. If you are not,
25
- you will have to wait for an authorized releaser to do so.
26
- * Double check it looks okay at https://rubygems.org/gems/minfraud and
27
- https://www.rubydoc.info/gems/minfraud.
28
- * Make a PR and get it merged.
data/Rakefile DELETED
@@ -1,12 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'bundler/gem_tasks'
4
- require 'rspec/core/rake_task'
5
- require 'rubocop/rake_task'
6
-
7
- RSpec::Core::RakeTask.new(:spec)
8
-
9
- RuboCop::RakeTask.new
10
-
11
- task default: :spec
12
- task default: :rubocop
data/bin/console DELETED
@@ -1,15 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- require 'bundler/setup'
5
- require 'minfraud'
6
-
7
- # You can add fixtures and/or initialization code here to make experimenting
8
- # with your gem easier. You can also use a different console, if you like.
9
-
10
- # (If you use this, don't forget to add pry to your Gemfile!)
11
- # require "pry"
12
- # Pry.start
13
-
14
- require 'irb'
15
- IRB.start
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here
data/minfraud.gemspec DELETED
@@ -1,38 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- lib = File.expand_path('lib', __dir__)
4
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
-
6
- require 'minfraud/version'
7
-
8
- Gem::Specification.new do |spec|
9
- spec.name = 'minfraud'
10
- spec.version = Minfraud::VERSION
11
- spec.authors = ['kushnir.yb', 'William Storey']
12
- spec.email = ['support@maxmind.com']
13
-
14
- spec.summary = 'Ruby API for the minFraud Score, Insights, Factors, and Report Transactions services'
15
- spec.homepage = 'https://github.com/maxmind/minfraud-api-ruby'
16
- spec.license = 'MIT'
17
-
18
- spec.required_ruby_version = '>= 3.0'
19
-
20
- spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^.gitignore$|^(?:\.github|dev-bin|spec)/}) }
21
- spec.bindir = 'exe'
22
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
23
- spec.require_paths = ['lib']
24
-
25
- spec.add_dependency 'connection_pool', '~> 2.2'
26
- spec.add_dependency 'http', '>= 4.3', '< 6.0'
27
- spec.add_dependency 'maxmind-geoip2', '~> 1.3'
28
- spec.add_dependency 'simpleidn', '~> 0.1', '>= 0.1.1'
29
-
30
- spec.add_development_dependency 'bundler', '~> 2.2'
31
- spec.add_development_dependency 'rake', '~> 13.0'
32
- spec.add_development_dependency 'rspec', '~> 3.0'
33
- spec.add_development_dependency 'rubocop', '~> 1.23'
34
- spec.add_development_dependency 'webmock', '~> 3.14'
35
- spec.metadata = {
36
- 'rubygems_mfa_required' => 'true'
37
- }
38
- end