solr_wrapper 3.1.2 → 3.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9c1284ffe589ddc60ddddb23b70fe7daf57ca017efa1630f80787bb28f5f5c66
4
- data.tar.gz: 0be582a13adedabd32636247b0554cfe0705d21990ae1221b34d83cac0882754
3
+ metadata.gz: e135734d52040fa5877fd21ad5149afc55ba8ffbc282a900ba448a9b2b230c28
4
+ data.tar.gz: 5363eb0bcad04e78b36267dbf35aa03a1fec56ee1487023622d3219a54501f87
5
5
  SHA512:
6
- metadata.gz: 2b5323d1a0d5d02fb6dab1e22dc100007863de09f458cd4259cf69ef3eda7882b9d23c89bc821aa478b4f529554d38cd771dc3fa7b37115bb61c478e89f9239b
7
- data.tar.gz: 1298a39b87f6608efc35669d8214f3cd034f42cae956b83d369ae0b5eb1553304ba59c53882a870dac69f8f69267f155c6e99eab36c6eb5d8f4eeaa5a3a5e187
6
+ metadata.gz: e0c3fca3bc208c4f9d71c6c14fcb0e99094d737e705ac12620c9ba725cc925b004a2dfa9bdb5210b05863df6ff94f4a3282a23b3e8f6aa4e2ef5de60a78eea2a
7
+ data.tar.gz: 3cd79dcfa0e2b3fd26bb1ce499712e09d019ade55799d9fbbdbdc6e832748df4f0bbc54689a5ba73f7e7d122db55751eff6a75bac37f6c41d19e6df55396b760
@@ -14,7 +14,7 @@ jobs:
14
14
  ruby:
15
15
  - 2.7
16
16
  - 3.0
17
- - jruby-9.2.14.0
17
+ - jruby-9.2.20.0
18
18
  steps:
19
19
  - uses: actions/checkout@v2
20
20
  - name: Set up Ruby
data/exe/solr_wrapper CHANGED
@@ -100,7 +100,7 @@ instance = SolrWrapper.instance(options)
100
100
 
101
101
  case command
102
102
  when 'clean'
103
- if instance.started?
103
+ if instance.managed? && instance.started?
104
104
  $stderr.puts "Please stop solr before cleaning"
105
105
  exit 1
106
106
  end
@@ -70,7 +70,7 @@ module SolrWrapper
70
70
  # Start Solr and wait for it to become available
71
71
  def start
72
72
  extract_and_configure
73
- if config.managed?
73
+ if managed?
74
74
  exec('start', p: port, c: config.cloud)
75
75
 
76
76
  # Wait for solr to start
@@ -85,7 +85,7 @@ module SolrWrapper
85
85
  ##
86
86
  # Stop Solr and wait for it to finish exiting
87
87
  def stop
88
- if config.managed? && started?
88
+ if managed? && started?
89
89
  exec('stop', p: port)
90
90
  wait
91
91
  end
@@ -94,7 +94,7 @@ module SolrWrapper
94
94
  ##
95
95
  # Stop Solr and wait for it to finish exiting
96
96
  def restart
97
- if config.managed? && started?
97
+ if managed? && started?
98
98
  exec('restart', p: port, c: config.cloud)
99
99
  end
100
100
  end
@@ -102,7 +102,7 @@ module SolrWrapper
102
102
  ##
103
103
  # Check the status of a managed Solr service
104
104
  def status
105
- return true unless config.managed?
105
+ return true unless managed?
106
106
 
107
107
  out = exec('status').read
108
108
  out =~ /running on port #{port}/
@@ -111,7 +111,7 @@ module SolrWrapper
111
111
  end
112
112
 
113
113
  def pid
114
- return unless config.managed?
114
+ return unless managed?
115
115
 
116
116
  @pid ||= begin
117
117
  out = exec('status').read
@@ -286,6 +286,10 @@ module SolrWrapper
286
286
  end
287
287
  # rubocop:enable Lint/RescueException
288
288
 
289
+ def managed?
290
+ config.managed?
291
+ end
292
+
289
293
  protected
290
294
 
291
295
  def extracted?
@@ -1,3 +1,3 @@
1
1
  module SolrWrapper
2
- VERSION = '3.1.2'
2
+ VERSION = '3.1.3'
3
3
  end
data/lib/solr_wrapper.rb CHANGED
@@ -40,7 +40,7 @@ module SolrWrapper
40
40
  ##
41
41
  # Ensures a Solr service is running before executing the block
42
42
  def self.wrap(options = {}, &block)
43
- instance(options).wrap &block
43
+ instance(options).wrap(&block)
44
44
  end
45
45
 
46
46
  class SolrWrapperError < StandardError; end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solr_wrapper
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.2
4
+ version: 3.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Beer
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-04-07 00:00:00.000000000 Z
11
+ date: 2022-03-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: http
@@ -229,7 +229,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
229
229
  - !ruby/object:Gem::Version
230
230
  version: '0'
231
231
  requirements: []
232
- rubygems_version: 3.2.3
232
+ rubygems_version: 3.2.32
233
233
  signing_key:
234
234
  specification_version: 4
235
235
  summary: Solr service wrapper