loqate 0.10.4 → 0.11.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: d57139c8cf424e3480e5c22ae2198b148a05dd71a604e9ffc02f3e0cc0263146
4
- data.tar.gz: 37fb37868a82c8cabcf0644c75a274781b476e41d3c74fec1471126ff820e091
3
+ metadata.gz: 3d7c198002f31ce942c68c3da5575e690249ca78cfb08b446634a9729a7ef7da
4
+ data.tar.gz: e377639de2c6cb66c0a453283fe43b7260478126da53247c3f300196666b78bc
5
5
  SHA512:
6
- metadata.gz: a5897a78969791c66a1120996a7fdbc69e80591c9eeeafb589da8bdb6e0235d6edacdb2f9deeb65cd81358fba2aefef1d7c94e9cbc93101157e15e4ba2f49dbb
7
- data.tar.gz: 69dca4a91153b2e0e619de8ec206aaa0803c2e51c185dd54753d652ebe96f584d993a0881391f325d1521bbef2a5aae87918d3b1c73688df27549c20d5339d26
6
+ metadata.gz: ccf1f88121d5cd1d0f845957f55e2ccd3ceccb7669e9eedd45b29379b67232d834f33b969ff77702b1c423819cbba3104c0cf339d764cf8b30f6254a00de5e40
7
+ data.tar.gz: 799be036d0c165420b59ab349e8ce1440d716a11091ba96b6a754ee604f6d92c3e5054261e5c93005ac9841eeeb3b8d81f100be938b9228ba03051c8428f9984
@@ -2,6 +2,7 @@ require: rubocop-rspec
2
2
 
3
3
  AllCops:
4
4
  DisplayCopNames: true
5
+ NewCops: enable
5
6
 
6
7
  # ---------------------- Layout -----------------------
7
8
 
@@ -0,0 +1 @@
1
+ ruby 2.7.1
@@ -9,7 +9,7 @@ rvm:
9
9
  - 2.7
10
10
  - jruby
11
11
 
12
- before_install: gem install bundler -v 1.16.5
12
+ before_install: gem install bundler -v 2.1.4
13
13
 
14
14
  before_script:
15
15
  - echo 'fake-key' > .api_key
@@ -4,6 +4,33 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
5
5
  and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [0.11.0] - 2021-01-29
8
+ ## Changed
9
+ - Updated `bundler` to version `2.1`
10
+ - Updated `guard` to version `2.16`
11
+ - Updated `guard-bundler` to version `3.0`
12
+ - Updated `guard-rubocop` to version `1.3`
13
+ - Updated `overcommit` to version `0.53`
14
+ - Updated `pry` to version `0.13`
15
+ - Updated `rubocop` to version `0.85`
16
+ - Updated `rubocop-rspec` to version `1.39`
17
+ - Updated `simplecov-console` to version `0.7`
18
+ - Updated `vcr` to version `6.0`
19
+ - Updated `webmock` to version `3.8`
20
+ - Enabled the newest RuboCop rules
21
+ - Set the local development Ruby version to 2.7.1
22
+
23
+ ## Removed
24
+ - Removed the attribute `is_complainer_or_fraud_risk` from `EmailValidation`. It is no longer supported by Loqate's API
25
+ and will always return `false`.
26
+
27
+ ## Fixed
28
+ - Fixed the type coercion of the attribute `duration` on the `EmailValidation` class:
29
+ ```
30
+ [Loqate::Email::EmailValidation.new] 0 (Integer) has invalid type for :duration violates
31
+ constraints (type?(Float, 0) failed)
32
+ ```
33
+
7
34
  ## [0.10.4] - 2020-05-08
8
35
  ### Changed
9
36
  - Updated `HTTP` to version `4.3`
@@ -4,10 +4,9 @@ require 'loqate/mappers/error_mapper'
4
4
  require 'loqate/mappers/generic_mapper'
5
5
  require 'loqate/bank/account_validation'
6
6
  require 'loqate/bank/batch_account_validation'
7
- require 'loqate/bank/card_validation'
8
7
  require 'loqate/bank/branch'
9
- require 'loqate/bank/international_account_validation'
10
8
  require 'loqate/bank/card_validation'
9
+ require 'loqate/bank/international_account_validation'
11
10
 
12
11
  module Loqate
13
12
  module Bank
@@ -44,20 +44,13 @@ module Loqate
44
44
  #
45
45
  attribute :is_disposable_or_temporary, Types::Strict::Bool
46
46
 
47
- # True if we recognise the email address against known lists of complainers and/or the email address has been
48
- # used to defraud.
49
- #
50
- # @return [Boolean]
51
- #
52
- attribute :is_complainer_or_fraud_risk, Types::Strict::Bool
53
-
54
47
  # The duration (in seconds) that the email validation took (maximum timeout enforced at 15 seconds).
55
48
  # We recommend a high timeout (at least 5 seconds) value as it will minimise the number of "Timeout"
56
49
  # responses returned.
57
50
  #
58
51
  # @return [Float]
59
52
  #
60
- attribute :duration, Types::Strict::Float
53
+ attribute :duration, Types::Coercible::Float
61
54
 
62
55
  # Whether the email was fully validated (including the account portion).
63
56
  def valid?
@@ -70,8 +70,8 @@ module Loqate
70
70
 
71
71
  # Utility methods to conveniently return +Success+ or +Failure+ results.
72
72
  module Mixin
73
- Success = Success
74
- Failure = Failure
73
+ Success = ::Loqate::Result::Success
74
+ Failure = ::Loqate::Result::Failure
75
75
 
76
76
  # Wraps the result of an operation in a +Success+ result.
77
77
  #
@@ -26,7 +26,7 @@ module Loqate
26
26
  def camelize(term)
27
27
  string = term.to_s
28
28
  string = string.sub(/^[a-z\d]*/, &:capitalize)
29
- string.gsub!(%r{(?:_|(\/))([a-z\d]*)}) { "#{Regexp.last_match(1)}#{Regexp.last_match(2).capitalize}" }
29
+ string.gsub!(%r{(?:_|(/))([a-z\d]*)}) { "#{Regexp.last_match(1)}#{Regexp.last_match(2).capitalize}" }
30
30
  string.gsub!('/'.freeze, '::'.freeze)
31
31
  string
32
32
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Loqate
4
- VERSION = '0.10.4'
4
+ VERSION = '0.11.0'
5
5
  end
@@ -24,26 +24,28 @@ Gem::Specification.new do |spec|
24
24
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
25
25
  spec.require_paths = ['lib']
26
26
 
27
+ spec.required_ruby_version = '>= 2.4.0'
28
+
27
29
  spec.add_runtime_dependency 'dry-struct', '~> 1.0'
28
30
  spec.add_runtime_dependency 'http', '>= 4.3.0'
29
31
 
30
- spec.add_development_dependency 'bundler', '>= 1.16'
32
+ spec.add_development_dependency 'bundler', '>= 2.1'
31
33
  spec.add_development_dependency 'bundler-audit', '~> 0.6'
32
- spec.add_development_dependency 'guard', '~> 2.14'
33
- spec.add_development_dependency 'guard-bundler', '~> 2.1'
34
+ spec.add_development_dependency 'guard', '~> 2.16'
35
+ spec.add_development_dependency 'guard-bundler', '~> 3.0'
34
36
  spec.add_development_dependency 'guard-bundler-audit', '~> 0.1'
35
37
  spec.add_development_dependency 'guard-rspec', '~> 4.7'
36
- spec.add_development_dependency 'guard-rubocop', '~> 1.2'
37
- spec.add_development_dependency 'overcommit', '~> 0.46'
38
- spec.add_development_dependency 'pry', '~> 0.11'
38
+ spec.add_development_dependency 'guard-rubocop', '~> 1.3'
39
+ spec.add_development_dependency 'overcommit', '~> 0.53'
40
+ spec.add_development_dependency 'pry', '~> 0.13'
39
41
  spec.add_development_dependency 'rake', '~> 12.3'
40
42
  spec.add_development_dependency 'rspec', '~> 3.0'
41
- spec.add_development_dependency 'rubocop', '~> 0.78'
42
- spec.add_development_dependency 'rubocop-rspec', '~> 1.29'
43
- spec.add_development_dependency 'simplecov', '~> 0.16'
44
- spec.add_development_dependency 'simplecov-console', '~> 0.4'
45
- spec.add_development_dependency 'vcr', '~> 4.0'
46
- spec.add_development_dependency 'webmock', '~> 3.4'
43
+ spec.add_development_dependency 'rubocop', '~> 0.85'
44
+ spec.add_development_dependency 'rubocop-rspec', '~> 1.39'
45
+ spec.add_development_dependency 'simplecov', '~> 0.17.1'
46
+ spec.add_development_dependency 'simplecov-console', '~> 0.7'
47
+ spec.add_development_dependency 'vcr', '~> 6.0'
48
+ spec.add_development_dependency 'webmock', '~> 3.8'
47
49
  spec.add_development_dependency 'yard', '~> 0.9'
48
50
  spec.add_development_dependency 'yard-junk', '~> 0.0.7'
49
51
  spec.add_development_dependency 'yardstick', '~> 0.9'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: loqate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.4
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wilson Silva
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-05-08 00:00:00.000000000 Z
11
+ date: 2021-01-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-struct
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: '1.16'
47
+ version: '2.1'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: '1.16'
54
+ version: '2.1'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: bundler-audit
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -72,28 +72,28 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '2.14'
75
+ version: '2.16'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '2.14'
82
+ version: '2.16'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: guard-bundler
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '2.1'
89
+ version: '3.0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '2.1'
96
+ version: '3.0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: guard-bundler-audit
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -128,42 +128,42 @@ dependencies:
128
128
  requirements:
129
129
  - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: '1.2'
131
+ version: '1.3'
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: '1.2'
138
+ version: '1.3'
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: overcommit
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
143
  - - "~>"
144
144
  - !ruby/object:Gem::Version
145
- version: '0.46'
145
+ version: '0.53'
146
146
  type: :development
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
150
  - - "~>"
151
151
  - !ruby/object:Gem::Version
152
- version: '0.46'
152
+ version: '0.53'
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: pry
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
157
  - - "~>"
158
158
  - !ruby/object:Gem::Version
159
- version: '0.11'
159
+ version: '0.13'
160
160
  type: :development
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
164
  - - "~>"
165
165
  - !ruby/object:Gem::Version
166
- version: '0.11'
166
+ version: '0.13'
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: rake
169
169
  requirement: !ruby/object:Gem::Requirement
@@ -198,84 +198,84 @@ dependencies:
198
198
  requirements:
199
199
  - - "~>"
200
200
  - !ruby/object:Gem::Version
201
- version: '0.78'
201
+ version: '0.85'
202
202
  type: :development
203
203
  prerelease: false
204
204
  version_requirements: !ruby/object:Gem::Requirement
205
205
  requirements:
206
206
  - - "~>"
207
207
  - !ruby/object:Gem::Version
208
- version: '0.78'
208
+ version: '0.85'
209
209
  - !ruby/object:Gem::Dependency
210
210
  name: rubocop-rspec
211
211
  requirement: !ruby/object:Gem::Requirement
212
212
  requirements:
213
213
  - - "~>"
214
214
  - !ruby/object:Gem::Version
215
- version: '1.29'
215
+ version: '1.39'
216
216
  type: :development
217
217
  prerelease: false
218
218
  version_requirements: !ruby/object:Gem::Requirement
219
219
  requirements:
220
220
  - - "~>"
221
221
  - !ruby/object:Gem::Version
222
- version: '1.29'
222
+ version: '1.39'
223
223
  - !ruby/object:Gem::Dependency
224
224
  name: simplecov
225
225
  requirement: !ruby/object:Gem::Requirement
226
226
  requirements:
227
227
  - - "~>"
228
228
  - !ruby/object:Gem::Version
229
- version: '0.16'
229
+ version: 0.17.1
230
230
  type: :development
231
231
  prerelease: false
232
232
  version_requirements: !ruby/object:Gem::Requirement
233
233
  requirements:
234
234
  - - "~>"
235
235
  - !ruby/object:Gem::Version
236
- version: '0.16'
236
+ version: 0.17.1
237
237
  - !ruby/object:Gem::Dependency
238
238
  name: simplecov-console
239
239
  requirement: !ruby/object:Gem::Requirement
240
240
  requirements:
241
241
  - - "~>"
242
242
  - !ruby/object:Gem::Version
243
- version: '0.4'
243
+ version: '0.7'
244
244
  type: :development
245
245
  prerelease: false
246
246
  version_requirements: !ruby/object:Gem::Requirement
247
247
  requirements:
248
248
  - - "~>"
249
249
  - !ruby/object:Gem::Version
250
- version: '0.4'
250
+ version: '0.7'
251
251
  - !ruby/object:Gem::Dependency
252
252
  name: vcr
253
253
  requirement: !ruby/object:Gem::Requirement
254
254
  requirements:
255
255
  - - "~>"
256
256
  - !ruby/object:Gem::Version
257
- version: '4.0'
257
+ version: '6.0'
258
258
  type: :development
259
259
  prerelease: false
260
260
  version_requirements: !ruby/object:Gem::Requirement
261
261
  requirements:
262
262
  - - "~>"
263
263
  - !ruby/object:Gem::Version
264
- version: '4.0'
264
+ version: '6.0'
265
265
  - !ruby/object:Gem::Dependency
266
266
  name: webmock
267
267
  requirement: !ruby/object:Gem::Requirement
268
268
  requirements:
269
269
  - - "~>"
270
270
  - !ruby/object:Gem::Version
271
- version: '3.4'
271
+ version: '3.8'
272
272
  type: :development
273
273
  prerelease: false
274
274
  version_requirements: !ruby/object:Gem::Requirement
275
275
  requirements:
276
276
  - - "~>"
277
277
  - !ruby/object:Gem::Version
278
- version: '3.4'
278
+ version: '3.8'
279
279
  - !ruby/object:Gem::Dependency
280
280
  name: yard
281
281
  requirement: !ruby/object:Gem::Requirement
@@ -330,6 +330,7 @@ files:
330
330
  - ".overcommit.yml"
331
331
  - ".rspec"
332
332
  - ".rubocop.yml"
333
+ - ".tool-versions"
333
334
  - ".tools-versions"
334
335
  - ".travis.yml"
335
336
  - ".yardopts"
@@ -378,7 +379,7 @@ files:
378
379
  homepage: https://github.com/wilsonsilva/loqate
379
380
  licenses: []
380
381
  metadata: {}
381
- post_install_message:
382
+ post_install_message:
382
383
  rdoc_options: []
383
384
  require_paths:
384
385
  - lib
@@ -386,7 +387,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
386
387
  requirements:
387
388
  - - ">="
388
389
  - !ruby/object:Gem::Version
389
- version: '0'
390
+ version: 2.4.0
390
391
  required_rubygems_version: !ruby/object:Gem::Requirement
391
392
  requirements:
392
393
  - - ">="
@@ -394,7 +395,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
394
395
  version: '0'
395
396
  requirements: []
396
397
  rubygems_version: 3.1.2
397
- signing_key:
398
+ signing_key:
398
399
  specification_version: 4
399
400
  summary: API client for GBG Loqate
400
401
  test_files: []