algolia 2.3.2 → 2.3.3
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 +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/algolia/http/http_requester.rb +1 -1
- data/lib/algolia/version.rb +1 -1
- data/test/algolia/unit/http_requester_test.rb +27 -0
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '0492459cd5b8a7ddc8abba6d658c1d4c5a5c8ddedbdc16ea2a8e8395588ae1ba'
|
4
|
+
data.tar.gz: e0d522ddb114dddf1fbb578b5c8a56a23d6b4a1c717aa30e4c86512a67b96d82
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c919b2855a50b42a1a01e832e0ef4560cb852a540dee2ca969af328413e042e1b70dda29543721cdd3c823fab024da1059704d6c525a5e0d359bff5d605846d0
|
7
|
+
data.tar.gz: 418cdc6b559ef6a591bacc3808fa079a5442089249f4097a84630631320d9d5d80a4e786567d706231c8a868b8ca05c306c5cd98f28615cda855275e19c31f8c
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,10 @@
|
|
2
2
|
|
3
3
|
## [Unreleased](https://github.com/algolia/algoliasearch-client-ruby/compare/2.3.2..master)
|
4
4
|
|
5
|
+
## [2.3.2](https://github.com/algolia/algoliasearch-client-ruby/compare/2.3.2...2.3.3) (2023-11-14)
|
6
|
+
### Fixed
|
7
|
+
- Fixed issue with connection caching for faulty hosts that accept similar requests ([`#496`](https://github.com/algolia/algoliasearch-client-ruby/pull/496))
|
8
|
+
|
5
9
|
## [2.3.2](https://github.com/algolia/algoliasearch-client-ruby/compare/2.3.1...2.3.2) (2023-06-07)
|
6
10
|
### Fixed
|
7
11
|
- Fixed issue with Request not taking timeouts into account ([`#493`](https://github.com/algolia/algoliasearch-client-ruby/pull/493))
|
data/lib/algolia/version.rb
CHANGED
@@ -0,0 +1,27 @@
|
|
1
|
+
require 'algolia'
|
2
|
+
require 'test_helper'
|
3
|
+
|
4
|
+
class HttpRequesterTest
|
5
|
+
describe 'connection' do
|
6
|
+
def test_caches_http_client_connections
|
7
|
+
requester = Algolia::Http::HttpRequester.new(Defaults::ADAPTER, nil)
|
8
|
+
host1 = Algolia::Transport::StatefulHost.new('host1')
|
9
|
+
|
10
|
+
# rubocop:disable Lint/UselessComparison
|
11
|
+
assert requester.connection(host1) == requester.connection(host1)
|
12
|
+
# rubocop:enable Lint/UselessComparison
|
13
|
+
assert_equal requester.connection(host1).url_prefix.host, 'host1'
|
14
|
+
end
|
15
|
+
|
16
|
+
def test_caches_hosts_independent_of_each_other
|
17
|
+
requester = Algolia::Http::HttpRequester.new(Defaults::ADAPTER, nil)
|
18
|
+
host1 = Algolia::Transport::StatefulHost.new('host1')
|
19
|
+
host2 = Algolia::Transport::StatefulHost.new('host2')
|
20
|
+
|
21
|
+
assert requester.connection(host1) != requester.connection(host2)
|
22
|
+
|
23
|
+
assert_equal requester.connection(host1).url_prefix.host, 'host1'
|
24
|
+
assert_equal requester.connection(host2).url_prefix.host, 'host2'
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: algolia
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.3.
|
4
|
+
version: 2.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Algolia
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-11-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -306,6 +306,7 @@ files:
|
|
306
306
|
- test/algolia/integration/search_index_test.rb
|
307
307
|
- test/algolia/unit/algolia_config_test.rb
|
308
308
|
- test/algolia/unit/helpers_test.rb
|
309
|
+
- test/algolia/unit/http_requester_test.rb
|
309
310
|
- test/algolia/unit/retry_strategy_test.rb
|
310
311
|
- test/algolia/unit/user_agent_test.rb
|
311
312
|
- test/test_helper.rb
|
@@ -332,7 +333,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
332
333
|
- !ruby/object:Gem::Version
|
333
334
|
version: '0'
|
334
335
|
requirements: []
|
335
|
-
rubygems_version: 3.
|
336
|
+
rubygems_version: 3.2.15
|
336
337
|
signing_key:
|
337
338
|
specification_version: 4
|
338
339
|
summary: A simple Ruby client for the algolia.com REST API
|
@@ -349,6 +350,7 @@ test_files:
|
|
349
350
|
- test/algolia/integration/search_index_test.rb
|
350
351
|
- test/algolia/unit/algolia_config_test.rb
|
351
352
|
- test/algolia/unit/helpers_test.rb
|
353
|
+
- test/algolia/unit/http_requester_test.rb
|
352
354
|
- test/algolia/unit/retry_strategy_test.rb
|
353
355
|
- test/algolia/unit/user_agent_test.rb
|
354
356
|
- test/test_helper.rb
|