algoliasearch-rails 2.3.0 → 2.3.1
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 +6 -1
- data/lib/algoliasearch/algolia_job.rb +1 -1
- data/lib/algoliasearch/configuration.rb +16 -4
- data/lib/algoliasearch/version.rb +1 -1
- data/spec/spec_helper.rb +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6c936268f937121a58b8a141df1d9cb5dc25504ff4c25dc3e4d133060162d326
|
4
|
+
data.tar.gz: 8b2262430fc7edab858ce40e6f46638ceb65ddea27f17b2261e2251c93b725b3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b54ada522502ea04902a815a185d1c7ee016c121ca711a79db89815c3ebf443dd958b68d9b64c7ae48d6260bd423472234babc11c0e6d43f5f0f17793b601d67
|
7
|
+
data.tar.gz: 7ec62bbe246782b6015be92ec55cf680157116e974c88efc5300f528e7324a437b182e7c6e5cde640d18ae5671b0052fad75338a41ed54e0b307c6a1834eaf77
|
data/CHANGELOG.MD
CHANGED
@@ -2,7 +2,12 @@
|
|
2
2
|
|
3
3
|
## [Unreleased](https://github.com/algolia/algoliasearch-rails/compare/2.2.1...master)
|
4
4
|
|
5
|
-
## [2.
|
5
|
+
## [2.3.1](https://github.com/algolia/algoliasearch-rails/compare/2.3.0...2.3.1)
|
6
|
+
### Added
|
7
|
+
* Allow ActiveJob queue configuration [`#439`](https://github.com/algolia/algoliasearch-rails/pull/439)
|
8
|
+
* allow to configure user agent and other default options [`#438`](https://github.com/algolia/algoliasearch-rails/pull/438)
|
9
|
+
|
10
|
+
## [2.3.0](https://github.com/algolia/algoliasearch-rails/compare/2.2.2...2.3.0)
|
6
11
|
### Fixed
|
7
12
|
* bugfix: don't consider objectID changed when using custom ID through method [`#436`](https://github.com/algolia/algoliasearch-rails/pull/436)
|
8
13
|
|
@@ -1,5 +1,10 @@
|
|
1
1
|
module AlgoliaSearch
|
2
2
|
module Configuration
|
3
|
+
REQUIRED_CONFIGURATION = {
|
4
|
+
user_agent: "Algolia for Rails (#{AlgoliaSearch::VERSION}); Rails (#{defined?(::Rails::VERSION::STRING) ? ::Rails::VERSION::STRING : 'unknown'})",
|
5
|
+
symbolize_keys: false
|
6
|
+
}
|
7
|
+
|
3
8
|
def initialize
|
4
9
|
@client = nil
|
5
10
|
end
|
@@ -9,10 +14,11 @@ module AlgoliaSearch
|
|
9
14
|
end
|
10
15
|
|
11
16
|
def configuration=(configuration)
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
17
|
+
user_agent = [REQUIRED_CONFIGURATION[:user_agent], configuration[:append_to_user_agent]].compact.join('; ')
|
18
|
+
@@configuration = default_configuration
|
19
|
+
.merge(configuration)
|
20
|
+
.merge(REQUIRED_CONFIGURATION)
|
21
|
+
.merge({ user_agent: user_agent })
|
16
22
|
end
|
17
23
|
|
18
24
|
def client_opts
|
@@ -34,5 +40,11 @@ module AlgoliaSearch
|
|
34
40
|
def setup_client
|
35
41
|
@client = Algolia::Search::Client.new(Algolia::Search::Config.new(@@configuration), client_opts)
|
36
42
|
end
|
43
|
+
|
44
|
+
def default_configuration
|
45
|
+
{
|
46
|
+
queue_name: 'algoliasearch'
|
47
|
+
}
|
48
|
+
end
|
37
49
|
end
|
38
50
|
end
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: algoliasearch-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.3.
|
4
|
+
version: 2.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Algolia
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-12-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|