supernova-core 0.0.1
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.
- data/.gitignore +17 -0
- data/Gemfile +4 -0
- data/LICENSE +22 -0
- data/README.md +29 -0
- data/Rakefile +10 -0
- data/bin/solr_admin +5 -0
- data/lib/functional_delegator.rb +44 -0
- data/lib/supernova-core.rb +7 -0
- data/lib/supernova-core/version.rb +5 -0
- data/lib/supernova.rb +18 -0
- data/lib/supernova/batch_indexer.rb +40 -0
- data/lib/supernova/solr/cli.rb +169 -0
- data/lib/supernova/solr/core.rb +41 -0
- data/lib/supernova/solr/mapper.rb +31 -0
- data/lib/supernova/solr/server.rb +108 -0
- data/solr/conf/admin-extra.html +31 -0
- data/solr/conf/elevate.xml +36 -0
- data/solr/conf/mapping-FoldToASCII.txt +3813 -0
- data/solr/conf/mapping-ISOLatin1Accent.txt +246 -0
- data/solr/conf/protwords.txt +21 -0
- data/solr/conf/schema.xml +477 -0
- data/solr/conf/scripts.conf +24 -0
- data/solr/conf/solrconfig.xml +1508 -0
- data/solr/conf/spellings.txt +2 -0
- data/solr/conf/stopwords.txt +58 -0
- data/solr/conf/synonyms.txt +29 -0
- data/solr/conf/velocity/VM_global_library.vm +184 -0
- data/solr/conf/velocity/browse.vm +45 -0
- data/solr/conf/velocity/cluster.vm +26 -0
- data/solr/conf/velocity/clusterResults.vm +29 -0
- data/solr/conf/velocity/doc.vm +29 -0
- data/solr/conf/velocity/facet_dates.vm +0 -0
- data/solr/conf/velocity/facet_fields.vm +12 -0
- data/solr/conf/velocity/facet_queries.vm +3 -0
- data/solr/conf/velocity/facet_ranges.vm +30 -0
- data/solr/conf/velocity/facets.vm +7 -0
- data/solr/conf/velocity/footer.vm +17 -0
- data/solr/conf/velocity/head.vm +45 -0
- data/solr/conf/velocity/header.vm +3 -0
- data/solr/conf/velocity/hit.vm +5 -0
- data/solr/conf/velocity/jquery.autocomplete.css +48 -0
- data/solr/conf/velocity/jquery.autocomplete.js +762 -0
- data/solr/conf/velocity/layout.vm +20 -0
- data/solr/conf/velocity/main.css +184 -0
- data/solr/conf/velocity/query.vm +56 -0
- data/solr/conf/velocity/querySpatial.vm +40 -0
- data/solr/conf/velocity/suggest.vm +3 -0
- data/solr/conf/velocity/tabs.vm +22 -0
- data/solr/conf/xslt/example.xsl +132 -0
- data/solr/conf/xslt/example_atom.xsl +67 -0
- data/solr/conf/xslt/example_rss.xsl +66 -0
- data/solr/conf/xslt/luke.xsl +337 -0
- data/spec/fixtures/cores_create.json +1 -0
- data/spec/fixtures/cores_status.json +1 -0
- data/spec/integration/supernova_core_spec.rb +95 -0
- data/spec/spec_helper.rb +30 -0
- data/spec/supernova/batch_indexer_spec.rb +69 -0
- data/spec/supernova/solr/cli_spec.rb +26 -0
- data/spec/supernova/solr/core_spec.rb +81 -0
- data/spec/supernova/solr/mapper_spec.rb +25 -0
- data/spec/supernova/solr/server_spec.rb +144 -0
- data/spec/supernova_spec.rb +31 -0
- data/supernova-core.gemspec +25 -0
- metadata +237 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
require "spec_helper"
|
|
2
|
+
|
|
3
|
+
describe "Supernova" do
|
|
4
|
+
let(:logger) { double("logger") }
|
|
5
|
+
after do
|
|
6
|
+
Supernova.logger = nil
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
it "allows setting a logger" do
|
|
10
|
+
Supernova.logger = logger
|
|
11
|
+
Supernova.send(:logger).should == logger
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
describe "#log" do
|
|
15
|
+
it "forwards logs to logger when set" do
|
|
16
|
+
Supernova.logger = logger
|
|
17
|
+
logger.should_receive(:info).with("my message")
|
|
18
|
+
Supernova.log("my message")
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
it "does not break when logger is nil" do
|
|
22
|
+
Supernova.log("my message")
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
it "uses a custom method when provided" do
|
|
26
|
+
Supernova.logger = logger
|
|
27
|
+
logger.should_receive(:debug).with("my message")
|
|
28
|
+
Supernova.log("my message", :debug)
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
|
2
|
+
require File.expand_path('../lib/supernova-core/version', __FILE__)
|
|
3
|
+
|
|
4
|
+
Gem::Specification.new do |gem|
|
|
5
|
+
gem.authors = ["Tobias Schwab"]
|
|
6
|
+
gem.email = ["tobias.schwab@dynport.de"]
|
|
7
|
+
gem.description = %q{Core libraries for using SOLR}
|
|
8
|
+
gem.summary = %q{Core libraries for using SOLR}
|
|
9
|
+
gem.homepage = "http://www.dynport.de"
|
|
10
|
+
|
|
11
|
+
gem.files = `git ls-files`.split($\)
|
|
12
|
+
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
|
13
|
+
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
|
14
|
+
gem.name = "supernova-core"
|
|
15
|
+
gem.require_paths = ["lib"]
|
|
16
|
+
gem.version = Supernova::Core::VERSION
|
|
17
|
+
|
|
18
|
+
gem.add_dependency('typhoeus')
|
|
19
|
+
gem.add_dependency('json')
|
|
20
|
+
gem.add_development_dependency('rspec', '2.9.0')
|
|
21
|
+
gem.add_development_dependency('guard', '1.0.1')
|
|
22
|
+
gem.add_development_dependency('growl', '1.0.3')
|
|
23
|
+
gem.add_development_dependency('webmock', '1.8.3')
|
|
24
|
+
gem.add_development_dependency('rake', '0.9.2')
|
|
25
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: supernova-core
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.0.1
|
|
5
|
+
prerelease:
|
|
6
|
+
platform: ruby
|
|
7
|
+
authors:
|
|
8
|
+
- Tobias Schwab
|
|
9
|
+
autorequire:
|
|
10
|
+
bindir: bin
|
|
11
|
+
cert_chain: []
|
|
12
|
+
date: 2012-04-30 00:00:00.000000000 Z
|
|
13
|
+
dependencies:
|
|
14
|
+
- !ruby/object:Gem::Dependency
|
|
15
|
+
name: typhoeus
|
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
|
17
|
+
none: false
|
|
18
|
+
requirements:
|
|
19
|
+
- - ! '>='
|
|
20
|
+
- !ruby/object:Gem::Version
|
|
21
|
+
version: '0'
|
|
22
|
+
type: :runtime
|
|
23
|
+
prerelease: false
|
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
25
|
+
none: false
|
|
26
|
+
requirements:
|
|
27
|
+
- - ! '>='
|
|
28
|
+
- !ruby/object:Gem::Version
|
|
29
|
+
version: '0'
|
|
30
|
+
- !ruby/object:Gem::Dependency
|
|
31
|
+
name: json
|
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
|
33
|
+
none: false
|
|
34
|
+
requirements:
|
|
35
|
+
- - ! '>='
|
|
36
|
+
- !ruby/object:Gem::Version
|
|
37
|
+
version: '0'
|
|
38
|
+
type: :runtime
|
|
39
|
+
prerelease: false
|
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
41
|
+
none: false
|
|
42
|
+
requirements:
|
|
43
|
+
- - ! '>='
|
|
44
|
+
- !ruby/object:Gem::Version
|
|
45
|
+
version: '0'
|
|
46
|
+
- !ruby/object:Gem::Dependency
|
|
47
|
+
name: rspec
|
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
|
49
|
+
none: false
|
|
50
|
+
requirements:
|
|
51
|
+
- - '='
|
|
52
|
+
- !ruby/object:Gem::Version
|
|
53
|
+
version: 2.9.0
|
|
54
|
+
type: :development
|
|
55
|
+
prerelease: false
|
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
57
|
+
none: false
|
|
58
|
+
requirements:
|
|
59
|
+
- - '='
|
|
60
|
+
- !ruby/object:Gem::Version
|
|
61
|
+
version: 2.9.0
|
|
62
|
+
- !ruby/object:Gem::Dependency
|
|
63
|
+
name: guard
|
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
|
65
|
+
none: false
|
|
66
|
+
requirements:
|
|
67
|
+
- - '='
|
|
68
|
+
- !ruby/object:Gem::Version
|
|
69
|
+
version: 1.0.1
|
|
70
|
+
type: :development
|
|
71
|
+
prerelease: false
|
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
73
|
+
none: false
|
|
74
|
+
requirements:
|
|
75
|
+
- - '='
|
|
76
|
+
- !ruby/object:Gem::Version
|
|
77
|
+
version: 1.0.1
|
|
78
|
+
- !ruby/object:Gem::Dependency
|
|
79
|
+
name: growl
|
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
|
81
|
+
none: false
|
|
82
|
+
requirements:
|
|
83
|
+
- - '='
|
|
84
|
+
- !ruby/object:Gem::Version
|
|
85
|
+
version: 1.0.3
|
|
86
|
+
type: :development
|
|
87
|
+
prerelease: false
|
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
89
|
+
none: false
|
|
90
|
+
requirements:
|
|
91
|
+
- - '='
|
|
92
|
+
- !ruby/object:Gem::Version
|
|
93
|
+
version: 1.0.3
|
|
94
|
+
- !ruby/object:Gem::Dependency
|
|
95
|
+
name: webmock
|
|
96
|
+
requirement: !ruby/object:Gem::Requirement
|
|
97
|
+
none: false
|
|
98
|
+
requirements:
|
|
99
|
+
- - '='
|
|
100
|
+
- !ruby/object:Gem::Version
|
|
101
|
+
version: 1.8.3
|
|
102
|
+
type: :development
|
|
103
|
+
prerelease: false
|
|
104
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
105
|
+
none: false
|
|
106
|
+
requirements:
|
|
107
|
+
- - '='
|
|
108
|
+
- !ruby/object:Gem::Version
|
|
109
|
+
version: 1.8.3
|
|
110
|
+
- !ruby/object:Gem::Dependency
|
|
111
|
+
name: rake
|
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
|
113
|
+
none: false
|
|
114
|
+
requirements:
|
|
115
|
+
- - '='
|
|
116
|
+
- !ruby/object:Gem::Version
|
|
117
|
+
version: 0.9.2
|
|
118
|
+
type: :development
|
|
119
|
+
prerelease: false
|
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
121
|
+
none: false
|
|
122
|
+
requirements:
|
|
123
|
+
- - '='
|
|
124
|
+
- !ruby/object:Gem::Version
|
|
125
|
+
version: 0.9.2
|
|
126
|
+
description: Core libraries for using SOLR
|
|
127
|
+
email:
|
|
128
|
+
- tobias.schwab@dynport.de
|
|
129
|
+
executables:
|
|
130
|
+
- solr_admin
|
|
131
|
+
extensions: []
|
|
132
|
+
extra_rdoc_files: []
|
|
133
|
+
files:
|
|
134
|
+
- .gitignore
|
|
135
|
+
- Gemfile
|
|
136
|
+
- LICENSE
|
|
137
|
+
- README.md
|
|
138
|
+
- Rakefile
|
|
139
|
+
- bin/solr_admin
|
|
140
|
+
- lib/functional_delegator.rb
|
|
141
|
+
- lib/supernova-core.rb
|
|
142
|
+
- lib/supernova-core/version.rb
|
|
143
|
+
- lib/supernova.rb
|
|
144
|
+
- lib/supernova/batch_indexer.rb
|
|
145
|
+
- lib/supernova/solr/cli.rb
|
|
146
|
+
- lib/supernova/solr/core.rb
|
|
147
|
+
- lib/supernova/solr/mapper.rb
|
|
148
|
+
- lib/supernova/solr/server.rb
|
|
149
|
+
- solr/conf/admin-extra.html
|
|
150
|
+
- solr/conf/elevate.xml
|
|
151
|
+
- solr/conf/mapping-FoldToASCII.txt
|
|
152
|
+
- solr/conf/mapping-ISOLatin1Accent.txt
|
|
153
|
+
- solr/conf/protwords.txt
|
|
154
|
+
- solr/conf/schema.xml
|
|
155
|
+
- solr/conf/scripts.conf
|
|
156
|
+
- solr/conf/solrconfig.xml
|
|
157
|
+
- solr/conf/spellings.txt
|
|
158
|
+
- solr/conf/stopwords.txt
|
|
159
|
+
- solr/conf/synonyms.txt
|
|
160
|
+
- solr/conf/velocity/VM_global_library.vm
|
|
161
|
+
- solr/conf/velocity/browse.vm
|
|
162
|
+
- solr/conf/velocity/cluster.vm
|
|
163
|
+
- solr/conf/velocity/clusterResults.vm
|
|
164
|
+
- solr/conf/velocity/doc.vm
|
|
165
|
+
- solr/conf/velocity/facet_dates.vm
|
|
166
|
+
- solr/conf/velocity/facet_fields.vm
|
|
167
|
+
- solr/conf/velocity/facet_queries.vm
|
|
168
|
+
- solr/conf/velocity/facet_ranges.vm
|
|
169
|
+
- solr/conf/velocity/facets.vm
|
|
170
|
+
- solr/conf/velocity/footer.vm
|
|
171
|
+
- solr/conf/velocity/head.vm
|
|
172
|
+
- solr/conf/velocity/header.vm
|
|
173
|
+
- solr/conf/velocity/hit.vm
|
|
174
|
+
- solr/conf/velocity/jquery.autocomplete.css
|
|
175
|
+
- solr/conf/velocity/jquery.autocomplete.js
|
|
176
|
+
- solr/conf/velocity/layout.vm
|
|
177
|
+
- solr/conf/velocity/main.css
|
|
178
|
+
- solr/conf/velocity/query.vm
|
|
179
|
+
- solr/conf/velocity/querySpatial.vm
|
|
180
|
+
- solr/conf/velocity/suggest.vm
|
|
181
|
+
- solr/conf/velocity/tabs.vm
|
|
182
|
+
- solr/conf/xslt/example.xsl
|
|
183
|
+
- solr/conf/xslt/example_atom.xsl
|
|
184
|
+
- solr/conf/xslt/example_rss.xsl
|
|
185
|
+
- solr/conf/xslt/luke.xsl
|
|
186
|
+
- spec/fixtures/cores_create.json
|
|
187
|
+
- spec/fixtures/cores_status.json
|
|
188
|
+
- spec/integration/supernova_core_spec.rb
|
|
189
|
+
- spec/spec_helper.rb
|
|
190
|
+
- spec/supernova/batch_indexer_spec.rb
|
|
191
|
+
- spec/supernova/solr/cli_spec.rb
|
|
192
|
+
- spec/supernova/solr/core_spec.rb
|
|
193
|
+
- spec/supernova/solr/mapper_spec.rb
|
|
194
|
+
- spec/supernova/solr/server_spec.rb
|
|
195
|
+
- spec/supernova_spec.rb
|
|
196
|
+
- supernova-core.gemspec
|
|
197
|
+
homepage: http://www.dynport.de
|
|
198
|
+
licenses: []
|
|
199
|
+
post_install_message:
|
|
200
|
+
rdoc_options: []
|
|
201
|
+
require_paths:
|
|
202
|
+
- lib
|
|
203
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
204
|
+
none: false
|
|
205
|
+
requirements:
|
|
206
|
+
- - ! '>='
|
|
207
|
+
- !ruby/object:Gem::Version
|
|
208
|
+
version: '0'
|
|
209
|
+
segments:
|
|
210
|
+
- 0
|
|
211
|
+
hash: 2052120325993177447
|
|
212
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
213
|
+
none: false
|
|
214
|
+
requirements:
|
|
215
|
+
- - ! '>='
|
|
216
|
+
- !ruby/object:Gem::Version
|
|
217
|
+
version: '0'
|
|
218
|
+
segments:
|
|
219
|
+
- 0
|
|
220
|
+
hash: 2052120325993177447
|
|
221
|
+
requirements: []
|
|
222
|
+
rubyforge_project:
|
|
223
|
+
rubygems_version: 1.8.23
|
|
224
|
+
signing_key:
|
|
225
|
+
specification_version: 3
|
|
226
|
+
summary: Core libraries for using SOLR
|
|
227
|
+
test_files:
|
|
228
|
+
- spec/fixtures/cores_create.json
|
|
229
|
+
- spec/fixtures/cores_status.json
|
|
230
|
+
- spec/integration/supernova_core_spec.rb
|
|
231
|
+
- spec/spec_helper.rb
|
|
232
|
+
- spec/supernova/batch_indexer_spec.rb
|
|
233
|
+
- spec/supernova/solr/cli_spec.rb
|
|
234
|
+
- spec/supernova/solr/core_spec.rb
|
|
235
|
+
- spec/supernova/solr/mapper_spec.rb
|
|
236
|
+
- spec/supernova/solr/server_spec.rb
|
|
237
|
+
- spec/supernova_spec.rb
|