sunspot_mongoid 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/lib/sunspot/mongoid.rb +1 -27
  3. metadata +3 -18
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.0
1
+ 0.3.1
@@ -18,35 +18,9 @@ module Sunspot
18
18
  module Mongoid
19
19
  def self.included(base)
20
20
  base.class_eval do
21
+ extend Sunspot::Rails::Searchable::ActsAsMethods
21
22
  Sunspot::Adapters::DataAccessor.register(DataAccessor, base)
22
23
  Sunspot::Adapters::InstanceAdapter.register(InstanceAdapter, base)
23
-
24
- extend Sunspot::Rails::Searchable::ClassMethods
25
- include Sunspot::Rails::Searchable::InstanceMethods
26
-
27
- extend Sunspot::Mongoid::ClassMethods
28
- end
29
- end
30
-
31
- module ClassMethods
32
- def searchable(options = {}, &block)
33
- Sunspot.setup(self, &block)
34
-
35
- class_inheritable_hash :sunspot_options
36
-
37
- unless options[:auto_index] == false
38
- before_save :maybe_mark_for_auto_indexing
39
- after_save :maybe_auto_index
40
- end
41
-
42
- unless options[:auto_remove] == false
43
- after_destroy do |searchable|
44
- searchable.remove_from_index
45
- end
46
- end
47
- options[:include] = Sunspot::Util::Array(options[:include])
48
-
49
- self.sunspot_options = options
50
24
  end
51
25
  end
52
26
 
metadata CHANGED
@@ -1,13 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sunspot_mongoid
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
5
4
  prerelease: false
6
5
  segments:
7
6
  - 0
8
7
  - 3
9
- - 0
10
- version: 0.3.0
8
+ - 1
9
+ version: 0.3.1
11
10
  platform: ruby
12
11
  authors:
13
12
  - jugyo
@@ -22,11 +21,9 @@ dependencies:
22
21
  name: mongoid
23
22
  prerelease: false
24
23
  requirement: &id001 !ruby/object:Gem::Requirement
25
- none: false
26
24
  requirements:
27
25
  - - ">="
28
26
  - !ruby/object:Gem::Version
29
- hash: 3
30
27
  segments:
31
28
  - 0
32
29
  version: "0"
@@ -36,11 +33,9 @@ dependencies:
36
33
  name: sunspot
37
34
  prerelease: false
38
35
  requirement: &id002 !ruby/object:Gem::Requirement
39
- none: false
40
36
  requirements:
41
37
  - - ">="
42
38
  - !ruby/object:Gem::Version
43
- hash: 19
44
39
  segments:
45
40
  - 1
46
41
  - 1
@@ -52,11 +47,9 @@ dependencies:
52
47
  name: sunspot_rails
53
48
  prerelease: false
54
49
  requirement: &id003 !ruby/object:Gem::Requirement
55
- none: false
56
50
  requirements:
57
51
  - - ">="
58
52
  - !ruby/object:Gem::Version
59
- hash: 19
60
53
  segments:
61
54
  - 1
62
55
  - 1
@@ -68,11 +61,9 @@ dependencies:
68
61
  name: shoulda
69
62
  prerelease: false
70
63
  requirement: &id004 !ruby/object:Gem::Requirement
71
- none: false
72
64
  requirements:
73
65
  - - ">="
74
66
  - !ruby/object:Gem::Version
75
- hash: 3
76
67
  segments:
77
68
  - 0
78
69
  version: "0"
@@ -82,11 +73,9 @@ dependencies:
82
73
  name: rr
83
74
  prerelease: false
84
75
  requirement: &id005 !ruby/object:Gem::Requirement
85
- none: false
86
76
  requirements:
87
77
  - - ">="
88
78
  - !ruby/object:Gem::Version
89
- hash: 3
90
79
  segments:
91
80
  - 0
92
81
  version: "0"
@@ -124,27 +113,23 @@ rdoc_options:
124
113
  require_paths:
125
114
  - lib
126
115
  required_ruby_version: !ruby/object:Gem::Requirement
127
- none: false
128
116
  requirements:
129
117
  - - ">="
130
118
  - !ruby/object:Gem::Version
131
- hash: 3
132
119
  segments:
133
120
  - 0
134
121
  version: "0"
135
122
  required_rubygems_version: !ruby/object:Gem::Requirement
136
- none: false
137
123
  requirements:
138
124
  - - ">="
139
125
  - !ruby/object:Gem::Version
140
- hash: 3
141
126
  segments:
142
127
  - 0
143
128
  version: "0"
144
129
  requirements: []
145
130
 
146
131
  rubyforge_project:
147
- rubygems_version: 1.3.7
132
+ rubygems_version: 1.3.6
148
133
  signing_key:
149
134
  specification_version: 3
150
135
  summary: A Sunspot wrapper for Mongoid.