solr_wrapper 4.2.0 → 4.3.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 +4 -4
- data/.github/workflows/ci.yml +5 -5
- data/lib/solr_wrapper/instance.rb +19 -3
- data/lib/solr_wrapper/version.rb +1 -1
- 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: 18f3d35de784cb86498a00c3441df0319346e4612cc701a0884285d2d1fec8f7
|
|
4
|
+
data.tar.gz: a2b668dfb513b3c95e0bb9eedb5b891e1121cc329214dee4bc984702f66709ef
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5c10dc4da08e95d372b7755ee8c86f42ed6788a002660b226581b38609452808c2219e759739f7ee0da567c40ca40a573617c72bbb25e1ed88edb729ed6e07d0
|
|
7
|
+
data.tar.gz: b17bef09a92418ca361767b867d562bc3110865731abf48d18fa185f279750947e57df7a707315bd4de0b1be5a2495d1b3b31121e7dc1149c0b9221b3b3a413e
|
data/.github/workflows/ci.yml
CHANGED
|
@@ -12,14 +12,14 @@ jobs:
|
|
|
12
12
|
strategy:
|
|
13
13
|
matrix:
|
|
14
14
|
ruby:
|
|
15
|
-
- '3.
|
|
16
|
-
- '3.3.
|
|
17
|
-
- jruby-9.4.
|
|
15
|
+
- '3.4.7'
|
|
16
|
+
- '3.3.10'
|
|
17
|
+
- jruby-9.4.14.0
|
|
18
18
|
solr_version: ['']
|
|
19
19
|
include:
|
|
20
|
-
- ruby: '3.
|
|
20
|
+
- ruby: '3.4.7'
|
|
21
21
|
solr_version: '8.11.4'
|
|
22
|
-
- ruby: '3.
|
|
22
|
+
- ruby: '3.4.7'
|
|
23
23
|
solr_version: '9.6.1'
|
|
24
24
|
env:
|
|
25
25
|
SOLR_WRAPPER_SOLR_VERSION: ${{ matrix.solr_version }}
|
|
@@ -150,7 +150,9 @@ module SolrWrapper
|
|
|
150
150
|
options[:name] ||= SecureRandom.hex
|
|
151
151
|
|
|
152
152
|
create_options = {}
|
|
153
|
-
if
|
|
153
|
+
if greater_than_solr98?
|
|
154
|
+
create_options[:s] = config.base_url
|
|
155
|
+
elsif greater_than_solr97?
|
|
154
156
|
create_options[:url] = config.base_url
|
|
155
157
|
else
|
|
156
158
|
create_options[:p] = port
|
|
@@ -166,7 +168,7 @@ module SolrWrapper
|
|
|
166
168
|
|
|
167
169
|
# Solr 9.7 required that the dir argument contain a `conf` directory that
|
|
168
170
|
# contains the actual configuration files.
|
|
169
|
-
if
|
|
171
|
+
if greater_than_solr97? && !File.exist?(File.join(options[:dir], 'conf'))
|
|
170
172
|
# ends in `conf` or `conf/`
|
|
171
173
|
if options[:dir].match?(/conf\/?$/)
|
|
172
174
|
create_options[:d] = File.expand_path("..", options[:dir])
|
|
@@ -239,7 +241,9 @@ module SolrWrapper
|
|
|
239
241
|
def delete(name, _options = {})
|
|
240
242
|
delete_options = { c: name }
|
|
241
243
|
|
|
242
|
-
if
|
|
244
|
+
if greater_than_solr98?
|
|
245
|
+
delete_options[:s] = config.base_url
|
|
246
|
+
elsif greater_than_solr97?
|
|
243
247
|
delete_options[:url] = config.base_url
|
|
244
248
|
else
|
|
245
249
|
delete_options[:p] = port
|
|
@@ -395,6 +399,18 @@ module SolrWrapper
|
|
|
395
399
|
end
|
|
396
400
|
end
|
|
397
401
|
|
|
402
|
+
def greater_than_solr97?
|
|
403
|
+
Gem::Version.new(version) >= Gem::Version.new('9.7.0')
|
|
404
|
+
rescue ArgumentError
|
|
405
|
+
true
|
|
406
|
+
end
|
|
407
|
+
|
|
408
|
+
def greater_than_solr98?
|
|
409
|
+
Gem::Version.new(version) >= Gem::Version.new('9.8.0')
|
|
410
|
+
rescue ArgumentError
|
|
411
|
+
true
|
|
412
|
+
end
|
|
413
|
+
|
|
398
414
|
def zkhost
|
|
399
415
|
"#{config.zookeeper_host}:#{config.zookeeper_port}" if config.cloud
|
|
400
416
|
end
|
data/lib/solr_wrapper/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: solr_wrapper
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.
|
|
4
|
+
version: 4.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Chris Beer
|
|
8
8
|
bindir: exe
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date: 2025-
|
|
10
|
+
date: 2025-11-19 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: faraday
|