redis-client 0.2.0 → 0.4.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 +16 -0
- data/Gemfile +1 -2
- data/Gemfile.lock +2 -3
- data/README.md +66 -3
- data/Rakefile +43 -23
- data/lib/redis_client/command_builder.rb +83 -0
- data/lib/redis_client/config.rb +9 -48
- data/lib/redis_client/connection_mixin.rb +38 -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 +162 -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 -62
- 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
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: redis-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jean Boussier
|
8
8
|
autorequire:
|
9
|
-
bindir:
|
9
|
+
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-05-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: connection_pool
|
@@ -28,79 +28,32 @@ description:
|
|
28
28
|
email:
|
29
29
|
- jean.boussier@gmail.com
|
30
30
|
executables: []
|
31
|
-
extensions:
|
32
|
-
- ext/redis_client/hiredis/extconf.rb
|
31
|
+
extensions: []
|
33
32
|
extra_rdoc_files: []
|
34
33
|
files:
|
35
|
-
- ".rubocop.yml"
|
36
34
|
- CHANGELOG.md
|
37
35
|
- Gemfile
|
38
36
|
- Gemfile.lock
|
39
37
|
- LICENSE.md
|
40
38
|
- README.md
|
41
39
|
- Rakefile
|
42
|
-
- ext/redis_client/hiredis/export.clang
|
43
|
-
- ext/redis_client/hiredis/export.gcc
|
44
|
-
- ext/redis_client/hiredis/extconf.rb
|
45
|
-
- ext/redis_client/hiredis/hiredis_connection.c
|
46
|
-
- ext/redis_client/hiredis/vendor/.gitignore
|
47
|
-
- ext/redis_client/hiredis/vendor/.travis.yml
|
48
|
-
- ext/redis_client/hiredis/vendor/CHANGELOG.md
|
49
|
-
- ext/redis_client/hiredis/vendor/CMakeLists.txt
|
50
|
-
- ext/redis_client/hiredis/vendor/COPYING
|
51
|
-
- ext/redis_client/hiredis/vendor/Makefile
|
52
|
-
- ext/redis_client/hiredis/vendor/README.md
|
53
|
-
- ext/redis_client/hiredis/vendor/adapters/ae.h
|
54
|
-
- ext/redis_client/hiredis/vendor/adapters/glib.h
|
55
|
-
- ext/redis_client/hiredis/vendor/adapters/ivykis.h
|
56
|
-
- ext/redis_client/hiredis/vendor/adapters/libev.h
|
57
|
-
- ext/redis_client/hiredis/vendor/adapters/libevent.h
|
58
|
-
- ext/redis_client/hiredis/vendor/adapters/libuv.h
|
59
|
-
- ext/redis_client/hiredis/vendor/adapters/macosx.h
|
60
|
-
- ext/redis_client/hiredis/vendor/adapters/qt.h
|
61
|
-
- ext/redis_client/hiredis/vendor/alloc.c
|
62
|
-
- ext/redis_client/hiredis/vendor/alloc.h
|
63
|
-
- ext/redis_client/hiredis/vendor/appveyor.yml
|
64
|
-
- ext/redis_client/hiredis/vendor/async.c
|
65
|
-
- ext/redis_client/hiredis/vendor/async.h
|
66
|
-
- ext/redis_client/hiredis/vendor/async_private.h
|
67
|
-
- ext/redis_client/hiredis/vendor/dict.c
|
68
|
-
- ext/redis_client/hiredis/vendor/dict.h
|
69
|
-
- ext/redis_client/hiredis/vendor/fmacros.h
|
70
|
-
- ext/redis_client/hiredis/vendor/hiredis-config.cmake.in
|
71
|
-
- ext/redis_client/hiredis/vendor/hiredis.c
|
72
|
-
- ext/redis_client/hiredis/vendor/hiredis.h
|
73
|
-
- ext/redis_client/hiredis/vendor/hiredis.pc.in
|
74
|
-
- ext/redis_client/hiredis/vendor/hiredis_ssl-config.cmake.in
|
75
|
-
- ext/redis_client/hiredis/vendor/hiredis_ssl.h
|
76
|
-
- ext/redis_client/hiredis/vendor/hiredis_ssl.pc.in
|
77
|
-
- ext/redis_client/hiredis/vendor/net.c
|
78
|
-
- ext/redis_client/hiredis/vendor/net.h
|
79
|
-
- ext/redis_client/hiredis/vendor/read.c
|
80
|
-
- ext/redis_client/hiredis/vendor/read.h
|
81
|
-
- ext/redis_client/hiredis/vendor/sds.c
|
82
|
-
- ext/redis_client/hiredis/vendor/sds.h
|
83
|
-
- ext/redis_client/hiredis/vendor/sdsalloc.h
|
84
|
-
- ext/redis_client/hiredis/vendor/sockcompat.c
|
85
|
-
- ext/redis_client/hiredis/vendor/sockcompat.h
|
86
|
-
- ext/redis_client/hiredis/vendor/ssl.c
|
87
|
-
- ext/redis_client/hiredis/vendor/test.c
|
88
|
-
- ext/redis_client/hiredis/vendor/test.sh
|
89
|
-
- ext/redis_client/hiredis/vendor/win32.h
|
90
40
|
- lib/redis-client.rb
|
91
41
|
- lib/redis_client.rb
|
92
|
-
- lib/redis_client/
|
42
|
+
- lib/redis_client/command_builder.rb
|
93
43
|
- lib/redis_client/config.rb
|
94
|
-
- lib/redis_client/
|
95
|
-
- lib/redis_client/
|
44
|
+
- lib/redis_client/connection_mixin.rb
|
45
|
+
- lib/redis_client/decorator.rb
|
96
46
|
- lib/redis_client/middlewares.rb
|
97
47
|
- lib/redis_client/pooled.rb
|
98
|
-
- lib/redis_client/
|
48
|
+
- lib/redis_client/ruby_connection.rb
|
49
|
+
- lib/redis_client/ruby_connection/buffered_io.rb
|
50
|
+
- lib/redis_client/ruby_connection/resp3.rb
|
99
51
|
- lib/redis_client/sentinel_config.rb
|
100
52
|
- lib/redis_client/version.rb
|
101
53
|
- redis-client.gemspec
|
102
54
|
homepage: https://github.com/redis-rb/redis-client
|
103
|
-
licenses:
|
55
|
+
licenses:
|
56
|
+
- MIT
|
104
57
|
metadata:
|
105
58
|
allowed_push_host: https://rubygems.org
|
106
59
|
homepage_uri: https://github.com/redis-rb/redis-client
|
data/.rubocop.yml
DELETED
@@ -1,190 +0,0 @@
|
|
1
|
-
AllCops:
|
2
|
-
TargetRubyVersion: 2.5
|
3
|
-
NewCops: enable
|
4
|
-
SuggestExtensions: false
|
5
|
-
|
6
|
-
Layout/LineLength:
|
7
|
-
Max: 120
|
8
|
-
Exclude:
|
9
|
-
- 'test/**/*'
|
10
|
-
|
11
|
-
Layout/CaseIndentation:
|
12
|
-
EnforcedStyle: end
|
13
|
-
|
14
|
-
Layout/LineEndStringConcatenationIndentation:
|
15
|
-
EnforcedStyle: indented
|
16
|
-
|
17
|
-
Layout/ArgumentAlignment:
|
18
|
-
EnforcedStyle: with_fixed_indentation
|
19
|
-
|
20
|
-
Lint/RescueException:
|
21
|
-
Enabled: false
|
22
|
-
|
23
|
-
Lint/SuppressedException:
|
24
|
-
Enabled: false
|
25
|
-
|
26
|
-
Lint/AssignmentInCondition:
|
27
|
-
Enabled: false
|
28
|
-
|
29
|
-
Lint/UnifiedInteger:
|
30
|
-
Enabled: false
|
31
|
-
|
32
|
-
Lint/UnderscorePrefixedVariableName:
|
33
|
-
Enabled: false
|
34
|
-
|
35
|
-
Lint/EmptyBlock:
|
36
|
-
Enabled: false
|
37
|
-
|
38
|
-
Lint/MissingSuper:
|
39
|
-
Enabled: false
|
40
|
-
|
41
|
-
Metrics/ClassLength:
|
42
|
-
Enabled: false
|
43
|
-
|
44
|
-
Metrics/CyclomaticComplexity:
|
45
|
-
Enabled: false
|
46
|
-
|
47
|
-
Metrics/AbcSize:
|
48
|
-
Enabled: false
|
49
|
-
|
50
|
-
Metrics/BlockLength:
|
51
|
-
Enabled: false
|
52
|
-
|
53
|
-
Metrics/MethodLength:
|
54
|
-
Enabled: false
|
55
|
-
|
56
|
-
Metrics/ModuleLength:
|
57
|
-
Enabled: false
|
58
|
-
|
59
|
-
Metrics/ParameterLists:
|
60
|
-
Enabled: false
|
61
|
-
|
62
|
-
Metrics/PerceivedComplexity:
|
63
|
-
Enabled: false
|
64
|
-
|
65
|
-
Style/Alias:
|
66
|
-
EnforcedStyle: prefer_alias_method
|
67
|
-
|
68
|
-
Style/PercentLiteralDelimiters:
|
69
|
-
Enabled: false
|
70
|
-
|
71
|
-
Style/ParallelAssignment:
|
72
|
-
Enabled: false
|
73
|
-
|
74
|
-
Style/NumericPredicate:
|
75
|
-
Enabled: false
|
76
|
-
|
77
|
-
Style/NumericLiterals:
|
78
|
-
Enabled: false
|
79
|
-
|
80
|
-
Style/IfUnlessModifier:
|
81
|
-
Enabled: false
|
82
|
-
|
83
|
-
Style/SignalException:
|
84
|
-
Exclude:
|
85
|
-
- 'lib/redis/connection/synchrony.rb'
|
86
|
-
|
87
|
-
Style/StringLiterals:
|
88
|
-
Enabled: false
|
89
|
-
|
90
|
-
Style/DoubleNegation:
|
91
|
-
Enabled: false
|
92
|
-
|
93
|
-
Style/MultipleComparison:
|
94
|
-
Enabled: false
|
95
|
-
|
96
|
-
Style/GuardClause:
|
97
|
-
Enabled: false
|
98
|
-
|
99
|
-
Style/Semicolon:
|
100
|
-
Enabled: false
|
101
|
-
|
102
|
-
Style/Documentation:
|
103
|
-
Enabled: false
|
104
|
-
|
105
|
-
Style/FormatStringToken:
|
106
|
-
Enabled: false
|
107
|
-
|
108
|
-
Style/FormatString:
|
109
|
-
Enabled: false
|
110
|
-
|
111
|
-
Style/RescueStandardError:
|
112
|
-
Enabled: false
|
113
|
-
|
114
|
-
Style/WordArray:
|
115
|
-
Enabled: false
|
116
|
-
|
117
|
-
Style/TrailingCommaInArrayLiteral:
|
118
|
-
EnforcedStyleForMultiline: consistent_comma
|
119
|
-
|
120
|
-
Style/TrailingCommaInHashLiteral:
|
121
|
-
EnforcedStyleForMultiline: consistent_comma
|
122
|
-
|
123
|
-
Style/TrailingCommaInArguments:
|
124
|
-
EnforcedStyleForMultiline: consistent_comma
|
125
|
-
|
126
|
-
Lint/NonLocalExitFromIterator:
|
127
|
-
Enabled: false
|
128
|
-
|
129
|
-
Layout/FirstArrayElementIndentation:
|
130
|
-
EnforcedStyle: consistent
|
131
|
-
|
132
|
-
Layout/FirstHashElementIndentation:
|
133
|
-
EnforcedStyle: consistent
|
134
|
-
|
135
|
-
Layout/EndAlignment:
|
136
|
-
EnforcedStyleAlignWith: variable
|
137
|
-
|
138
|
-
Layout/ElseAlignment:
|
139
|
-
Enabled: false
|
140
|
-
|
141
|
-
Layout/RescueEnsureAlignment:
|
142
|
-
Enabled: false
|
143
|
-
|
144
|
-
Naming/HeredocDelimiterNaming:
|
145
|
-
Enabled: false
|
146
|
-
|
147
|
-
Naming/FileName:
|
148
|
-
Enabled: false
|
149
|
-
|
150
|
-
Naming/RescuedExceptionsVariableName:
|
151
|
-
Enabled: false
|
152
|
-
|
153
|
-
Naming/AccessorMethodName:
|
154
|
-
Exclude:
|
155
|
-
- lib/redis/connection/ruby.rb
|
156
|
-
|
157
|
-
Naming/MethodParameterName:
|
158
|
-
Enabled: false
|
159
|
-
|
160
|
-
Metrics/BlockNesting:
|
161
|
-
Enabled: false
|
162
|
-
|
163
|
-
Style/HashTransformValues:
|
164
|
-
Enabled: false
|
165
|
-
|
166
|
-
Style/SymbolProc:
|
167
|
-
Exclude:
|
168
|
-
- 'test/**/*'
|
169
|
-
|
170
|
-
Style/SoleNestedConditional:
|
171
|
-
Enabled: false
|
172
|
-
|
173
|
-
Style/GlobalVars:
|
174
|
-
Exclude:
|
175
|
-
- 'ext/**/*'
|
176
|
-
|
177
|
-
Gemspec/RequireMFA:
|
178
|
-
Enabled: false
|
179
|
-
|
180
|
-
Style/StderrPuts:
|
181
|
-
Enabled: false
|
182
|
-
|
183
|
-
Style/ModuleFunction:
|
184
|
-
Enabled: false
|
185
|
-
|
186
|
-
Style/CombinableLoops:
|
187
|
-
Enabled: false
|
188
|
-
|
189
|
-
Style/DocumentDynamicEvalDefinition:
|
190
|
-
Enabled: false
|
@@ -1,62 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "mkmf"
|
4
|
-
|
5
|
-
if RUBY_ENGINE == "ruby" && !RUBY_ENGINE.match?(/mswin/)
|
6
|
-
have_func("rb_hash_new_capa", "ruby.h")
|
7
|
-
|
8
|
-
hiredis_dir = File.expand_path('vendor', __dir__)
|
9
|
-
|
10
|
-
make_program = with_config("make-prog", ENV["MAKE"])
|
11
|
-
make_program ||= case RUBY_PLATFORM
|
12
|
-
when /(bsd|solaris)/
|
13
|
-
'gmake'
|
14
|
-
else
|
15
|
-
'make'
|
16
|
-
end
|
17
|
-
|
18
|
-
openssl_include, openssl_lib = dir_config("openssl")
|
19
|
-
|
20
|
-
openssl_include ||= dir_config("opt").first
|
21
|
-
&.split(File::PATH_SEPARATOR)
|
22
|
-
&.detect { |dir| dir.include?("openssl") }
|
23
|
-
|
24
|
-
openssl_lib ||= dir_config("opt").last
|
25
|
-
&.split(File::PATH_SEPARATOR)
|
26
|
-
&.detect { |dir| dir.include?("openssl") }
|
27
|
-
|
28
|
-
if (!openssl_include || !openssl_lib) && !have_header("openssl/ssl.h")
|
29
|
-
raise "OpenSSL library could not be found. You might want to use --with-openssl-dir=<dir> option to specify the " \
|
30
|
-
"prefix where OpenSSL is installed."
|
31
|
-
end
|
32
|
-
|
33
|
-
Dir.chdir(hiredis_dir) do
|
34
|
-
flags = %(CFLAGS="-I#{openssl_include}" SSL_LDFLAGS="-L#{openssl_lib}") if openssl_lib
|
35
|
-
success = system("#{make_program} static USE_SSL=1 #{flags}")
|
36
|
-
raise "Building hiredis failed" unless success
|
37
|
-
end
|
38
|
-
|
39
|
-
$CFLAGS << " -I#{hiredis_dir}"
|
40
|
-
$LDFLAGS << " -lssl -lcrypto"
|
41
|
-
$libs << " #{hiredis_dir}/libhiredis.a #{hiredis_dir}/libhiredis_ssl.a "
|
42
|
-
$CFLAGS << " -O3"
|
43
|
-
$CFLAGS << " -std=c99 "
|
44
|
-
|
45
|
-
case RbConfig::CONFIG['CC']
|
46
|
-
when /gcc/i
|
47
|
-
$LDFLAGS << ' -Wl,--version-script="' << File.join(__dir__, 'export.gcc') << '"'
|
48
|
-
when /clang/i
|
49
|
-
$LDFLAGS << ' -Wl,-exported_symbols_list,"' << File.join(__dir__, 'export.clang') << '"'
|
50
|
-
end
|
51
|
-
|
52
|
-
if ENV["EXT_PEDANTIC"]
|
53
|
-
$CFLAGS << " -Werror"
|
54
|
-
end
|
55
|
-
|
56
|
-
$CFLAGS << " -Wno-declaration-after-statement" # Older compilers
|
57
|
-
$CFLAGS << " -Wno-compound-token-split-by-macro" # Older rubies on macos
|
58
|
-
|
59
|
-
create_makefile("redis_client/hiredis_connection")
|
60
|
-
else
|
61
|
-
File.write("Makefile", dummy_makefile($srcdir).join)
|
62
|
-
end
|