hiredis-client 0.15.0 → 0.16.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d85790ae197a6affc3f442a07dc13207b600821dba1a840b773aa54e6dd9b6df
4
- data.tar.gz: 5e4e61dfa45511e1ebe56681fa55ef121900155b1a5db8724f45a23111dbcb21
3
+ metadata.gz: 61bc01f80337772a560ed39e2ee0ecf4c783f9190dba9d58d8a4a4b9508b2ec6
4
+ data.tar.gz: 9ea97d9bf65cf629ca7501534faa2644dd8c8afc2e9d74b973d8d661909cd327
5
5
  SHA512:
6
- metadata.gz: 19be40f01d83e960305cc29b719578124f4a11189c60431c4a9337174a462c2ede846c00a53d166485ddc4208f68c4641263d03533fad783998ad64685941e4b
7
- data.tar.gz: b1ee30444e242333a3920acb864f943523312b6ad34eeec3bd09cef421c611d4b26267bf1a7d61559fba66055bbd08afd8a75b417c63080afa5bb2bc73efaf7d
6
+ metadata.gz: e334396d8518211eda9f1c60151b140cc713049ec32b68b57de0f16977c76693b3a4de7b93c70a56dbb1ef1826717754d0e8ccc92247c7f26f01e853f8093ea0
7
+ data.tar.gz: 9e3597f5cde32b9289c5d35554046b4e40bda564656eb94dafe65521e22049baa19decbda89b215343187e054a30372ed7d2c96f9297dbfb285ac9ab10e1fc2b
@@ -36,8 +36,6 @@
36
36
  #include <errno.h>
37
37
  #include <sys/socket.h>
38
38
  #include <stdbool.h>
39
- #include <unistd.h>
40
- #include <fcntl.h>
41
39
  #include "hiredis.h"
42
40
  #include "net.h"
43
41
  #include "hiredis_ssl.h"
@@ -800,33 +798,6 @@ static VALUE hiredis_close(VALUE self) {
800
798
  return Qnil;
801
799
  }
802
800
 
803
- static VALUE hiredis_reopen(VALUE self) {
804
- CONNECTION(self, connection);
805
- if (!connection->context) {
806
- return Qfalse;
807
- }
808
-
809
- if (connection->context->fd == REDIS_INVALID_FD) {
810
- return Qfalse;
811
- }
812
-
813
- int null_fd = open("/dev/null", O_RDWR | O_CLOEXEC);
814
- if (null_fd <= 0) {
815
- return Qfalse;
816
- }
817
-
818
- int rc = dup2(null_fd, connection->context->fd);
819
- if (close(null_fd) < 0) {
820
- return Qfalse;
821
- }
822
-
823
- if (rc < 0) {
824
- return Qfalse;
825
- }
826
-
827
- return Qtrue;
828
- }
829
-
830
801
  static inline double diff_timespec_ms(const struct timespec *time1, const struct timespec *time0) {
831
802
  return ((time1->tv_sec - time0->tv_sec) * 1000.0)
832
803
  + (time1->tv_nsec - time0->tv_nsec) / 1000000.0;
@@ -960,7 +931,6 @@ RUBY_FUNC_EXPORTED void Init_hiredis_connection(void) {
960
931
  rb_define_private_method(rb_cHiredisConnection, "_read", hiredis_read, 0);
961
932
  rb_define_private_method(rb_cHiredisConnection, "flush", hiredis_flush, 0);
962
933
  rb_define_private_method(rb_cHiredisConnection, "_close", hiredis_close, 0);
963
- rb_define_private_method(rb_cHiredisConnection, "_reopen", hiredis_reopen, 0);
964
934
  rb_define_method(rb_cHiredisConnection, "measure_round_trip_delay", hiredis_measure_round_trip_delay, 0);
965
935
 
966
936
  VALUE rb_cHiredisSSLContext = rb_define_class_under(rb_cHiredisConnection, "SSLContext", rb_cObject);
@@ -53,11 +53,6 @@ class RedisClient
53
53
  super
54
54
  end
55
55
 
56
- def discard
57
- _reopen
58
- close
59
- end
60
-
61
56
  def reconnect
62
57
  reconnected = begin
63
58
  _reconnect(@config.path, @config.ssl_context)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hiredis-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.0
4
+ version: 0.16.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jean Boussier
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-08-01 00:00:00.000000000 Z
11
+ date: 2023-08-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redis-client
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 0.15.0
19
+ version: 0.16.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 0.15.0
26
+ version: 0.16.0
27
27
  description:
28
28
  email:
29
29
  - jean.boussier@gmail.com
@@ -105,7 +105,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
105
105
  - !ruby/object:Gem::Version
106
106
  version: '0'
107
107
  requirements: []
108
- rubygems_version: 3.3.7
108
+ rubygems_version: 3.4.10
109
109
  signing_key:
110
110
  specification_version: 4
111
111
  summary: Hiredis binding for redis-client