protocol-redis 0.5.0 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/protocol/redis/connection.rb +2 -19
- data/lib/protocol/redis/error.rb +2 -19
- data/lib/protocol/redis/methods/cluster.rb +30 -0
- data/lib/protocol/redis/methods/connection.rb +6 -22
- data/lib/protocol/redis/methods/counting.rb +2 -19
- data/lib/protocol/redis/methods/generic.rb +11 -20
- data/lib/protocol/redis/methods/geospatial.rb +2 -19
- data/lib/protocol/redis/methods/hashes.rb +74 -27
- data/lib/protocol/redis/methods/lists.rb +3 -20
- data/lib/protocol/redis/methods/pubsub.rb +20 -0
- data/lib/protocol/redis/methods/scripting.rb +10 -51
- data/lib/protocol/redis/methods/server.rb +4 -21
- data/lib/protocol/redis/methods/sets.rb +2 -19
- data/lib/protocol/redis/methods/sorted_sets.rb +2 -19
- data/lib/protocol/redis/methods/streams.rb +2 -19
- data/lib/protocol/redis/methods/strings.rb +2 -20
- data/lib/protocol/redis/methods.rb +18 -20
- data/lib/protocol/redis/version.rb +3 -20
- data/lib/protocol/redis.rb +2 -19
- data/license.md +29 -0
- data/readme.md +50 -0
- data.tar.gz.sig +0 -0
- metadata +55 -124
- metadata.gz.sig +0 -0
- data/.editorconfig +0 -6
- data/.github/workflows/development.yml +0 -34
- data/.gitignore +0 -13
- data/.rspec +0 -3
- data/Gemfile +0 -10
- data/README.md +0 -67
- data/Rakefile +0 -10
- data/benchmark/call.rb +0 -55
- data/protocol-redis.gemspec +0 -27
- data/tasks/generate.rake +0 -174
- data/tasks/methods.trenni +0 -46
@@ -1,24 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
#
|
4
|
-
#
|
5
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
# of this software and associated documentation files (the "Software"), to deal
|
7
|
-
# in the Software without restriction, including without limitation the rights
|
8
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
# copies of the Software, and to permit persons to whom the Software is
|
10
|
-
# furnished to do so, subject to the following conditions:
|
11
|
-
#
|
12
|
-
# The above copyright notice and this permission notice shall be included in
|
13
|
-
# all copies or substantial portions of the Software.
|
14
|
-
#
|
15
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
# THE SOFTWARE.
|
3
|
+
# Released under the MIT License.
|
4
|
+
# Copyright, 2020-2023, by Samuel Williams.
|
22
5
|
|
23
6
|
module Protocol
|
24
7
|
module Redis
|
@@ -1,25 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
#
|
4
|
-
# Copyright,
|
5
|
-
#
|
6
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
|
-
# of this software and associated documentation files (the "Software"), to deal
|
8
|
-
# in the Software without restriction, including without limitation the rights
|
9
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
10
|
-
# copies of the Software, and to permit persons to whom the Software is
|
11
|
-
# furnished to do so, subject to the following conditions:
|
12
|
-
#
|
13
|
-
# The above copyright notice and this permission notice shall be included in
|
14
|
-
# all copies or substantial portions of the Software.
|
15
|
-
#
|
16
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
17
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
18
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
19
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
20
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
21
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
22
|
-
# THE SOFTWARE.
|
3
|
+
# Released under the MIT License.
|
4
|
+
# Copyright, 2019-2023, by Samuel Williams.
|
23
5
|
|
24
6
|
module Protocol
|
25
7
|
module Redis
|
@@ -1,37 +1,29 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
#
|
4
|
-
#
|
5
|
-
#
|
6
|
-
#
|
7
|
-
#
|
8
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
# copies of the Software, and to permit persons to whom the Software is
|
10
|
-
# furnished to do so, subject to the following conditions:
|
11
|
-
#
|
12
|
-
# The above copyright notice and this permission notice shall be included in
|
13
|
-
# all copies or substantial portions of the Software.
|
14
|
-
#
|
15
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
# THE SOFTWARE.
|
3
|
+
# Released under the MIT License.
|
4
|
+
# Copyright, 2019-2023, by Samuel Williams.
|
5
|
+
# Copyright, 2020, by Dimitry Chopey.
|
6
|
+
# Copyright, 2021, by Daniel Evans.
|
7
|
+
# Copyright, 2023, by Nick Burwell.
|
22
8
|
|
23
9
|
require_relative 'methods/generic'
|
24
10
|
require_relative 'methods/connection'
|
25
11
|
require_relative 'methods/server'
|
12
|
+
require_relative 'methods/cluster'
|
26
13
|
require_relative 'methods/geospatial'
|
27
14
|
|
28
15
|
require_relative 'methods/counting'
|
29
16
|
|
30
17
|
require_relative 'methods/hashes'
|
31
18
|
require_relative 'methods/lists'
|
19
|
+
require_relative 'methods/scripting'
|
20
|
+
require_relative 'methods/sets'
|
32
21
|
require_relative 'methods/strings'
|
22
|
+
require_relative 'methods/streams'
|
33
23
|
require_relative 'methods/sorted_sets'
|
34
24
|
|
25
|
+
require_relative 'methods/pubsub'
|
26
|
+
|
35
27
|
module Protocol
|
36
28
|
module Redis
|
37
29
|
module Methods
|
@@ -39,15 +31,21 @@ module Protocol
|
|
39
31
|
klass.include Methods::Generic
|
40
32
|
klass.include Methods::Connection
|
41
33
|
klass.include Methods::Server
|
34
|
+
klass.include Methods::Cluster
|
42
35
|
klass.include Methods::Geospatial
|
43
36
|
|
44
37
|
klass.include Methods::Counting
|
45
38
|
|
46
39
|
klass.include Methods::Hashes
|
47
40
|
klass.include Methods::Lists
|
41
|
+
klass.include Methods::Scripting
|
42
|
+
klass.include Methods::Sets
|
48
43
|
klass.include Methods::SortedSets
|
49
44
|
klass.include Methods::Strings
|
45
|
+
klass.include Methods::Streams
|
46
|
+
|
47
|
+
klass.include Methods::Pubsub
|
50
48
|
end
|
51
49
|
end
|
52
50
|
end
|
53
|
-
end
|
51
|
+
end
|
@@ -1,27 +1,10 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
#
|
4
|
-
#
|
5
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
# of this software and associated documentation files (the "Software"), to deal
|
7
|
-
# in the Software without restriction, including without limitation the rights
|
8
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
# copies of the Software, and to permit persons to whom the Software is
|
10
|
-
# furnished to do so, subject to the following conditions:
|
11
|
-
#
|
12
|
-
# The above copyright notice and this permission notice shall be included in
|
13
|
-
# all copies or substantial portions of the Software.
|
14
|
-
#
|
15
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
# THE SOFTWARE.
|
3
|
+
# Released under the MIT License.
|
4
|
+
# Copyright, 2019-2023, by Samuel Williams.
|
22
5
|
|
23
6
|
module Protocol
|
24
7
|
module Redis
|
25
|
-
VERSION = "0.
|
8
|
+
VERSION = "0.8.0"
|
26
9
|
end
|
27
10
|
end
|
data/lib/protocol/redis.rb
CHANGED
@@ -1,24 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
#
|
4
|
-
#
|
5
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
# of this software and associated documentation files (the "Software"), to deal
|
7
|
-
# in the Software without restriction, including without limitation the rights
|
8
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
# copies of the Software, and to permit persons to whom the Software is
|
10
|
-
# furnished to do so, subject to the following conditions:
|
11
|
-
#
|
12
|
-
# The above copyright notice and this permission notice shall be included in
|
13
|
-
# all copies or substantial portions of the Software.
|
14
|
-
#
|
15
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
# THE SOFTWARE.
|
3
|
+
# Released under the MIT License.
|
4
|
+
# Copyright, 2019-2023, by Samuel Williams.
|
22
5
|
|
23
6
|
require_relative 'redis/version'
|
24
7
|
require_relative 'redis/connection'
|
data/license.md
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
# MIT License
|
2
|
+
|
3
|
+
Copyright, 2019-2023, by Samuel Williams.
|
4
|
+
Copyright, 2020, by Olle Jonsson.
|
5
|
+
Copyright, 2020, by Salim Semaoune.
|
6
|
+
Copyright, 2020, by Dimitry Chopey.
|
7
|
+
Copyright, 2020, by Nakul Warrier.
|
8
|
+
Copyright, 2020, by David Ortiz.
|
9
|
+
Copyright, 2021-2023, by Troex Nevelin.
|
10
|
+
Copyright, 2021, by Daniel Evans.
|
11
|
+
Copyright, 2023, by Nick Burwell.
|
12
|
+
|
13
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
14
|
+
of this software and associated documentation files (the "Software"), to deal
|
15
|
+
in the Software without restriction, including without limitation the rights
|
16
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
17
|
+
copies of the Software, and to permit persons to whom the Software is
|
18
|
+
furnished to do so, subject to the following conditions:
|
19
|
+
|
20
|
+
The above copyright notice and this permission notice shall be included in all
|
21
|
+
copies or substantial portions of the Software.
|
22
|
+
|
23
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
24
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
25
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
26
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
27
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
28
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
29
|
+
SOFTWARE.
|
data/readme.md
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
# Protocol::Redis
|
2
|
+
|
3
|
+
Implements the RESP2 and [RESP3](https://github.com/antirez/RESP3) Redis protocols.
|
4
|
+
|
5
|
+
[![Development Status](https://github.com/socketry/protocol-redis/workflows/Test/badge.svg)](https://github.com/socketry/protocol-redis/actions?workflow=Test)
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
``` ruby
|
12
|
+
gem 'protocol-redis'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install protocol-redis
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
``` ruby
|
26
|
+
sockets = Socket.pair(Socket::PF_UNIX, Socket::SOCK_STREAM)
|
27
|
+
|
28
|
+
client = Protocol::Redis::Connection.new(sockets.first)
|
29
|
+
server = Protocol::Redis::Connection.new(sockets.last)
|
30
|
+
|
31
|
+
client.write_object("Hello World!")
|
32
|
+
puts server.read_object
|
33
|
+
# => "Hello World!"
|
34
|
+
```
|
35
|
+
|
36
|
+
## Development
|
37
|
+
|
38
|
+
Run tests:
|
39
|
+
|
40
|
+
bundle exec bake test
|
41
|
+
|
42
|
+
## Contributing
|
43
|
+
|
44
|
+
We welcome contributions to this project.
|
45
|
+
|
46
|
+
1. Fork it.
|
47
|
+
2. Create your feature branch (`git checkout -b my-new-feature`).
|
48
|
+
3. Commit your changes (`git commit -am 'Add some feature'`).
|
49
|
+
4. Push to the branch (`git push origin my-new-feature`).
|
50
|
+
5. Create new Pull Request.
|
data.tar.gz.sig
ADDED
Binary file
|
metadata
CHANGED
@@ -1,140 +1,70 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: protocol-redis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
8
|
-
-
|
9
|
-
|
8
|
+
- Dimitry Chopey
|
9
|
+
- Nick Burwell
|
10
|
+
- David Ortiz
|
11
|
+
- Nakul Warrier
|
12
|
+
- Troex Nevelin
|
13
|
+
- Daniel Evans
|
14
|
+
- Olle Jonsson
|
15
|
+
- Salim Semaoune
|
16
|
+
autorequire:
|
10
17
|
bindir: bin
|
11
|
-
cert_chain:
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
requirement: !ruby/object:Gem::Requirement
|
45
|
-
requirements:
|
46
|
-
- - ">="
|
47
|
-
- !ruby/object:Gem::Version
|
48
|
-
version: '0'
|
49
|
-
type: :development
|
50
|
-
prerelease: false
|
51
|
-
version_requirements: !ruby/object:Gem::Requirement
|
52
|
-
requirements:
|
53
|
-
- - ">="
|
54
|
-
- !ruby/object:Gem::Version
|
55
|
-
version: '0'
|
56
|
-
- !ruby/object:Gem::Dependency
|
57
|
-
name: covered
|
58
|
-
requirement: !ruby/object:Gem::Requirement
|
59
|
-
requirements:
|
60
|
-
- - ">="
|
61
|
-
- !ruby/object:Gem::Version
|
62
|
-
version: '0'
|
63
|
-
type: :development
|
64
|
-
prerelease: false
|
65
|
-
version_requirements: !ruby/object:Gem::Requirement
|
66
|
-
requirements:
|
67
|
-
- - ">="
|
68
|
-
- !ruby/object:Gem::Version
|
69
|
-
version: '0'
|
70
|
-
- !ruby/object:Gem::Dependency
|
71
|
-
name: bundler
|
72
|
-
requirement: !ruby/object:Gem::Requirement
|
73
|
-
requirements:
|
74
|
-
- - ">="
|
75
|
-
- !ruby/object:Gem::Version
|
76
|
-
version: '0'
|
77
|
-
type: :development
|
78
|
-
prerelease: false
|
79
|
-
version_requirements: !ruby/object:Gem::Requirement
|
80
|
-
requirements:
|
81
|
-
- - ">="
|
82
|
-
- !ruby/object:Gem::Version
|
83
|
-
version: '0'
|
84
|
-
- !ruby/object:Gem::Dependency
|
85
|
-
name: rspec
|
86
|
-
requirement: !ruby/object:Gem::Requirement
|
87
|
-
requirements:
|
88
|
-
- - "~>"
|
89
|
-
- !ruby/object:Gem::Version
|
90
|
-
version: '3.6'
|
91
|
-
type: :development
|
92
|
-
prerelease: false
|
93
|
-
version_requirements: !ruby/object:Gem::Requirement
|
94
|
-
requirements:
|
95
|
-
- - "~>"
|
96
|
-
- !ruby/object:Gem::Version
|
97
|
-
version: '3.6'
|
98
|
-
- !ruby/object:Gem::Dependency
|
99
|
-
name: rake
|
100
|
-
requirement: !ruby/object:Gem::Requirement
|
101
|
-
requirements:
|
102
|
-
- - ">="
|
103
|
-
- !ruby/object:Gem::Version
|
104
|
-
version: '0'
|
105
|
-
type: :development
|
106
|
-
prerelease: false
|
107
|
-
version_requirements: !ruby/object:Gem::Requirement
|
108
|
-
requirements:
|
109
|
-
- - ">="
|
110
|
-
- !ruby/object:Gem::Version
|
111
|
-
version: '0'
|
112
|
-
description:
|
18
|
+
cert_chain:
|
19
|
+
- |
|
20
|
+
-----BEGIN CERTIFICATE-----
|
21
|
+
MIIE2DCCA0CgAwIBAgIBATANBgkqhkiG9w0BAQsFADBhMRgwFgYDVQQDDA9zYW11
|
22
|
+
ZWwud2lsbGlhbXMxHTAbBgoJkiaJk/IsZAEZFg1vcmlvbnRyYW5zZmVyMRIwEAYK
|
23
|
+
CZImiZPyLGQBGRYCY28xEjAQBgoJkiaJk/IsZAEZFgJuejAeFw0yMjA4MDYwNDUz
|
24
|
+
MjRaFw0zMjA4MDMwNDUzMjRaMGExGDAWBgNVBAMMD3NhbXVlbC53aWxsaWFtczEd
|
25
|
+
MBsGCgmSJomT8ixkARkWDW9yaW9udHJhbnNmZXIxEjAQBgoJkiaJk/IsZAEZFgJj
|
26
|
+
bzESMBAGCgmSJomT8ixkARkWAm56MIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIB
|
27
|
+
igKCAYEAomvSopQXQ24+9DBB6I6jxRI2auu3VVb4nOjmmHq7XWM4u3HL+pni63X2
|
28
|
+
9qZdoq9xt7H+RPbwL28LDpDNflYQXoOhoVhQ37Pjn9YDjl8/4/9xa9+NUpl9XDIW
|
29
|
+
sGkaOY0eqsQm1pEWkHJr3zn/fxoKPZPfaJOglovdxf7dgsHz67Xgd/ka+Wo1YqoE
|
30
|
+
e5AUKRwUuvaUaumAKgPH+4E4oiLXI4T1Ff5Q7xxv6yXvHuYtlMHhYfgNn8iiW8WN
|
31
|
+
XibYXPNP7NtieSQqwR/xM6IRSoyXKuS+ZNGDPUUGk8RoiV/xvVN4LrVm9upSc0ss
|
32
|
+
RZ6qwOQmXCo/lLcDUxJAgG95cPw//sI00tZan75VgsGzSWAOdjQpFM0l4dxvKwHn
|
33
|
+
tUeT3ZsAgt0JnGqNm2Bkz81kG4A2hSyFZTFA8vZGhp+hz+8Q573tAR89y9YJBdYM
|
34
|
+
zp0FM4zwMNEUwgfRzv1tEVVUEXmoFCyhzonUUw4nE4CFu/sE3ffhjKcXcY//qiSW
|
35
|
+
xm4erY3XAgMBAAGjgZowgZcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAwHQYDVR0O
|
36
|
+
BBYEFO9t7XWuFf2SKLmuijgqR4sGDlRsMC4GA1UdEQQnMCWBI3NhbXVlbC53aWxs
|
37
|
+
aWFtc0BvcmlvbnRyYW5zZmVyLmNvLm56MC4GA1UdEgQnMCWBI3NhbXVlbC53aWxs
|
38
|
+
aWFtc0BvcmlvbnRyYW5zZmVyLmNvLm56MA0GCSqGSIb3DQEBCwUAA4IBgQB5sxkE
|
39
|
+
cBsSYwK6fYpM+hA5B5yZY2+L0Z+27jF1pWGgbhPH8/FjjBLVn+VFok3CDpRqwXCl
|
40
|
+
xCO40JEkKdznNy2avOMra6PFiQyOE74kCtv7P+Fdc+FhgqI5lMon6tt9rNeXmnW/
|
41
|
+
c1NaMRdxy999hmRGzUSFjozcCwxpy/LwabxtdXwXgSay4mQ32EDjqR1TixS1+smp
|
42
|
+
8C/NCWgpIfzpHGJsjvmH2wAfKtTTqB9CVKLCWEnCHyCaRVuKkrKjqhYCdmMBqCws
|
43
|
+
JkxfQWC+jBVeG9ZtPhQgZpfhvh+6hMhraUYRQ6XGyvBqEUe+yo6DKIT3MtGE2+CP
|
44
|
+
eX9i9ZWBydWb8/rvmwmX2kkcBbX0hZS1rcR593hGc61JR6lvkGYQ2MYskBveyaxt
|
45
|
+
Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
|
46
|
+
voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
|
47
|
+
-----END CERTIFICATE-----
|
48
|
+
date: 2023-06-13 00:00:00.000000000 Z
|
49
|
+
dependencies: []
|
50
|
+
description:
|
113
51
|
email:
|
114
|
-
- samuel.williams@oriontransfer.co.nz
|
115
|
-
- 12huba@gmail.com
|
116
52
|
executables: []
|
117
53
|
extensions: []
|
118
54
|
extra_rdoc_files: []
|
119
55
|
files:
|
120
|
-
- ".editorconfig"
|
121
|
-
- ".github/workflows/development.yml"
|
122
|
-
- ".gitignore"
|
123
|
-
- ".rspec"
|
124
|
-
- Gemfile
|
125
|
-
- README.md
|
126
|
-
- Rakefile
|
127
|
-
- benchmark/call.rb
|
128
56
|
- lib/protocol/redis.rb
|
129
57
|
- lib/protocol/redis/connection.rb
|
130
58
|
- lib/protocol/redis/error.rb
|
131
59
|
- lib/protocol/redis/methods.rb
|
60
|
+
- lib/protocol/redis/methods/cluster.rb
|
132
61
|
- lib/protocol/redis/methods/connection.rb
|
133
62
|
- lib/protocol/redis/methods/counting.rb
|
134
63
|
- lib/protocol/redis/methods/generic.rb
|
135
64
|
- lib/protocol/redis/methods/geospatial.rb
|
136
65
|
- lib/protocol/redis/methods/hashes.rb
|
137
66
|
- lib/protocol/redis/methods/lists.rb
|
67
|
+
- lib/protocol/redis/methods/pubsub.rb
|
138
68
|
- lib/protocol/redis/methods/scripting.rb
|
139
69
|
- lib/protocol/redis/methods/server.rb
|
140
70
|
- lib/protocol/redis/methods/sets.rb
|
@@ -142,13 +72,14 @@ files:
|
|
142
72
|
- lib/protocol/redis/methods/streams.rb
|
143
73
|
- lib/protocol/redis/methods/strings.rb
|
144
74
|
- lib/protocol/redis/version.rb
|
145
|
-
-
|
146
|
-
-
|
147
|
-
- tasks/methods.trenni
|
75
|
+
- license.md
|
76
|
+
- readme.md
|
148
77
|
homepage: https://github.com/socketry/protocol-redis
|
149
|
-
licenses:
|
150
|
-
|
151
|
-
|
78
|
+
licenses:
|
79
|
+
- MIT
|
80
|
+
metadata:
|
81
|
+
funding_uri: https://github.com/sponsors/ioquatix
|
82
|
+
post_install_message:
|
152
83
|
rdoc_options: []
|
153
84
|
require_paths:
|
154
85
|
- lib
|
@@ -156,15 +87,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
156
87
|
requirements:
|
157
88
|
- - ">="
|
158
89
|
- !ruby/object:Gem::Version
|
159
|
-
version: '
|
90
|
+
version: '2.7'
|
160
91
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
161
92
|
requirements:
|
162
93
|
- - ">="
|
163
94
|
- !ruby/object:Gem::Version
|
164
95
|
version: '0'
|
165
96
|
requirements: []
|
166
|
-
rubygems_version: 3.
|
167
|
-
signing_key:
|
97
|
+
rubygems_version: 3.2.33
|
98
|
+
signing_key:
|
168
99
|
specification_version: 4
|
169
100
|
summary: A transport agnostic RESP protocol client/server.
|
170
101
|
test_files: []
|
metadata.gz.sig
ADDED
Binary file
|
data/.editorconfig
DELETED
@@ -1,34 +0,0 @@
|
|
1
|
-
name: Development
|
2
|
-
|
3
|
-
on: [push, pull_request]
|
4
|
-
|
5
|
-
jobs:
|
6
|
-
test:
|
7
|
-
strategy:
|
8
|
-
matrix:
|
9
|
-
os:
|
10
|
-
- ubuntu
|
11
|
-
- macos
|
12
|
-
|
13
|
-
ruby:
|
14
|
-
- 2.4
|
15
|
-
- 2.5
|
16
|
-
- 2.6
|
17
|
-
- 2.7
|
18
|
-
|
19
|
-
include:
|
20
|
-
- os: 'ubuntu'
|
21
|
-
ruby: '2.6'
|
22
|
-
env: COVERAGE=PartialSummary,Coveralls
|
23
|
-
|
24
|
-
runs-on: ${{matrix.os}}-latest
|
25
|
-
|
26
|
-
steps:
|
27
|
-
- uses: actions/checkout@v1
|
28
|
-
- uses: ruby/setup-ruby@v1
|
29
|
-
with:
|
30
|
-
ruby-version: ${{matrix.ruby}}
|
31
|
-
- name: Install dependencies
|
32
|
-
run: bundle install
|
33
|
-
- name: Run tests
|
34
|
-
run: ${{matrix.env}} bundle exec rspec
|
data/.gitignore
DELETED
data/.rspec
DELETED
data/Gemfile
DELETED
data/README.md
DELETED
@@ -1,67 +0,0 @@
|
|
1
|
-
# Protocol::Redis
|
2
|
-
|
3
|
-
Implements the RESP2 and [RESP3](https://github.com/antirez/RESP3) Redis protocols.
|
4
|
-
|
5
|
-
[![Actions Status](https://github.com/socketry/protocol-redis/workflows/Development/badge.svg)](https://github.com/socketry/protocol-redis/actions?workflow=Development)
|
6
|
-
|
7
|
-
## Installation
|
8
|
-
|
9
|
-
Add this line to your application's Gemfile:
|
10
|
-
|
11
|
-
```ruby
|
12
|
-
gem 'protocol-redis'
|
13
|
-
```
|
14
|
-
|
15
|
-
And then execute:
|
16
|
-
|
17
|
-
$ bundle
|
18
|
-
|
19
|
-
Or install it yourself as:
|
20
|
-
|
21
|
-
$ gem install protocol-redis
|
22
|
-
|
23
|
-
## Usage
|
24
|
-
|
25
|
-
```ruby
|
26
|
-
sockets = Socket.pair(Socket::PF_UNIX, Socket::SOCK_STREAM)
|
27
|
-
|
28
|
-
client = Protocol::Redis::Connection.new(sockets.first)
|
29
|
-
server = Protocol::Redis::Connection.new(sockets.last)
|
30
|
-
|
31
|
-
client.write_object("Hello World!")
|
32
|
-
puts server.read_object
|
33
|
-
# => "Hello World!"
|
34
|
-
```
|
35
|
-
|
36
|
-
## Contributing
|
37
|
-
|
38
|
-
1. Fork it
|
39
|
-
2. Create your feature branch (`git checkout -b my-new-feature`)
|
40
|
-
3. Commit your changes (`git commit -am 'Add some feature'`)
|
41
|
-
4. Push to the branch (`git push origin my-new-feature`)
|
42
|
-
5. Create new Pull Request
|
43
|
-
|
44
|
-
## License
|
45
|
-
|
46
|
-
Released under the MIT license.
|
47
|
-
|
48
|
-
Copyright, 2019, by [Samuel G. D. Williams](http://www.codeotaku.com/samuel-williams).
|
49
|
-
Copyright, 2019, by Huba Z. Nagy.
|
50
|
-
|
51
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
52
|
-
of this software and associated documentation files (the "Software"), to deal
|
53
|
-
in the Software without restriction, including without limitation the rights
|
54
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
55
|
-
copies of the Software, and to permit persons to whom the Software is
|
56
|
-
furnished to do so, subject to the following conditions:
|
57
|
-
|
58
|
-
The above copyright notice and this permission notice shall be included in
|
59
|
-
all copies or substantial portions of the Software.
|
60
|
-
|
61
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
62
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
63
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
64
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
65
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
66
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
67
|
-
THE SOFTWARE.
|