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 +4 -4
- data/exe/solr_wrapper +20 -14
- data/lib/solr_wrapper.rb +1 -1
- data/lib/solr_wrapper/instance.rb +1 -1
- data/lib/solr_wrapper/version.rb +1 -1
- data/spec/lib/solr_wrapper/instance_spec.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c79d57707566b9eb01ef46907be4d6990b4605a1
|
4
|
+
data.tar.gz: 2702fa747f39c90047d032c8187870dadab62d5a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f5b4dd813e6e3bac738a8c982e086545d40dd09995ee197275d0dda9aa4dcf00744245031f88cf5c7c6cca7d8d263fa2d7de7f82876124fdb6a4b1b390f6743b
|
7
|
+
data.tar.gz: bec2c92b37e4d24064228e8bef8537e6fbcb4d4c2183d43cf4b7b2f0d114e460ae9020dbee48917849452e63d200c33d147ed693563283d5536a0c6728a01c3f
|
data/exe/solr_wrapper
CHANGED
@@ -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
|
-
|
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
|
-
|
105
|
-
|
106
|
-
|
107
|
-
$stderr.print "Starting Solr #{instance.version} on port #{instance.port} ... "
|
108
|
-
instance.wrap do |conn|
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
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
|
data/lib/solr_wrapper.rb
CHANGED
@@ -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
|
data/lib/solr_wrapper/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2016-11-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|