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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 626db54fafc1a1fc7b2cdf05ee35093193c48572f6a19eda6637a9947d0efea8
4
- data.tar.gz: 2a096674ab3b3aa7a59a7d96210358c54bcb78197cc6761f93ecfb60dd39fb8d
3
+ metadata.gz: 18f3d35de784cb86498a00c3441df0319346e4612cc701a0884285d2d1fec8f7
4
+ data.tar.gz: a2b668dfb513b3c95e0bb9eedb5b891e1121cc329214dee4bc984702f66709ef
5
5
  SHA512:
6
- metadata.gz: 4a849614bd09e398e205441e20df3dd93e07cc097116d97ef63c7b985ee5a925a75c2420fab42d360fc42f87dcacda21dc15445c192b1d2519ba6d71134e4057
7
- data.tar.gz: 0a803b20156f2ceae31a2597361ec54360d3fd5ee9da6970143846e845e2caa1903d6680aa4cf629e9e26a39880d3947ae01ddd9a03ed6416ddcbea059d636b2
6
+ metadata.gz: 5c10dc4da08e95d372b7755ee8c86f42ed6788a002660b226581b38609452808c2219e759739f7ee0da567c40ca40a573617c72bbb25e1ed88edb729ed6e07d0
7
+ data.tar.gz: b17bef09a92418ca361767b867d562bc3110865731abf48d18fa185f279750947e57df7a707315bd4de0b1be5a2495d1b3b31121e7dc1149c0b9221b3b3a413e
@@ -12,14 +12,14 @@ jobs:
12
12
  strategy:
13
13
  matrix:
14
14
  ruby:
15
- - '3.2.5'
16
- - '3.3.4'
17
- - jruby-9.4.8.0
15
+ - '3.4.7'
16
+ - '3.3.10'
17
+ - jruby-9.4.14.0
18
18
  solr_version: ['']
19
19
  include:
20
- - ruby: '3.3.4'
20
+ - ruby: '3.4.7'
21
21
  solr_version: '8.11.4'
22
- - ruby: '3.3.4'
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 version >= '9.7'
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 version >= '9.7' && !File.exist?(File.join(options[:dir], 'conf'))
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 version >= '9.7'
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
@@ -1,3 +1,3 @@
1
1
  module SolrWrapper
2
- VERSION = '4.2.0'
2
+ VERSION = '4.3.0'
3
3
  end
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.2.0
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-08-04 00:00:00.000000000 Z
10
+ date: 2025-11-19 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: faraday