libcouchbase 0.3.3 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/libcouchbase/CMakeLists.txt +6 -8
- data/ext/libcouchbase/README.markdown +2 -2
- data/ext/libcouchbase/RELEASE_NOTES.markdown +229 -2
- data/ext/libcouchbase/cmake/Modules/ConfigureDtrace.cmake +11 -0
- data/ext/libcouchbase/cmake/Modules/GenerateConfigDotH.cmake +18 -0
- data/ext/libcouchbase/cmake/Modules/GetLibcouchbaseFlags.cmake +3 -2
- data/ext/libcouchbase/cmake/Modules/GetVersionInfo.cmake +3 -3
- data/ext/libcouchbase/cmake/config-cmake.h.in +4 -0
- data/ext/libcouchbase/cmake/defs.mk.in +0 -2
- data/ext/libcouchbase/cmake/source_files.cmake +21 -5
- data/ext/libcouchbase/contrib/cJSON/cJSON.c +1 -1
- data/ext/libcouchbase/contrib/cbsasl/src/client.c +2 -0
- data/ext/libcouchbase/example/users/README +48 -0
- data/ext/libcouchbase/example/users/users.c +147 -0
- data/ext/libcouchbase/include/libcouchbase/auth.h +175 -31
- data/ext/libcouchbase/include/libcouchbase/cntl.h +82 -1
- data/ext/libcouchbase/include/libcouchbase/couchbase.h +45 -3
- data/ext/libcouchbase/include/libcouchbase/error.h +19 -1
- data/ext/libcouchbase/include/libcouchbase/iops.h +3 -0
- data/ext/libcouchbase/include/libcouchbase/n1ql.h +31 -1
- data/ext/libcouchbase/include/libcouchbase/plugins/io/bsdio-inl.c +4 -1
- data/ext/libcouchbase/include/libcouchbase/subdoc.h +36 -2
- data/ext/libcouchbase/include/libcouchbase/views.h +7 -1
- data/ext/libcouchbase/include/libcouchbase/visibility.h +1 -0
- data/ext/libcouchbase/include/memcached/protocol_binary.h +24 -1146
- data/ext/libcouchbase/packaging/parse-git-describe.pl +1 -1
- data/ext/libcouchbase/plugins/io/libev/libev_io_opts.h +3 -2
- data/ext/libcouchbase/src/README.md +0 -2
- data/ext/libcouchbase/src/auth-priv.h +23 -4
- data/ext/libcouchbase/src/auth.cc +51 -43
- data/ext/libcouchbase/src/bootstrap.cc +244 -0
- data/ext/libcouchbase/src/bootstrap.h +58 -38
- data/ext/libcouchbase/src/bucketconfig/bc_cccp.cc +120 -158
- data/ext/libcouchbase/src/bucketconfig/bc_file.cc +281 -0
- data/ext/libcouchbase/src/bucketconfig/bc_http.cc +526 -0
- data/ext/libcouchbase/src/bucketconfig/bc_http.h +50 -25
- data/ext/libcouchbase/src/bucketconfig/bc_static.cc +150 -0
- data/ext/libcouchbase/src/bucketconfig/clconfig.h +410 -386
- data/ext/libcouchbase/src/bucketconfig/confmon.cc +393 -0
- data/ext/libcouchbase/src/cbft.cc +22 -27
- data/ext/libcouchbase/src/cntl.cc +56 -22
- data/ext/libcouchbase/src/connspec.cc +47 -6
- data/ext/libcouchbase/src/connspec.h +27 -0
- data/ext/libcouchbase/src/dns-srv.cc +147 -0
- data/ext/libcouchbase/src/dump.cc +3 -3
- data/ext/libcouchbase/src/errmap.cc +173 -0
- data/ext/libcouchbase/src/errmap.h +198 -0
- data/ext/libcouchbase/src/getconfig.cc +7 -33
- data/ext/libcouchbase/src/handler.cc +118 -7
- data/ext/libcouchbase/src/hostlist.cc +0 -36
- data/ext/libcouchbase/src/hostlist.h +44 -62
- data/ext/libcouchbase/src/http/http-priv.h +125 -112
- data/ext/libcouchbase/src/http/http.cc +27 -35
- data/ext/libcouchbase/src/http/http.h +1 -34
- data/ext/libcouchbase/src/http/http_io.cc +28 -36
- data/ext/libcouchbase/src/instance.cc +131 -34
- data/ext/libcouchbase/src/internal.h +58 -26
- data/ext/libcouchbase/src/jsparse/parser.cc +136 -210
- data/ext/libcouchbase/src/jsparse/parser.h +84 -98
- data/ext/libcouchbase/src/lcbht/lcbht.cc +177 -0
- data/ext/libcouchbase/src/lcbht/lcbht.h +174 -163
- data/ext/libcouchbase/src/lcbio/connect.cc +569 -0
- data/ext/libcouchbase/src/lcbio/connect.h +16 -7
- data/ext/libcouchbase/src/lcbio/ctx.c +1 -1
- data/ext/libcouchbase/src/lcbio/iotable.h +101 -16
- data/ext/libcouchbase/src/lcbio/{ioutils.c → ioutils.cc} +30 -51
- data/ext/libcouchbase/src/lcbio/ioutils.h +29 -90
- data/ext/libcouchbase/src/lcbio/manager.cc +543 -0
- data/ext/libcouchbase/src/lcbio/manager.h +133 -96
- data/ext/libcouchbase/src/lcbio/protoctx.c +2 -2
- data/ext/libcouchbase/src/lcbio/timer-cxx.h +87 -0
- data/ext/libcouchbase/src/mc/mcreq.c +11 -2
- data/ext/libcouchbase/src/mc/mcreq.h +9 -2
- data/ext/libcouchbase/src/mcserver/mcserver.cc +175 -43
- data/ext/libcouchbase/src/mcserver/mcserver.h +9 -13
- data/ext/libcouchbase/src/mcserver/negotiate.cc +181 -62
- data/ext/libcouchbase/src/mcserver/negotiate.h +1 -3
- data/ext/libcouchbase/src/mctx-helper.h +51 -0
- data/ext/libcouchbase/src/n1ql/ixmgmt.cc +1 -2
- data/ext/libcouchbase/src/n1ql/n1ql.cc +74 -42
- data/ext/libcouchbase/src/netbuf/netbuf.c +4 -4
- data/ext/libcouchbase/src/newconfig.cc +6 -6
- data/ext/libcouchbase/src/nodeinfo.cc +2 -2
- data/ext/libcouchbase/src/operations/{cbflush.c → cbflush.cc} +7 -15
- data/ext/libcouchbase/src/operations/{counter.c → counter.cc} +0 -0
- data/ext/libcouchbase/src/operations/durability.cc +6 -26
- data/ext/libcouchbase/src/operations/durability_internal.h +6 -3
- data/ext/libcouchbase/src/operations/{get.c → get.cc} +24 -26
- data/ext/libcouchbase/src/operations/{observe.c → observe.cc} +68 -93
- data/ext/libcouchbase/src/operations/{pktfwd.c → pktfwd.cc} +0 -0
- data/ext/libcouchbase/src/operations/{remove.c → remove.cc} +0 -0
- data/ext/libcouchbase/src/operations/stats.cc +3 -8
- data/ext/libcouchbase/src/operations/{store.c → store.cc} +27 -32
- data/ext/libcouchbase/src/operations/subdoc.cc +129 -42
- data/ext/libcouchbase/src/operations/{touch.c → touch.cc} +0 -0
- data/ext/libcouchbase/src/packetutils.h +30 -2
- data/ext/libcouchbase/src/probes.d +1 -1
- data/ext/libcouchbase/src/rdb/rope.c +1 -1
- data/ext/libcouchbase/src/{retrychk.c → retrychk.cc} +2 -3
- data/ext/libcouchbase/src/retryq.cc +52 -14
- data/ext/libcouchbase/src/retryq.h +3 -3
- data/ext/libcouchbase/src/settings.c +5 -0
- data/ext/libcouchbase/src/settings.h +11 -0
- data/ext/libcouchbase/src/ssl/ssl_c.c +1 -0
- data/ext/libcouchbase/src/ssl/ssl_common.c +2 -0
- data/ext/libcouchbase/src/ssl/ssl_e.c +0 -1
- data/ext/libcouchbase/src/strcodecs/strcodecs.h +1 -1
- data/ext/libcouchbase/src/trace.h +4 -4
- data/ext/libcouchbase/src/vbucket/vbucket.c +6 -10
- data/ext/libcouchbase/src/views/{docreq.c → docreq.cc} +48 -54
- data/ext/libcouchbase/src/views/docreq.h +24 -30
- data/ext/libcouchbase/src/views/viewreq.cc +318 -0
- data/ext/libcouchbase/src/views/viewreq.h +43 -13
- data/ext/libcouchbase/tests/basic/t_connstr.cc +88 -50
- data/ext/libcouchbase/tests/basic/t_creds.cc +47 -5
- data/ext/libcouchbase/tests/basic/t_host.cc +67 -75
- data/ext/libcouchbase/tests/basic/t_jsparse.cc +27 -82
- data/ext/libcouchbase/tests/basic/t_misc.cc +1 -1
- data/ext/libcouchbase/tests/basic/t_n1qlstrings.cc +0 -1
- data/ext/libcouchbase/tests/htparse/t_basic.cc +58 -78
- data/ext/libcouchbase/tests/ioserver/connection.cc +1 -1
- data/ext/libcouchbase/tests/ioserver/ioserver.cc +19 -6
- data/ext/libcouchbase/tests/iotests/mock-environment.cc +28 -2
- data/ext/libcouchbase/tests/iotests/mock-environment.h +51 -1
- data/ext/libcouchbase/tests/iotests/t_behavior.cc +1 -7
- data/ext/libcouchbase/tests/iotests/t_confmon.cc +97 -115
- data/ext/libcouchbase/tests/iotests/t_durability.cc +0 -1
- data/ext/libcouchbase/tests/iotests/t_eerrs.cc +119 -0
- data/ext/libcouchbase/tests/iotests/t_errmap.cc +178 -0
- data/ext/libcouchbase/tests/iotests/t_misc.cc +3 -3
- data/ext/libcouchbase/tests/iotests/t_netfail.cc +1 -1
- data/ext/libcouchbase/tests/iotests/t_obseqno.cc +0 -1
- data/ext/libcouchbase/tests/iotests/t_subdoc.cc +18 -11
- data/ext/libcouchbase/tests/mc/t_alloc.cc +9 -9
- data/ext/libcouchbase/tests/socktests/socktest.cc +7 -10
- data/ext/libcouchbase/tests/socktests/socktest.h +2 -3
- data/ext/libcouchbase/tests/socktests/t_basic.cc +6 -6
- data/ext/libcouchbase/tests/socktests/t_manager.cc +5 -6
- data/ext/libcouchbase/tests/socktests/t_ssl.cc +1 -1
- data/ext/libcouchbase/tests/vbucket/confdata/ketama_expected.json +2562 -0
- data/ext/libcouchbase/tests/vbucket/confdata/memd_ketama_config.json +31 -0
- data/ext/libcouchbase/tests/vbucket/t_config.cc +35 -5
- data/ext/libcouchbase/tools/CMakeLists.txt +2 -2
- data/ext/libcouchbase/tools/cbc-handlers.h +128 -0
- data/ext/libcouchbase/tools/cbc-n1qlback.cc +64 -10
- data/ext/libcouchbase/tools/cbc-pillowfight.cc +2 -2
- data/ext/libcouchbase/tools/cbc.cc +143 -10
- data/ext/libcouchbase/tools/docgen/loc.h +1 -1
- data/lib/libcouchbase/connection.rb +4 -3
- data/lib/libcouchbase/version.rb +1 -1
- metadata +37 -28
- data/ext/libcouchbase/include/memcached/vbucket.h +0 -42
- data/ext/libcouchbase/src/bootstrap.c +0 -269
- data/ext/libcouchbase/src/bucketconfig/bc_file.c +0 -347
- data/ext/libcouchbase/src/bucketconfig/bc_http.c +0 -630
- data/ext/libcouchbase/src/bucketconfig/bc_mcraw.c +0 -150
- data/ext/libcouchbase/src/bucketconfig/confmon.c +0 -474
- data/ext/libcouchbase/src/lcbht/lcbht.c +0 -282
- data/ext/libcouchbase/src/lcbio/connect.c +0 -557
- data/ext/libcouchbase/src/lcbio/manager.c +0 -584
- data/ext/libcouchbase/src/packetutils.c +0 -37
- data/ext/libcouchbase/src/simplestring.c +0 -211
- data/ext/libcouchbase/src/simplestring.h +0 -228
- data/ext/libcouchbase/src/ssobuf.h +0 -82
- data/ext/libcouchbase/src/views/viewreq.c +0 -358
- data/ext/libcouchbase/tests/basic/t_string.cc +0 -112
@@ -3,6 +3,7 @@
|
|
3
3
|
#include <map>
|
4
4
|
#include <sstream>
|
5
5
|
#include <iostream>
|
6
|
+
#include <iomanip>
|
6
7
|
#include <fstream>
|
7
8
|
#include <algorithm>
|
8
9
|
#include <libcouchbase/vbucket.h>
|
@@ -14,6 +15,8 @@
|
|
14
15
|
#include "common/histogram.h"
|
15
16
|
#include "cbc-handlers.h"
|
16
17
|
#include "connspec.h"
|
18
|
+
#include "contrib/lcb-jsoncpp/lcb-jsoncpp.h"
|
19
|
+
|
17
20
|
using namespace cbc;
|
18
21
|
|
19
22
|
using std::string;
|
@@ -910,7 +913,7 @@ ArithmeticHandler::run()
|
|
910
913
|
cmd.initial = o_initial.result();
|
911
914
|
}
|
912
915
|
uint64_t delta = o_delta.result();
|
913
|
-
if (delta > std::numeric_limits<int64_t>::max()) {
|
916
|
+
if (delta > static_cast<uint64_t>(std::numeric_limits<int64_t>::max())) {
|
914
917
|
throw BadArg("Delta too big");
|
915
918
|
}
|
916
919
|
cmd.delta = static_cast<int64_t>(delta);
|
@@ -1166,7 +1169,7 @@ AdminHandler::run()
|
|
1166
1169
|
{
|
1167
1170
|
fprintf(stderr, "Requesting %s\n", getURI().c_str());
|
1168
1171
|
HttpBaseHandler::run();
|
1169
|
-
printf("%s", resbuf.c_str());
|
1172
|
+
printf("%s\n", resbuf.c_str());
|
1170
1173
|
}
|
1171
1174
|
|
1172
1175
|
void
|
@@ -1202,6 +1205,125 @@ BucketCreateHandler::run()
|
|
1202
1205
|
AdminHandler::run();
|
1203
1206
|
}
|
1204
1207
|
|
1208
|
+
void
|
1209
|
+
RbacHandler::run()
|
1210
|
+
{
|
1211
|
+
fprintf(stderr, "Requesting %s\n", getURI().c_str());
|
1212
|
+
HttpBaseHandler::run();
|
1213
|
+
if (o_raw.result()) {
|
1214
|
+
printf("%s\n", resbuf.c_str());
|
1215
|
+
} else {
|
1216
|
+
format();
|
1217
|
+
}
|
1218
|
+
}
|
1219
|
+
|
1220
|
+
void
|
1221
|
+
RoleListHandler::format()
|
1222
|
+
{
|
1223
|
+
Json::Value json;
|
1224
|
+
if (!Json::Reader().parse(resbuf, json)) {
|
1225
|
+
fprintf(stderr, "Failed to parse response as JSON, falling back to raw mode\n");
|
1226
|
+
printf("%s\n", resbuf.c_str());
|
1227
|
+
}
|
1228
|
+
|
1229
|
+
std::map<string, string> roles;
|
1230
|
+
size_t max_width = 0;
|
1231
|
+
for (Json::Value::iterator i = json.begin(); i != json.end(); i++) {
|
1232
|
+
Json::Value role = *i;
|
1233
|
+
string role_id = role["role"].asString() + ": ";
|
1234
|
+
roles[role_id] = role["desc"].asString();
|
1235
|
+
if (max_width < role_id.size()) {
|
1236
|
+
max_width = role_id.size();
|
1237
|
+
}
|
1238
|
+
}
|
1239
|
+
for (map<string, string>::iterator i = roles.begin(); i != roles.end(); i++) {
|
1240
|
+
std::cout << std::left << std::setw(max_width) << i->first << i->second << std::endl;
|
1241
|
+
}
|
1242
|
+
}
|
1243
|
+
|
1244
|
+
void
|
1245
|
+
UserListHandler::format()
|
1246
|
+
{
|
1247
|
+
Json::Value json;
|
1248
|
+
if (!Json::Reader().parse(resbuf, json)) {
|
1249
|
+
fprintf(stderr, "Failed to parse response as JSON, falling back to raw mode\n");
|
1250
|
+
printf("%s\n", resbuf.c_str());
|
1251
|
+
}
|
1252
|
+
|
1253
|
+
map<string, map<string, string> > users;
|
1254
|
+
size_t max_width = 0;
|
1255
|
+
for (Json::Value::iterator i = json.begin(); i != json.end(); i++) {
|
1256
|
+
Json::Value user = *i;
|
1257
|
+
string domain = user["domain"].asString();
|
1258
|
+
string user_id = user["id"].asString();
|
1259
|
+
string user_name = user["name"].asString();
|
1260
|
+
if (!user_name.empty()) {
|
1261
|
+
user_id += " (" + user_name + "): ";
|
1262
|
+
}
|
1263
|
+
stringstream roles;
|
1264
|
+
Json::Value roles_ary = user["roles"];
|
1265
|
+
for (Json::Value::iterator j = roles_ary.begin(); j != roles_ary.end(); j++) {
|
1266
|
+
Json::Value role = *j;
|
1267
|
+
roles << "\n - " << role["role"].asString();
|
1268
|
+
if (!role["bucket_name"].empty()) {
|
1269
|
+
roles << "[" << role["bucket_name"].asString() << "]";
|
1270
|
+
}
|
1271
|
+
}
|
1272
|
+
if (max_width < user_id.size()) {
|
1273
|
+
max_width = user_id.size();
|
1274
|
+
}
|
1275
|
+
users[domain][user_id] = roles.str();
|
1276
|
+
}
|
1277
|
+
if (!users["local"].empty()) {
|
1278
|
+
std::cout << "Local users:" << std::endl;
|
1279
|
+
int j = 1;
|
1280
|
+
for (map<string, string>::iterator i = users["local"].begin(); i != users["local"].end(); i++, j++) {
|
1281
|
+
std::cout << j << ". " << std::left << std::setw(max_width) << i->first << i->second << std::endl;
|
1282
|
+
}
|
1283
|
+
}
|
1284
|
+
if (!users["external"].empty()) {
|
1285
|
+
std::cout << "External users:" << std::endl;
|
1286
|
+
int j = 1;
|
1287
|
+
for (map<string, string>::iterator i = users["external"].begin(); i != users["external"].end(); i++, j++) {
|
1288
|
+
std::cout << j << ". " << std::left << std::setw(max_width) << i->first << i->second << std::endl;
|
1289
|
+
}
|
1290
|
+
}
|
1291
|
+
}
|
1292
|
+
|
1293
|
+
void
|
1294
|
+
UserUpsertHandler::run()
|
1295
|
+
{
|
1296
|
+
stringstream ss;
|
1297
|
+
|
1298
|
+
name = getRequiredArg();
|
1299
|
+
domain = o_domain.result();
|
1300
|
+
if (domain != "local" && domain != "external") {
|
1301
|
+
throw BadArg("Unrecognized domain type");
|
1302
|
+
}
|
1303
|
+
if (!o_roles.passed()) {
|
1304
|
+
throw BadArg("At least one role has to be specified");
|
1305
|
+
}
|
1306
|
+
std::vector<std::string> roles = o_roles.result();
|
1307
|
+
std::string roles_param;
|
1308
|
+
for (size_t ii = 0; ii < roles.size(); ii++) {
|
1309
|
+
if (roles_param.empty()) {
|
1310
|
+
roles_param += roles[ii];
|
1311
|
+
} else {
|
1312
|
+
roles_param += std::string(",") + roles[ii];
|
1313
|
+
}
|
1314
|
+
}
|
1315
|
+
ss << "roles=" << roles_param;
|
1316
|
+
if (o_full_name.passed()) {
|
1317
|
+
ss << "&name=" << o_full_name.result();
|
1318
|
+
}
|
1319
|
+
if (o_password.passed()) {
|
1320
|
+
ss << "&password=" << o_password.result();
|
1321
|
+
}
|
1322
|
+
body = ss.str();
|
1323
|
+
|
1324
|
+
AdminHandler::run();
|
1325
|
+
}
|
1326
|
+
|
1205
1327
|
struct HostEnt {
|
1206
1328
|
string protostr;
|
1207
1329
|
string hostname;
|
@@ -1326,6 +1448,7 @@ static const char* optionsOrder[] = {
|
|
1326
1448
|
"hash",
|
1327
1449
|
"lock",
|
1328
1450
|
"unlock",
|
1451
|
+
"cp",
|
1329
1452
|
"rm",
|
1330
1453
|
"stats",
|
1331
1454
|
// "verify,
|
@@ -1337,6 +1460,10 @@ static const char* optionsOrder[] = {
|
|
1337
1460
|
"bucket-create",
|
1338
1461
|
"bucket-delete",
|
1339
1462
|
"bucket-flush",
|
1463
|
+
"role-list",
|
1464
|
+
"user-list",
|
1465
|
+
"user-upsert",
|
1466
|
+
"user-delete",
|
1340
1467
|
"connstr",
|
1341
1468
|
"write-config",
|
1342
1469
|
"strerror",
|
@@ -1423,8 +1550,10 @@ setupHandlers()
|
|
1423
1550
|
handlers_s["strerror"] = new StrErrorHandler();
|
1424
1551
|
handlers_s["observe-seqno"] = new ObserveSeqnoHandler();
|
1425
1552
|
handlers_s["touch"] = new TouchHandler();
|
1426
|
-
|
1427
|
-
|
1553
|
+
handlers_s["role-list"] = new RoleListHandler();
|
1554
|
+
handlers_s["user-list"] = new UserListHandler();
|
1555
|
+
handlers_s["user-upsert"] = new UserUpsertHandler();
|
1556
|
+
handlers_s["user-delete"] = new UserDeleteHandler();
|
1428
1557
|
|
1429
1558
|
map<string,Handler*>::iterator ii;
|
1430
1559
|
for (ii = handlers_s.begin(); ii != handlers_s.end(); ++ii) {
|
@@ -1495,6 +1624,14 @@ wrapExternalBinary(int argc, char **argv, const std::string& name)
|
|
1495
1624
|
#endif
|
1496
1625
|
}
|
1497
1626
|
|
1627
|
+
static void cleanupHandlers()
|
1628
|
+
{
|
1629
|
+
map<string,Handler*>::iterator iter = handlers_s.begin();
|
1630
|
+
for (; iter != handlers_s.end(); iter++) {
|
1631
|
+
delete iter->second;
|
1632
|
+
}
|
1633
|
+
}
|
1634
|
+
|
1498
1635
|
int main(int argc, char **argv)
|
1499
1636
|
{
|
1500
1637
|
|
@@ -1508,6 +1645,8 @@ int main(int argc, char **argv)
|
|
1508
1645
|
}
|
1509
1646
|
|
1510
1647
|
setupHandlers();
|
1648
|
+
std::atexit(cleanupHandlers);
|
1649
|
+
|
1511
1650
|
string cmdname;
|
1512
1651
|
parseCommandname(cmdname, argc, argv);
|
1513
1652
|
|
@@ -1541,10 +1680,4 @@ int main(int argc, char **argv)
|
|
1541
1680
|
fprintf(stderr, "%s\n", err.what());
|
1542
1681
|
exit(EXIT_FAILURE);
|
1543
1682
|
}
|
1544
|
-
|
1545
|
-
map<string,Handler*>::iterator iter = handlers_s.begin();
|
1546
|
-
for (; iter != handlers_s.end(); iter++) {
|
1547
|
-
delete iter->second;
|
1548
|
-
}
|
1549
|
-
exit(EXIT_SUCCESS);
|
1550
1683
|
}
|
@@ -94,9 +94,10 @@ module Libcouchbase
|
|
94
94
|
# Configure the connection to the database
|
95
95
|
@connection = Ext::CreateSt.new
|
96
96
|
@connection[:version] = 3
|
97
|
-
@connection[:v][:v3][:connstr]
|
98
|
-
@connection[:v][:v3][:
|
99
|
-
@connection[:v][:v3][:
|
97
|
+
@connection[:v][:v3][:connstr] = FFI::MemoryPointer.from_string(connstr)
|
98
|
+
@connection[:v][:v3][:username] = FFI::MemoryPointer.from_string(bucket.to_s)
|
99
|
+
@connection[:v][:v3][:passwd] = FFI::MemoryPointer.from_string(password) if password
|
100
|
+
@connection[:v][:v3][:io] = @io_ptr.get_pointer(0)
|
100
101
|
@handle_ptr = FFI::MemoryPointer.new :pointer, 1
|
101
102
|
end
|
102
103
|
|
data/lib/libcouchbase/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: libcouchbase
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stephen von Takach
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-07-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi
|
@@ -290,8 +290,12 @@ files:
|
|
290
290
|
- ext/libcouchbase/doc/man/cbc-observe.1
|
291
291
|
- ext/libcouchbase/doc/man/cbc-pillowfight.1
|
292
292
|
- ext/libcouchbase/doc/man/cbc-rm.1
|
293
|
+
- ext/libcouchbase/doc/man/cbc-role-list.1
|
293
294
|
- ext/libcouchbase/doc/man/cbc-stats.1
|
294
295
|
- ext/libcouchbase/doc/man/cbc-unlock.1
|
296
|
+
- ext/libcouchbase/doc/man/cbc-user-delete.1
|
297
|
+
- ext/libcouchbase/doc/man/cbc-user-list.1
|
298
|
+
- ext/libcouchbase/doc/man/cbc-user-upsert.1
|
295
299
|
- ext/libcouchbase/doc/man/cbc-verbosity.1
|
296
300
|
- ext/libcouchbase/doc/man/cbc-version.1
|
297
301
|
- ext/libcouchbase/doc/man/cbc-view.1
|
@@ -312,6 +316,8 @@ files:
|
|
312
316
|
- ext/libcouchbase/example/subdoc/subdoc-multi.cc
|
313
317
|
- ext/libcouchbase/example/subdoc/subdoc-simple.cc
|
314
318
|
- ext/libcouchbase/example/tick/tick.c
|
319
|
+
- ext/libcouchbase/example/users/README
|
320
|
+
- ext/libcouchbase/example/users/users.c
|
315
321
|
- ext/libcouchbase/example/views/views-example.cc
|
316
322
|
- ext/libcouchbase/include/libcouchbase/_cxxwrap.h
|
317
323
|
- ext/libcouchbase/include/libcouchbase/api-legacy.h
|
@@ -342,7 +348,6 @@ files:
|
|
342
348
|
- ext/libcouchbase/include/memcached/COPYING
|
343
349
|
- ext/libcouchbase/include/memcached/README
|
344
350
|
- ext/libcouchbase/include/memcached/protocol_binary.h
|
345
|
-
- ext/libcouchbase/include/memcached/vbucket.h
|
346
351
|
- ext/libcouchbase/packaging/README
|
347
352
|
- ext/libcouchbase/packaging/abicheck/.gitignore
|
348
353
|
- ext/libcouchbase/packaging/abicheck/Makefile
|
@@ -387,15 +392,15 @@ files:
|
|
387
392
|
- ext/libcouchbase/src/aspend.h
|
388
393
|
- ext/libcouchbase/src/auth-priv.h
|
389
394
|
- ext/libcouchbase/src/auth.cc
|
390
|
-
- ext/libcouchbase/src/bootstrap.
|
395
|
+
- ext/libcouchbase/src/bootstrap.cc
|
391
396
|
- ext/libcouchbase/src/bootstrap.h
|
392
397
|
- ext/libcouchbase/src/bucketconfig/bc_cccp.cc
|
393
|
-
- ext/libcouchbase/src/bucketconfig/bc_file.
|
394
|
-
- ext/libcouchbase/src/bucketconfig/bc_http.
|
398
|
+
- ext/libcouchbase/src/bucketconfig/bc_file.cc
|
399
|
+
- ext/libcouchbase/src/bucketconfig/bc_http.cc
|
395
400
|
- ext/libcouchbase/src/bucketconfig/bc_http.h
|
396
|
-
- ext/libcouchbase/src/bucketconfig/
|
401
|
+
- ext/libcouchbase/src/bucketconfig/bc_static.cc
|
397
402
|
- ext/libcouchbase/src/bucketconfig/clconfig.h
|
398
|
-
- ext/libcouchbase/src/bucketconfig/confmon.
|
403
|
+
- ext/libcouchbase/src/bucketconfig/confmon.cc
|
399
404
|
- ext/libcouchbase/src/callbacks.c
|
400
405
|
- ext/libcouchbase/src/cbft.cc
|
401
406
|
- ext/libcouchbase/src/cntl.cc
|
@@ -403,7 +408,10 @@ files:
|
|
403
408
|
- ext/libcouchbase/src/connspec.cc
|
404
409
|
- ext/libcouchbase/src/connspec.h
|
405
410
|
- ext/libcouchbase/src/ctx-log-inl.h
|
411
|
+
- ext/libcouchbase/src/dns-srv.cc
|
406
412
|
- ext/libcouchbase/src/dump.cc
|
413
|
+
- ext/libcouchbase/src/errmap.cc
|
414
|
+
- ext/libcouchbase/src/errmap.h
|
407
415
|
- ext/libcouchbase/src/getconfig.cc
|
408
416
|
- ext/libcouchbase/src/gethrtime.c
|
409
417
|
- ext/libcouchbase/src/handler.cc
|
@@ -420,22 +428,23 @@ files:
|
|
420
428
|
- ext/libcouchbase/src/iofactory.c
|
421
429
|
- ext/libcouchbase/src/jsparse/parser.cc
|
422
430
|
- ext/libcouchbase/src/jsparse/parser.h
|
423
|
-
- ext/libcouchbase/src/lcbht/lcbht.
|
431
|
+
- ext/libcouchbase/src/lcbht/lcbht.cc
|
424
432
|
- ext/libcouchbase/src/lcbht/lcbht.h
|
425
|
-
- ext/libcouchbase/src/lcbio/connect.
|
433
|
+
- ext/libcouchbase/src/lcbio/connect.cc
|
426
434
|
- ext/libcouchbase/src/lcbio/connect.h
|
427
435
|
- ext/libcouchbase/src/lcbio/ctx.c
|
428
436
|
- ext/libcouchbase/src/lcbio/ctx.h
|
429
437
|
- ext/libcouchbase/src/lcbio/iotable.c
|
430
438
|
- ext/libcouchbase/src/lcbio/iotable.h
|
431
|
-
- ext/libcouchbase/src/lcbio/ioutils.
|
439
|
+
- ext/libcouchbase/src/lcbio/ioutils.cc
|
432
440
|
- ext/libcouchbase/src/lcbio/ioutils.h
|
433
441
|
- ext/libcouchbase/src/lcbio/lcbio.h
|
434
|
-
- ext/libcouchbase/src/lcbio/manager.
|
442
|
+
- ext/libcouchbase/src/lcbio/manager.cc
|
435
443
|
- ext/libcouchbase/src/lcbio/manager.h
|
436
444
|
- ext/libcouchbase/src/lcbio/protoctx.c
|
437
445
|
- ext/libcouchbase/src/lcbio/rw-inl.h
|
438
446
|
- ext/libcouchbase/src/lcbio/ssl.h
|
447
|
+
- ext/libcouchbase/src/lcbio/timer-cxx.h
|
439
448
|
- ext/libcouchbase/src/lcbio/timer-ng.h
|
440
449
|
- ext/libcouchbase/src/lcbio/timer.c
|
441
450
|
- ext/libcouchbase/src/legacy.c
|
@@ -456,6 +465,7 @@ files:
|
|
456
465
|
- ext/libcouchbase/src/mcserver/mcserver.h
|
457
466
|
- ext/libcouchbase/src/mcserver/negotiate.cc
|
458
467
|
- ext/libcouchbase/src/mcserver/negotiate.h
|
468
|
+
- ext/libcouchbase/src/mctx-helper.h
|
459
469
|
- ext/libcouchbase/src/n1ql/ixmgmt.cc
|
460
470
|
- ext/libcouchbase/src/n1ql/n1ql-internal.h
|
461
471
|
- ext/libcouchbase/src/n1ql/n1ql.cc
|
@@ -466,22 +476,21 @@ files:
|
|
466
476
|
- ext/libcouchbase/src/netbuf/netbuf.h
|
467
477
|
- ext/libcouchbase/src/newconfig.cc
|
468
478
|
- ext/libcouchbase/src/nodeinfo.cc
|
469
|
-
- ext/libcouchbase/src/operations/cbflush.
|
470
|
-
- ext/libcouchbase/src/operations/counter.
|
479
|
+
- ext/libcouchbase/src/operations/cbflush.cc
|
480
|
+
- ext/libcouchbase/src/operations/counter.cc
|
471
481
|
- ext/libcouchbase/src/operations/durability-cas.cc
|
472
482
|
- ext/libcouchbase/src/operations/durability-seqno.cc
|
473
483
|
- ext/libcouchbase/src/operations/durability.cc
|
474
484
|
- ext/libcouchbase/src/operations/durability_internal.h
|
475
|
-
- ext/libcouchbase/src/operations/get.
|
485
|
+
- ext/libcouchbase/src/operations/get.cc
|
476
486
|
- ext/libcouchbase/src/operations/observe-seqno.cc
|
477
|
-
- ext/libcouchbase/src/operations/observe.
|
478
|
-
- ext/libcouchbase/src/operations/pktfwd.
|
479
|
-
- ext/libcouchbase/src/operations/remove.
|
487
|
+
- ext/libcouchbase/src/operations/observe.cc
|
488
|
+
- ext/libcouchbase/src/operations/pktfwd.cc
|
489
|
+
- ext/libcouchbase/src/operations/remove.cc
|
480
490
|
- ext/libcouchbase/src/operations/stats.cc
|
481
|
-
- ext/libcouchbase/src/operations/store.
|
491
|
+
- ext/libcouchbase/src/operations/store.cc
|
482
492
|
- ext/libcouchbase/src/operations/subdoc.cc
|
483
|
-
- ext/libcouchbase/src/operations/touch.
|
484
|
-
- ext/libcouchbase/src/packetutils.c
|
493
|
+
- ext/libcouchbase/src/operations/touch.cc
|
485
494
|
- ext/libcouchbase/src/packetutils.h
|
486
495
|
- ext/libcouchbase/src/probes.d
|
487
496
|
- ext/libcouchbase/src/rdb/bigalloc.c
|
@@ -490,15 +499,13 @@ files:
|
|
490
499
|
- ext/libcouchbase/src/rdb/libcalloc.c
|
491
500
|
- ext/libcouchbase/src/rdb/rope.c
|
492
501
|
- ext/libcouchbase/src/rdb/rope.h
|
493
|
-
- ext/libcouchbase/src/retrychk.
|
502
|
+
- ext/libcouchbase/src/retrychk.cc
|
494
503
|
- ext/libcouchbase/src/retryq.cc
|
495
504
|
- ext/libcouchbase/src/retryq.h
|
496
505
|
- ext/libcouchbase/src/ringbuffer.c
|
497
506
|
- ext/libcouchbase/src/ringbuffer.h
|
498
507
|
- ext/libcouchbase/src/settings.c
|
499
508
|
- ext/libcouchbase/src/settings.h
|
500
|
-
- ext/libcouchbase/src/simplestring.c
|
501
|
-
- ext/libcouchbase/src/simplestring.h
|
502
509
|
- ext/libcouchbase/src/sllist-inl.h
|
503
510
|
- ext/libcouchbase/src/sllist.h
|
504
511
|
- ext/libcouchbase/src/ssl/CMakeLists.txt
|
@@ -506,7 +513,6 @@ files:
|
|
506
513
|
- ext/libcouchbase/src/ssl/ssl_common.c
|
507
514
|
- ext/libcouchbase/src/ssl/ssl_e.c
|
508
515
|
- ext/libcouchbase/src/ssl/ssl_iot_common.h
|
509
|
-
- ext/libcouchbase/src/ssobuf.h
|
510
516
|
- ext/libcouchbase/src/strcodecs/base64.c
|
511
517
|
- ext/libcouchbase/src/strcodecs/strcodecs.h
|
512
518
|
- ext/libcouchbase/src/timings.c
|
@@ -522,9 +528,9 @@ files:
|
|
522
528
|
- ext/libcouchbase/src/vbucket/rfc1321/md5.h
|
523
529
|
- ext/libcouchbase/src/vbucket/rfc1321/md5c-inl.h
|
524
530
|
- ext/libcouchbase/src/vbucket/vbucket.c
|
525
|
-
- ext/libcouchbase/src/views/docreq.
|
531
|
+
- ext/libcouchbase/src/views/docreq.cc
|
526
532
|
- ext/libcouchbase/src/views/docreq.h
|
527
|
-
- ext/libcouchbase/src/views/viewreq.
|
533
|
+
- ext/libcouchbase/src/views/viewreq.cc
|
528
534
|
- ext/libcouchbase/src/views/viewreq.h
|
529
535
|
- ext/libcouchbase/src/wait.cc
|
530
536
|
- ext/libcouchbase/tests/CMakeLists.txt
|
@@ -545,7 +551,6 @@ files:
|
|
545
551
|
- ext/libcouchbase/tests/basic/t_ringbuffer.cc
|
546
552
|
- ext/libcouchbase/tests/basic/t_slist.cc
|
547
553
|
- ext/libcouchbase/tests/basic/t_strerror.cc
|
548
|
-
- ext/libcouchbase/tests/basic/t_string.cc
|
549
554
|
- ext/libcouchbase/tests/basic/t_urlencode.cc
|
550
555
|
- ext/libcouchbase/tests/check-all.cc
|
551
556
|
- ext/libcouchbase/tests/htparse/t_basic.cc
|
@@ -569,6 +574,8 @@ files:
|
|
569
574
|
- ext/libcouchbase/tests/iotests/t_configcache.cc
|
570
575
|
- ext/libcouchbase/tests/iotests/t_confmon.cc
|
571
576
|
- ext/libcouchbase/tests/iotests/t_durability.cc
|
577
|
+
- ext/libcouchbase/tests/iotests/t_eerrs.cc
|
578
|
+
- ext/libcouchbase/tests/iotests/t_errmap.cc
|
572
579
|
- ext/libcouchbase/tests/iotests/t_forward.cc
|
573
580
|
- ext/libcouchbase/tests/iotests/t_get.cc
|
574
581
|
- ext/libcouchbase/tests/iotests/t_http.cc
|
@@ -621,9 +628,11 @@ files:
|
|
621
628
|
- ext/libcouchbase/tests/unit_tests.cc
|
622
629
|
- ext/libcouchbase/tests/vbucket/confdata/bad.json
|
623
630
|
- ext/libcouchbase/tests/vbucket/confdata/full_25.json
|
631
|
+
- ext/libcouchbase/tests/vbucket/confdata/ketama_expected.json
|
624
632
|
- ext/libcouchbase/tests/vbucket/confdata/memd_25.json
|
625
633
|
- ext/libcouchbase/tests/vbucket/confdata/memd_30.json
|
626
634
|
- ext/libcouchbase/tests/vbucket/confdata/memd_45.json
|
635
|
+
- ext/libcouchbase/tests/vbucket/confdata/memd_ketama_config.json
|
627
636
|
- ext/libcouchbase/tests/vbucket/confdata/terse_25.json
|
628
637
|
- ext/libcouchbase/tests/vbucket/confdata/terse_30.json
|
629
638
|
- ext/libcouchbase/tests/vbucket/t_config.cc
|