solr_wrapper 0.18.1 → 0.19.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b4003df13bf105dbf5bb12a5593a8cfa5bcaa6fe
4
- data.tar.gz: 607971ddd802c68cc0d8eaede0eb4121fc90c0d3
3
+ metadata.gz: c79d57707566b9eb01ef46907be4d6990b4605a1
4
+ data.tar.gz: 2702fa747f39c90047d032c8187870dadab62d5a
5
5
  SHA512:
6
- metadata.gz: 2a8437e169cad81c857fdc2513ffe37311a6f3431aa9d6925ba6771a69708d085dff7858ea52794732c2b17cc0b44487259804572a13df3dfd09337fec451c78
7
- data.tar.gz: 4e44c61e56b5a34d795f646a2db3d7a8a5a8abbbfac65013b97b046366b173042d88b8f435f135bd570c4fdcaa5c5101ddfda5406bd3e1ceae7eab74e1c04173
6
+ metadata.gz: f5b4dd813e6e3bac738a8c982e086545d40dd09995ee197275d0dda9aa4dcf00744245031f88cf5c7c6cca7d8d263fa2d7de7f82876124fdb6a4b1b390f6743b
7
+ data.tar.gz: bec2c92b37e4d24064228e8bef8537e6fbcb4d4c2183d43cf4b7b2f0d114e460ae9020dbee48917849452e63d200c33d147ed693563283d5536a0c6728a01c3f
@@ -8,6 +8,7 @@ collection_options = {}
8
8
  subtext = <<HELP
9
9
  Commonly used command are:
10
10
  clean : cleans all data from solr and configures a clean instance based on configuration options
11
+ dir : prints the solr instance dir
11
12
  See 'solr_wrapper COMMAND --help' for more information on a specific command.
12
13
  HELP
13
14
 
@@ -75,6 +76,9 @@ subcommands = {
75
76
  'clean' => OptionParser.new do |opts|
76
77
  opts.banner = "Usage: clean"
77
78
  end,
79
+ 'dir' => OptionParser.new do |opts|
80
+ opts.banner = "Usage: dir"
81
+ end,
78
82
  }
79
83
 
80
84
 
@@ -94,26 +98,28 @@ end
94
98
 
95
99
  instance = SolrWrapper.instance(options)
96
100
 
97
- if command == 'clean'
101
+ case command
102
+ when 'clean'
98
103
  if instance.started?
99
104
  $stderr.puts "Please stop solr before cleaning"
100
105
  exit 1
101
106
  end
102
107
  $stderr.puts "cleaning #{instance.instance_dir}..."
103
108
  instance.remove_instance_dir!
104
- exit 0
105
- end
106
-
107
- $stderr.print "Starting Solr #{instance.version} on port #{instance.port} ... "
108
- instance.wrap do |conn|
109
- conn.with_collection(collection_options) do
110
- $stderr.puts "http://#{instance.host}:#{instance.port}/solr/"
111
- begin
112
- conn.wait
113
- rescue Interrupt
114
- Signal.trap("SIGTERM") {"IGNORE"}
115
- Signal.trap("SIGINT") {"IGNORE"}
116
- $stderr.puts "Solr is shutting down."
109
+ when 'dir'
110
+ puts instance.instance_dir
111
+ else
112
+ $stderr.print "Starting Solr #{instance.version} on port #{instance.port} ... "
113
+ instance.wrap do |conn|
114
+ conn.with_collection(collection_options) do
115
+ $stderr.puts "http://#{instance.host}:#{instance.port}/solr/"
116
+ begin
117
+ conn.wait
118
+ rescue Interrupt
119
+ Signal.trap("SIGTERM") {"IGNORE"}
120
+ Signal.trap("SIGINT") {"IGNORE"}
121
+ $stderr.puts "Solr is shutting down."
122
+ end
117
123
  end
118
124
  end
119
125
  end
@@ -8,7 +8,7 @@ require 'solr_wrapper/client'
8
8
 
9
9
  module SolrWrapper
10
10
  def self.default_solr_version
11
- '6.2.0'
11
+ '6.3.0'
12
12
  end
13
13
 
14
14
  def self.default_solr_port
@@ -353,7 +353,7 @@ module SolrWrapper
353
353
 
354
354
  stringio.rewind
355
355
  if exit_status != 0 && cmd != 'status'
356
- raise "Failed to execute solr #{cmd}: #{stringio.read}"
356
+ raise "Failed to execute solr #{cmd}: #{stringio.read}. Further information may be available in #{instance_dir}/logs"
357
357
  end
358
358
 
359
359
  stringio
@@ -1,3 +1,3 @@
1
1
  module SolrWrapper
2
- VERSION = '0.18.1'
2
+ VERSION = '0.19.0'
3
3
  end
@@ -152,7 +152,7 @@ describe SolrWrapper::Instance do
152
152
 
153
153
  describe "#version" do
154
154
  subject { solr_instance.version }
155
- it { is_expected.to eq '6.2.0' }
155
+ it { is_expected.to eq '6.3.0' }
156
156
  end
157
157
 
158
158
  describe "#md5" do
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: 0.18.1
4
+ version: 0.19.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Beer
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-10-01 00:00:00.000000000 Z
11
+ date: 2016-11-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday