redis-client 0.2.1 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +19 -0
- data/Gemfile +1 -2
- data/Gemfile.lock +2 -3
- data/README.md +71 -8
- data/Rakefile +43 -23
- data/lib/redis_client/command_builder.rb +91 -0
- data/lib/redis_client/config.rb +19 -50
- data/lib/redis_client/connection_mixin.rb +40 -0
- data/lib/redis_client/decorator.rb +84 -0
- data/lib/redis_client/pooled.rb +38 -30
- data/lib/redis_client/ruby_connection/buffered_io.rb +153 -0
- data/lib/redis_client/{resp3.rb → ruby_connection/resp3.rb} +0 -26
- data/lib/redis_client/{connection.rb → ruby_connection.rb} +26 -31
- data/lib/redis_client/version.rb +1 -1
- data/lib/redis_client.rb +183 -36
- data/redis-client.gemspec +2 -4
- metadata +12 -59
- data/.rubocop.yml +0 -190
- data/ext/redis_client/hiredis/export.clang +0 -2
- data/ext/redis_client/hiredis/export.gcc +0 -7
- data/ext/redis_client/hiredis/extconf.rb +0 -61
- data/ext/redis_client/hiredis/hiredis_connection.c +0 -708
- data/ext/redis_client/hiredis/vendor/.gitignore +0 -9
- data/ext/redis_client/hiredis/vendor/.travis.yml +0 -131
- data/ext/redis_client/hiredis/vendor/CHANGELOG.md +0 -364
- data/ext/redis_client/hiredis/vendor/CMakeLists.txt +0 -165
- data/ext/redis_client/hiredis/vendor/COPYING +0 -29
- data/ext/redis_client/hiredis/vendor/Makefile +0 -308
- data/ext/redis_client/hiredis/vendor/README.md +0 -664
- data/ext/redis_client/hiredis/vendor/adapters/ae.h +0 -130
- data/ext/redis_client/hiredis/vendor/adapters/glib.h +0 -156
- data/ext/redis_client/hiredis/vendor/adapters/ivykis.h +0 -84
- data/ext/redis_client/hiredis/vendor/adapters/libev.h +0 -179
- data/ext/redis_client/hiredis/vendor/adapters/libevent.h +0 -175
- data/ext/redis_client/hiredis/vendor/adapters/libuv.h +0 -117
- data/ext/redis_client/hiredis/vendor/adapters/macosx.h +0 -115
- data/ext/redis_client/hiredis/vendor/adapters/qt.h +0 -135
- data/ext/redis_client/hiredis/vendor/alloc.c +0 -86
- data/ext/redis_client/hiredis/vendor/alloc.h +0 -91
- data/ext/redis_client/hiredis/vendor/appveyor.yml +0 -24
- data/ext/redis_client/hiredis/vendor/async.c +0 -887
- data/ext/redis_client/hiredis/vendor/async.h +0 -147
- data/ext/redis_client/hiredis/vendor/async_private.h +0 -75
- data/ext/redis_client/hiredis/vendor/dict.c +0 -352
- data/ext/redis_client/hiredis/vendor/dict.h +0 -126
- data/ext/redis_client/hiredis/vendor/fmacros.h +0 -12
- data/ext/redis_client/hiredis/vendor/hiredis-config.cmake.in +0 -13
- data/ext/redis_client/hiredis/vendor/hiredis.c +0 -1174
- data/ext/redis_client/hiredis/vendor/hiredis.h +0 -336
- data/ext/redis_client/hiredis/vendor/hiredis.pc.in +0 -12
- data/ext/redis_client/hiredis/vendor/hiredis_ssl-config.cmake.in +0 -13
- data/ext/redis_client/hiredis/vendor/hiredis_ssl.h +0 -157
- data/ext/redis_client/hiredis/vendor/hiredis_ssl.pc.in +0 -12
- data/ext/redis_client/hiredis/vendor/net.c +0 -612
- data/ext/redis_client/hiredis/vendor/net.h +0 -56
- data/ext/redis_client/hiredis/vendor/read.c +0 -739
- data/ext/redis_client/hiredis/vendor/read.h +0 -129
- data/ext/redis_client/hiredis/vendor/sds.c +0 -1289
- data/ext/redis_client/hiredis/vendor/sds.h +0 -278
- data/ext/redis_client/hiredis/vendor/sdsalloc.h +0 -44
- data/ext/redis_client/hiredis/vendor/sockcompat.c +0 -248
- data/ext/redis_client/hiredis/vendor/sockcompat.h +0 -92
- data/ext/redis_client/hiredis/vendor/ssl.c +0 -544
- data/ext/redis_client/hiredis/vendor/test.c +0 -1401
- data/ext/redis_client/hiredis/vendor/test.sh +0 -78
- data/ext/redis_client/hiredis/vendor/win32.h +0 -56
- data/lib/redis_client/buffered_io.rb +0 -151
- data/lib/redis_client/hiredis_connection.rb +0 -80
@@ -1,91 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* Copyright (c) 2020, Michael Grunder <michael dot grunder at gmail dot com>
|
3
|
-
*
|
4
|
-
* All rights reserved.
|
5
|
-
*
|
6
|
-
* Redistribution and use in source and binary forms, with or without
|
7
|
-
* modification, are permitted provided that the following conditions are met:
|
8
|
-
*
|
9
|
-
* * Redistributions of source code must retain the above copyright notice,
|
10
|
-
* this list of conditions and the following disclaimer.
|
11
|
-
* * Redistributions in binary form must reproduce the above copyright
|
12
|
-
* notice, this list of conditions and the following disclaimer in the
|
13
|
-
* documentation and/or other materials provided with the distribution.
|
14
|
-
* * Neither the name of Redis nor the names of its contributors may be used
|
15
|
-
* to endorse or promote products derived from this software without
|
16
|
-
* specific prior written permission.
|
17
|
-
*
|
18
|
-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
19
|
-
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
20
|
-
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
21
|
-
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
22
|
-
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
23
|
-
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
24
|
-
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
25
|
-
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
26
|
-
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
27
|
-
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
28
|
-
* POSSIBILITY OF SUCH DAMAGE.
|
29
|
-
*/
|
30
|
-
|
31
|
-
#ifndef HIREDIS_ALLOC_H
|
32
|
-
#define HIREDIS_ALLOC_H
|
33
|
-
|
34
|
-
#include <stddef.h> /* for size_t */
|
35
|
-
|
36
|
-
#ifdef __cplusplus
|
37
|
-
extern "C" {
|
38
|
-
#endif
|
39
|
-
|
40
|
-
/* Structure pointing to our actually configured allocators */
|
41
|
-
typedef struct hiredisAllocFuncs {
|
42
|
-
void *(*mallocFn)(size_t);
|
43
|
-
void *(*callocFn)(size_t,size_t);
|
44
|
-
void *(*reallocFn)(void*,size_t);
|
45
|
-
char *(*strdupFn)(const char*);
|
46
|
-
void (*freeFn)(void*);
|
47
|
-
} hiredisAllocFuncs;
|
48
|
-
|
49
|
-
hiredisAllocFuncs hiredisSetAllocators(hiredisAllocFuncs *ha);
|
50
|
-
void hiredisResetAllocators(void);
|
51
|
-
|
52
|
-
#ifndef _WIN32
|
53
|
-
|
54
|
-
/* Hiredis' configured allocator function pointer struct */
|
55
|
-
extern hiredisAllocFuncs hiredisAllocFns;
|
56
|
-
|
57
|
-
static inline void *hi_malloc(size_t size) {
|
58
|
-
return hiredisAllocFns.mallocFn(size);
|
59
|
-
}
|
60
|
-
|
61
|
-
static inline void *hi_calloc(size_t nmemb, size_t size) {
|
62
|
-
return hiredisAllocFns.callocFn(nmemb, size);
|
63
|
-
}
|
64
|
-
|
65
|
-
static inline void *hi_realloc(void *ptr, size_t size) {
|
66
|
-
return hiredisAllocFns.reallocFn(ptr, size);
|
67
|
-
}
|
68
|
-
|
69
|
-
static inline char *hi_strdup(const char *str) {
|
70
|
-
return hiredisAllocFns.strdupFn(str);
|
71
|
-
}
|
72
|
-
|
73
|
-
static inline void hi_free(void *ptr) {
|
74
|
-
hiredisAllocFns.freeFn(ptr);
|
75
|
-
}
|
76
|
-
|
77
|
-
#else
|
78
|
-
|
79
|
-
void *hi_malloc(size_t size);
|
80
|
-
void *hi_calloc(size_t nmemb, size_t size);
|
81
|
-
void *hi_realloc(void *ptr, size_t size);
|
82
|
-
char *hi_strdup(const char *str);
|
83
|
-
void hi_free(void *ptr);
|
84
|
-
|
85
|
-
#endif
|
86
|
-
|
87
|
-
#ifdef __cplusplus
|
88
|
-
}
|
89
|
-
#endif
|
90
|
-
|
91
|
-
#endif /* HIREDIS_ALLOC_H */
|
@@ -1,24 +0,0 @@
|
|
1
|
-
# Appveyor configuration file for CI build of hiredis on Windows (under Cygwin)
|
2
|
-
environment:
|
3
|
-
matrix:
|
4
|
-
- CYG_BASH: C:\cygwin64\bin\bash
|
5
|
-
CC: gcc
|
6
|
-
- CYG_BASH: C:\cygwin\bin\bash
|
7
|
-
CC: gcc
|
8
|
-
CFLAGS: -m32
|
9
|
-
CXXFLAGS: -m32
|
10
|
-
LDFLAGS: -m32
|
11
|
-
|
12
|
-
clone_depth: 1
|
13
|
-
|
14
|
-
# Attempt to ensure we don't try to convert line endings to Win32 CRLF as this will cause build to fail
|
15
|
-
init:
|
16
|
-
- git config --global core.autocrlf input
|
17
|
-
|
18
|
-
# Install needed build dependencies
|
19
|
-
install:
|
20
|
-
- '%CYG_BASH% -lc "cygcheck -dc cygwin"'
|
21
|
-
|
22
|
-
build_script:
|
23
|
-
- 'echo building...'
|
24
|
-
- '%CYG_BASH% -lc "cd $APPVEYOR_BUILD_FOLDER; exec 0</dev/null; mkdir build && cd build && cmake .. -G \"Unix Makefiles\" && make VERBOSE=1"'
|