solr_wrapper 4.1.3 → 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 +27 -6
- data/lib/solr_wrapper/version.rb +1 -1
- metadata +3 -7
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
|
|
@@ -159,12 +161,17 @@ module SolrWrapper
|
|
|
159
161
|
create_options[:n] = options[:config_name] if options[:config_name]
|
|
160
162
|
|
|
161
163
|
if options[:dir]
|
|
164
|
+
# Turn a relative path to absolute. Solr 9.7+ changes relative to be
|
|
165
|
+
# relative to solr instance dir (which can be a temp dir for us),
|
|
166
|
+
# instead of command CWD. Normalize to absolute is good for all.
|
|
167
|
+
options[:dir] = File.absolute_path(options[:dir])
|
|
168
|
+
|
|
162
169
|
# Solr 9.7 required that the dir argument contain a `conf` directory that
|
|
163
170
|
# contains the actual configuration files.
|
|
164
|
-
if
|
|
165
|
-
|
|
166
|
-
if options[:dir].match?(/conf
|
|
167
|
-
create_options[:d] = File.expand_path(options[:dir]
|
|
171
|
+
if greater_than_solr97? && !File.exist?(File.join(options[:dir], 'conf'))
|
|
172
|
+
# ends in `conf` or `conf/`
|
|
173
|
+
if options[:dir].match?(/conf\/?$/)
|
|
174
|
+
create_options[:d] = File.expand_path("..", options[:dir])
|
|
168
175
|
else
|
|
169
176
|
tmpdir = Dir.mktmpdir
|
|
170
177
|
|
|
@@ -234,7 +241,9 @@ module SolrWrapper
|
|
|
234
241
|
def delete(name, _options = {})
|
|
235
242
|
delete_options = { c: name }
|
|
236
243
|
|
|
237
|
-
if
|
|
244
|
+
if greater_than_solr98?
|
|
245
|
+
delete_options[:s] = config.base_url
|
|
246
|
+
elsif greater_than_solr97?
|
|
238
247
|
delete_options[:url] = config.base_url
|
|
239
248
|
else
|
|
240
249
|
delete_options[:p] = port
|
|
@@ -390,6 +399,18 @@ module SolrWrapper
|
|
|
390
399
|
end
|
|
391
400
|
end
|
|
392
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
|
+
|
|
393
414
|
def zkhost
|
|
394
415
|
"#{config.zookeeper_host}:#{config.zookeeper_port}" if config.cloud
|
|
395
416
|
end
|
data/lib/solr_wrapper/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +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
|
-
autorequire:
|
|
9
8
|
bindir: exe
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date: 2025-
|
|
10
|
+
date: 2025-11-19 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: faraday
|
|
@@ -182,7 +181,6 @@ dependencies:
|
|
|
182
181
|
- - ">="
|
|
183
182
|
- !ruby/object:Gem::Version
|
|
184
183
|
version: '0'
|
|
185
|
-
description:
|
|
186
184
|
email:
|
|
187
185
|
- chris@cbeer.info
|
|
188
186
|
executables:
|
|
@@ -235,7 +233,6 @@ homepage: https://github.com/cbeer/solr_wrapper
|
|
|
235
233
|
licenses:
|
|
236
234
|
- MIT
|
|
237
235
|
metadata: {}
|
|
238
|
-
post_install_message:
|
|
239
236
|
rdoc_options: []
|
|
240
237
|
require_paths:
|
|
241
238
|
- lib
|
|
@@ -250,8 +247,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
250
247
|
- !ruby/object:Gem::Version
|
|
251
248
|
version: '0'
|
|
252
249
|
requirements: []
|
|
253
|
-
rubygems_version: 3.
|
|
254
|
-
signing_key:
|
|
250
|
+
rubygems_version: 3.6.3
|
|
255
251
|
specification_version: 4
|
|
256
252
|
summary: Solr service wrapper
|
|
257
253
|
test_files:
|