ripplr 0.0.8.beta → 0.0.9.beta

Sign up to get free protection for your applications and to get access to all the features.
@@ -6,7 +6,7 @@ module Ripplr
6
6
  end
7
7
 
8
8
  def self.search(klass, query, options={})
9
- results = ::Ripple.client.search(klass.bucket.name, query)["response"]["docs"]
9
+ results = ::Ripple.client.search(klass.bucket.name, query, options)["response"]["docs"]
10
10
  results.map{|result| klass.find(result["id"])}.reject{|obj| obj.nil?}
11
11
  end
12
12
  end
@@ -1,3 +1,3 @@
1
1
  module Ripplr
2
- VERSION = "0.0.8.beta"
2
+ VERSION = "0.0.9.beta"
3
3
  end
@@ -11,7 +11,7 @@ describe Ripplr::Indexers::Ripple do
11
11
  describe "#search" do
12
12
  context "when no documents match" do
13
13
  Given (:results) { {"response" => {"docs" => []} } }
14
- Given { Ripple.client.should_receive(:search).with('people', 'query string').and_return results }
14
+ Given { Ripple.client.should_receive(:search).with('people', 'query string', {}).and_return results }
15
15
  When(:result) { Ripplr::Indexers::Ripple.search Person, 'query string' }
16
16
  Then { result.should be_empty }
17
17
  end
@@ -19,7 +19,7 @@ describe Ripplr::Indexers::Ripple do
19
19
  context "when one document matches" do
20
20
  Given (:results) { {"response" => {"docs" => [ { "id" => "12345"} ]} } }
21
21
  Given { Person.should_receive(:find).with("12345").and_return "yo dawg" }
22
- Given { Ripple.client.should_receive(:search).with('people', 'query string').and_return results }
22
+ Given { Ripple.client.should_receive(:search).with('people', 'query string', {}).and_return results }
23
23
  When(:result) { Ripplr::Indexers::Ripple.search Person, 'query string' }
24
24
  Then { result.first.should == "yo dawg" }
25
25
  end
@@ -27,7 +27,7 @@ describe Ripplr::Indexers::Ripple do
27
27
  context "when one document matches but it doesnt exist" do
28
28
  Given (:results) { {"response" => {"docs" => [ { "id" => "12345"} ]} } }
29
29
  Given { Person.should_receive(:find).with("12345").and_return nil }
30
- Given { Ripple.client.should_receive(:search).with('people', 'query string').and_return results }
30
+ Given { Ripple.client.should_receive(:search).with('people', 'query string', {}).and_return results }
31
31
  When(:result) { Ripplr::Indexers::Ripple.search Person, 'query string' }
32
32
  Then { result.should be_empty }
33
33
  end
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.8.beta
4
+ version: 0.0.9.beta
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors: