protocol-redis 0.8.1 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6c41c131d63e6ae475e086880ebbaaf833374369a25a4111f19612254323cf64
4
- data.tar.gz: 953c597e87f269af83413f7d36ea16b5da15dd75f689505bf46a2cf79d31c16e
3
+ metadata.gz: f4eaf2e185b9e0b2f5a29527a83e803e56bd89470ebbd800519338db47c33ae8
4
+ data.tar.gz: 6954fa6365d178dca0ff302b5b1739e9d731dd72df61a9238f6d16a152640318
5
5
  SHA512:
6
- metadata.gz: 83ef8872ca16bdeecb0083804cf31abc4e195b49ad408c6f2e7e93c2a4511afb8ef6e811455dbd3cce55946d83cfc2f00b4e1ac1394e28eb25881ecc8a4f0c44
7
- data.tar.gz: ef60e6ccefda376a2b0efc91d1940bba209a18d9b9c22e09a36acca9c06666bb695e82535f5a79d5e7e2a9123c04bd10716a42cb302838719850327b723ea05f
6
+ metadata.gz: d85825ba053ca54ae00e329edef4ae7bcb0b06afc5c3752d777faa20439fff39d0a4bf9cd293f675a36859b5bb7fa8417c449fc6efe3fa0664892ad8f7b7593e
7
+ data.tar.gz: 503526c37e829a7272c0a43c458f514544d9b1514410f957c1b8ef669bab5701c0a892143cd9c4f83b9e3186551e6a7be135f6b8d087fc4d223cbb1e39571a60
checksums.yaml.gz.sig CHANGED
Binary file
@@ -4,27 +4,27 @@
4
4
  # Copyright, 2023, by Nick Burwell.
5
5
 
6
6
  module Protocol
7
- module Redis
8
- module Methods
9
- module Cluster
10
- # Sends the `CLUSTER *` command to random node and returns its reply.
11
- # @see https://redis.io/commands/cluster-addslots/
12
- # @param subcommand [String, Symbol] the subcommand of cluster command
13
- # e.g. `:addslots`, `:delslots`, `:nodes`, `:replicas`, `:info`
14
- #
15
- # @return [Object] depends on the subcommand provided
16
- def cluster(subcommand, *args)
17
- call("CLUSTER", subcommand.to_s, *args)
18
- end
19
-
20
- # Sends `ASKING` command to random node and returns its reply.
21
- # @see https://redis.io/commands/asking/
22
- #
23
- # @return [String] `'OK'`
24
- def asking
25
- call("ASKING")
26
- end
27
- end
28
- end
29
- end
7
+ module Redis
8
+ module Methods
9
+ module Cluster
10
+ # Sends the `CLUSTER *` command to random node and returns its reply.
11
+ # @see https://redis.io/commands/cluster-addslots/
12
+ # @param subcommand [String, Symbol] the subcommand of cluster command
13
+ # e.g. `:addslots`, `:delslots`, `:nodes`, `:replicas`, `:info`
14
+ #
15
+ # @return [Object] depends on the subcommand provided
16
+ def cluster(subcommand, *args)
17
+ call("CLUSTER", subcommand.to_s, *args)
18
+ end
19
+
20
+ # Sends `ASKING` command to random node and returns its reply.
21
+ # @see https://redis.io/commands/asking/
22
+ #
23
+ # @return [String] `'OK'`
24
+ def asking
25
+ call("ASKING")
26
+ end
27
+ end
28
+ end
29
+ end
30
30
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2019-2023, by Samuel Williams.
4
+ # Copyright, 2019-2024, by Samuel Williams.
5
5
  # Copyright, 2023, by Troex Nevelin.
6
6
  # Copyright, 2023, by Nick Burwell.
7
7
 
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2019-2023, by Samuel Williams.
4
+ # Copyright, 2019-2024, by Samuel Williams.
5
5
  # Copyright, 2020, by David Ortiz.
6
6
 
7
7
  module Protocol
@@ -25,6 +25,22 @@ module Protocol
25
25
  return metadata
26
26
  end
27
27
 
28
+ def client_info
29
+ metadata = {}
30
+
31
+ call('CLIENT', 'INFO').split(/\s+/).each do |pair|
32
+ key, value = pair.split('=')
33
+
34
+ if value
35
+ metadata[key.to_sym] = value
36
+ else
37
+ metadata[key.to_sym] = nil
38
+ end
39
+ end
40
+
41
+ return metadata
42
+ end
43
+
28
44
  # Remove all keys from the current database.
29
45
  # @see https://redis.io/commands/flushdb
30
46
  # @param async [Enum]
@@ -1,10 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2019-2023, by Samuel Williams.
4
+ # Copyright, 2019-2024, by Samuel Williams.
5
5
 
6
6
  module Protocol
7
7
  module Redis
8
- VERSION = "0.8.1"
8
+ VERSION = "0.9.0"
9
9
  end
10
10
  end
data/license.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # MIT License
2
2
 
3
- Copyright, 2019-2023, by Samuel Williams.
3
+ Copyright, 2019-2024, by Samuel Williams.
4
4
  Copyright, 2020, by Olle Jonsson.
5
5
  Copyright, 2020, by Salim Semaoune.
6
6
  Copyright, 2020, by Dimitry Chopey.
data/readme.md CHANGED
@@ -48,3 +48,11 @@ We welcome contributions to this project.
48
48
  3. Commit your changes (`git commit -am 'Add some feature'`).
49
49
  4. Push to the branch (`git push origin my-new-feature`).
50
50
  5. Create new Pull Request.
51
+
52
+ ### Developer Certificate of Origin
53
+
54
+ In order to protect users of this project, we require all contributors to comply with the [Developer Certificate of Origin](https://developercertificate.org/). This ensures that all contributions are properly licensed and attributed.
55
+
56
+ ### Community Guidelines
57
+
58
+ This project is best served by a collaborative and respectful environment. Treat each other professionally, respect differing viewpoints, and engage constructively. Harassment, discrimination, or harmful behavior is not tolerated. Communicate clearly, listen actively, and support one another. If any issues arise, please inform the project maintainers.
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: protocol-redis
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
@@ -45,7 +45,7 @@ cert_chain:
45
45
  Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
46
46
  voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
47
47
  -----END CERTIFICATE-----
48
- date: 2024-02-13 00:00:00.000000000 Z
48
+ date: 2024-08-15 00:00:00.000000000 Z
49
49
  dependencies: []
50
50
  description:
51
51
  email:
@@ -78,7 +78,9 @@ homepage: https://github.com/socketry/protocol-redis
78
78
  licenses:
79
79
  - MIT
80
80
  metadata:
81
+ documentation_uri: https://socketry.github.io/protocol-redis/
81
82
  funding_uri: https://github.com/sponsors/ioquatix
83
+ source_code_uri: https://github.com/socketry/protocol-redis.git
82
84
  post_install_message:
83
85
  rdoc_options: []
84
86
  require_paths:
@@ -87,14 +89,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
87
89
  requirements:
88
90
  - - ">="
89
91
  - !ruby/object:Gem::Version
90
- version: '2.7'
92
+ version: '3.1'
91
93
  required_rubygems_version: !ruby/object:Gem::Requirement
92
94
  requirements:
93
95
  - - ">="
94
96
  - !ruby/object:Gem::Version
95
97
  version: '0'
96
98
  requirements: []
97
- rubygems_version: 3.5.3
99
+ rubygems_version: 3.5.11
98
100
  signing_key:
99
101
  specification_version: 4
100
102
  summary: A transport agnostic RESP protocol client/server.
metadata.gz.sig CHANGED
Binary file