libcouchbase 1.0.1 → 1.0.2
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.
- checksums.yaml +4 -4
- data/ext/libcouchbase/cmake/dtrace-instr-link.pl +17 -4
- data/ext/libcouchbase/contrib/cliopts/cliopts.c +85 -1
- data/ext/libcouchbase/contrib/cliopts/cliopts.h +45 -0
- data/ext/libcouchbase/example/subdoc/subdoc-multi.cc +11 -0
- data/ext/libcouchbase/example/subdoc/subdoc-simple.cc +10 -0
- data/ext/libcouchbase/example/subdoc/subdoc-xattrs.c +287 -0
- data/ext/libcouchbase/include/libcouchbase/subdoc.h +5 -0
- data/ext/libcouchbase/plugins/io/iocp/iocp_iops.c +1 -0
- data/ext/libcouchbase/plugins/io/libuv/libuv_compat.h +3 -3
- data/ext/libcouchbase/src/legacy.c +1 -0
- data/ext/libcouchbase/src/logging.c +1 -1
- data/ext/libcouchbase/src/operations/subdoc.cc +6 -1
- data/ext/libcouchbase/tools/CMakeLists.txt +4 -0
- data/ext/libcouchbase/tools/cbc-pillowfight.cc +1 -1
- data/ext/libcouchbase/tools/common/options.cc +16 -12
- data/ext/libcouchbase/tools/common/options.h +1 -0
- data/ext/libcouchbase/tools/linenoise/linenoise.c +1199 -0
- data/ext/libcouchbase/tools/linenoise/linenoise.h +73 -0
- data/lib/libcouchbase/connection.rb +14 -11
- data/lib/libcouchbase/version.rb +1 -1
- data/libcouchbase.gemspec +1 -1
- metadata +7 -4
@@ -0,0 +1,73 @@
|
|
1
|
+
/* linenoise.h -- VERSION 1.0
|
2
|
+
*
|
3
|
+
* Guerrilla line editing library against the idea that a line editing lib
|
4
|
+
* needs to be 20,000 lines of C code.
|
5
|
+
*
|
6
|
+
* See linenoise.c for more information.
|
7
|
+
*
|
8
|
+
* ------------------------------------------------------------------------
|
9
|
+
*
|
10
|
+
* Copyright (c) 2010-2014, Salvatore Sanfilippo <antirez at gmail dot com>
|
11
|
+
* Copyright (c) 2010-2013, Pieter Noordhuis <pcnoordhuis at gmail dot com>
|
12
|
+
*
|
13
|
+
* All rights reserved.
|
14
|
+
*
|
15
|
+
* Redistribution and use in source and binary forms, with or without
|
16
|
+
* modification, are permitted provided that the following conditions are
|
17
|
+
* met:
|
18
|
+
*
|
19
|
+
* * Redistributions of source code must retain the above copyright
|
20
|
+
* notice, this list of conditions and the following disclaimer.
|
21
|
+
*
|
22
|
+
* * Redistributions in binary form must reproduce the above copyright
|
23
|
+
* notice, this list of conditions and the following disclaimer in the
|
24
|
+
* documentation and/or other materials provided with the distribution.
|
25
|
+
*
|
26
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
27
|
+
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
28
|
+
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
29
|
+
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
30
|
+
* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
31
|
+
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
32
|
+
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
33
|
+
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
34
|
+
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
35
|
+
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
36
|
+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
37
|
+
*/
|
38
|
+
|
39
|
+
#ifndef __LINENOISE_H
|
40
|
+
#define __LINENOISE_H
|
41
|
+
|
42
|
+
#ifdef __cplusplus
|
43
|
+
extern "C" {
|
44
|
+
#endif
|
45
|
+
|
46
|
+
typedef struct linenoiseCompletions {
|
47
|
+
size_t len;
|
48
|
+
char **cvec;
|
49
|
+
} linenoiseCompletions;
|
50
|
+
|
51
|
+
typedef void(linenoiseCompletionCallback)(const char *, linenoiseCompletions *);
|
52
|
+
typedef char*(linenoiseHintsCallback)(const char *, int *color, int *bold);
|
53
|
+
typedef void(linenoiseFreeHintsCallback)(void *);
|
54
|
+
void linenoiseSetCompletionCallback(linenoiseCompletionCallback *);
|
55
|
+
void linenoiseSetHintsCallback(linenoiseHintsCallback *);
|
56
|
+
void linenoiseSetFreeHintsCallback(linenoiseFreeHintsCallback *);
|
57
|
+
void linenoiseAddCompletion(linenoiseCompletions *, const char *);
|
58
|
+
|
59
|
+
char *linenoise(const char *prompt);
|
60
|
+
void linenoiseFree(void *ptr);
|
61
|
+
int linenoiseHistoryAdd(const char *line);
|
62
|
+
int linenoiseHistorySetMaxLen(int len);
|
63
|
+
int linenoiseHistorySave(const char *filename);
|
64
|
+
int linenoiseHistoryLoad(const char *filename);
|
65
|
+
void linenoiseClearScreen(void);
|
66
|
+
void linenoiseSetMultiLine(int ml);
|
67
|
+
void linenoisePrintKeyCodes(void);
|
68
|
+
|
69
|
+
#ifdef __cplusplus
|
70
|
+
}
|
71
|
+
#endif
|
72
|
+
|
73
|
+
#endif /* __LINENOISE_H */
|
@@ -177,21 +177,24 @@ module Libcouchbase
|
|
177
177
|
end
|
178
178
|
|
179
179
|
def destroy
|
180
|
-
raise 'not connected' unless @handle
|
181
180
|
return @destroy_defer.promise if @destroy_defer
|
182
181
|
|
183
182
|
# Ensure it is thread safe
|
184
183
|
defer = @reactor.defer
|
185
|
-
@
|
186
|
-
|
187
|
-
@destroy_defer
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
184
|
+
if @handle
|
185
|
+
@reactor.schedule {
|
186
|
+
if @destroy_defer.nil?
|
187
|
+
@destroy_defer = defer
|
188
|
+
Ext.destroy(@handle)
|
189
|
+
handle_destroyed
|
190
|
+
defer.resolve(nil)
|
191
|
+
else
|
192
|
+
defer.resolve(@destroy_defer.promise)
|
193
|
+
end
|
194
|
+
}
|
195
|
+
else
|
196
|
+
defer.resolve(nil)
|
197
|
+
end
|
195
198
|
defer.promise
|
196
199
|
end
|
197
200
|
|
data/lib/libcouchbase/version.rb
CHANGED
data/libcouchbase.gemspec
CHANGED
@@ -17,7 +17,7 @@ Gem::Specification.new do |gem|
|
|
17
17
|
|
18
18
|
gem.add_runtime_dependency 'ffi', '~> 1.9'
|
19
19
|
gem.add_runtime_dependency 'concurrent-ruby', '~> 1.0'
|
20
|
-
gem.add_runtime_dependency 'libuv', '>= 3.2.
|
20
|
+
gem.add_runtime_dependency 'libuv', '>= 3.2.2', '< 4'
|
21
21
|
|
22
22
|
gem.add_development_dependency 'rake', '~> 11.2'
|
23
23
|
gem.add_development_dependency 'rspec', '~> 3.5'
|
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: 1.0.
|
4
|
+
version: 1.0.2
|
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-08-
|
11
|
+
date: 2017-08-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi
|
@@ -44,7 +44,7 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 3.2.
|
47
|
+
version: 3.2.2
|
48
48
|
- - "<"
|
49
49
|
- !ruby/object:Gem::Version
|
50
50
|
version: '4'
|
@@ -54,7 +54,7 @@ dependencies:
|
|
54
54
|
requirements:
|
55
55
|
- - ">="
|
56
56
|
- !ruby/object:Gem::Version
|
57
|
-
version: 3.2.
|
57
|
+
version: 3.2.2
|
58
58
|
- - "<"
|
59
59
|
- !ruby/object:Gem::Version
|
60
60
|
version: '4'
|
@@ -315,6 +315,7 @@ files:
|
|
315
315
|
- ext/libcouchbase/example/observe/observe.c
|
316
316
|
- ext/libcouchbase/example/subdoc/subdoc-multi.cc
|
317
317
|
- ext/libcouchbase/example/subdoc/subdoc-simple.cc
|
318
|
+
- ext/libcouchbase/example/subdoc/subdoc-xattrs.c
|
318
319
|
- ext/libcouchbase/example/tick/tick.c
|
319
320
|
- ext/libcouchbase/example/users/README
|
320
321
|
- ext/libcouchbase/example/users/users.c
|
@@ -650,6 +651,8 @@ files:
|
|
650
651
|
- ext/libcouchbase/tools/docgen/loc.h
|
651
652
|
- ext/libcouchbase/tools/docgen/placeholders.h
|
652
653
|
- ext/libcouchbase/tools/docgen/seqgen.h
|
654
|
+
- ext/libcouchbase/tools/linenoise/linenoise.c
|
655
|
+
- ext/libcouchbase/tools/linenoise/linenoise.h
|
653
656
|
- lib/libcouchbase.rb
|
654
657
|
- lib/libcouchbase/bucket.rb
|
655
658
|
- lib/libcouchbase/callbacks.rb
|