cb_sunspot_solr 2.0.0.pre2
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +3 -0
- data/README.rdoc +24 -0
- data/bin/sunspot-installer +20 -0
- data/bin/sunspot-solr +80 -0
- data/lib/sunspot/solr/installer/config_installer.rb +46 -0
- data/lib/sunspot/solr/installer/task_helper.rb +13 -0
- data/lib/sunspot/solr/installer.rb +25 -0
- data/lib/sunspot/solr/java.rb +10 -0
- data/lib/sunspot/solr/railtie.rb +15 -0
- data/lib/sunspot/solr/server.rb +224 -0
- data/lib/sunspot/solr/tasks.rb +49 -0
- data/lib/sunspot_solr.rb +5 -0
- data/solr/README.txt +42 -0
- data/solr/etc/jetty.xml +219 -0
- data/solr/etc/webdefault.xml +379 -0
- data/solr/lib/jetty-6.1.26-patched-JETTY-1340.jar +0 -0
- data/solr/lib/jetty-util-6.1.26-patched-JETTY-1340.jar +0 -0
- data/solr/lib/jsp-2.1/ant-1.6.5.jar +0 -0
- data/solr/lib/jsp-2.1/core-3.1.1.jar +0 -0
- data/solr/lib/jsp-2.1/jsp-2.1.jar +0 -0
- data/solr/lib/jsp-2.1/jsp-api-2.1.jar +0 -0
- data/solr/lib/servlet-api-2.5-20081211.jar +0 -0
- data/solr/solr/.gitignore +1 -0
- data/solr/solr/README.txt +54 -0
- data/solr/solr/conf/admin-extra.html +31 -0
- data/solr/solr/conf/elevate.xml +36 -0
- data/solr/solr/conf/mapping-ISOLatin1Accent.txt +246 -0
- data/solr/solr/conf/protwords.txt +21 -0
- data/solr/solr/conf/schema.xml +238 -0
- data/solr/solr/conf/scripts.conf +24 -0
- data/solr/solr/conf/solrconfig.xml +934 -0
- data/solr/solr/conf/spellings.txt +2 -0
- data/solr/solr/conf/stopwords.txt +58 -0
- data/solr/solr/conf/synonyms.txt +31 -0
- data/solr/solr/conf/xslt/example.xsl +132 -0
- data/solr/solr/conf/xslt/example_atom.xsl +67 -0
- data/solr/solr/conf/xslt/example_rss.xsl +66 -0
- data/solr/solr/conf/xslt/luke.xsl +337 -0
- data/solr/start.jar +0 -0
- data/solr/webapps/solr.war +0 -0
- data/spec/server_spec.rb +98 -0
- data/spec/spec_helper.rb +18 -0
- data/sunspot_solr.gemspec +39 -0
- metadata +151 -0
@@ -0,0 +1,337 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!--
|
3
|
+
Licensed to the Apache Software Foundation (ASF) under one or more
|
4
|
+
contributor license agreements. See the NOTICE file distributed with
|
5
|
+
this work for additional information regarding copyright ownership.
|
6
|
+
The ASF licenses this file to You under the Apache License, Version 2.0
|
7
|
+
(the "License"); you may not use this file except in compliance with
|
8
|
+
the License. You may obtain a copy of the License at
|
9
|
+
|
10
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
|
12
|
+
Unless required by applicable law or agreed to in writing, software
|
13
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
See the License for the specific language governing permissions and
|
16
|
+
limitations under the License.
|
17
|
+
-->
|
18
|
+
|
19
|
+
|
20
|
+
<!--
|
21
|
+
Display the luke request handler with graphs
|
22
|
+
-->
|
23
|
+
<xsl:stylesheet
|
24
|
+
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
25
|
+
xmlns="http://www.w3.org/1999/xhtml"
|
26
|
+
version="1.0"
|
27
|
+
>
|
28
|
+
<xsl:output
|
29
|
+
method="html"
|
30
|
+
encoding="UTF-8"
|
31
|
+
media-type="text/html; charset=UTF-8"
|
32
|
+
doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
|
33
|
+
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
|
34
|
+
/>
|
35
|
+
|
36
|
+
<xsl:variable name="title">Solr Luke Request Handler Response</xsl:variable>
|
37
|
+
|
38
|
+
<xsl:template match="/">
|
39
|
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
40
|
+
<head>
|
41
|
+
<link rel="stylesheet" type="text/css" href="solr-admin.css"/>
|
42
|
+
<link rel="icon" href="favicon.ico" type="image/ico"/>
|
43
|
+
<link rel="shortcut icon" href="favicon.ico" type="image/ico"/>
|
44
|
+
<title>
|
45
|
+
<xsl:value-of select="$title"/>
|
46
|
+
</title>
|
47
|
+
<xsl:call-template name="css"/>
|
48
|
+
|
49
|
+
</head>
|
50
|
+
<body>
|
51
|
+
<h1>
|
52
|
+
<xsl:value-of select="$title"/>
|
53
|
+
</h1>
|
54
|
+
<div class="doc">
|
55
|
+
<ul>
|
56
|
+
<xsl:if test="response/lst[@name='index']">
|
57
|
+
<li>
|
58
|
+
<a href="#index">Index Statistics</a>
|
59
|
+
</li>
|
60
|
+
</xsl:if>
|
61
|
+
<xsl:if test="response/lst[@name='fields']">
|
62
|
+
<li>
|
63
|
+
<a href="#fields">Field Statistics</a>
|
64
|
+
<ul>
|
65
|
+
<xsl:for-each select="response/lst[@name='fields']/lst">
|
66
|
+
<li>
|
67
|
+
<a href="#{@name}">
|
68
|
+
<xsl:value-of select="@name"/>
|
69
|
+
</a>
|
70
|
+
</li>
|
71
|
+
</xsl:for-each>
|
72
|
+
</ul>
|
73
|
+
</li>
|
74
|
+
</xsl:if>
|
75
|
+
<xsl:if test="response/lst[@name='doc']">
|
76
|
+
<li>
|
77
|
+
<a href="#doc">Document statistics</a>
|
78
|
+
</li>
|
79
|
+
</xsl:if>
|
80
|
+
</ul>
|
81
|
+
</div>
|
82
|
+
<xsl:if test="response/lst[@name='index']">
|
83
|
+
<h2><a name="index"/>Index Statistics</h2>
|
84
|
+
<xsl:apply-templates select="response/lst[@name='index']"/>
|
85
|
+
</xsl:if>
|
86
|
+
<xsl:if test="response/lst[@name='fields']">
|
87
|
+
<h2><a name="fields"/>Field Statistics</h2>
|
88
|
+
<xsl:apply-templates select="response/lst[@name='fields']"/>
|
89
|
+
</xsl:if>
|
90
|
+
<xsl:if test="response/lst[@name='doc']">
|
91
|
+
<h2><a name="doc"/>Document statistics</h2>
|
92
|
+
<xsl:apply-templates select="response/lst[@name='doc']"/>
|
93
|
+
</xsl:if>
|
94
|
+
</body>
|
95
|
+
</html>
|
96
|
+
</xsl:template>
|
97
|
+
|
98
|
+
<xsl:template match="lst">
|
99
|
+
<xsl:if test="parent::lst">
|
100
|
+
<tr>
|
101
|
+
<td colspan="2">
|
102
|
+
<div class="doc">
|
103
|
+
<xsl:call-template name="list"/>
|
104
|
+
</div>
|
105
|
+
</td>
|
106
|
+
</tr>
|
107
|
+
</xsl:if>
|
108
|
+
<xsl:if test="not(parent::lst)">
|
109
|
+
<div class="doc">
|
110
|
+
<xsl:call-template name="list"/>
|
111
|
+
</div>
|
112
|
+
</xsl:if>
|
113
|
+
</xsl:template>
|
114
|
+
|
115
|
+
<xsl:template name="list">
|
116
|
+
<xsl:if test="count(child::*)>0">
|
117
|
+
<table>
|
118
|
+
<thead>
|
119
|
+
<tr>
|
120
|
+
<th colspan="2">
|
121
|
+
<p>
|
122
|
+
<a name="{@name}"/>
|
123
|
+
</p>
|
124
|
+
<xsl:value-of select="@name"/>
|
125
|
+
</th>
|
126
|
+
</tr>
|
127
|
+
</thead>
|
128
|
+
<tbody>
|
129
|
+
<xsl:choose>
|
130
|
+
<xsl:when
|
131
|
+
test="@name='histogram'">
|
132
|
+
<tr>
|
133
|
+
<td colspan="2">
|
134
|
+
<xsl:call-template name="histogram"/>
|
135
|
+
</td>
|
136
|
+
</tr>
|
137
|
+
</xsl:when>
|
138
|
+
<xsl:otherwise>
|
139
|
+
<xsl:apply-templates/>
|
140
|
+
</xsl:otherwise>
|
141
|
+
</xsl:choose>
|
142
|
+
</tbody>
|
143
|
+
</table>
|
144
|
+
</xsl:if>
|
145
|
+
</xsl:template>
|
146
|
+
|
147
|
+
<xsl:template name="histogram">
|
148
|
+
<div class="doc">
|
149
|
+
<xsl:call-template name="barchart">
|
150
|
+
<xsl:with-param name="max_bar_width">50</xsl:with-param>
|
151
|
+
<xsl:with-param name="iwidth">800</xsl:with-param>
|
152
|
+
<xsl:with-param name="iheight">160</xsl:with-param>
|
153
|
+
<xsl:with-param name="fill">blue</xsl:with-param>
|
154
|
+
</xsl:call-template>
|
155
|
+
</div>
|
156
|
+
</xsl:template>
|
157
|
+
|
158
|
+
<xsl:template name="barchart">
|
159
|
+
<xsl:param name="max_bar_width"/>
|
160
|
+
<xsl:param name="iwidth"/>
|
161
|
+
<xsl:param name="iheight"/>
|
162
|
+
<xsl:param name="fill"/>
|
163
|
+
<xsl:variable name="max">
|
164
|
+
<xsl:for-each select="int">
|
165
|
+
<xsl:sort data-type="number" order="descending"/>
|
166
|
+
<xsl:if test="position()=1">
|
167
|
+
<xsl:value-of select="."/>
|
168
|
+
</xsl:if>
|
169
|
+
</xsl:for-each>
|
170
|
+
</xsl:variable>
|
171
|
+
<xsl:variable name="bars">
|
172
|
+
<xsl:value-of select="count(int)"/>
|
173
|
+
</xsl:variable>
|
174
|
+
<xsl:variable name="bar_width">
|
175
|
+
<xsl:choose>
|
176
|
+
<xsl:when test="$max_bar_width < ($iwidth div $bars)">
|
177
|
+
<xsl:value-of select="$max_bar_width"/>
|
178
|
+
</xsl:when>
|
179
|
+
<xsl:otherwise>
|
180
|
+
<xsl:value-of select="$iwidth div $bars"/>
|
181
|
+
</xsl:otherwise>
|
182
|
+
</xsl:choose>
|
183
|
+
</xsl:variable>
|
184
|
+
<table class="histogram">
|
185
|
+
<tbody>
|
186
|
+
<tr>
|
187
|
+
<xsl:for-each select="int">
|
188
|
+
<td>
|
189
|
+
<xsl:value-of select="."/>
|
190
|
+
<div class="histogram">
|
191
|
+
<xsl:attribute name="style">background-color: <xsl:value-of select="$fill"/>; width: <xsl:value-of select="$bar_width"/>px; height: <xsl:value-of select="($iheight*number(.)) div $max"/>px;</xsl:attribute>
|
192
|
+
</div>
|
193
|
+
</td>
|
194
|
+
</xsl:for-each>
|
195
|
+
</tr>
|
196
|
+
<tr>
|
197
|
+
<xsl:for-each select="int">
|
198
|
+
<td>
|
199
|
+
<xsl:value-of select="@name"/>
|
200
|
+
</td>
|
201
|
+
</xsl:for-each>
|
202
|
+
</tr>
|
203
|
+
</tbody>
|
204
|
+
</table>
|
205
|
+
</xsl:template>
|
206
|
+
|
207
|
+
<xsl:template name="keyvalue">
|
208
|
+
<xsl:choose>
|
209
|
+
<xsl:when test="@name">
|
210
|
+
<tr>
|
211
|
+
<td class="name">
|
212
|
+
<xsl:value-of select="@name"/>
|
213
|
+
</td>
|
214
|
+
<td class="value">
|
215
|
+
<xsl:value-of select="."/>
|
216
|
+
</td>
|
217
|
+
</tr>
|
218
|
+
</xsl:when>
|
219
|
+
<xsl:otherwise>
|
220
|
+
<xsl:value-of select="."/>
|
221
|
+
</xsl:otherwise>
|
222
|
+
</xsl:choose>
|
223
|
+
</xsl:template>
|
224
|
+
|
225
|
+
<xsl:template match="int|bool|long|float|double|uuid|date">
|
226
|
+
<xsl:call-template name="keyvalue"/>
|
227
|
+
</xsl:template>
|
228
|
+
|
229
|
+
<xsl:template match="arr">
|
230
|
+
<tr>
|
231
|
+
<td class="name">
|
232
|
+
<xsl:value-of select="@name"/>
|
233
|
+
</td>
|
234
|
+
<td class="value">
|
235
|
+
<ul>
|
236
|
+
<xsl:for-each select="child::*">
|
237
|
+
<li>
|
238
|
+
<xsl:apply-templates/>
|
239
|
+
</li>
|
240
|
+
</xsl:for-each>
|
241
|
+
</ul>
|
242
|
+
</td>
|
243
|
+
</tr>
|
244
|
+
</xsl:template>
|
245
|
+
|
246
|
+
<xsl:template match="str">
|
247
|
+
<xsl:choose>
|
248
|
+
<xsl:when test="@name='schema' or @name='index' or @name='flags'">
|
249
|
+
<xsl:call-template name="schema"/>
|
250
|
+
</xsl:when>
|
251
|
+
<xsl:otherwise>
|
252
|
+
<xsl:call-template name="keyvalue"/>
|
253
|
+
</xsl:otherwise>
|
254
|
+
</xsl:choose>
|
255
|
+
</xsl:template>
|
256
|
+
|
257
|
+
<xsl:template name="schema">
|
258
|
+
<tr>
|
259
|
+
<td class="name">
|
260
|
+
<xsl:value-of select="@name"/>
|
261
|
+
</td>
|
262
|
+
<td class="value">
|
263
|
+
<xsl:if test="contains(.,'unstored')">
|
264
|
+
<xsl:value-of select="."/>
|
265
|
+
</xsl:if>
|
266
|
+
<xsl:if test="not(contains(.,'unstored'))">
|
267
|
+
<xsl:call-template name="infochar2string">
|
268
|
+
<xsl:with-param name="charList">
|
269
|
+
<xsl:value-of select="."/>
|
270
|
+
</xsl:with-param>
|
271
|
+
</xsl:call-template>
|
272
|
+
</xsl:if>
|
273
|
+
</td>
|
274
|
+
</tr>
|
275
|
+
</xsl:template>
|
276
|
+
|
277
|
+
<xsl:template name="infochar2string">
|
278
|
+
<xsl:param name="i">1</xsl:param>
|
279
|
+
<xsl:param name="charList"/>
|
280
|
+
|
281
|
+
<xsl:variable name="char">
|
282
|
+
<xsl:value-of select="substring($charList,$i,1)"/>
|
283
|
+
</xsl:variable>
|
284
|
+
<xsl:choose>
|
285
|
+
<xsl:when test="$char='I'">
|
286
|
+
<xsl:value-of select="/response/lst[@name='info']/lst/str[@name='I']"/> - </xsl:when>
|
287
|
+
<xsl:when test="$char='T'">
|
288
|
+
<xsl:value-of select="/response/lst[@name='info']/lst/str[@name='T']"/> - </xsl:when>
|
289
|
+
<xsl:when test="$char='S'">
|
290
|
+
<xsl:value-of select="/response/lst[@name='info']/lst/str[@name='S']"/> - </xsl:when>
|
291
|
+
<xsl:when test="$char='M'">
|
292
|
+
<xsl:value-of select="/response/lst[@name='info']/lst/str[@name='M']"/> - </xsl:when>
|
293
|
+
<xsl:when test="$char='V'">
|
294
|
+
<xsl:value-of select="/response/lst[@name='info']/lst/str[@name='V']"/> - </xsl:when>
|
295
|
+
<xsl:when test="$char='o'">
|
296
|
+
<xsl:value-of select="/response/lst[@name='info']/lst/str[@name='o']"/> - </xsl:when>
|
297
|
+
<xsl:when test="$char='p'">
|
298
|
+
<xsl:value-of select="/response/lst[@name='info']/lst/str[@name='p']"/> - </xsl:when>
|
299
|
+
<xsl:when test="$char='O'">
|
300
|
+
<xsl:value-of select="/response/lst[@name='info']/lst/str[@name='O']"/> - </xsl:when>
|
301
|
+
<xsl:when test="$char='L'">
|
302
|
+
<xsl:value-of select="/response/lst[@name='info']/lst/str[@name='L']"/> - </xsl:when>
|
303
|
+
<xsl:when test="$char='B'">
|
304
|
+
<xsl:value-of select="/response/lst[@name='info']/lst/str[@name='B']"/> - </xsl:when>
|
305
|
+
<xsl:when test="$char='C'">
|
306
|
+
<xsl:value-of select="/response/lst[@name='info']/lst/str[@name='C']"/> - </xsl:when>
|
307
|
+
<xsl:when test="$char='f'">
|
308
|
+
<xsl:value-of select="/response/lst[@name='info']/lst/str[@name='f']"/> - </xsl:when>
|
309
|
+
<xsl:when test="$char='l'">
|
310
|
+
<xsl:value-of select="/response/lst[@name='info']/lst/str[@name='l']"/> -
|
311
|
+
</xsl:when>
|
312
|
+
</xsl:choose>
|
313
|
+
|
314
|
+
<xsl:if test="not($i>=string-length($charList))">
|
315
|
+
<xsl:call-template name="infochar2string">
|
316
|
+
<xsl:with-param name="i">
|
317
|
+
<xsl:value-of select="$i+1"/>
|
318
|
+
</xsl:with-param>
|
319
|
+
<xsl:with-param name="charList">
|
320
|
+
<xsl:value-of select="$charList"/>
|
321
|
+
</xsl:with-param>
|
322
|
+
</xsl:call-template>
|
323
|
+
</xsl:if>
|
324
|
+
</xsl:template>
|
325
|
+
<xsl:template name="css">
|
326
|
+
<style type="text/css">
|
327
|
+
<![CDATA[
|
328
|
+
td.name {font-style: italic; font-size:80%; }
|
329
|
+
.doc { margin: 0.5em; border: solid grey 1px; }
|
330
|
+
.exp { display: none; font-family: monospace; white-space: pre; }
|
331
|
+
div.histogram { background: none repeat scroll 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;}
|
332
|
+
table.histogram { width: auto; vertical-align: bottom; }
|
333
|
+
table.histogram td, table.histogram th { text-align: center; vertical-align: bottom; border-bottom: 1px solid #ff9933; width: auto; }
|
334
|
+
]]>
|
335
|
+
</style>
|
336
|
+
</xsl:template>
|
337
|
+
</xsl:stylesheet>
|
data/solr/start.jar
ADDED
Binary file
|
Binary file
|
data/spec/server_spec.rb
ADDED
@@ -0,0 +1,98 @@
|
|
1
|
+
require File.expand_path('spec_helper', File.dirname(__FILE__))
|
2
|
+
require 'tempfile'
|
3
|
+
|
4
|
+
describe Sunspot::Solr::Server do
|
5
|
+
SUNSPOT_START_JAR = File.expand_path(
|
6
|
+
File.join(File.dirname(__FILE__), '..', '..', 'solr', 'start.jar')
|
7
|
+
)
|
8
|
+
|
9
|
+
before :each do
|
10
|
+
@server = Sunspot::Solr::Server.new
|
11
|
+
end
|
12
|
+
|
13
|
+
it 'runs server in current process' do
|
14
|
+
@server.should_not_receive(:fork)
|
15
|
+
@server.should_receive(:exec).with(/java .*-jar start.jar/)
|
16
|
+
@server.run
|
17
|
+
end
|
18
|
+
|
19
|
+
it 'runs Java with min memory' do
|
20
|
+
@server.min_memory = 1024
|
21
|
+
@server.should_receive(:exec).with(/-Xms1024/)
|
22
|
+
@server.run
|
23
|
+
end
|
24
|
+
|
25
|
+
it 'runs Java with max memory' do
|
26
|
+
@server.max_memory = 2048
|
27
|
+
@server.should_receive(:exec).with(/-Xmx2048/)
|
28
|
+
@server.run
|
29
|
+
end
|
30
|
+
|
31
|
+
it 'runs Jetty with specified port' do
|
32
|
+
@server.port = 8981
|
33
|
+
@server.should_receive(:exec).with(/-Djetty\.port=8981/)
|
34
|
+
@server.run
|
35
|
+
end
|
36
|
+
|
37
|
+
it 'runs Solr with specified data dir' do
|
38
|
+
@server.solr_data_dir = '/tmp/var/solr/data'
|
39
|
+
@server.should_receive(:exec).with(%r(-Dsolr\.data\.dir=/tmp/var/solr/data))
|
40
|
+
@server.run
|
41
|
+
end
|
42
|
+
|
43
|
+
it 'runs Solr with specified Solr home' do
|
44
|
+
@server.solr_home = '/tmp/var/solr'
|
45
|
+
@server.should_receive(:exec).with(%r(-Dsolr\.solr\.home=/tmp/var/solr))
|
46
|
+
@server.run
|
47
|
+
end
|
48
|
+
|
49
|
+
it 'runs Solr with specified Solr jar' do
|
50
|
+
@server.solr_jar = SUNSPOT_START_JAR
|
51
|
+
FileUtils.should_receive(:cd).with(File.dirname(SUNSPOT_START_JAR))
|
52
|
+
@server.run
|
53
|
+
end
|
54
|
+
|
55
|
+
it 'raises an error if java is missing' do
|
56
|
+
Sunspot::Solr::Java.stub(:installed? => false)
|
57
|
+
expect {
|
58
|
+
Sunspot::Solr::Server.new
|
59
|
+
}.to raise_error(Sunspot::Solr::Server::JavaMissing)
|
60
|
+
end
|
61
|
+
|
62
|
+
describe 'with logging' do
|
63
|
+
before :each do
|
64
|
+
@server.log_level = 'info'
|
65
|
+
@server.log_file = 'log/sunspot-development.log'
|
66
|
+
Tempfile.should_receive(:new).with('logging.properties').and_return(@tempfile = StringIO.new)
|
67
|
+
@tempfile.should_receive(:flush)
|
68
|
+
@tempfile.should_receive(:close)
|
69
|
+
@tempfile.stub!(:path).and_return('/tmp/logging.properties.12345')
|
70
|
+
@server.stub!(:exec)
|
71
|
+
end
|
72
|
+
|
73
|
+
it 'runs Solr with logging properties file' do
|
74
|
+
@server.should_receive(:exec).with(%r(-Djava\.util\.logging\.config\.file=/tmp/logging\.properties\.12345))
|
75
|
+
@server.run
|
76
|
+
end
|
77
|
+
|
78
|
+
it 'sets logging level' do
|
79
|
+
@server.run
|
80
|
+
@tempfile.string.should =~ /^java\.util\.logging\.FileHandler\.level *= *INFO$/
|
81
|
+
end
|
82
|
+
|
83
|
+
it 'sets handler' do
|
84
|
+
@server.run
|
85
|
+
@tempfile.string.should =~ /^handlers *= *java.util.logging.FileHandler$/
|
86
|
+
end
|
87
|
+
|
88
|
+
it 'sets formatter' do
|
89
|
+
@server.run
|
90
|
+
@tempfile.string.should =~ /^java\.util\.logging\.FileHandler\.formatter *= *java\.util\.logging\.SimpleFormatter$/
|
91
|
+
end
|
92
|
+
|
93
|
+
it 'sets log file' do
|
94
|
+
@server.run
|
95
|
+
@tempfile.string.should =~ /^java\.util\.logging\.FileHandler\.pattern *= *log\/sunspot-development\.log$/
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
begin
|
2
|
+
require 'rspec'
|
3
|
+
rescue LoadError => e
|
4
|
+
require 'spec'
|
5
|
+
end
|
6
|
+
|
7
|
+
require 'sunspot_solr'
|
8
|
+
|
9
|
+
rspec =
|
10
|
+
begin
|
11
|
+
RSpec
|
12
|
+
rescue NameError, ArgumentError
|
13
|
+
Spec::Runner
|
14
|
+
end
|
15
|
+
|
16
|
+
rspec.configure do |config|
|
17
|
+
# Maybe later...
|
18
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
lib = File.expand_path('../../sunspot/lib/', __FILE__)
|
3
|
+
|
4
|
+
$:.unshift(lib) unless $:.include?(lib)
|
5
|
+
|
6
|
+
require 'sunspot/version'
|
7
|
+
|
8
|
+
Gem::Specification.new do |s|
|
9
|
+
s.name = "cb_sunspot_solr"
|
10
|
+
s.version = Sunspot::VERSION
|
11
|
+
s.platform = Gem::Platform::RUBY
|
12
|
+
s.authors = ['Mat Brown', 'Peer Allan', 'Dmitriy Dzema', 'Benjamin Krause', 'Marcel de Graaf', 'Brandon Keepers', 'Peter Berkenbosch',
|
13
|
+
'Brian Atkinson', 'Tom Coleman', 'Matt Mitchell', 'Nathan Beyer', 'Kieran Topping', 'Nicolas Braem', 'Jeremy Ashkenas',
|
14
|
+
'Dylan Vaughn', 'Brian Durand', 'Sam Granieri', 'Nick Zadrozny', 'Jason Ronallo']
|
15
|
+
s.email = ["mat@patch.com"]
|
16
|
+
s.homepage = 'https://github.com/outoftime/sunspot/tree/master/sunspot_solr'
|
17
|
+
s.summary = 'Bundled Solr distribution for Sunspot'
|
18
|
+
s.description = <<-TEXT
|
19
|
+
Sunspot::Solr provides a bundled Solr distribution for use with Sunspot.
|
20
|
+
Typical deployment environments will require more configuration, but this
|
21
|
+
distribution is well suited to development and testing.
|
22
|
+
TEXT
|
23
|
+
|
24
|
+
s.rubyforge_project = "sunspot"
|
25
|
+
|
26
|
+
s.files = `git ls-files`.split("\n")
|
27
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
28
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
29
|
+
s.require_paths = ["lib"]
|
30
|
+
|
31
|
+
s.add_dependency 'escape', '~>0.0.4'
|
32
|
+
|
33
|
+
s.add_development_dependency 'rspec', '~> 1.1'
|
34
|
+
s.add_development_dependency 'hanna'
|
35
|
+
|
36
|
+
s.rdoc_options << '--webcvs=http://github.com/outoftime/sunspot/tree/master/%s' <<
|
37
|
+
'--title' << 'Sunspot-Solr - Bundled Solr distribution for Sunspot - API Documentation' <<
|
38
|
+
'--main' << 'README.rdoc'
|
39
|
+
end
|
metadata
ADDED
@@ -0,0 +1,151 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: cb_sunspot_solr
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 2.0.0.pre2
|
5
|
+
prerelease: 6
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Mat Brown
|
9
|
+
- Peer Allan
|
10
|
+
- Dmitriy Dzema
|
11
|
+
- Benjamin Krause
|
12
|
+
- Marcel de Graaf
|
13
|
+
- Brandon Keepers
|
14
|
+
- Peter Berkenbosch
|
15
|
+
- Brian Atkinson
|
16
|
+
- Tom Coleman
|
17
|
+
- Matt Mitchell
|
18
|
+
- Nathan Beyer
|
19
|
+
- Kieran Topping
|
20
|
+
- Nicolas Braem
|
21
|
+
- Jeremy Ashkenas
|
22
|
+
- Dylan Vaughn
|
23
|
+
- Brian Durand
|
24
|
+
- Sam Granieri
|
25
|
+
- Nick Zadrozny
|
26
|
+
- Jason Ronallo
|
27
|
+
autorequire:
|
28
|
+
bindir: bin
|
29
|
+
cert_chain: []
|
30
|
+
date: 2011-12-09 00:00:00.000000000 Z
|
31
|
+
dependencies:
|
32
|
+
- !ruby/object:Gem::Dependency
|
33
|
+
name: escape
|
34
|
+
requirement: &70281814463720 !ruby/object:Gem::Requirement
|
35
|
+
none: false
|
36
|
+
requirements:
|
37
|
+
- - ~>
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: 0.0.4
|
40
|
+
type: :runtime
|
41
|
+
prerelease: false
|
42
|
+
version_requirements: *70281814463720
|
43
|
+
- !ruby/object:Gem::Dependency
|
44
|
+
name: rspec
|
45
|
+
requirement: &70281814462920 !ruby/object:Gem::Requirement
|
46
|
+
none: false
|
47
|
+
requirements:
|
48
|
+
- - ~>
|
49
|
+
- !ruby/object:Gem::Version
|
50
|
+
version: '1.1'
|
51
|
+
type: :development
|
52
|
+
prerelease: false
|
53
|
+
version_requirements: *70281814462920
|
54
|
+
- !ruby/object:Gem::Dependency
|
55
|
+
name: hanna
|
56
|
+
requirement: &70281814462320 !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: *70281814462320
|
65
|
+
description: ! " Sunspot::Solr provides a bundled Solr distribution for use with
|
66
|
+
Sunspot.\n Typical deployment environments will require more configuration, but
|
67
|
+
this\n distribution is well suited to development and testing.\n"
|
68
|
+
email:
|
69
|
+
- mat@patch.com
|
70
|
+
executables:
|
71
|
+
- sunspot-installer
|
72
|
+
- sunspot-solr
|
73
|
+
extensions: []
|
74
|
+
extra_rdoc_files: []
|
75
|
+
files:
|
76
|
+
- Gemfile
|
77
|
+
- README.rdoc
|
78
|
+
- bin/sunspot-installer
|
79
|
+
- bin/sunspot-solr
|
80
|
+
- lib/sunspot/solr/installer.rb
|
81
|
+
- lib/sunspot/solr/installer/config_installer.rb
|
82
|
+
- lib/sunspot/solr/installer/task_helper.rb
|
83
|
+
- lib/sunspot/solr/java.rb
|
84
|
+
- lib/sunspot/solr/railtie.rb
|
85
|
+
- lib/sunspot/solr/server.rb
|
86
|
+
- lib/sunspot/solr/tasks.rb
|
87
|
+
- lib/sunspot_solr.rb
|
88
|
+
- solr/README.txt
|
89
|
+
- solr/etc/jetty.xml
|
90
|
+
- solr/etc/webdefault.xml
|
91
|
+
- solr/lib/jetty-6.1.26-patched-JETTY-1340.jar
|
92
|
+
- solr/lib/jetty-util-6.1.26-patched-JETTY-1340.jar
|
93
|
+
- solr/lib/jsp-2.1/ant-1.6.5.jar
|
94
|
+
- solr/lib/jsp-2.1/core-3.1.1.jar
|
95
|
+
- solr/lib/jsp-2.1/jsp-2.1.jar
|
96
|
+
- solr/lib/jsp-2.1/jsp-api-2.1.jar
|
97
|
+
- solr/lib/servlet-api-2.5-20081211.jar
|
98
|
+
- solr/solr/.gitignore
|
99
|
+
- solr/solr/README.txt
|
100
|
+
- solr/solr/conf/admin-extra.html
|
101
|
+
- solr/solr/conf/elevate.xml
|
102
|
+
- solr/solr/conf/mapping-ISOLatin1Accent.txt
|
103
|
+
- solr/solr/conf/protwords.txt
|
104
|
+
- solr/solr/conf/schema.xml
|
105
|
+
- solr/solr/conf/scripts.conf
|
106
|
+
- solr/solr/conf/solrconfig.xml
|
107
|
+
- solr/solr/conf/spellings.txt
|
108
|
+
- solr/solr/conf/stopwords.txt
|
109
|
+
- solr/solr/conf/synonyms.txt
|
110
|
+
- solr/solr/conf/xslt/example.xsl
|
111
|
+
- solr/solr/conf/xslt/example_atom.xsl
|
112
|
+
- solr/solr/conf/xslt/example_rss.xsl
|
113
|
+
- solr/solr/conf/xslt/luke.xsl
|
114
|
+
- solr/start.jar
|
115
|
+
- solr/webapps/solr.war
|
116
|
+
- spec/server_spec.rb
|
117
|
+
- spec/spec_helper.rb
|
118
|
+
- sunspot_solr.gemspec
|
119
|
+
homepage: https://github.com/outoftime/sunspot/tree/master/sunspot_solr
|
120
|
+
licenses: []
|
121
|
+
post_install_message:
|
122
|
+
rdoc_options:
|
123
|
+
- --webcvs=http://github.com/outoftime/sunspot/tree/master/%s
|
124
|
+
- --title
|
125
|
+
- Sunspot-Solr - Bundled Solr distribution for Sunspot - API Documentation
|
126
|
+
- --main
|
127
|
+
- README.rdoc
|
128
|
+
require_paths:
|
129
|
+
- lib
|
130
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
131
|
+
none: false
|
132
|
+
requirements:
|
133
|
+
- - ! '>='
|
134
|
+
- !ruby/object:Gem::Version
|
135
|
+
version: '0'
|
136
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
137
|
+
none: false
|
138
|
+
requirements:
|
139
|
+
- - ! '>'
|
140
|
+
- !ruby/object:Gem::Version
|
141
|
+
version: 1.3.1
|
142
|
+
requirements: []
|
143
|
+
rubyforge_project: sunspot
|
144
|
+
rubygems_version: 1.8.10
|
145
|
+
signing_key:
|
146
|
+
specification_version: 3
|
147
|
+
summary: Bundled Solr distribution for Sunspot
|
148
|
+
test_files:
|
149
|
+
- spec/server_spec.rb
|
150
|
+
- spec/spec_helper.rb
|
151
|
+
has_rdoc:
|