sunspot_rails 1.2.1 → 1.3.0.rc6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. data/.gitignore +7 -0
  2. data/.rspec +1 -0
  3. data/History.txt +15 -0
  4. data/README.rdoc +14 -7
  5. data/Rakefile +0 -6
  6. data/TESTING.md +32 -18
  7. data/dev_tasks/spec.rake +103 -18
  8. data/gemfiles/rails-2.3.14 +15 -0
  9. data/gemfiles/rails-3.0.10 +15 -0
  10. data/gemfiles/rails-3.1.1 +15 -0
  11. data/lib/sunspot/rails.rb +13 -6
  12. data/lib/sunspot/rails/configuration.rb +25 -4
  13. data/lib/sunspot/rails/log_subscriber.rb +33 -0
  14. data/lib/sunspot/rails/railtie.rb +10 -0
  15. data/lib/sunspot/rails/railties/controller_runtime.rb +36 -0
  16. data/lib/sunspot/rails/searchable.rb +88 -20
  17. data/lib/sunspot/rails/server.rb +10 -77
  18. data/lib/sunspot/rails/solr_instrumentation.rb +20 -0
  19. data/lib/sunspot/rails/solr_logging.rb +16 -17
  20. data/lib/sunspot/rails/stub_session_proxy.rb +56 -2
  21. data/lib/sunspot/rails/tasks.rb +56 -33
  22. data/lib/sunspot_rails.rb +5 -0
  23. data/spec/configuration_spec.rb +27 -5
  24. data/spec/model_lifecycle_spec.rb +1 -1
  25. data/spec/model_spec.rb +240 -1
  26. data/spec/rails_template/app/controllers/application_controller.rb +10 -0
  27. data/spec/rails_template/app/controllers/posts_controller.rb +6 -0
  28. data/spec/rails_template/app/models/author.rb +8 -0
  29. data/spec/rails_template/app/models/blog.rb +12 -0
  30. data/spec/rails_template/app/models/location.rb +2 -0
  31. data/spec/rails_template/app/models/photo_post.rb +2 -0
  32. data/spec/rails_template/app/models/post.rb +11 -0
  33. data/spec/rails_template/app/models/post_with_auto.rb +10 -0
  34. data/spec/rails_template/app/models/post_with_default_scope.rb +11 -0
  35. data/spec/rails_template/config/boot.rb +127 -0
  36. data/spec/rails_template/config/preinitializer.rb +22 -0
  37. data/spec/rails_template/config/routes.rb +9 -0
  38. data/spec/rails_template/config/sunspot.yml +22 -0
  39. data/spec/rails_template/db/schema.rb +27 -0
  40. data/spec/request_lifecycle_spec.rb +1 -1
  41. data/spec/searchable_spec.rb +12 -0
  42. data/spec/server_spec.rb +2 -6
  43. data/spec/session_spec.rb +35 -2
  44. data/spec/shared_examples/indexed_after_save.rb +8 -0
  45. data/spec/shared_examples/not_indexed_after_save.rb +8 -0
  46. data/spec/spec_helper.rb +4 -2
  47. data/spec/stub_session_proxy_spec.rb +2 -2
  48. data/sunspot_rails.gemspec +43 -0
  49. metadata +114 -44
  50. data/lib/sunspot/rails/version.rb +0 -5
@@ -0,0 +1,43 @@
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 = "sunspot_rails"
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 = 'http://github.com/outoftime/sunspot/tree/master/sunspot_rails'
17
+ s.summary = 'Rails integration for the Sunspot Solr search library'
18
+ s.description = <<-TEXT
19
+ Sunspot::Rails is an extension to the Sunspot library for Solr search.
20
+ Sunspot::Rails adds integration between Sunspot and ActiveRecord, including
21
+ defining search and indexing related methods on ActiveRecord models themselves,
22
+ running a Sunspot-compatible Solr instance for development and test
23
+ environments, and automatically commit Solr index changes at the end of each
24
+ Rails request.
25
+ TEXT
26
+
27
+ s.rubyforge_project = "sunspot"
28
+
29
+ s.files = `git ls-files`.split("\n")
30
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
31
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
32
+ s.require_paths = ["lib"]
33
+
34
+ s.add_dependency 'sunspot', Sunspot::VERSION
35
+ s.add_dependency 'nokogiri'
36
+
37
+ s.add_development_dependency 'rspec', '~> 1.2'
38
+ s.add_development_dependency 'rspec-rails', '~> 1.2'
39
+
40
+ s.rdoc_options << '--webcvs=http://github.com/outoftime/sunspot/tree/master/%s' <<
41
+ '--title' << 'Sunspot-Rails - Rails integration for the Sunspot Solr search library - API Documentation' <<
42
+ '--main' << 'README.rdoc'
43
+ end
metadata CHANGED
@@ -1,29 +1,41 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sunspot_rails
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: false
4
+ hash: 15424009
5
+ prerelease: 6
5
6
  segments:
6
7
  - 1
7
- - 2
8
- - 1
9
- version: 1.2.1
8
+ - 3
9
+ - 0
10
+ - rc
11
+ - 6
12
+ version: 1.3.0.rc6
10
13
  platform: ruby
11
14
  authors:
12
15
  - Mat Brown
13
16
  - Peer Allan
14
- - Michael Moen
17
+ - Dmitriy Dzema
15
18
  - Benjamin Krause
16
- - Adam Salter
19
+ - Marcel de Graaf
17
20
  - Brandon Keepers
18
- - Paul Canavese
19
- - John Eberly
20
- - Gert Thiel
21
+ - Peter Berkenbosch
22
+ - Brian Atkinson
23
+ - Tom Coleman
24
+ - Matt Mitchell
25
+ - Nathan Beyer
26
+ - Kieran Topping
27
+ - Nicolas Braem
28
+ - Jeremy Ashkenas
29
+ - Dylan Vaughn
30
+ - Brian Durand
31
+ - Sam Granieri
32
+ - Nick Zadrozny
33
+ - Jason Ronallo
21
34
  autorequire:
22
35
  bindir: bin
23
36
  cert_chain: []
24
37
 
25
- date: 2010-12-29 00:00:00 -07:00
26
- default_executable:
38
+ date: 2011-11-03 00:00:00 Z
27
39
  dependencies:
28
40
  - !ruby/object:Gem::Dependency
29
41
  name: sunspot
@@ -33,11 +45,14 @@ dependencies:
33
45
  requirements:
34
46
  - - "="
35
47
  - !ruby/object:Gem::Version
48
+ hash: 15424009
36
49
  segments:
37
50
  - 1
38
- - 2
39
- - 1
40
- version: 1.2.1
51
+ - 3
52
+ - 0
53
+ - rc
54
+ - 6
55
+ version: 1.3.0.rc6
41
56
  type: :runtime
42
57
  version_requirements: *id001
43
58
  - !ruby/object:Gem::Dependency
@@ -48,6 +63,7 @@ dependencies:
48
63
  requirements:
49
64
  - - ">="
50
65
  - !ruby/object:Gem::Version
66
+ hash: 3
51
67
  segments:
52
68
  - 0
53
69
  version: "0"
@@ -61,6 +77,7 @@ dependencies:
61
77
  requirements:
62
78
  - - ~>
63
79
  - !ruby/object:Gem::Version
80
+ hash: 11
64
81
  segments:
65
82
  - 1
66
83
  - 2
@@ -75,21 +92,16 @@ dependencies:
75
92
  requirements:
76
93
  - - ~>
77
94
  - !ruby/object:Gem::Version
95
+ hash: 11
78
96
  segments:
79
97
  - 1
80
98
  - 2
81
99
  version: "1.2"
82
100
  type: :development
83
101
  version_requirements: *id004
84
- description: |
85
- Sunspot::Rails is an extension to the Sunspot library for Solr search.
86
- Sunspot::Rails adds integration between Sunspot and ActiveRecord, including
87
- defining search and indexing related methods on ActiveRecord models themselves,
88
- running a Sunspot-compatible Solr instance for development and test
89
- environments, and automatically commit Solr index changes at the end of each
90
- Rails request.
91
-
92
- email: mat@patch.com
102
+ description: " Sunspot::Rails is an extension to the Sunspot library for Solr search.\n Sunspot::Rails adds integration between Sunspot and ActiveRecord, including\n defining search and indexing related methods on ActiveRecord models themselves,\n running a Sunspot-compatible Solr instance for development and test\n environments, and automatically commit Solr index changes at the end of each\n Rails request.\n"
103
+ email:
104
+ - mat@patch.com
93
105
  executables: []
94
106
 
95
107
  extensions: []
@@ -97,54 +109,83 @@ extensions: []
97
109
  extra_rdoc_files: []
98
110
 
99
111
  files:
112
+ - .gitignore
113
+ - .rspec
100
114
  - History.txt
101
115
  - LICENSE
102
116
  - MIT-LICENSE
103
- - Rakefile
104
117
  - README.rdoc
118
+ - Rakefile
105
119
  - TESTING.md
106
120
  - TODO
107
121
  - VERSION.yml
122
+ - dev_tasks/rdoc.rake
123
+ - dev_tasks/release.rake
124
+ - dev_tasks/spec.rake
125
+ - dev_tasks/todo.rake
126
+ - gemfiles/rails-2.3.14
127
+ - gemfiles/rails-3.0.10
128
+ - gemfiles/rails-3.1.1
129
+ - generators/sunspot/sunspot_generator.rb
130
+ - generators/sunspot/templates/sunspot.yml
131
+ - install.rb
132
+ - lib/generators/sunspot_rails.rb
108
133
  - lib/generators/sunspot_rails/install/install_generator.rb
109
134
  - lib/generators/sunspot_rails/install/templates/config/sunspot.yml
110
- - lib/generators/sunspot_rails.rb
135
+ - lib/sunspot/rails.rb
111
136
  - lib/sunspot/rails/adapters.rb
112
137
  - lib/sunspot/rails/configuration.rb
113
138
  - lib/sunspot/rails/init.rb
139
+ - lib/sunspot/rails/log_subscriber.rb
114
140
  - lib/sunspot/rails/railtie.rb
141
+ - lib/sunspot/rails/railties/controller_runtime.rb
115
142
  - lib/sunspot/rails/request_lifecycle.rb
116
143
  - lib/sunspot/rails/searchable.rb
117
144
  - lib/sunspot/rails/server.rb
145
+ - lib/sunspot/rails/solr_instrumentation.rb
118
146
  - lib/sunspot/rails/solr_logging.rb
119
147
  - lib/sunspot/rails/spec_helper.rb
120
148
  - lib/sunspot/rails/stub_session_proxy.rb
121
149
  - lib/sunspot/rails/tasks.rb
122
- - lib/sunspot/rails/version.rb
123
- - lib/sunspot/rails.rb
124
150
  - lib/sunspot_rails.rb
125
- - dev_tasks/rdoc.rake
126
- - dev_tasks/release.rake
127
- - dev_tasks/spec.rake
128
- - dev_tasks/todo.rake
129
- - generators/sunspot/sunspot_generator.rb
130
- - generators/sunspot/templates/sunspot.yml
131
- - install.rb
132
151
  - spec/configuration_spec.rb
133
152
  - spec/model_lifecycle_spec.rb
134
153
  - spec/model_spec.rb
154
+ - spec/rails_template/app/controllers/application_controller.rb
155
+ - spec/rails_template/app/controllers/posts_controller.rb
156
+ - spec/rails_template/app/models/author.rb
157
+ - spec/rails_template/app/models/blog.rb
158
+ - spec/rails_template/app/models/location.rb
159
+ - spec/rails_template/app/models/photo_post.rb
160
+ - spec/rails_template/app/models/post.rb
161
+ - spec/rails_template/app/models/post_with_auto.rb
162
+ - spec/rails_template/app/models/post_with_default_scope.rb
163
+ - spec/rails_template/config/boot.rb
164
+ - spec/rails_template/config/preinitializer.rb
165
+ - spec/rails_template/config/routes.rb
166
+ - spec/rails_template/config/sunspot.yml
167
+ - spec/rails_template/db/schema.rb
135
168
  - spec/request_lifecycle_spec.rb
136
169
  - spec/schema.rb
170
+ - spec/searchable_spec.rb
137
171
  - spec/server_spec.rb
138
172
  - spec/session_spec.rb
173
+ - spec/shared_examples/indexed_after_save.rb
174
+ - spec/shared_examples/not_indexed_after_save.rb
139
175
  - spec/spec_helper.rb
140
176
  - spec/stub_session_proxy_spec.rb
141
- has_rdoc: true
142
- homepage: http://github.com/outoftime/sunspot_rails
177
+ - sunspot_rails.gemspec
178
+ - tmp/.gitkeep
179
+ homepage: http://github.com/outoftime/sunspot/tree/master/sunspot_rails
143
180
  licenses: []
144
181
 
145
182
  post_install_message:
146
- rdoc_options: []
147
-
183
+ rdoc_options:
184
+ - --webcvs=http://github.com/outoftime/sunspot/tree/master/%s
185
+ - --title
186
+ - Sunspot-Rails - Rails integration for the Sunspot Solr search library - API Documentation
187
+ - --main
188
+ - README.rdoc
148
189
  require_paths:
149
190
  - lib
150
191
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -152,23 +193,52 @@ required_ruby_version: !ruby/object:Gem::Requirement
152
193
  requirements:
153
194
  - - ">="
154
195
  - !ruby/object:Gem::Version
196
+ hash: 3
155
197
  segments:
156
198
  - 0
157
199
  version: "0"
158
200
  required_rubygems_version: !ruby/object:Gem::Requirement
159
201
  none: false
160
202
  requirements:
161
- - - ">="
203
+ - - ">"
162
204
  - !ruby/object:Gem::Version
205
+ hash: 25
163
206
  segments:
164
- - 0
165
- version: "0"
207
+ - 1
208
+ - 3
209
+ - 1
210
+ version: 1.3.1
166
211
  requirements: []
167
212
 
168
213
  rubyforge_project: sunspot
169
- rubygems_version: 1.3.7
214
+ rubygems_version: 1.8.10
170
215
  signing_key:
171
216
  specification_version: 3
172
217
  summary: Rails integration for the Sunspot Solr search library
173
- test_files: []
174
-
218
+ test_files:
219
+ - spec/configuration_spec.rb
220
+ - spec/model_lifecycle_spec.rb
221
+ - spec/model_spec.rb
222
+ - spec/rails_template/app/controllers/application_controller.rb
223
+ - spec/rails_template/app/controllers/posts_controller.rb
224
+ - spec/rails_template/app/models/author.rb
225
+ - spec/rails_template/app/models/blog.rb
226
+ - spec/rails_template/app/models/location.rb
227
+ - spec/rails_template/app/models/photo_post.rb
228
+ - spec/rails_template/app/models/post.rb
229
+ - spec/rails_template/app/models/post_with_auto.rb
230
+ - spec/rails_template/app/models/post_with_default_scope.rb
231
+ - spec/rails_template/config/boot.rb
232
+ - spec/rails_template/config/preinitializer.rb
233
+ - spec/rails_template/config/routes.rb
234
+ - spec/rails_template/config/sunspot.yml
235
+ - spec/rails_template/db/schema.rb
236
+ - spec/request_lifecycle_spec.rb
237
+ - spec/schema.rb
238
+ - spec/searchable_spec.rb
239
+ - spec/server_spec.rb
240
+ - spec/session_spec.rb
241
+ - spec/shared_examples/indexed_after_save.rb
242
+ - spec/shared_examples/not_indexed_after_save.rb
243
+ - spec/spec_helper.rb
244
+ - spec/stub_session_proxy_spec.rb
@@ -1,5 +0,0 @@
1
- module Sunspot
2
- module Rails
3
- VERSION = '1.2.1'
4
- end
5
- end