sunspot_mongoid 0.1.2 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -20,7 +20,7 @@ Example
20
20
  field :title
21
21
 
22
22
  include Sunspot::Mongoid
23
- sunspot_setup do
23
+ searchable do
24
24
  text :title
25
25
  end
26
26
  end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.2
1
+ 0.2.0
data/examples/example.rb CHANGED
@@ -11,7 +11,7 @@ class Post
11
11
  field :title
12
12
 
13
13
  include Sunspot::Mongoid
14
- sunspot_setup do
14
+ searchable do
15
15
  text :title
16
16
  end
17
17
  end
@@ -15,7 +15,7 @@ module Sunspot
15
15
  extend Sunspot::Rails::Searchable::ClassMethods
16
16
  include Sunspot::Rails::Searchable::InstanceMethods
17
17
 
18
- def self.sunspot_setup(options = {}, &block)
18
+ def self.searchable(options = {}, &block)
19
19
  Sunspot.setup(self, &block)
20
20
 
21
21
  class_inheritable_hash :sunspot_options
@@ -9,7 +9,7 @@ class TestSunspotMongoid < Test::Unit::TestCase
9
9
  field :title
10
10
 
11
11
  include Sunspot::Mongoid
12
- sunspot_setup do
12
+ searchable do
13
13
  text :title
14
14
  end
15
15
  end
@@ -19,7 +19,7 @@ class TestSunspotMongoid < Test::Unit::TestCase
19
19
  field :title
20
20
 
21
21
  include Sunspot::Mongoid
22
- sunspot_setup(:auto_index => false, :auto_remove => false) do
22
+ searchable(:auto_index => false, :auto_remove => false) do
23
23
  text :title
24
24
  end
25
25
  end
@@ -30,9 +30,9 @@ class TestSunspotMongoid < Test::Unit::TestCase
30
30
  assert Bar.sunspot_options == {:auto_index=>false, :auto_remove=>false, :include=>[]}
31
31
  end
32
32
 
33
- should 'be called Sunspot.setup when call Foo.sunspot_setup' do
33
+ should 'be called Sunspot.setup when call Foo.searchable' do
34
34
  mock(Sunspot).setup(Foo)
35
- Foo.sunspot_setup
35
+ Foo.searchable
36
36
  end
37
37
 
38
38
  should 'get as text_fields from Sunspot::Setup' do
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
- - 1
8
7
  - 2
9
- version: 0.1.2
8
+ - 0
9
+ version: 0.2.0
10
10
  platform: ruby
11
11
  authors:
12
12
  - jugyo