sphinxsearchlogic 0.9.1 → 0.9.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +5 -6
- data/lib/rails_helpers.rb +1 -1
- data/lib/sphinxsearchlogic.rb +3 -1
- metadata +19 -8
data/README.rdoc
CHANGED
@@ -19,16 +19,15 @@ If you're not familiar with ThinkingSphinx check {this presentation!}[http://www
|
|
19
19
|
First you need Sphinx and ThinkingSphinx. Simply because they rock. Check the ThinkingSphinx pages for this.
|
20
20
|
Use the gem in your environment.rb like:
|
21
21
|
|
22
|
-
config.gem
|
22
|
+
config.gem 'thinking-sphinx', :source => 'http://gemcutter.org'
|
23
23
|
|
24
|
-
Install as gem from
|
24
|
+
Install as gem from Gemcutter.org (recommended).
|
25
25
|
|
26
|
-
gem
|
27
|
-
sudo gem install joost-sphinxsearchlogic
|
26
|
+
sudo gem install sphinxsearchlogic -s http://gemcutter.org
|
28
27
|
|
29
28
|
Next use it in your environment.rb like:
|
30
29
|
|
31
|
-
config.gem '
|
30
|
+
config.gem 'sphinxsearchlogic', :source => 'http://gemcutter.org'
|
32
31
|
|
33
32
|
Install as plugin from Github.
|
34
33
|
|
@@ -158,4 +157,4 @@ On the Model you want to search specify the defaults for the search. Eg. on the
|
|
158
157
|
sphinxsearchlogic_max_per_page = 100
|
159
158
|
sphinxsearchlogic_match_mode = :any
|
160
159
|
|
161
|
-
Copyright (c)
|
160
|
+
Copyright (c) 2010 Joost Hietbrink, released under the MIT license
|
data/lib/rails_helpers.rb
CHANGED
@@ -34,7 +34,7 @@ module Sphinxsearchlogic
|
|
34
34
|
end
|
35
35
|
html_options[:class] = css_classes.join(" ")
|
36
36
|
end
|
37
|
-
params = controller.params.clone
|
37
|
+
params = controller.params.dup # Stopped using clone, see http://github.com/joost/sphinxsearchlogic/issues#issue/3
|
38
38
|
params[options[:params_scope]] ||= {}
|
39
39
|
params[options[:params_scope]].merge!(:order => new_scope)
|
40
40
|
url_options = {:controller => params[:controller], :action => params[:action], options[:params_scope] => params[options[:params_scope]]}
|
data/lib/sphinxsearchlogic.rb
CHANGED
@@ -207,7 +207,8 @@ module Sphinxsearchlogic
|
|
207
207
|
end
|
208
208
|
else
|
209
209
|
if name =~ /^with(out|_all)?_(\w+)$/
|
210
|
-
attribute_name = $2
|
210
|
+
attribute_name = $2
|
211
|
+
attribute_name = attribute_name.gsub(/_before_type_cast)$/, '').to_sym
|
211
212
|
if is_sphinx_attribute?(attribute_name)
|
212
213
|
# Put in with / without / with_all depending on what the regexp matched.
|
213
214
|
if $1 == 'out'
|
@@ -264,6 +265,7 @@ module Sphinxsearchlogic
|
|
264
265
|
|
265
266
|
# Returns the ThinkingSphinx index for the klass we search on.
|
266
267
|
def sphinx_index
|
268
|
+
klass.define_indexes if klass.sphinx_indexes.blank?
|
267
269
|
klass.sphinx_indexes.first
|
268
270
|
end
|
269
271
|
|
metadata
CHANGED
@@ -1,7 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sphinxsearchlogic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 9
|
8
|
+
- 2
|
9
|
+
version: 0.9.2
|
5
10
|
platform: ruby
|
6
11
|
authors:
|
7
12
|
- Joost Hietbrink
|
@@ -14,14 +19,18 @@ default_executable:
|
|
14
19
|
dependencies:
|
15
20
|
- !ruby/object:Gem::Dependency
|
16
21
|
name: activerecord
|
17
|
-
|
18
|
-
|
19
|
-
version_requirements: !ruby/object:Gem::Requirement
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
20
24
|
requirements:
|
21
25
|
- - ">="
|
22
26
|
- !ruby/object:Gem::Version
|
27
|
+
segments:
|
28
|
+
- 2
|
29
|
+
- 0
|
30
|
+
- 0
|
23
31
|
version: 2.0.0
|
24
|
-
|
32
|
+
type: :runtime
|
33
|
+
version_requirements: *id001
|
25
34
|
description: Searchlogic provides common named scopes and object based searching for ActiveRecord.
|
26
35
|
email: joost@joopp.com
|
27
36
|
executables: []
|
@@ -56,18 +65,20 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
56
65
|
requirements:
|
57
66
|
- - ">="
|
58
67
|
- !ruby/object:Gem::Version
|
68
|
+
segments:
|
69
|
+
- 0
|
59
70
|
version: "0"
|
60
|
-
version:
|
61
71
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
62
72
|
requirements:
|
63
73
|
- - ">="
|
64
74
|
- !ruby/object:Gem::Version
|
75
|
+
segments:
|
76
|
+
- 0
|
65
77
|
version: "0"
|
66
|
-
version:
|
67
78
|
requirements: []
|
68
79
|
|
69
80
|
rubyforge_project: sphinxsearchlogic
|
70
|
-
rubygems_version: 1.3.
|
81
|
+
rubygems_version: 1.3.6
|
71
82
|
signing_key:
|
72
83
|
specification_version: 3
|
73
84
|
summary: Sphinxsearchlogic is for ThinkingSphinx what Searchlogic is for ActiveRecord.. or at least something similar.
|