hiredis-client 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +5 -0
  3. data/ext/redis_client/hiredis/export.clang +2 -0
  4. data/ext/redis_client/hiredis/export.gcc +7 -0
  5. data/ext/redis_client/hiredis/extconf.rb +69 -0
  6. data/ext/redis_client/hiredis/hiredis_connection.c +708 -0
  7. data/ext/redis_client/hiredis/vendor/.gitignore +9 -0
  8. data/ext/redis_client/hiredis/vendor/.travis.yml +131 -0
  9. data/ext/redis_client/hiredis/vendor/CHANGELOG.md +364 -0
  10. data/ext/redis_client/hiredis/vendor/CMakeLists.txt +165 -0
  11. data/ext/redis_client/hiredis/vendor/COPYING +29 -0
  12. data/ext/redis_client/hiredis/vendor/Makefile +308 -0
  13. data/ext/redis_client/hiredis/vendor/README.md +664 -0
  14. data/ext/redis_client/hiredis/vendor/adapters/ae.h +130 -0
  15. data/ext/redis_client/hiredis/vendor/adapters/glib.h +156 -0
  16. data/ext/redis_client/hiredis/vendor/adapters/ivykis.h +84 -0
  17. data/ext/redis_client/hiredis/vendor/adapters/libev.h +179 -0
  18. data/ext/redis_client/hiredis/vendor/adapters/libevent.h +175 -0
  19. data/ext/redis_client/hiredis/vendor/adapters/libuv.h +117 -0
  20. data/ext/redis_client/hiredis/vendor/adapters/macosx.h +115 -0
  21. data/ext/redis_client/hiredis/vendor/adapters/qt.h +135 -0
  22. data/ext/redis_client/hiredis/vendor/alloc.c +86 -0
  23. data/ext/redis_client/hiredis/vendor/alloc.h +91 -0
  24. data/ext/redis_client/hiredis/vendor/appveyor.yml +24 -0
  25. data/ext/redis_client/hiredis/vendor/async.c +887 -0
  26. data/ext/redis_client/hiredis/vendor/async.h +147 -0
  27. data/ext/redis_client/hiredis/vendor/async_private.h +75 -0
  28. data/ext/redis_client/hiredis/vendor/dict.c +352 -0
  29. data/ext/redis_client/hiredis/vendor/dict.h +126 -0
  30. data/ext/redis_client/hiredis/vendor/fmacros.h +12 -0
  31. data/ext/redis_client/hiredis/vendor/hiredis-config.cmake.in +13 -0
  32. data/ext/redis_client/hiredis/vendor/hiredis.c +1174 -0
  33. data/ext/redis_client/hiredis/vendor/hiredis.h +336 -0
  34. data/ext/redis_client/hiredis/vendor/hiredis.pc.in +12 -0
  35. data/ext/redis_client/hiredis/vendor/hiredis_ssl-config.cmake.in +13 -0
  36. data/ext/redis_client/hiredis/vendor/hiredis_ssl.h +157 -0
  37. data/ext/redis_client/hiredis/vendor/hiredis_ssl.pc.in +12 -0
  38. data/ext/redis_client/hiredis/vendor/net.c +612 -0
  39. data/ext/redis_client/hiredis/vendor/net.h +56 -0
  40. data/ext/redis_client/hiredis/vendor/read.c +739 -0
  41. data/ext/redis_client/hiredis/vendor/read.h +129 -0
  42. data/ext/redis_client/hiredis/vendor/sds.c +1289 -0
  43. data/ext/redis_client/hiredis/vendor/sds.h +278 -0
  44. data/ext/redis_client/hiredis/vendor/sdsalloc.h +44 -0
  45. data/ext/redis_client/hiredis/vendor/sockcompat.c +248 -0
  46. data/ext/redis_client/hiredis/vendor/sockcompat.h +92 -0
  47. data/ext/redis_client/hiredis/vendor/ssl.c +544 -0
  48. data/ext/redis_client/hiredis/vendor/test.c +1401 -0
  49. data/ext/redis_client/hiredis/vendor/test.sh +78 -0
  50. data/ext/redis_client/hiredis/vendor/win32.h +56 -0
  51. data/hiredis-client.gemspec +33 -0
  52. data/lib/hiredis-client.rb +11 -0
  53. data/lib/redis_client/hiredis_connection.rb +94 -0
  54. metadata +114 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 002d836b8dec0059c6dd1bfe640f613594b34bb625a724b1a72183e321ebc98f
4
+ data.tar.gz: 96ea371a99e2091712fb01366f00bff21398f0e08039b573d677c8157ef41af6
5
+ SHA512:
6
+ metadata.gz: fc7b1a377d1531936f3456ca54dfe07d99e0a9e7c7adb72cfbdd4126ea1ca0f8ce206ded1338a78f6e43ebcaa5b976a08bdf0849a976cf57690ae61da4b5bd39
7
+ data.tar.gz: 4ee028ab34699d2301a8bd6b23ae02c9056ab1b049548a945a9a83b0a55c5eb3dcd33472fefc83d125be451709a7a5bfb722f7d9cca64e507213e7fe2d234d96
data/README.md ADDED
@@ -0,0 +1,5 @@
1
+ # HiredisClient
2
+
3
+ `hiredis-client` provides a `hiredis` binding for the native `hiredis` client library.
4
+
5
+ See [`redis-client`](https://github.com/redis-rb/redis-client) for details.
@@ -0,0 +1,2 @@
1
+ _Init_hiredis_connection
2
+ _ruby_abi_version
@@ -0,0 +1,7 @@
1
+ hiredis_connection_1.0 {
2
+ global:
3
+ Init_hiredis_connection;
4
+ ruby_abi_version;
5
+ local:
6
+ *;
7
+ };
@@ -0,0 +1,69 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "mkmf"
4
+
5
+ if RUBY_ENGINE == "ruby" && !RUBY_PLATFORM.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 = ["static", "USE_SSL=1"]
35
+ if openssl_lib
36
+ flags << %(CFLAGS="-I#{openssl_include}") << %(SSL_LDFLAGS="-L#{openssl_lib}")
37
+ end
38
+
39
+ flags << "OPTIMIZATION=-g" if ENV["EXT_PEDANTIC"]
40
+
41
+ unless system(make_program, *flags)
42
+ raise "Building hiredis failed"
43
+ end
44
+ end
45
+
46
+ $CFLAGS << " -I#{hiredis_dir}"
47
+ $LDFLAGS << " -lssl -lcrypto"
48
+ $libs << " #{hiredis_dir}/libhiredis.a #{hiredis_dir}/libhiredis_ssl.a "
49
+ $CFLAGS << " -std=c99 "
50
+ if ENV["EXT_PEDANTIC"]
51
+ $CFLAGS << " -Werror"
52
+ $CFLAGS << " -g "
53
+ else
54
+ $CFLAGS << " -O3 "
55
+ end
56
+
57
+ if `cc --version`.match?(/ clang /i) || RbConfig::CONFIG['CC'].match?(/clang/i)
58
+ $LDFLAGS << ' -Wl,-exported_symbols_list,"' << File.join(__dir__, 'export.clang') << '"'
59
+ elsif RbConfig::CONFIG['CC'].match?(/gcc/i)
60
+ $LDFLAGS << ' -Wl,--version-script="' << File.join(__dir__, 'export.gcc') << '"'
61
+ end
62
+
63
+ $CFLAGS << " -Wno-declaration-after-statement" # Older compilers
64
+ $CFLAGS << " -Wno-compound-token-split-by-macro" # Older rubies on macos
65
+
66
+ create_makefile("redis_client/hiredis_connection")
67
+ else
68
+ File.write("Makefile", dummy_makefile($srcdir).join)
69
+ end