riak-client 0.8.3 → 0.9.0.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.
@@ -24,6 +24,7 @@ describe "Search mixins" do
24
24
  @http = mock(Riak::Client::HTTPBackend)
25
25
  @client.stub!(:http).and_return(@http)
26
26
  end
27
+
27
28
  describe "searching" do
28
29
  it "should exclude the index from the URL when not specified" do
29
30
  @http.should_receive(:get).with(200, "/solr", "select", hash_including("q" => "foo"), {}).and_return({:code => 200, :headers => {"content-type"=>["application/json"]}, :body => "{}"})
@@ -77,6 +78,7 @@ describe "Search mixins" do
77
78
  @client.index({'id' => 1, 'field' => "value"}, {'id' => 2, 'foo' => "bar"})
78
79
  end
79
80
  end
81
+
80
82
  describe "removing documents" do
81
83
  it "should exclude the index from the URL when not specified" do
82
84
  @http.should_receive(:post).with(200, "/solr","update", anything, anything).and_return({:code => 200, :headers => {'content-type' => ['text/html']}, :body => ""})
@@ -119,32 +121,19 @@ describe "Search mixins" do
119
121
  @bucket = Riak::Bucket.new(@client, "foo")
120
122
  end
121
123
 
122
- def do_load(overrides={})
123
- @bucket.load({
124
- :body => '{"props":{"name":"foo","n_val":3,"allow_mult":false,"last_write_wins":false,"precommit":[],"postcommit":[],"chash_keyfun":{"mod":"riak_core_util","fun":"chash_std_keyfun"},"linkfun":{"mod":"riak_kv_wm_link_walker","fun":"mapreduce_linkfun"},"old_vclock":86400,"young_vclock":20,"big_vclock":50,"small_vclock":10,"r":"quorum","w":"quorum","dw":"quorum","rw":"quorum"},"keys":["bar"]}',
125
- :headers => {
126
- "vary" => ["Accept-Encoding"],
127
- "server" => ["MochiWeb/1.1 WebMachine/1.5.1 (hack the charles gibson)"],
128
- "link" => ['</riak/foo/bar>; riaktag="contained"'],
129
- "date" => ["Tue, 12 Jan 2010 15:30:43 GMT"],
130
- "content-type" => ["application/json"],
131
- "content-length" => ["257"]
132
- }
133
- }.merge(overrides))
124
+ def load_without_index_hook
125
+ @bucket.instance_variable_set(:@props, {"precommit" => []})
134
126
  end
135
- alias :load_without_index_hook :do_load
136
127
 
137
128
  def load_with_index_hook
138
- do_load(:body => '{"props":{"precommit":[{"mod":"riak_search_kv_hook","fun":"precommit"}]}}')
129
+ @bucket.instance_variable_set(:@props, {"precommit" => [{"mod" => "riak_search_kv_hook", "fun" => "precommit"}]})
139
130
  end
140
131
 
141
132
  it "should detect whether the indexing hook is installed" do
142
133
  load_without_index_hook
143
- @bucket.props['precommit'].should be_empty
144
134
  @bucket.is_indexed?.should be_false
145
135
 
146
136
  load_with_index_hook
147
- @bucket.props['precommit'].should_not be_empty
148
137
  @bucket.is_indexed?.should be_true
149
138
  end
150
139
 
@@ -33,7 +33,7 @@ end
33
33
 
34
34
  Dir[File.join(File.dirname(__FILE__), "support", "*.rb")].each {|f| require f }
35
35
 
36
- Rspec.configure do |config|
36
+ RSpec.configure do |config|
37
37
  config.mock_with :rspec
38
38
 
39
39
  config.before(:each) do
metadata CHANGED
@@ -1,12 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: riak-client
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: false
4
+ hash: 31098121
5
+ prerelease: true
5
6
  segments:
6
7
  - 0
7
- - 8
8
- - 3
9
- version: 0.8.3
8
+ - 9
9
+ - 0
10
+ - beta
11
+ version: 0.9.0.beta
10
12
  platform: ruby
11
13
  authors:
12
14
  - Sean Cribbs
@@ -14,7 +16,7 @@ autorequire:
14
16
  bindir: bin
15
17
  cert_chain: []
16
18
 
17
- date: 2010-12-13 00:00:00 -06:00
19
+ date: 2010-12-29 00:00:00 -06:00
18
20
  default_executable:
19
21
  dependencies:
20
22
  - !ruby/object:Gem::Dependency
@@ -25,6 +27,7 @@ dependencies:
25
27
  requirements:
26
28
  - - ~>
27
29
  - !ruby/object:Gem::Version
30
+ hash: 15
28
31
  segments:
29
32
  - 2
30
33
  - 0
@@ -40,6 +43,7 @@ dependencies:
40
43
  requirements:
41
44
  - - ">="
42
45
  - !ruby/object:Gem::Version
46
+ hash: 11
43
47
  segments:
44
48
  - 1
45
49
  - 2
@@ -54,6 +58,7 @@ dependencies:
54
58
  requirements:
55
59
  - - ">="
56
60
  - !ruby/object:Gem::Version
61
+ hash: 15
57
62
  segments:
58
63
  - 1
59
64
  - 0
@@ -68,6 +73,7 @@ dependencies:
68
73
  requirements:
69
74
  - - ">="
70
75
  - !ruby/object:Gem::Version
76
+ hash: 7
71
77
  segments:
72
78
  - 0
73
79
  - 6
@@ -82,6 +88,7 @@ dependencies:
82
88
  requirements:
83
89
  - - ~>
84
90
  - !ruby/object:Gem::Version
91
+ hash: 27
85
92
  segments:
86
93
  - 0
87
94
  - 3
@@ -97,6 +104,7 @@ dependencies:
97
104
  requirements:
98
105
  - - ">="
99
106
  - !ruby/object:Gem::Version
107
+ hash: 15
100
108
  segments:
101
109
  - 0
102
110
  - 4
@@ -112,6 +120,7 @@ dependencies:
112
120
  requirements:
113
121
  - - ~>
114
122
  - !ruby/object:Gem::Version
123
+ hash: 15
115
124
  segments:
116
125
  - 2
117
126
  - 1
@@ -136,6 +145,10 @@ files:
136
145
  - lib/riak/cache_store.rb
137
146
  - lib/riak/client/curb_backend.rb
138
147
  - lib/riak/client/excon_backend.rb
148
+ - lib/riak/client/http_backend/configuration.rb
149
+ - lib/riak/client/http_backend/object_methods.rb
150
+ - lib/riak/client/http_backend/request_headers.rb
151
+ - lib/riak/client/http_backend/transport_methods.rb
139
152
  - lib/riak/client/http_backend.rb
140
153
  - lib/riak/client/net_http_backend.rb
141
154
  - lib/riak/client.rb
@@ -151,6 +164,8 @@ files:
151
164
  - lib/riak/invalid_response.rb
152
165
  - lib/riak/link.rb
153
166
  - lib/riak/locale/en.yml
167
+ - lib/riak/map_reduce/filter_builder.rb
168
+ - lib/riak/map_reduce/phase.rb
154
169
  - lib/riak/map_reduce.rb
155
170
  - lib/riak/map_reduce_error.rb
156
171
  - lib/riak/robject.rb
@@ -177,6 +192,7 @@ files:
177
192
  - spec/riak/escape_spec.rb
178
193
  - spec/riak/excon_backend_spec.rb
179
194
  - spec/riak/headers_spec.rb
195
+ - spec/riak/http_backend/object_methods_spec.rb
180
196
  - spec/riak/http_backend_spec.rb
181
197
  - spec/riak/link_spec.rb
182
198
  - spec/riak/map_reduce_spec.rb
@@ -205,17 +221,21 @@ required_ruby_version: !ruby/object:Gem::Requirement
205
221
  requirements:
206
222
  - - ">="
207
223
  - !ruby/object:Gem::Version
224
+ hash: 3
208
225
  segments:
209
226
  - 0
210
227
  version: "0"
211
228
  required_rubygems_version: !ruby/object:Gem::Requirement
212
229
  none: false
213
230
  requirements:
214
- - - ">="
231
+ - - ">"
215
232
  - !ruby/object:Gem::Version
233
+ hash: 25
216
234
  segments:
217
- - 0
218
- version: "0"
235
+ - 1
236
+ - 3
237
+ - 1
238
+ version: 1.3.1
219
239
  requirements: []
220
240
 
221
241
  rubyforge_project:
@@ -233,6 +253,7 @@ test_files:
233
253
  - spec/riak/escape_spec.rb
234
254
  - spec/riak/excon_backend_spec.rb
235
255
  - spec/riak/headers_spec.rb
256
+ - spec/riak/http_backend/object_methods_spec.rb
236
257
  - spec/riak/http_backend_spec.rb
237
258
  - spec/riak/link_spec.rb
238
259
  - spec/riak/map_reduce_spec.rb