couchbase 1.3.4-x86-mingw32 → 1.3.5-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.markdown +8 -3
- data/RELEASE_NOTES.markdown +18 -0
- data/ext/couchbase_ext/arithmetic.c +13 -4
- data/ext/couchbase_ext/bucket.c +4 -1
- data/ext/couchbase_ext/http.c +1 -1
- data/ext/couchbase_ext/result.c +1 -1
- data/ext/couchbase_ext/timer.c +1 -1
- data/lib/couchbase/version.rb +1 -1
- data/test/test_bucket.rb +26 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3f995c345a321d8c33147e83879f4b574c6edf12
|
4
|
+
data.tar.gz: d229cfdb9b65f7781ab194690e5425e56adfe0c7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d81743f7961968eb0bab3caf12bd7eced9f32a337dfeca8acd311b895b7efc9b55b64a654d87acf5b62fc3b4553fc17f2aeee680628bf46e3af555787b01d46f
|
7
|
+
data.tar.gz: cf0a3b9bb8e73f97051ee121d12080124f3d7f1bcb8b6e2bbf07b5f116fe282a0796c46b46ab310504ad81bc056c6e02e7414f8bd216a2c5cdbb9125ea46f9bd
|
data/README.markdown
CHANGED
@@ -9,10 +9,10 @@ are related libraries available:
|
|
9
9
|
## SUPPORT
|
10
10
|
|
11
11
|
If you find an issue, please file it in our [JIRA][1]. Also you are
|
12
|
-
always welcome on the `#libcouchbase` channel at [freenode.net IRC
|
12
|
+
always welcome on the `#libcouchbase` channel at [freenode.net IRC
|
13
|
+
servers][2]. Checkout [library overview][overview] and [API
|
14
|
+
documentation][api].
|
13
15
|
|
14
|
-
Documentation: [http://docs.couchbase.com/couchbase-sdk-ruby-1.3/](http://docs.couchbase.com/couchbase-sdk-ruby-1.3/)
|
15
|
-
API Documentation: [http://www.couchbase.com/autodocs/](http://www.couchbase.com/autodocs/)
|
16
16
|
|
17
17
|
## INSTALL
|
18
18
|
|
@@ -95,6 +95,9 @@ Now install the couchbase gem itself
|
|
95
95
|
|
96
96
|
$ gem install couchbase
|
97
97
|
|
98
|
+
The library verified with all major ruby versions: 1.8.7, 1.9.3, 2.0,
|
99
|
+
2.1.
|
100
|
+
|
98
101
|
## USAGE
|
99
102
|
|
100
103
|
First, you need to load the library:
|
@@ -635,6 +638,8 @@ task and you will find all artifacts in `pkg/` directory:
|
|
635
638
|
pkg/couchbase-1.3.4-x86-mingw32.gem
|
636
639
|
|
637
640
|
|
641
|
+
[api]: http://www.couchbase.com/autodocs/couchbase-ruby-client-1.3.4/index.html
|
642
|
+
[overview]: http://docs.couchbase.com/couchbase-sdk-ruby-1.3/index.html
|
638
643
|
[1]: http://couchbase.com/issues/browse/RCBC
|
639
644
|
[2]: http://freenode.net/irc_servers.shtml
|
640
645
|
[3]: http://www.couchbase.com/develop/c/current
|
data/RELEASE_NOTES.markdown
CHANGED
@@ -3,6 +3,24 @@
|
|
3
3
|
This document is a list of user visible feature changes and important
|
4
4
|
bugfixes. Do not forget to update this doc in every important patch.
|
5
5
|
|
6
|
+
## 1.3.5 (2014-02-05)
|
7
|
+
|
8
|
+
* [major] RCBC-159, RCBC-152 Honor the :environment constructor argument
|
9
|
+
|
10
|
+
* [major] Allow inheritance from `Couchbase::Bucket`. It wasn't
|
11
|
+
possible to create a view with subclass of the `Couchbase::Bucket`.
|
12
|
+
|
13
|
+
* [major] Ensure that an exception raised early will not prevent the
|
14
|
+
finalizer from being called in the underlying client being constructed.
|
15
|
+
One example situation where this could occur:
|
16
|
+
|
17
|
+
class Couchbase::Bucket
|
18
|
+
def initialize(*args)
|
19
|
+
raise "something wrong"
|
20
|
+
super
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
6
24
|
## 1.3.4 (2014-01-08)
|
7
25
|
|
8
26
|
* [major] Build 64-bit versions of the extensions for Windows
|
@@ -136,10 +136,9 @@ cb_bucket_arithmetic(int sign, int argc, VALUE *argv, VALUE self)
|
|
136
136
|
* provided at the protocol level. This simplifies what would otherwise be a
|
137
137
|
* two-stage get and set operation.
|
138
138
|
*
|
139
|
-
* @note that server values
|
140
|
-
*
|
141
|
-
*
|
142
|
-
* below)
|
139
|
+
* @note that server treats values as unsigned numbers, therefore if
|
140
|
+
* you try to store negative number and then increment or decrement it
|
141
|
+
* will cause overflow. (see "Integer overflow" example below)
|
143
142
|
*
|
144
143
|
* @overload incr(key, delta = 1, options = {})
|
145
144
|
* @param key [String, Symbol] Key used to reference the value.
|
@@ -194,6 +193,16 @@ cb_bucket_arithmetic(int sign, int argc, VALUE *argv, VALUE self)
|
|
194
193
|
* c.set("foo", -100)
|
195
194
|
* c.get("foo") #=> -100
|
196
195
|
* c.incr("foo") #=> 18446744073709551517
|
196
|
+
* # but it might look like working
|
197
|
+
* c.set("foo", -2)
|
198
|
+
* c.get("foo") #=> -2
|
199
|
+
* c.incr("foo", 2) #=> 0
|
200
|
+
* # on server:
|
201
|
+
* # // UINT64_MAX is 18446744073709551615
|
202
|
+
* # uint64_t num = atoll("-2");
|
203
|
+
* # // num is 18446744073709551614
|
204
|
+
* # num += 2
|
205
|
+
* # // num is 0
|
197
206
|
*
|
198
207
|
* @example Asynchronous invocation
|
199
208
|
* c.run do
|
data/ext/couchbase_ext/bucket.c
CHANGED
@@ -69,7 +69,9 @@ cb_bucket_free(void *ptr)
|
|
69
69
|
lcb_destroy(bucket->handle);
|
70
70
|
lcb_destroy_io_ops(bucket->io);
|
71
71
|
}
|
72
|
-
|
72
|
+
if (bucket->object_space) {
|
73
|
+
st_free_table(bucket->object_space);
|
74
|
+
}
|
73
75
|
xfree(bucket);
|
74
76
|
}
|
75
77
|
}
|
@@ -242,6 +244,7 @@ do_scan_connection_options(struct cb_bucket_st *bucket, int argc, VALUE *argv)
|
|
242
244
|
if (arg != Qundef) {
|
243
245
|
cb_bucket_transcoder_set(bucket->self, arg);
|
244
246
|
}
|
247
|
+
arg = rb_hash_aref(opts, cb_sym_environment);
|
245
248
|
if (arg != Qnil) {
|
246
249
|
if (arg == cb_sym_production || arg == cb_sym_development) {
|
247
250
|
bucket->environment = arg;
|
data/ext/couchbase_ext/http.c
CHANGED
@@ -206,7 +206,7 @@ cb_http_request_init(int argc, VALUE *argv, VALUE self)
|
|
206
206
|
if (NIL_P(on_body) && rb_block_given_p()) {
|
207
207
|
on_body = rb_block_proc();
|
208
208
|
}
|
209
|
-
if (
|
209
|
+
if (!RTEST(rb_obj_is_kind_of(bucket, cb_cBucket))) {
|
210
210
|
rb_raise(rb_eTypeError, "wrong argument type (expected Couchbase::Bucket)");
|
211
211
|
}
|
212
212
|
memset(&request->cmd, 0, sizeof(lcb_http_cmd_t));
|
data/ext/couchbase_ext/result.c
CHANGED
@@ -62,7 +62,7 @@ cb_result_inspect(VALUE self)
|
|
62
62
|
}
|
63
63
|
|
64
64
|
attr = rb_attr_get(self, cb_id_iv_value);
|
65
|
-
if (RTEST(attr) && rb_obj_is_kind_of(attr, cb_cBucket)) {
|
65
|
+
if (RTEST(attr) && RTEST(rb_obj_is_kind_of(attr, cb_cBucket))) {
|
66
66
|
rb_str_buf_cat2(str, " bucket="); /* value also accessible using alias #bucket */
|
67
67
|
rb_str_append(str, rb_inspect(attr));
|
68
68
|
}
|
data/ext/couchbase_ext/timer.c
CHANGED
@@ -169,7 +169,7 @@ cb_timer_init(int argc, VALUE *argv, VALUE self)
|
|
169
169
|
rb_need_block();
|
170
170
|
rb_scan_args(argc, argv, "21&", &bucket, &timeout, &opts, &cb);
|
171
171
|
|
172
|
-
if (
|
172
|
+
if (!RTEST(rb_obj_is_kind_of(bucket, cb_cBucket))) {
|
173
173
|
rb_raise(rb_eTypeError, "wrong argument type (expected Couchbase::Bucket)");
|
174
174
|
}
|
175
175
|
tm->self = self;
|
data/lib/couchbase/version.rb
CHANGED
data/test/test_bucket.rb
CHANGED
@@ -247,4 +247,30 @@ class TestBucket < MiniTest::Test
|
|
247
247
|
GC.start # make sure it won't touch handle in finalizer
|
248
248
|
end
|
249
249
|
|
250
|
+
def test_it_accepts_environment_option
|
251
|
+
with_mock do |mock|
|
252
|
+
connection = Couchbase.new(:hostname => mock.host,
|
253
|
+
:port => mock.port,
|
254
|
+
:environment => :development)
|
255
|
+
assert_equal :development, connection.environment
|
256
|
+
end
|
257
|
+
end
|
258
|
+
|
259
|
+
def test_it_defaults_to_production_environment
|
260
|
+
with_mock do |mock|
|
261
|
+
connection = Couchbase.new(:hostname => mock.host,
|
262
|
+
:port => mock.port)
|
263
|
+
assert_equal :production, connection.environment
|
264
|
+
end
|
265
|
+
end
|
266
|
+
|
267
|
+
def test_it_uses_default_environment_if_unknown_was_specified
|
268
|
+
with_mock do |mock|
|
269
|
+
connection = Couchbase.new(:hostname => mock.host,
|
270
|
+
:port => mock.port,
|
271
|
+
:environment => :foobar)
|
272
|
+
assert_equal :production, connection.environment
|
273
|
+
end
|
274
|
+
end
|
275
|
+
|
250
276
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: couchbase
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.5
|
5
5
|
platform: x86-mingw32
|
6
6
|
authors:
|
7
7
|
- Couchbase
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-02-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: yaji
|