websolr-rails 0.0.0 → 1.4.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (168) hide show
  1. data/.document +5 -0
  2. data/.gitignore +15 -0
  3. data/CHANGELOG +8 -0
  4. data/LICENSE +19 -0
  5. data/README.rdoc +69 -0
  6. data/Rakefile +112 -0
  7. data/TESTING_THE_PLUGIN +25 -0
  8. data/VERSION +1 -0
  9. data/bin/websolr +10 -0
  10. data/config/solr.yml +15 -0
  11. data/config/solr_environment.rb +22 -0
  12. data/generate_rdoc.sh +13 -0
  13. data/lib/acts_as_solr.rb +65 -0
  14. data/lib/acts_methods.rb +281 -0
  15. data/lib/class_methods.rb +243 -0
  16. data/lib/common_methods.rb +89 -0
  17. data/lib/deprecation.rb +61 -0
  18. data/lib/instance_methods.rb +181 -0
  19. data/lib/lazy_document.rb +18 -0
  20. data/lib/parser_methods.rb +230 -0
  21. data/lib/search_results.rb +72 -0
  22. data/lib/solr.rb +21 -0
  23. data/lib/solr/connection.rb +190 -0
  24. data/lib/solr/document.rb +78 -0
  25. data/lib/solr/exception.rb +13 -0
  26. data/lib/solr/field.rb +39 -0
  27. data/lib/solr/importer.rb +19 -0
  28. data/lib/solr/importer/array_mapper.rb +26 -0
  29. data/lib/solr/importer/delimited_file_source.rb +38 -0
  30. data/lib/solr/importer/hpricot_mapper.rb +27 -0
  31. data/lib/solr/importer/mapper.rb +51 -0
  32. data/lib/solr/importer/solr_source.rb +43 -0
  33. data/lib/solr/importer/xpath_mapper.rb +35 -0
  34. data/lib/solr/indexer.rb +52 -0
  35. data/lib/solr/request.rb +26 -0
  36. data/lib/solr/request/add_document.rb +63 -0
  37. data/lib/solr/request/base.rb +36 -0
  38. data/lib/solr/request/commit.rb +31 -0
  39. data/lib/solr/request/delete.rb +50 -0
  40. data/lib/solr/request/dismax.rb +46 -0
  41. data/lib/solr/request/index_info.rb +22 -0
  42. data/lib/solr/request/modify_document.rb +51 -0
  43. data/lib/solr/request/optimize.rb +21 -0
  44. data/lib/solr/request/ping.rb +36 -0
  45. data/lib/solr/request/select.rb +56 -0
  46. data/lib/solr/request/spellcheck.rb +30 -0
  47. data/lib/solr/request/standard.rb +402 -0
  48. data/lib/solr/request/update.rb +23 -0
  49. data/lib/solr/response.rb +27 -0
  50. data/lib/solr/response/add_document.rb +17 -0
  51. data/lib/solr/response/base.rb +42 -0
  52. data/lib/solr/response/commit.rb +17 -0
  53. data/lib/solr/response/delete.rb +13 -0
  54. data/lib/solr/response/dismax.rb +8 -0
  55. data/lib/solr/response/index_info.rb +26 -0
  56. data/lib/solr/response/modify_document.rb +17 -0
  57. data/lib/solr/response/optimize.rb +14 -0
  58. data/lib/solr/response/ping.rb +28 -0
  59. data/lib/solr/response/ruby.rb +42 -0
  60. data/lib/solr/response/select.rb +17 -0
  61. data/lib/solr/response/spellcheck.rb +20 -0
  62. data/lib/solr/response/standard.rb +64 -0
  63. data/lib/solr/response/xml.rb +42 -0
  64. data/lib/solr/solrtasks.rb +27 -0
  65. data/lib/solr/util.rb +32 -0
  66. data/lib/solr/xml.rb +44 -0
  67. data/lib/solr_fixtures.rb +13 -0
  68. data/lib/tasks/database.rake +18 -0
  69. data/lib/tasks/solr.rake +94 -0
  70. data/lib/tasks/test.rake +7 -0
  71. data/lib/websolr-rails.rb +1 -0
  72. data/lib/websolr.rb +1 -0
  73. data/lib/websolr_controller.rb +233 -0
  74. data/lib/websolr_option_parser.rb +61 -0
  75. data/lib/websolr_rails.rb +1 -0
  76. data/lib/websolr_rails/tasks.rb +4 -0
  77. data/lib/will_paginate_support.rb +12 -0
  78. data/solr/CHANGES.txt +1207 -0
  79. data/solr/LICENSE.txt +712 -0
  80. data/solr/NOTICE.txt +90 -0
  81. data/solr/etc/jetty.xml +205 -0
  82. data/solr/etc/webdefault.xml +379 -0
  83. data/solr/lib/easymock.jar +0 -0
  84. data/solr/lib/jetty-6.1.3.jar +0 -0
  85. data/solr/lib/jetty-util-6.1.3.jar +0 -0
  86. data/solr/lib/jsp-2.1/ant-1.6.5.jar +0 -0
  87. data/solr/lib/jsp-2.1/core-3.1.1.jar +0 -0
  88. data/solr/lib/jsp-2.1/jsp-2.1.jar +0 -0
  89. data/solr/lib/jsp-2.1/jsp-api-2.1.jar +0 -0
  90. data/solr/lib/servlet-api-2.4.jar +0 -0
  91. data/solr/lib/servlet-api-2.5-6.1.3.jar +0 -0
  92. data/solr/lib/xpp3-1.1.3.4.O.jar +0 -0
  93. data/solr/logs/.empty-dir-for-git +0 -0
  94. data/solr/solr/README.txt +52 -0
  95. data/solr/solr/bin/abc +176 -0
  96. data/solr/solr/bin/abo +176 -0
  97. data/solr/solr/bin/backup +108 -0
  98. data/solr/solr/bin/backupcleaner +142 -0
  99. data/solr/solr/bin/commit +128 -0
  100. data/solr/solr/bin/optimize +129 -0
  101. data/solr/solr/bin/readercycle +129 -0
  102. data/solr/solr/bin/rsyncd-disable +77 -0
  103. data/solr/solr/bin/rsyncd-enable +76 -0
  104. data/solr/solr/bin/rsyncd-start +145 -0
  105. data/solr/solr/bin/rsyncd-stop +105 -0
  106. data/solr/solr/bin/scripts-util +83 -0
  107. data/solr/solr/bin/snapcleaner +148 -0
  108. data/solr/solr/bin/snapinstaller +168 -0
  109. data/solr/solr/bin/snappuller +248 -0
  110. data/solr/solr/bin/snappuller-disable +77 -0
  111. data/solr/solr/bin/snappuller-enable +77 -0
  112. data/solr/solr/bin/snapshooter +109 -0
  113. data/solr/solr/conf/admin-extra.html +31 -0
  114. data/solr/solr/conf/protwords.txt +21 -0
  115. data/solr/solr/conf/schema.xml +126 -0
  116. data/solr/solr/conf/scripts.conf +24 -0
  117. data/solr/solr/conf/solrconfig.xml +458 -0
  118. data/solr/solr/conf/stopwords.txt +57 -0
  119. data/solr/solr/conf/synonyms.txt +31 -0
  120. data/solr/solr/conf/xslt/example.xsl +132 -0
  121. data/solr/solr/conf/xslt/example_atom.xsl +63 -0
  122. data/solr/solr/conf/xslt/example_rss.xsl +62 -0
  123. data/solr/start.jar +0 -0
  124. data/solr/tmp/.empty-dir-for-git +0 -0
  125. data/solr/webapps/solr.war +0 -0
  126. data/test/config/solr.yml +2 -0
  127. data/test/db/connections/mysql/connection.rb +10 -0
  128. data/test/db/connections/sqlite/connection.rb +8 -0
  129. data/test/db/migrate/001_create_books.rb +15 -0
  130. data/test/db/migrate/002_create_movies.rb +12 -0
  131. data/test/db/migrate/003_create_categories.rb +11 -0
  132. data/test/db/migrate/004_create_electronics.rb +16 -0
  133. data/test/db/migrate/005_create_authors.rb +12 -0
  134. data/test/db/migrate/006_create_postings.rb +9 -0
  135. data/test/db/migrate/007_create_posts.rb +13 -0
  136. data/test/db/migrate/008_create_gadgets.rb +11 -0
  137. data/test/fixtures/authors.yml +9 -0
  138. data/test/fixtures/books.yml +13 -0
  139. data/test/fixtures/categories.yml +7 -0
  140. data/test/fixtures/db_definitions/mysql.sql +41 -0
  141. data/test/fixtures/electronics.yml +49 -0
  142. data/test/fixtures/movies.yml +9 -0
  143. data/test/fixtures/postings.yml +10 -0
  144. data/test/functional/acts_as_solr_test.rb +413 -0
  145. data/test/functional/association_indexing_test.rb +37 -0
  146. data/test/functional/faceted_search_test.rb +163 -0
  147. data/test/functional/multi_solr_search_test.rb +51 -0
  148. data/test/models/author.rb +10 -0
  149. data/test/models/book.rb +10 -0
  150. data/test/models/category.rb +8 -0
  151. data/test/models/electronic.rb +21 -0
  152. data/test/models/gadget.rb +9 -0
  153. data/test/models/movie.rb +17 -0
  154. data/test/models/novel.rb +2 -0
  155. data/test/models/post.rb +3 -0
  156. data/test/models/posting.rb +11 -0
  157. data/test/test_helper.rb +51 -0
  158. data/test/unit/acts_methods_shoulda.rb +70 -0
  159. data/test/unit/class_methods_shoulda.rb +88 -0
  160. data/test/unit/common_methods_shoulda.rb +112 -0
  161. data/test/unit/instance_methods_shoulda.rb +326 -0
  162. data/test/unit/lazy_document_shoulda.rb +35 -0
  163. data/test/unit/parser_instance.rb +19 -0
  164. data/test/unit/parser_methods_shoulda.rb +278 -0
  165. data/test/unit/solr_instance.rb +46 -0
  166. data/test/unit/test_helper.rb +14 -0
  167. data/websolr-rails.gemspec +243 -0
  168. metadata +229 -18
@@ -0,0 +1,35 @@
1
+ require 'test_helper'
2
+ require 'lazy_document'
3
+
4
+ class UserModel; end
5
+
6
+ class LazyDocumentTest < Test::Unit::TestCase
7
+ context "With a lazy document" do
8
+ setup do
9
+ @record = stub(:record)
10
+ @record.stubs(:is_valid?).returns true
11
+ UserModel.stubs(:find).returns @record
12
+ @document = ActsAsSolr::LazyDocument.new(1, UserModel)
13
+ end
14
+
15
+ context "with an uninitialized document" do
16
+ should "fetch the record from the database" do
17
+ UserModel.expects(:find).with(1).returns(@record)
18
+ @document.is_valid?
19
+ end
20
+ end
21
+
22
+ context "with an initialized document" do
23
+ should "not fetch the record again" do
24
+ @document.is_valid?
25
+ @document.expects(:find).never
26
+ @document.is_valid?
27
+ end
28
+
29
+ should "reroute the calls to the record" do
30
+ @record.expects(:is_valid?).once
31
+ @document.is_valid?
32
+ end
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,19 @@
1
+ class ActsAsSolr::ParserInstance
2
+ include ActsAsSolr::ParserMethods
3
+ include ActsAsSolr::CommonMethods
4
+ attr_accessor :configuration, :solr_configuration
5
+
6
+ def table_name
7
+ "documents"
8
+ end
9
+
10
+ def primary_key
11
+ "id"
12
+ end
13
+
14
+ def find(*args)
15
+ []
16
+ end
17
+
18
+ public :parse_results, :reorder, :parse_query, :add_scores, :replace_types
19
+ end
@@ -0,0 +1,278 @@
1
+ require File.dirname(__FILE__) + '/test_helper'
2
+ require 'parser_methods'
3
+ require 'common_methods'
4
+ require 'search_results'
5
+ require 'deprecation'
6
+ module Solr; module Request; end; end
7
+ require 'solr/request/base'
8
+ require 'solr/request/select'
9
+ require 'solr/request/standard'
10
+ require 'parser_instance'
11
+ require 'lazy_document'
12
+
13
+ class ActsAsSolr::Post; end
14
+
15
+ class ParserMethodsTest < Test::Unit::TestCase
16
+
17
+ context "With a parser instance" do
18
+ setup do
19
+ @parser = ActsAsSolr::ParserInstance.new
20
+ end
21
+
22
+ context "When parsing results" do
23
+ setup do
24
+ @results = stub(:results)
25
+ @results.stubs(:total_hits).returns(2)
26
+ @results.stubs(:hits).returns([])
27
+ @results.stubs(:max_score).returns 2.1
28
+ @results.stubs(:data).returns({"responseHeader" => {"QTime" => "10.2"}})
29
+ end
30
+
31
+ should "return a SearchResults object" do
32
+ assert_equal ActsAsSolr::SearchResults, @parser.parse_results(@results).class
33
+ end
34
+
35
+ should "set the max score" do
36
+ assert_equal 2.1, @parser.parse_results(@results).max_score
37
+ end
38
+
39
+ should "include the facets" do
40
+ @results.stubs(:data).returns({"responseHeader" => {"QTime" => "10.2"}, "facet_counts" => 2})
41
+ assert_equal 2, @parser.parse_results(@results, :facets => true).facets
42
+ end
43
+
44
+ context "when the format requests objects" do
45
+ setup do
46
+ @parser.configuration = {:format => :objects}
47
+ @parser.solr_configuration = {:primary_key_field => :pk_id}
48
+ @results.stubs(:hits).returns [{"pk_id" => 1}, {"pk_id" => 2}]
49
+ @parser.stubs(:reorder)
50
+ end
51
+
52
+ should "query with the record ids" do
53
+ @parser.expects(:find).with(:all, :conditions => ["documents.id in (?)", [1, 2]]).returns [1, 2]
54
+ @parser.parse_results(@results)
55
+ end
56
+
57
+ should "reorder the records" do
58
+ @parser.expects(:reorder).with([], [1, 2])
59
+ @parser.parse_results(@results)
60
+ end
61
+
62
+ should "add :include if :include was specified" do
63
+ @parser.expects(:find).with(:all, :conditions => ["documents.id in (?)", [1, 2]], :include => [:author]).returns [1, 2]
64
+ @parser.parse_results(@results, :include => [:author])
65
+ end
66
+ end
67
+
68
+ context "when the format doesn't request objects" do
69
+ setup do
70
+ @parser.solr_configuration = {:primary_key_field => "pk_id"}
71
+ end
72
+
73
+ should "not query the database" do
74
+ @parser.expects(:find).never
75
+ @parser.parse_results(@results, :format => nil)
76
+ end
77
+
78
+ should "return just the ids" do
79
+ @results.stubs(:hits).returns([{"pk_id" => 1}, {"pk_id" => 2}])
80
+ assert_equal [1, 2], @parser.parse_results(@results, :format => nil).docs
81
+ end
82
+
83
+ should "ignore the :lazy option" do
84
+ @results.stubs(:hits).returns([{"pk_id" => 1}, {"pk_id" => 2}])
85
+ assert_equal [1, 2], @parser.parse_results(@results, :format => :ids, :lazy => true).docs
86
+ end
87
+ end
88
+
89
+ context "with an empty result set" do
90
+ setup do
91
+ @results.stubs(:total_hits).returns(0)
92
+ @results.stubs(:hits).returns([])
93
+ end
94
+
95
+ should "return an empty search results set" do
96
+ assert_equal 0, @parser.parse_results(@results).total
97
+ end
98
+
99
+ should "not have any search results" do
100
+ assert_equal [], @parser.parse_results(@results).docs
101
+ end
102
+ end
103
+
104
+ context "with a nil result set" do
105
+ should "return an empty search results set" do
106
+ assert_equal 0, @parser.parse_results(nil).total
107
+ end
108
+ end
109
+
110
+ context "with the scores option" do
111
+ should "add the scores" do
112
+ @parser.expects(:add_scores).with([], @results)
113
+ @parser.parse_results(@results, :scores => true)
114
+ end
115
+ end
116
+
117
+ context "with lazy format" do
118
+ setup do
119
+ @parser.solr_configuration = {:primary_key_field => :pk_id}
120
+ @results.stubs(:hits).returns([{"pk_id" => 1}, {"pk_id" => 2}])
121
+ end
122
+
123
+ should "create LazyDocuments for the resulting docs" do
124
+ result = @parser.parse_results(@results, :lazy => true)
125
+ assert_equal ActsAsSolr::LazyDocument, result.results.first.class
126
+ end
127
+
128
+ should "set the document id as the record id" do
129
+ result = @parser.parse_results(@results, :lazy => true)
130
+ assert_equal 1, result.results.first.id
131
+ end
132
+
133
+ should "set the document class" do
134
+ result = @parser.parse_results(@results, :lazy => true)
135
+ assert_equal ActsAsSolr::ParserInstance, result.results.first.clazz.class
136
+ end
137
+ end
138
+
139
+ end
140
+
141
+ context "when reordering results" do
142
+ should "raise an error if arguments don't have the same number of elements" do
143
+ assert_raise(RuntimeError) {@parser.reorder([], [1])}
144
+ end
145
+
146
+ should "reorder the results to match the order of the documents returned by solr" do
147
+ thing1 = stub(:thing1)
148
+ thing1.stubs(:id).returns 5
149
+ thing2 = stub(:thing2)
150
+ thing2.stubs(:id).returns 1
151
+ thing3 = stub(:things3)
152
+ thing3.stubs(:id).returns 3
153
+ things = [thing1, thing2, thing3]
154
+ reordered = @parser.reorder(things, [1, 3, 5])
155
+ assert_equal [1, 3, 5], reordered.collect{|thing| thing.id}
156
+ end
157
+ end
158
+
159
+ context "When parsing a query" do
160
+ setup do
161
+ ActsAsSolr::Post.stubs(:execute)
162
+ @parser.stubs(:solr_type_condition).returns "(type:ParserMethodsTest)"
163
+ @parser.solr_configuration = {:primary_key_field => "id"}
164
+ @parser.configuration = {:solr_fields => nil}
165
+ end
166
+
167
+ should "set the limit and offset" do
168
+ ActsAsSolr::Post.expects(:execute).with {|request|
169
+ 10 == request.to_hash[:rows]
170
+ 20 == request.to_hash[:start]
171
+ }
172
+ @parser.parse_query "foo", :limit => 10, :offset => 20
173
+ end
174
+
175
+ should "set the operator" do
176
+ ActsAsSolr::Post.expects(:execute).with {|request|
177
+ "OR" == request.to_hash["q.op"]
178
+ }
179
+ @parser.parse_query "foo", :operator => :or
180
+ end
181
+
182
+ should "not execute anything if the query is nil" do
183
+ ActsAsSolr::Post.expects(:execute).never
184
+ assert_nil @parser.parse_query(nil)
185
+ end
186
+
187
+ should "not execute anything if the query is ''" do
188
+ ActsAsSolr::Post.expects(:execute).never
189
+ assert_nil @parser.parse_query('')
190
+ end
191
+
192
+ should "raise an error if invalid options where specified" do
193
+ assert_raise(RuntimeError) {@parser.parse_query "foo", :invalid => true}
194
+ end
195
+
196
+ should "add the type" do
197
+ ActsAsSolr::Post.expects(:execute).with {|request|
198
+ request.to_hash[:q].include?("(type:ParserMethodsTest)")
199
+ }
200
+ @parser.parse_query "foo"
201
+ end
202
+
203
+ should "append the field types for the specified fields" do
204
+ ActsAsSolr::Post.expects(:execute).with {|request|
205
+ request.to_hash[:q].include?("(username_t:Chunky)")
206
+ }
207
+ @parser.parse_query "username:Chunky"
208
+ end
209
+
210
+ should "replace the field types" do
211
+ @parser.expects(:replace_types).returns(["active_i:1"])
212
+ ActsAsSolr::Post.expects(:execute).with {|request|
213
+ request.to_hash[:q].include?("active_i:1")
214
+ }
215
+ @parser.parse_query "active:1"
216
+ end
217
+
218
+ should "add score and primary key to field list" do
219
+ ActsAsSolr::Post.expects(:execute).with {|request|
220
+ request.to_hash[:fl] == ('id,score')
221
+ }
222
+ @parser.parse_query "foo"
223
+ end
224
+
225
+ context "with the order option" do
226
+ should "add the order criteria to the query" do
227
+ ActsAsSolr::Post.expects(:execute).with {|request|
228
+ request.to_hash[:q].include?(";active_t desc")
229
+ }
230
+ @parser.parse_query "active:1", :order => "active desc"
231
+ end
232
+ end
233
+
234
+ context "with facets" do
235
+ end
236
+ end
237
+
238
+ context "When setting the field types" do
239
+ setup do
240
+ @parser.configuration = {:solr_fields => {:name => {:type => :string},
241
+ :age => {:type => :integer}}}
242
+ end
243
+
244
+ should "replace the _t suffix with the real type" do
245
+ assert_equal ["name_s:Chunky AND age_i:21"], @parser.replace_types(["name_t:Chunky AND age_t:21"])
246
+ end
247
+
248
+ context "with a suffix" do
249
+ should "not include the colon when false" do
250
+ assert_equal ["name_s"], @parser.replace_types(["name_t"], false)
251
+ end
252
+
253
+ should "include the colon by default" do
254
+ assert_equal ["name_s:Chunky"], @parser.replace_types(["name_t:Chunky"])
255
+ end
256
+ end
257
+ end
258
+
259
+ context "When adding scores" do
260
+ setup do
261
+ @solr_data = stub(:results)
262
+ @solr_data.stubs(:total_hits).returns(1)
263
+ @solr_data.stubs(:hits).returns([{"id" => 2, "score" => 2.546}])
264
+ @solr_data.stubs(:max_score).returns 2.1
265
+
266
+ @results = [Array.new]
267
+
268
+ @parser.stubs(:record_id).returns(2)
269
+
270
+ @parser.solr_configuration = {:primary_key_field => "id"}
271
+ end
272
+
273
+ should "add the score to the result document" do
274
+ assert_equal 2.546, @parser.add_scores(@results, @solr_data).first.last.solr_score
275
+ end
276
+ end
277
+ end
278
+ end
@@ -0,0 +1,46 @@
1
+ require 'instance_methods'
2
+
3
+ class SolrInstance
4
+ include ActsAsSolr::InstanceMethods
5
+ attr_accessor :configuration, :solr_configuration, :name
6
+
7
+ def initialize(name = "Chunky bacon!")
8
+ @name = name
9
+ end
10
+
11
+ def self.primary_key
12
+ "id"
13
+ end
14
+
15
+ def logger
16
+ @logger ||= Logger.new(StringIO.new)
17
+ end
18
+
19
+ def record_id(obj)
20
+ 10
21
+ end
22
+
23
+ def boost_rate
24
+ 10.0
25
+ end
26
+
27
+ def irate
28
+ 8.0
29
+ end
30
+
31
+ def name_for_solr
32
+ name
33
+ end
34
+
35
+ def id_for_solr
36
+ "bogus"
37
+ end
38
+
39
+ def type_for_solr
40
+ "humbug"
41
+ end
42
+
43
+ def get_solr_field_type(args)
44
+ "s"
45
+ end
46
+ end
@@ -0,0 +1,14 @@
1
+ $:.unshift(File.join(File.expand_path(File.dirname(__FILE__)), "..", "..", "lib"))
2
+
3
+ require 'rubygems'
4
+ require 'test/unit'
5
+
6
+ if RUBY_VERSION =~ /^1\.9/
7
+ puts "\nRunning the unit test suite doesn't as of yet work with Ruby 1.9, because Mocha hasn't yet been updated to use minitest."
8
+ puts
9
+ exit 1
10
+ end
11
+
12
+ require 'mocha'
13
+ gem 'thoughtbot-shoulda'
14
+ require 'shoulda'
@@ -0,0 +1,243 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec`
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{websolr-rails}
8
+ s.version = "1.4.3"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Kyle Maxwell"]
12
+ s.date = %q{2009-10-10}
13
+ s.default_executable = %q{websolr}
14
+ s.description = %q{acts_as_solr compatible gem for websolr}
15
+ s.email = %q{kyle@kylemaxwell.com}
16
+ s.executables = ["websolr"]
17
+ s.extra_rdoc_files = [
18
+ "LICENSE",
19
+ "README.rdoc"
20
+ ]
21
+ s.files = [
22
+ ".document",
23
+ ".gitignore",
24
+ "CHANGELOG",
25
+ "LICENSE",
26
+ "README.rdoc",
27
+ "Rakefile",
28
+ "TESTING_THE_PLUGIN",
29
+ "VERSION",
30
+ "bin/websolr",
31
+ "config/solr.yml",
32
+ "config/solr_environment.rb",
33
+ "generate_rdoc.sh",
34
+ "lib/acts_as_solr.rb",
35
+ "lib/acts_methods.rb",
36
+ "lib/class_methods.rb",
37
+ "lib/common_methods.rb",
38
+ "lib/deprecation.rb",
39
+ "lib/instance_methods.rb",
40
+ "lib/lazy_document.rb",
41
+ "lib/parser_methods.rb",
42
+ "lib/search_results.rb",
43
+ "lib/solr.rb",
44
+ "lib/solr/connection.rb",
45
+ "lib/solr/document.rb",
46
+ "lib/solr/exception.rb",
47
+ "lib/solr/field.rb",
48
+ "lib/solr/importer.rb",
49
+ "lib/solr/importer/array_mapper.rb",
50
+ "lib/solr/importer/delimited_file_source.rb",
51
+ "lib/solr/importer/hpricot_mapper.rb",
52
+ "lib/solr/importer/mapper.rb",
53
+ "lib/solr/importer/solr_source.rb",
54
+ "lib/solr/importer/xpath_mapper.rb",
55
+ "lib/solr/indexer.rb",
56
+ "lib/solr/request.rb",
57
+ "lib/solr/request/add_document.rb",
58
+ "lib/solr/request/base.rb",
59
+ "lib/solr/request/commit.rb",
60
+ "lib/solr/request/delete.rb",
61
+ "lib/solr/request/dismax.rb",
62
+ "lib/solr/request/index_info.rb",
63
+ "lib/solr/request/modify_document.rb",
64
+ "lib/solr/request/optimize.rb",
65
+ "lib/solr/request/ping.rb",
66
+ "lib/solr/request/select.rb",
67
+ "lib/solr/request/spellcheck.rb",
68
+ "lib/solr/request/standard.rb",
69
+ "lib/solr/request/update.rb",
70
+ "lib/solr/response.rb",
71
+ "lib/solr/response/add_document.rb",
72
+ "lib/solr/response/base.rb",
73
+ "lib/solr/response/commit.rb",
74
+ "lib/solr/response/delete.rb",
75
+ "lib/solr/response/dismax.rb",
76
+ "lib/solr/response/index_info.rb",
77
+ "lib/solr/response/modify_document.rb",
78
+ "lib/solr/response/optimize.rb",
79
+ "lib/solr/response/ping.rb",
80
+ "lib/solr/response/ruby.rb",
81
+ "lib/solr/response/select.rb",
82
+ "lib/solr/response/spellcheck.rb",
83
+ "lib/solr/response/standard.rb",
84
+ "lib/solr/response/xml.rb",
85
+ "lib/solr/solrtasks.rb",
86
+ "lib/solr/util.rb",
87
+ "lib/solr/xml.rb",
88
+ "lib/solr_fixtures.rb",
89
+ "lib/tasks/database.rake",
90
+ "lib/tasks/solr.rake",
91
+ "lib/tasks/test.rake",
92
+ "lib/websolr-rails.rb",
93
+ "lib/websolr.rb",
94
+ "lib/websolr_controller.rb",
95
+ "lib/websolr_option_parser.rb",
96
+ "lib/websolr_rails.rb",
97
+ "lib/websolr_rails/tasks.rb",
98
+ "lib/will_paginate_support.rb",
99
+ "solr/CHANGES.txt",
100
+ "solr/LICENSE.txt",
101
+ "solr/NOTICE.txt",
102
+ "solr/etc/jetty.xml",
103
+ "solr/etc/webdefault.xml",
104
+ "solr/lib/easymock.jar",
105
+ "solr/lib/jetty-6.1.3.jar",
106
+ "solr/lib/jetty-util-6.1.3.jar",
107
+ "solr/lib/jsp-2.1/ant-1.6.5.jar",
108
+ "solr/lib/jsp-2.1/core-3.1.1.jar",
109
+ "solr/lib/jsp-2.1/jsp-2.1.jar",
110
+ "solr/lib/jsp-2.1/jsp-api-2.1.jar",
111
+ "solr/lib/servlet-api-2.4.jar",
112
+ "solr/lib/servlet-api-2.5-6.1.3.jar",
113
+ "solr/lib/xpp3-1.1.3.4.O.jar",
114
+ "solr/logs/.empty-dir-for-git",
115
+ "solr/solr/README.txt",
116
+ "solr/solr/bin/abc",
117
+ "solr/solr/bin/abo",
118
+ "solr/solr/bin/backup",
119
+ "solr/solr/bin/backupcleaner",
120
+ "solr/solr/bin/commit",
121
+ "solr/solr/bin/optimize",
122
+ "solr/solr/bin/readercycle",
123
+ "solr/solr/bin/rsyncd-disable",
124
+ "solr/solr/bin/rsyncd-enable",
125
+ "solr/solr/bin/rsyncd-start",
126
+ "solr/solr/bin/rsyncd-stop",
127
+ "solr/solr/bin/scripts-util",
128
+ "solr/solr/bin/snapcleaner",
129
+ "solr/solr/bin/snapinstaller",
130
+ "solr/solr/bin/snappuller",
131
+ "solr/solr/bin/snappuller-disable",
132
+ "solr/solr/bin/snappuller-enable",
133
+ "solr/solr/bin/snapshooter",
134
+ "solr/solr/conf/admin-extra.html",
135
+ "solr/solr/conf/protwords.txt",
136
+ "solr/solr/conf/schema.xml",
137
+ "solr/solr/conf/scripts.conf",
138
+ "solr/solr/conf/solrconfig.xml",
139
+ "solr/solr/conf/stopwords.txt",
140
+ "solr/solr/conf/synonyms.txt",
141
+ "solr/solr/conf/xslt/example.xsl",
142
+ "solr/solr/conf/xslt/example_atom.xsl",
143
+ "solr/solr/conf/xslt/example_rss.xsl",
144
+ "solr/start.jar",
145
+ "solr/tmp/.empty-dir-for-git",
146
+ "solr/webapps/solr.war",
147
+ "test/config/solr.yml",
148
+ "test/db/connections/mysql/connection.rb",
149
+ "test/db/connections/sqlite/connection.rb",
150
+ "test/db/migrate/001_create_books.rb",
151
+ "test/db/migrate/002_create_movies.rb",
152
+ "test/db/migrate/003_create_categories.rb",
153
+ "test/db/migrate/004_create_electronics.rb",
154
+ "test/db/migrate/005_create_authors.rb",
155
+ "test/db/migrate/006_create_postings.rb",
156
+ "test/db/migrate/007_create_posts.rb",
157
+ "test/db/migrate/008_create_gadgets.rb",
158
+ "test/fixtures/authors.yml",
159
+ "test/fixtures/books.yml",
160
+ "test/fixtures/categories.yml",
161
+ "test/fixtures/db_definitions/mysql.sql",
162
+ "test/fixtures/electronics.yml",
163
+ "test/fixtures/movies.yml",
164
+ "test/fixtures/postings.yml",
165
+ "test/functional/acts_as_solr_test.rb",
166
+ "test/functional/association_indexing_test.rb",
167
+ "test/functional/faceted_search_test.rb",
168
+ "test/functional/multi_solr_search_test.rb",
169
+ "test/models/author.rb",
170
+ "test/models/book.rb",
171
+ "test/models/category.rb",
172
+ "test/models/electronic.rb",
173
+ "test/models/gadget.rb",
174
+ "test/models/movie.rb",
175
+ "test/models/novel.rb",
176
+ "test/models/post.rb",
177
+ "test/models/posting.rb",
178
+ "test/test_helper.rb",
179
+ "test/unit/acts_methods_shoulda.rb",
180
+ "test/unit/class_methods_shoulda.rb",
181
+ "test/unit/common_methods_shoulda.rb",
182
+ "test/unit/instance_methods_shoulda.rb",
183
+ "test/unit/lazy_document_shoulda.rb",
184
+ "test/unit/parser_instance.rb",
185
+ "test/unit/parser_methods_shoulda.rb",
186
+ "test/unit/solr_instance.rb",
187
+ "test/unit/test_helper.rb",
188
+ "websolr-rails.gemspec"
189
+ ]
190
+ s.homepage = %q{http://github.com/onemorecloud/websolr-rails}
191
+ s.rdoc_options = ["--main", "README.rdoc", "README.rdoc", "lib"]
192
+ s.require_paths = ["lib"]
193
+ s.rubygems_version = %q{1.3.4}
194
+ s.summary = %q{acts_as_solr compatible gem for websolr}
195
+ s.test_files = [
196
+ "test/db/connections/mysql/connection.rb",
197
+ "test/db/connections/sqlite/connection.rb",
198
+ "test/db/migrate/001_create_books.rb",
199
+ "test/db/migrate/002_create_movies.rb",
200
+ "test/db/migrate/003_create_categories.rb",
201
+ "test/db/migrate/004_create_electronics.rb",
202
+ "test/db/migrate/005_create_authors.rb",
203
+ "test/db/migrate/006_create_postings.rb",
204
+ "test/db/migrate/007_create_posts.rb",
205
+ "test/db/migrate/008_create_gadgets.rb",
206
+ "test/functional/acts_as_solr_test.rb",
207
+ "test/functional/association_indexing_test.rb",
208
+ "test/functional/faceted_search_test.rb",
209
+ "test/functional/multi_solr_search_test.rb",
210
+ "test/models/author.rb",
211
+ "test/models/book.rb",
212
+ "test/models/category.rb",
213
+ "test/models/electronic.rb",
214
+ "test/models/gadget.rb",
215
+ "test/models/movie.rb",
216
+ "test/models/novel.rb",
217
+ "test/models/post.rb",
218
+ "test/models/posting.rb",
219
+ "test/test_helper.rb",
220
+ "test/unit/acts_methods_shoulda.rb",
221
+ "test/unit/class_methods_shoulda.rb",
222
+ "test/unit/common_methods_shoulda.rb",
223
+ "test/unit/instance_methods_shoulda.rb",
224
+ "test/unit/lazy_document_shoulda.rb",
225
+ "test/unit/parser_instance.rb",
226
+ "test/unit/parser_methods_shoulda.rb",
227
+ "test/unit/solr_instance.rb",
228
+ "test/unit/test_helper.rb"
229
+ ]
230
+
231
+ if s.respond_to? :specification_version then
232
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
233
+ s.specification_version = 3
234
+
235
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
236
+ s.add_development_dependency(%q<thoughtbot-shoulda>, [">= 0"])
237
+ else
238
+ s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
239
+ end
240
+ else
241
+ s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
242
+ end
243
+ end