couchbase 1.3.4-x64-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (92) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +15 -0
  3. data/.travis.yml +22 -0
  4. data/.yardopts +5 -0
  5. data/CONTRIBUTING.markdown +75 -0
  6. data/Gemfile +4 -0
  7. data/LICENSE +201 -0
  8. data/Makefile +3 -0
  9. data/README.markdown +649 -0
  10. data/RELEASE_NOTES.markdown +796 -0
  11. data/Rakefile +20 -0
  12. data/couchbase.gemspec +49 -0
  13. data/examples/chat-em/Gemfile +7 -0
  14. data/examples/chat-em/README.markdown +45 -0
  15. data/examples/chat-em/server.rb +82 -0
  16. data/examples/chat-goliath-grape/Gemfile +5 -0
  17. data/examples/chat-goliath-grape/README.markdown +50 -0
  18. data/examples/chat-goliath-grape/app.rb +67 -0
  19. data/examples/chat-goliath-grape/config/app.rb +20 -0
  20. data/examples/transcoders/Gemfile +3 -0
  21. data/examples/transcoders/README.markdown +59 -0
  22. data/examples/transcoders/cb-zcat +40 -0
  23. data/examples/transcoders/cb-zcp +45 -0
  24. data/examples/transcoders/gzip_transcoder.rb +49 -0
  25. data/examples/transcoders/options.rb +54 -0
  26. data/ext/couchbase_ext/.gitignore +4 -0
  27. data/ext/couchbase_ext/arguments.c +956 -0
  28. data/ext/couchbase_ext/arithmetic.c +307 -0
  29. data/ext/couchbase_ext/bucket.c +1370 -0
  30. data/ext/couchbase_ext/context.c +65 -0
  31. data/ext/couchbase_ext/couchbase_ext.c +1364 -0
  32. data/ext/couchbase_ext/couchbase_ext.h +644 -0
  33. data/ext/couchbase_ext/delete.c +163 -0
  34. data/ext/couchbase_ext/eventmachine_plugin.c +452 -0
  35. data/ext/couchbase_ext/extconf.rb +168 -0
  36. data/ext/couchbase_ext/get.c +316 -0
  37. data/ext/couchbase_ext/gethrtime.c +129 -0
  38. data/ext/couchbase_ext/http.c +432 -0
  39. data/ext/couchbase_ext/multithread_plugin.c +1090 -0
  40. data/ext/couchbase_ext/observe.c +171 -0
  41. data/ext/couchbase_ext/plugin_common.c +171 -0
  42. data/ext/couchbase_ext/result.c +129 -0
  43. data/ext/couchbase_ext/stats.c +163 -0
  44. data/ext/couchbase_ext/store.c +542 -0
  45. data/ext/couchbase_ext/timer.c +192 -0
  46. data/ext/couchbase_ext/touch.c +186 -0
  47. data/ext/couchbase_ext/unlock.c +176 -0
  48. data/ext/couchbase_ext/utils.c +551 -0
  49. data/ext/couchbase_ext/version.c +142 -0
  50. data/lib/action_dispatch/middleware/session/couchbase_store.rb +38 -0
  51. data/lib/active_support/cache/couchbase_store.rb +430 -0
  52. data/lib/couchbase.rb +155 -0
  53. data/lib/couchbase/bucket.rb +457 -0
  54. data/lib/couchbase/cluster.rb +119 -0
  55. data/lib/couchbase/connection_pool.rb +58 -0
  56. data/lib/couchbase/constants.rb +12 -0
  57. data/lib/couchbase/result.rb +26 -0
  58. data/lib/couchbase/transcoder.rb +120 -0
  59. data/lib/couchbase/utils.rb +62 -0
  60. data/lib/couchbase/version.rb +21 -0
  61. data/lib/couchbase/view.rb +506 -0
  62. data/lib/couchbase/view_row.rb +272 -0
  63. data/lib/ext/multi_json_fix.rb +56 -0
  64. data/lib/rack/session/couchbase.rb +108 -0
  65. data/tasks/benchmark.rake +6 -0
  66. data/tasks/compile.rake +158 -0
  67. data/tasks/test.rake +100 -0
  68. data/tasks/util.rake +21 -0
  69. data/test/profile/.gitignore +1 -0
  70. data/test/profile/Gemfile +6 -0
  71. data/test/profile/benchmark.rb +195 -0
  72. data/test/setup.rb +178 -0
  73. data/test/test_arithmetic.rb +185 -0
  74. data/test/test_async.rb +316 -0
  75. data/test/test_bucket.rb +250 -0
  76. data/test/test_cas.rb +235 -0
  77. data/test/test_couchbase.rb +77 -0
  78. data/test/test_couchbase_connection_pool.rb +77 -0
  79. data/test/test_couchbase_rails_cache_store.rb +361 -0
  80. data/test/test_delete.rb +120 -0
  81. data/test/test_errors.rb +82 -0
  82. data/test/test_eventmachine.rb +70 -0
  83. data/test/test_format.rb +164 -0
  84. data/test/test_get.rb +407 -0
  85. data/test/test_stats.rb +57 -0
  86. data/test/test_store.rb +216 -0
  87. data/test/test_timer.rb +42 -0
  88. data/test/test_touch.rb +97 -0
  89. data/test/test_unlock.rb +119 -0
  90. data/test/test_utils.rb +58 -0
  91. data/test/test_version.rb +52 -0
  92. metadata +336 -0
@@ -0,0 +1,58 @@
1
+ # Author:: Couchbase <info@couchbase.com>
2
+ # Copyright:: 2011, 2012 Couchbase, Inc.
3
+ # License:: Apache License, Version 2.0
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+ #
17
+
18
+ require File.join(File.dirname(__FILE__), 'setup')
19
+
20
+ class TestUtils < MiniTest::Test
21
+
22
+ def setup
23
+ @mock = start_mock
24
+ end
25
+
26
+ def teardown
27
+ stop_mock(@mock)
28
+ end
29
+
30
+ def test_complex_startkey
31
+ assert_equal "all_docs?startkey=%5B%22Deadmau5%22%2C%22%22%5D", Couchbase::Utils.build_query("all_docs", :startkey => ["Deadmau5", ""])
32
+ end
33
+
34
+ def test_it_provides_enough_info_with_value_error
35
+ class << MultiJson
36
+ alias dump_good dump
37
+ def dump(obj)
38
+ raise ArgumentError, "cannot accept your object"
39
+ end
40
+ end
41
+ connection = Couchbase.new(:hostname => @mock.host, :port => @mock.port)
42
+ assert_raises(Couchbase::Error::ValueFormat) do
43
+ connection.set(uniq_id, "foo")
44
+ end
45
+ begin
46
+ connection.set(uniq_id, "foo")
47
+ rescue Couchbase::Error::ValueFormat => ex
48
+ assert_match /cannot accept your object/, ex.to_s
49
+ assert_instance_of ArgumentError, ex.inner_exception
50
+ end
51
+ ensure
52
+ class << MultiJson
53
+ undef dump
54
+ alias dump dump_good
55
+ end
56
+ end
57
+
58
+ end
@@ -0,0 +1,52 @@
1
+ # Author:: Couchbase <info@couchbase.com>
2
+ # Copyright:: 2011, 2012 Couchbase, Inc.
3
+ # License:: Apache License, Version 2.0
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+ #
17
+
18
+ require File.join(File.dirname(__FILE__), 'setup')
19
+
20
+ class TestVersion < MiniTest::Test
21
+
22
+ def setup
23
+ @mock = start_mock
24
+ end
25
+
26
+ def teardown
27
+ stop_mock(@mock)
28
+ end
29
+
30
+ def test_sync_version
31
+ connection = Couchbase.new(:hostname => @mock.host, :port => @mock.port)
32
+ ver = connection.version
33
+ assert ver.is_a?(Hash)
34
+ assert_equal @mock.num_nodes, ver.size
35
+ end
36
+
37
+ def test_async_version
38
+ connection = Couchbase.new(:hostname => @mock.host, :port => @mock.port)
39
+ ver = {}
40
+ connection.run do |conn|
41
+ conn.version do |ret|
42
+ assert ret.success?
43
+ ver[ret.node] = ret.value
44
+ end
45
+ end
46
+ assert_equal @mock.num_nodes, ver.size
47
+ ver.each do |node, v|
48
+ assert v.is_a?(String)
49
+ end
50
+ end
51
+
52
+ end
metadata ADDED
@@ -0,0 +1,336 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: couchbase
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.3.4
5
+ platform: x64-mingw32
6
+ authors:
7
+ - Couchbase
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-01-08 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: yaji
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: '0.3'
20
+ - - '>='
21
+ - !ruby/object:Gem::Version
22
+ version: 0.3.2
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: '0.3'
30
+ - - '>='
31
+ - !ruby/object:Gem::Version
32
+ version: 0.3.2
33
+ - !ruby/object:Gem::Dependency
34
+ name: multi_json
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - ~>
38
+ - !ruby/object:Gem::Version
39
+ version: '1.0'
40
+ type: :runtime
41
+ prerelease: false
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - ~>
45
+ - !ruby/object:Gem::Version
46
+ version: '1.0'
47
+ - !ruby/object:Gem::Dependency
48
+ name: connection_pool
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ~>
52
+ - !ruby/object:Gem::Version
53
+ version: '1.0'
54
+ - - '>='
55
+ - !ruby/object:Gem::Version
56
+ version: 1.0.0
57
+ type: :runtime
58
+ prerelease: false
59
+ version_requirements: !ruby/object:Gem::Requirement
60
+ requirements:
61
+ - - ~>
62
+ - !ruby/object:Gem::Version
63
+ version: '1.0'
64
+ - - '>='
65
+ - !ruby/object:Gem::Version
66
+ version: 1.0.0
67
+ - !ruby/object:Gem::Dependency
68
+ name: rake
69
+ requirement: !ruby/object:Gem::Requirement
70
+ requirements:
71
+ - - '>='
72
+ - !ruby/object:Gem::Version
73
+ version: '0'
74
+ type: :development
75
+ prerelease: false
76
+ version_requirements: !ruby/object:Gem::Requirement
77
+ requirements:
78
+ - - '>='
79
+ - !ruby/object:Gem::Version
80
+ version: '0'
81
+ - !ruby/object:Gem::Dependency
82
+ name: minitest
83
+ requirement: !ruby/object:Gem::Requirement
84
+ requirements:
85
+ - - ~>
86
+ - !ruby/object:Gem::Version
87
+ version: '5.0'
88
+ - - '>='
89
+ - !ruby/object:Gem::Version
90
+ version: 5.0.4
91
+ type: :development
92
+ prerelease: false
93
+ version_requirements: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - ~>
96
+ - !ruby/object:Gem::Version
97
+ version: '5.0'
98
+ - - '>='
99
+ - !ruby/object:Gem::Version
100
+ version: 5.0.4
101
+ - !ruby/object:Gem::Dependency
102
+ name: rake-compiler
103
+ requirement: !ruby/object:Gem::Requirement
104
+ requirements:
105
+ - - ~>
106
+ - !ruby/object:Gem::Version
107
+ version: '0.7'
108
+ - - '>='
109
+ - !ruby/object:Gem::Version
110
+ version: 0.7.5
111
+ type: :development
112
+ prerelease: false
113
+ version_requirements: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ~>
116
+ - !ruby/object:Gem::Version
117
+ version: '0.7'
118
+ - - '>='
119
+ - !ruby/object:Gem::Version
120
+ version: 0.7.5
121
+ - !ruby/object:Gem::Dependency
122
+ name: mini_portile
123
+ requirement: !ruby/object:Gem::Requirement
124
+ requirements:
125
+ - - ~>
126
+ - !ruby/object:Gem::Version
127
+ version: '0.5'
128
+ - - '>='
129
+ - !ruby/object:Gem::Version
130
+ version: 0.5.2
131
+ type: :development
132
+ prerelease: false
133
+ version_requirements: !ruby/object:Gem::Requirement
134
+ requirements:
135
+ - - ~>
136
+ - !ruby/object:Gem::Version
137
+ version: '0.5'
138
+ - - '>='
139
+ - !ruby/object:Gem::Version
140
+ version: 0.5.2
141
+ - !ruby/object:Gem::Dependency
142
+ name: yajl-ruby
143
+ requirement: !ruby/object:Gem::Requirement
144
+ requirements:
145
+ - - ~>
146
+ - !ruby/object:Gem::Version
147
+ version: '1.1'
148
+ - - '>='
149
+ - !ruby/object:Gem::Version
150
+ version: 1.1.0
151
+ type: :development
152
+ prerelease: false
153
+ version_requirements: !ruby/object:Gem::Requirement
154
+ requirements:
155
+ - - ~>
156
+ - !ruby/object:Gem::Version
157
+ version: '1.1'
158
+ - - '>='
159
+ - !ruby/object:Gem::Version
160
+ version: 1.1.0
161
+ - !ruby/object:Gem::Dependency
162
+ name: active_support
163
+ requirement: !ruby/object:Gem::Requirement
164
+ requirements:
165
+ - - '>='
166
+ - !ruby/object:Gem::Version
167
+ version: '0'
168
+ type: :development
169
+ prerelease: false
170
+ version_requirements: !ruby/object:Gem::Requirement
171
+ requirements:
172
+ - - '>='
173
+ - !ruby/object:Gem::Version
174
+ version: '0'
175
+ - !ruby/object:Gem::Dependency
176
+ name: eventmachine
177
+ requirement: !ruby/object:Gem::Requirement
178
+ requirements:
179
+ - - '>='
180
+ - !ruby/object:Gem::Version
181
+ version: '0'
182
+ type: :development
183
+ prerelease: false
184
+ version_requirements: !ruby/object:Gem::Requirement
185
+ requirements:
186
+ - - '>='
187
+ - !ruby/object:Gem::Version
188
+ version: '0'
189
+ description: The official client library for use with Couchbase Server.
190
+ email: support@couchbase.com
191
+ executables: []
192
+ extensions: []
193
+ extra_rdoc_files: []
194
+ files:
195
+ - .gitignore
196
+ - .travis.yml
197
+ - .yardopts
198
+ - CONTRIBUTING.markdown
199
+ - Gemfile
200
+ - LICENSE
201
+ - Makefile
202
+ - README.markdown
203
+ - RELEASE_NOTES.markdown
204
+ - Rakefile
205
+ - couchbase.gemspec
206
+ - examples/chat-em/Gemfile
207
+ - examples/chat-em/README.markdown
208
+ - examples/chat-em/server.rb
209
+ - examples/chat-goliath-grape/Gemfile
210
+ - examples/chat-goliath-grape/README.markdown
211
+ - examples/chat-goliath-grape/app.rb
212
+ - examples/chat-goliath-grape/config/app.rb
213
+ - examples/transcoders/Gemfile
214
+ - examples/transcoders/README.markdown
215
+ - examples/transcoders/cb-zcat
216
+ - examples/transcoders/cb-zcp
217
+ - examples/transcoders/gzip_transcoder.rb
218
+ - examples/transcoders/options.rb
219
+ - ext/couchbase_ext/.gitignore
220
+ - ext/couchbase_ext/arguments.c
221
+ - ext/couchbase_ext/arithmetic.c
222
+ - ext/couchbase_ext/bucket.c
223
+ - ext/couchbase_ext/context.c
224
+ - ext/couchbase_ext/couchbase_ext.c
225
+ - ext/couchbase_ext/couchbase_ext.h
226
+ - ext/couchbase_ext/delete.c
227
+ - ext/couchbase_ext/eventmachine_plugin.c
228
+ - ext/couchbase_ext/extconf.rb
229
+ - ext/couchbase_ext/get.c
230
+ - ext/couchbase_ext/gethrtime.c
231
+ - ext/couchbase_ext/http.c
232
+ - ext/couchbase_ext/multithread_plugin.c
233
+ - ext/couchbase_ext/observe.c
234
+ - ext/couchbase_ext/plugin_common.c
235
+ - ext/couchbase_ext/result.c
236
+ - ext/couchbase_ext/stats.c
237
+ - ext/couchbase_ext/store.c
238
+ - ext/couchbase_ext/timer.c
239
+ - ext/couchbase_ext/touch.c
240
+ - ext/couchbase_ext/unlock.c
241
+ - ext/couchbase_ext/utils.c
242
+ - ext/couchbase_ext/version.c
243
+ - lib/action_dispatch/middleware/session/couchbase_store.rb
244
+ - lib/active_support/cache/couchbase_store.rb
245
+ - lib/couchbase.rb
246
+ - lib/couchbase/bucket.rb
247
+ - lib/couchbase/cluster.rb
248
+ - lib/couchbase/connection_pool.rb
249
+ - lib/couchbase/constants.rb
250
+ - lib/couchbase/result.rb
251
+ - lib/couchbase/transcoder.rb
252
+ - lib/couchbase/utils.rb
253
+ - lib/couchbase/version.rb
254
+ - lib/couchbase/view.rb
255
+ - lib/couchbase/view_row.rb
256
+ - lib/ext/multi_json_fix.rb
257
+ - lib/rack/session/couchbase.rb
258
+ - tasks/benchmark.rake
259
+ - tasks/compile.rake
260
+ - tasks/test.rake
261
+ - tasks/util.rake
262
+ - test/profile/.gitignore
263
+ - test/profile/Gemfile
264
+ - test/profile/benchmark.rb
265
+ - test/setup.rb
266
+ - test/test_arithmetic.rb
267
+ - test/test_async.rb
268
+ - test/test_bucket.rb
269
+ - test/test_cas.rb
270
+ - test/test_couchbase.rb
271
+ - test/test_couchbase_connection_pool.rb
272
+ - test/test_couchbase_rails_cache_store.rb
273
+ - test/test_delete.rb
274
+ - test/test_errors.rb
275
+ - test/test_eventmachine.rb
276
+ - test/test_format.rb
277
+ - test/test_get.rb
278
+ - test/test_stats.rb
279
+ - test/test_store.rb
280
+ - test/test_timer.rb
281
+ - test/test_touch.rb
282
+ - test/test_unlock.rb
283
+ - test/test_utils.rb
284
+ - test/test_version.rb
285
+ - lib/couchbase/1.9/couchbase_ext.so
286
+ - lib/couchbase/2.0/couchbase_ext.so
287
+ - lib/couchbase/2.1/couchbase_ext.so
288
+ - lib/couchbase_ext.rb
289
+ homepage: http://couchbase.org
290
+ licenses:
291
+ - ASL-2
292
+ metadata: {}
293
+ post_install_message:
294
+ rdoc_options: []
295
+ require_paths:
296
+ - lib
297
+ required_ruby_version: !ruby/object:Gem::Requirement
298
+ requirements:
299
+ - - '>='
300
+ - !ruby/object:Gem::Version
301
+ version: '0'
302
+ required_rubygems_version: !ruby/object:Gem::Requirement
303
+ requirements:
304
+ - - '>='
305
+ - !ruby/object:Gem::Version
306
+ version: '0'
307
+ requirements: []
308
+ rubyforge_project:
309
+ rubygems_version: 2.0.14
310
+ signing_key:
311
+ specification_version: 4
312
+ summary: Couchbase ruby driver
313
+ test_files:
314
+ - test/profile/.gitignore
315
+ - test/profile/Gemfile
316
+ - test/profile/benchmark.rb
317
+ - test/setup.rb
318
+ - test/test_arithmetic.rb
319
+ - test/test_async.rb
320
+ - test/test_bucket.rb
321
+ - test/test_cas.rb
322
+ - test/test_couchbase.rb
323
+ - test/test_couchbase_connection_pool.rb
324
+ - test/test_couchbase_rails_cache_store.rb
325
+ - test/test_delete.rb
326
+ - test/test_errors.rb
327
+ - test/test_eventmachine.rb
328
+ - test/test_format.rb
329
+ - test/test_get.rb
330
+ - test/test_stats.rb
331
+ - test/test_store.rb
332
+ - test/test_timer.rb
333
+ - test/test_touch.rb
334
+ - test/test_unlock.rb
335
+ - test/test_utils.rb
336
+ - test/test_version.rb