ripplr 0.0.5.beta → 0.0.6.beta

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -29,7 +29,7 @@ module Ripplr
29
29
  end
30
30
 
31
31
  module QueryableClassMethods
32
- def find(property, query, indices=Ripplr::Indexers::Ripple)
32
+ def search(property, query, indices=Ripplr::Indexers::Ripple)
33
33
  indices.search self, "#{queryable_field(property)}: \"#{query}\""
34
34
  end
35
35
 
@@ -1,3 +1,3 @@
1
1
  module Ripplr
2
- VERSION = "0.0.5.beta"
2
+ VERSION = "0.0.6.beta"
3
3
  end
@@ -15,20 +15,20 @@ describe Ripplr::Queryable do
15
15
  Then { Person.new.bucket_name.should == "people" }
16
16
  end
17
17
 
18
- describe "#find" do
18
+ describe "#search" do
19
19
  context "when using a field that has been defiend as queryable" do
20
20
  Given (:indexer) { mock }
21
21
  Given { indexer.should_receive(:search).with(Person,"first_name_text: \"Dan\"").and_return ["Dan Auerbach"] }
22
- When (:result) { Person.find :first_name, "Dan", indexer }
22
+ When (:result) { Person.search :first_name, "Dan", indexer }
23
23
  Then { result.should == [ "Dan Auerbach" ] }
24
24
  end
25
25
 
26
26
  context "when using a field that has not been defined as queryable" do
27
- Then { expect { Person.find :full_name, "val" }.to raise_error RuntimeError }
27
+ Then { expect { Person.search :full_name, "val" }.to raise_error RuntimeError }
28
28
  end
29
29
 
30
30
  context "when the object does not have any queryable fields" do
31
- Then { expect { Unqueryable.find :something, "what what" }.to raise_error RuntimeError }
31
+ Then { expect { Unqueryable.search :something, "what what" }.to raise_error RuntimeError }
32
32
  end
33
33
  end
34
34
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ripplr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5.beta
4
+ version: 0.0.6.beta
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors: