addressfinder 1.13.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: 8e9d77bd22770090ef74d02d1b2135dd3504130442b4a5dfd0de17b90661c468
4
- data.tar.gz: 91f162b6b301ff9f86c3253f8a37c89c5d5f9f8781dd8e674f49a8f6624cd2ff
3
+ metadata.gz: c5898fc54f3fcd543748761e03afc308e2f0de4d071c4a507c1d25a3d59f34fd
4
+ data.tar.gz: 894ba815fb72c6b4e6b340fc44204b376fd04d510a27abe8878e0fa5e5fb2c77
5
5
  SHA512:
6
- metadata.gz: 076b5eb2c9d1200713f7952a631b70852071db5e31321c89c31264b134fd2e4ebb8e40f5820fa97fb9a4c3b43fa0c71b714c656018458a6aa02d5e0d92c20ae6
7
- data.tar.gz: 651f98846af6d9d31ab6cb135775f6e0cae3855e8d6031aeef342e1a4d7983bd3389432123bd4b7b01b207029632e325fbb73c703e15ba27da2a471e5099a40d
6
+ metadata.gz: a12cb1500ce95ca0c64857ac7b8d37957704c51c24da9b86557884c926caa9acee0007f14ae409f7a424f5d53b251383afa7bec92c2d2017ccfed5091a91e83c
7
+ data.tar.gz: 4e18036778cd7eeaf4178e099bf037963efbf667ee18ac5c7425349dc5f96108d67be76c802839dce66d8b04c312f88935ff55b79f4d807d4a72e905c63e936f
data/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
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
+
6
+ # Addressfinder 1.14.0 (February 2025) #
7
+
8
+ * Add support for Ruby 3.4
9
+
1
10
  # Addressfinder 1.13.0 (September 2024) #
2
11
 
3
12
  * Add client agent versioning
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
 
@@ -19,6 +19,7 @@ Gem::Specification.new do |gem|
19
19
  gem.required_ruby_version = '>= 2.7'
20
20
  gem.add_dependency 'multi_json', '~> 1.15'
21
21
  gem.add_dependency "concurrent-ruby", "~> 1.2"
22
+ gem.add_dependency 'ostruct', '> 0.6'
22
23
 
23
24
  gem.add_development_dependency 'guard-rspec', '~> 4.7'
24
25
  gem.add_development_dependency 'listen', '~> 3.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.13.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.13.0
4
+ version: 1.15.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nigel Ramsay
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2024-09-04 00:00:00.000000000 Z
15
+ date: 2025-03-24 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: multi_json
@@ -42,6 +42,20 @@ dependencies:
42
42
  - - "~>"
43
43
  - !ruby/object:Gem::Version
44
44
  version: '1.2'
45
+ - !ruby/object:Gem::Dependency
46
+ name: ostruct
47
+ requirement: !ruby/object:Gem::Requirement
48
+ requirements:
49
+ - - ">"
50
+ - !ruby/object:Gem::Version
51
+ version: '0.6'
52
+ type: :runtime
53
+ prerelease: false
54
+ version_requirements: !ruby/object:Gem::Requirement
55
+ requirements:
56
+ - - ">"
57
+ - !ruby/object:Gem::Version
58
+ version: '0.6'
45
59
  - !ruby/object:Gem::Dependency
46
60
  name: guard-rspec
47
61
  requirement: !ruby/object:Gem::Requirement
@@ -195,7 +209,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
195
209
  - !ruby/object:Gem::Version
196
210
  version: '0'
197
211
  requirements: []
198
- rubygems_version: 3.4.13
212
+ rubygems_version: 3.5.22
199
213
  signing_key:
200
214
  specification_version: 4
201
215
  summary: Provides easy access to Addressfinder APIs