addressfinder 1.14.0 → 1.15.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0d90188a9c9fc48c8fe6f6969422dbd58fca983e1df1fcd847b30a901e517d57
4
- data.tar.gz: dbf03555650c7b18d98e95984eba7355dc23e6002bde8992222203d2cb5d33bc
3
+ metadata.gz: c5898fc54f3fcd543748761e03afc308e2f0de4d071c4a507c1d25a3d59f34fd
4
+ data.tar.gz: 894ba815fb72c6b4e6b340fc44204b376fd04d510a27abe8878e0fa5e5fb2c77
5
5
  SHA512:
6
- metadata.gz: 26482cf4b76f70993a20dac62aeb5c6bc4b9cda257343fb47dccd049adea2098a4bab8bf1027ae40377071b6eba02162e9bd6fa94a3391ee4afaf9bf74e2f008
7
- data.tar.gz: ed1ce7451090295ebf848e75133e2b19c376bed7c802dd584b72a516695b0e67172e043a4e88c85b3f93714dc5655b9b5f744f0a4b1a193b92f2c62671790383
6
+ metadata.gz: a12cb1500ce95ca0c64857ac7b8d37957704c51c24da9b86557884c926caa9acee0007f14ae409f7a424f5d53b251383afa7bec92c2d2017ccfed5091a91e83c
7
+ data.tar.gz: 4e18036778cd7eeaf4178e099bf037963efbf667ee18ac5c7425349dc5f96108d67be76c802839dce66d8b04c312f88935ff55b79f4d807d4a72e905c63e936f
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ # Addressfinder 1.15.0 (March 2025) #
2
+
3
+ * Automatically skip empty strings within Batch verification
4
+ * Mark unverified addressses as false within Batch verification
5
+
1
6
  # Addressfinder 1.14.0 (February 2025) #
2
7
 
3
8
  * Add support for Ruby 3.4
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Addressfinder Ruby Gem
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/addressfinder.svg)](http://badge.fury.io/rb/addressfinder)
4
- [![Build Status](https://travis-ci.com/github/AddressFinder/addressfinder-ruby.svg)](https://travis-ci.com/github/AddressFinder/addressfinder-ruby)
4
+ [![Build Status](https://github.com/addressfinder/addressfinder-ruby/actions/workflows/ruby.yml/badge.svg?branch=master)](https://github.com/addressfinder/addressfinder-ruby/actions/workflows/ruby.yml/badge.svg?branch=master)
5
5
 
6
6
  A client library for accessing the [Addressfinder](https://addressfinder.nz/?utm_source=github&utm_medium=readme&utm_campaign=addressfinder_rubygem&utm_term=AddressFinder) APIs.
7
7
 
@@ -47,7 +47,7 @@ module AddressFinder
47
47
  @emails.each_with_index do |email, index_of_email|
48
48
  # Start a new thread for each task
49
49
  pool.post do
50
- verify_email(email, index_of_email)
50
+ @results[index_of_email] = verify_email(email)
51
51
  end
52
52
  end
53
53
 
@@ -57,11 +57,12 @@ module AddressFinder
57
57
  end
58
58
 
59
59
  # Verifies a single email addresses, and writes the result into @results
60
- def verify_email(email, index_of_email)
61
- @results[index_of_email] =
62
- AddressFinder::V1::Email::Verification.new(email: email, http: http.clone, **args).perform.result
60
+ def verify_email(email)
61
+ return if email.empty?
62
+
63
+ AddressFinder::V1::Email::Verification.new(email: email, http: http.clone, **args).perform.result
63
64
  rescue AddressFinder::RequestRejectedError => e
64
- @results[index_of_email] = OpenStruct.new(success: false, body: e.body, status: e.status)
65
+ OpenStruct.new(success: false, body: e.body, status: e.status)
65
66
  end
66
67
  end
67
68
  end
@@ -48,7 +48,7 @@ module AddressFinder
48
48
  addresses.each_with_index do |address, index_of_address|
49
49
  # Start a new thread for each task
50
50
  pool.post do
51
- verify_address(address, index_of_address)
51
+ @results[index_of_address] = verify_address(address)
52
52
  end
53
53
  end
54
54
 
@@ -58,11 +58,12 @@ module AddressFinder
58
58
  end
59
59
 
60
60
  # Verifies a single address, and writes the result into @results
61
- def verify_address(address, index_of_address)
62
- @results[index_of_address] =
63
- AddressFinder::Verification.new(q: address, http: http.clone, **args).perform.result
61
+ def verify_address(address)
62
+ return if address.empty?
63
+
64
+ AddressFinder::Verification.new(q: address, http: http.clone, **args).perform.result || false
64
65
  rescue AddressFinder::RequestRejectedError => e
65
- @results[index_of_address] = OpenStruct.new(success: false, body: e.body, status: e.status)
66
+ OpenStruct.new(success: false, body: e.body, status: e.status)
66
67
  end
67
68
  end
68
69
  end
@@ -48,7 +48,7 @@ module AddressFinder
48
48
  addresses.each_with_index do |address, index_of_address|
49
49
  # Start a new thread for each task
50
50
  pool.post do
51
- verify_address(address, index_of_address)
51
+ @results[index_of_address] = verify_address(address)
52
52
  end
53
53
  end
54
54
 
@@ -58,11 +58,12 @@ module AddressFinder
58
58
  end
59
59
 
60
60
  # Verifies a single address, and writes the result into @results
61
- def verify_address(address, index_of_address)
62
- @results[index_of_address] =
63
- AddressFinder::V2::Au::Verification.new(q: address, http: http.clone, **args).perform.result
61
+ def verify_address(address)
62
+ return if address.empty?
63
+
64
+ AddressFinder::V2::Au::Verification.new(q: address, http: http.clone, **args).perform.result || false
64
65
  rescue AddressFinder::RequestRejectedError => e
65
- @results[index_of_address] = OpenStruct.new(success: false, body: e.body, status: e.status)
66
+ OpenStruct.new(success: false, body: e.body, status: e.status)
66
67
  end
67
68
  end
68
69
  end
@@ -1,3 +1,3 @@
1
1
  module AddressFinder
2
- VERSION = "1.14.0"
2
+ VERSION = "1.15.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: addressfinder
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.14.0
4
+ version: 1.15.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nigel Ramsay
@@ -9,9 +9,10 @@ authors:
9
9
  - Sean Arnold
10
10
  - Alexandre Barret
11
11
  - Cassandre Guinut
12
+ autorequire:
12
13
  bindir: bin
13
14
  cert_chain: []
14
- date: 2025-02-28 00:00:00.000000000 Z
15
+ date: 2025-03-24 00:00:00.000000000 Z
15
16
  dependencies:
16
17
  - !ruby/object:Gem::Dependency
17
18
  name: multi_json
@@ -193,6 +194,7 @@ homepage: https://github.com/AddressFinder/addressfinder-ruby
193
194
  licenses:
194
195
  - MIT
195
196
  metadata: {}
197
+ post_install_message:
196
198
  rdoc_options: []
197
199
  require_paths:
198
200
  - lib
@@ -207,7 +209,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
207
209
  - !ruby/object:Gem::Version
208
210
  version: '0'
209
211
  requirements: []
210
- rubygems_version: 3.6.2
212
+ rubygems_version: 3.5.22
213
+ signing_key:
211
214
  specification_version: 4
212
215
  summary: Provides easy access to Addressfinder APIs
213
216
  test_files: []