lwtarantool 0.0.2

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.
Files changed (107) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +84 -0
  3. data/ext/lwtarantool/conn.c +314 -0
  4. data/ext/lwtarantool/depend +23 -0
  5. data/ext/lwtarantool/errors.c +24 -0
  6. data/ext/lwtarantool/extconf.rb +8 -0
  7. data/ext/lwtarantool/lwtarantool.c +12 -0
  8. data/ext/lwtarantool/lwtarantool.h +38 -0
  9. data/ext/lwtarantool/request.c +124 -0
  10. data/ext/lwtarantool/vendor/msgpuck/CMakeLists.txt +73 -0
  11. data/ext/lwtarantool/vendor/msgpuck/hints.c +674 -0
  12. data/ext/lwtarantool/vendor/msgpuck/msgpuck.c +375 -0
  13. data/ext/lwtarantool/vendor/msgpuck/msgpuck.h +2195 -0
  14. data/ext/lwtarantool/vendor/msgpuck/test/CMakeLists.txt +25 -0
  15. data/ext/lwtarantool/vendor/msgpuck/test/msgpuck.c +1126 -0
  16. data/ext/lwtarantool/vendor/msgpuck/test/test.c +105 -0
  17. data/ext/lwtarantool/vendor/msgpuck/test/test.h +123 -0
  18. data/ext/lwtarantool/vendor/tarantool-c/CMakeLists.txt +89 -0
  19. data/ext/lwtarantool/vendor/tarantool-c/cmake/FindMsgPuck.cmake +18 -0
  20. data/ext/lwtarantool/vendor/tarantool-c/cmake/FindSphinx.cmake +10 -0
  21. data/ext/lwtarantool/vendor/tarantool-c/doc/CMakeLists.txt +15 -0
  22. data/ext/lwtarantool/vendor/tarantool-c/doc/source/example.c +340 -0
  23. data/ext/lwtarantool/vendor/tarantool-c/include/CMakeLists.txt +6 -0
  24. data/ext/lwtarantool/vendor/tarantool-c/include/tarantool/tarantool.h +67 -0
  25. data/ext/lwtarantool/vendor/tarantool-c/include/tarantool/tnt_auth.h +72 -0
  26. data/ext/lwtarantool/vendor/tarantool-c/include/tarantool/tnt_buf.h +88 -0
  27. data/ext/lwtarantool/vendor/tarantool-c/include/tarantool/tnt_call.h +83 -0
  28. data/ext/lwtarantool/vendor/tarantool-c/include/tarantool/tnt_delete.h +52 -0
  29. data/ext/lwtarantool/vendor/tarantool-c/include/tarantool/tnt_execute.h +24 -0
  30. data/ext/lwtarantool/vendor/tarantool-c/include/tarantool/tnt_insert.h +62 -0
  31. data/ext/lwtarantool/vendor/tarantool-c/include/tarantool/tnt_io.h +67 -0
  32. data/ext/lwtarantool/vendor/tarantool-c/include/tarantool/tnt_iob.h +62 -0
  33. data/ext/lwtarantool/vendor/tarantool-c/include/tarantool/tnt_iter.h +301 -0
  34. data/ext/lwtarantool/vendor/tarantool-c/include/tarantool/tnt_mem.h +102 -0
  35. data/ext/lwtarantool/vendor/tarantool-c/include/tarantool/tnt_net.h +242 -0
  36. data/ext/lwtarantool/vendor/tarantool-c/include/tarantool/tnt_object.h +248 -0
  37. data/ext/lwtarantool/vendor/tarantool-c/include/tarantool/tnt_opt.h +138 -0
  38. data/ext/lwtarantool/vendor/tarantool-c/include/tarantool/tnt_ping.h +49 -0
  39. data/ext/lwtarantool/vendor/tarantool-c/include/tarantool/tnt_proto.h +295 -0
  40. data/ext/lwtarantool/vendor/tarantool-c/include/tarantool/tnt_reply.h +204 -0
  41. data/ext/lwtarantool/vendor/tarantool-c/include/tarantool/tnt_request.h +377 -0
  42. data/ext/lwtarantool/vendor/tarantool-c/include/tarantool/tnt_schema.h +165 -0
  43. data/ext/lwtarantool/vendor/tarantool-c/include/tarantool/tnt_select.h +59 -0
  44. data/ext/lwtarantool/vendor/tarantool-c/include/tarantool/tnt_stream.h +79 -0
  45. data/ext/lwtarantool/vendor/tarantool-c/include/tarantool/tnt_update.h +226 -0
  46. data/ext/lwtarantool/vendor/tarantool-c/include/tp.h +1998 -0
  47. data/ext/lwtarantool/vendor/tarantool-c/test/CMakeLists.txt +36 -0
  48. data/ext/lwtarantool/vendor/tarantool-c/test/common.c +233 -0
  49. data/ext/lwtarantool/vendor/tarantool-c/test/common.h +28 -0
  50. data/ext/lwtarantool/vendor/tarantool-c/test/plain_test.c +152 -0
  51. data/ext/lwtarantool/vendor/tarantool-c/test/tarantool_call.c +57 -0
  52. data/ext/lwtarantool/vendor/tarantool-c/test/tarantool_disconnect.c +31 -0
  53. data/ext/lwtarantool/vendor/tarantool-c/test/tarantool_tcp.c +840 -0
  54. data/ext/lwtarantool/vendor/tarantool-c/test/tarantool_unix.c +384 -0
  55. data/ext/lwtarantool/vendor/tarantool-c/test/test.c +72 -0
  56. data/ext/lwtarantool/vendor/tarantool-c/test/test.h +94 -0
  57. data/ext/lwtarantool/vendor/tarantool-c/test/tnt_assoc.c +6 -0
  58. data/ext/lwtarantool/vendor/tarantool-c/test/tnt_assoc.h +67 -0
  59. data/ext/lwtarantool/vendor/tarantool-c/third_party/PMurHash.c +317 -0
  60. data/ext/lwtarantool/vendor/tarantool-c/third_party/PMurHash.h +68 -0
  61. data/ext/lwtarantool/vendor/tarantool-c/third_party/base64.c +300 -0
  62. data/ext/lwtarantool/vendor/tarantool-c/third_party/base64.h +91 -0
  63. data/ext/lwtarantool/vendor/tarantool-c/third_party/mhash.h +589 -0
  64. data/ext/lwtarantool/vendor/tarantool-c/third_party/sha1.c +219 -0
  65. data/ext/lwtarantool/vendor/tarantool-c/third_party/sha1.h +24 -0
  66. data/ext/lwtarantool/vendor/tarantool-c/third_party/uri.c +6528 -0
  67. data/ext/lwtarantool/vendor/tarantool-c/third_party/uri.h +81 -0
  68. data/ext/lwtarantool/vendor/tarantool-c/tnt/CMakeLists.txt +83 -0
  69. data/ext/lwtarantool/vendor/tarantool-c/tnt/pmatomic.h +494 -0
  70. data/ext/lwtarantool/vendor/tarantool-c/tnt/tnt_assoc.c +9 -0
  71. data/ext/lwtarantool/vendor/tarantool-c/tnt/tnt_assoc.h +172 -0
  72. data/ext/lwtarantool/vendor/tarantool-c/tnt/tnt_auth.c +118 -0
  73. data/ext/lwtarantool/vendor/tarantool-c/tnt/tnt_buf.c +171 -0
  74. data/ext/lwtarantool/vendor/tarantool-c/tnt/tnt_call.c +79 -0
  75. data/ext/lwtarantool/vendor/tarantool-c/tnt/tnt_delete.c +52 -0
  76. data/ext/lwtarantool/vendor/tarantool-c/tnt/tnt_execute.c +60 -0
  77. data/ext/lwtarantool/vendor/tarantool-c/tnt/tnt_insert.c +60 -0
  78. data/ext/lwtarantool/vendor/tarantool-c/tnt/tnt_io.c +520 -0
  79. data/ext/lwtarantool/vendor/tarantool-c/tnt/tnt_iob.c +75 -0
  80. data/ext/lwtarantool/vendor/tarantool-c/tnt/tnt_iter.c +293 -0
  81. data/ext/lwtarantool/vendor/tarantool-c/tnt/tnt_mem.c +82 -0
  82. data/ext/lwtarantool/vendor/tarantool-c/tnt/tnt_net.c +336 -0
  83. data/ext/lwtarantool/vendor/tarantool-c/tnt/tnt_object.c +476 -0
  84. data/ext/lwtarantool/vendor/tarantool-c/tnt/tnt_opt.c +117 -0
  85. data/ext/lwtarantool/vendor/tarantool-c/tnt/tnt_ping.c +38 -0
  86. data/ext/lwtarantool/vendor/tarantool-c/tnt/tnt_proto_internal.h +43 -0
  87. data/ext/lwtarantool/vendor/tarantool-c/tnt/tnt_reply.c +300 -0
  88. data/ext/lwtarantool/vendor/tarantool-c/tnt/tnt_request.c +336 -0
  89. data/ext/lwtarantool/vendor/tarantool-c/tnt/tnt_schema.c +334 -0
  90. data/ext/lwtarantool/vendor/tarantool-c/tnt/tnt_select.c +58 -0
  91. data/ext/lwtarantool/vendor/tarantool-c/tnt/tnt_stream.c +71 -0
  92. data/ext/lwtarantool/vendor/tarantool-c/tnt/tnt_update.c +247 -0
  93. data/ext/lwtarantool/vendor/tarantool-c/tntrpl/CMakeLists.txt +69 -0
  94. data/ext/lwtarantool/vendor/tarantool-c/tntrpl/tnt_dir.c +173 -0
  95. data/ext/lwtarantool/vendor/tarantool-c/tntrpl/tnt_dir.h +58 -0
  96. data/ext/lwtarantool/vendor/tarantool-c/tntrpl/tnt_log.c +329 -0
  97. data/ext/lwtarantool/vendor/tarantool-c/tntrpl/tnt_log.h +119 -0
  98. data/ext/lwtarantool/vendor/tarantool-c/tntrpl/tnt_rpl.c +189 -0
  99. data/ext/lwtarantool/vendor/tarantool-c/tntrpl/tnt_rpl.h +47 -0
  100. data/ext/lwtarantool/vendor/tarantool-c/tntrpl/tnt_snapshot.c +163 -0
  101. data/ext/lwtarantool/vendor/tarantool-c/tntrpl/tnt_snapshot.h +50 -0
  102. data/ext/lwtarantool/vendor/tarantool-c/tntrpl/tnt_xlog.c +163 -0
  103. data/ext/lwtarantool/vendor/tarantool-c/tntrpl/tnt_xlog.h +50 -0
  104. data/lib/lwtarantool/connection.rb +84 -0
  105. data/lib/lwtarantool/request.rb +58 -0
  106. data/lib/lwtarantool.rb +23 -0
  107. metadata +164 -0
@@ -0,0 +1,73 @@
1
+ project(msgpuck)
2
+ cmake_minimum_required(VERSION 2.8.5)
3
+
4
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -fPIC -fstrict-aliasing")
5
+ set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wall -Wextra -Werror")
6
+
7
+ if(NOT CMAKE_BUILD_TYPE)
8
+ set(CMAKE_BUILD_TYPE Debug CACHE STRING
9
+ "Build type, options are: Debug Release." FORCE)
10
+ endif()
11
+
12
+ include(CheckCCompilerFlag)
13
+ check_c_compiler_flag("-mno-unaligned-access" CC_HAS_MNO_UNALIGNED_ACCESS)
14
+
15
+ add_library(msgpuck STATIC msgpuck.c hints.c)
16
+ set_target_properties(msgpuck PROPERTIES VERSION 1.0 SOVERSION 1)
17
+ set_target_properties(msgpuck PROPERTIES OUTPUT_NAME "msgpuck")
18
+
19
+ if (NOT ${PROJECT_SOURCE_DIR} STREQUAL ${CMAKE_SOURCE_DIR})
20
+ # Embedded mode, skip tests, documentation and the install targets
21
+ return()
22
+ endif()
23
+
24
+ option(ENABLE_GCOV "Enable integration with gcov, a code coverage program" OFF)
25
+ if (ENABLE_GCOV)
26
+ set(_flags "-fprofile-arcs -ftest-coverage")
27
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${_flags}")
28
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${_flags}")
29
+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${_flags}")
30
+ endif()
31
+
32
+ add_subdirectory(test)
33
+
34
+ include(GNUInstallDirs)
35
+ install(TARGETS msgpuck
36
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
37
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
38
+ COMPONENT library)
39
+ install(FILES msgpuck.h DESTINATION include)
40
+
41
+ find_package(Doxygen)
42
+ if(NOT DOXYGEN_FOUND)
43
+ return()
44
+ endif()
45
+
46
+ set(GENERATE_HTML "NO")
47
+ set(GENERATE_MAN "YES")
48
+ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in"
49
+ "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile.man")
50
+ add_custom_command(OUTPUT doc/man/man3/msgpuck.h.3
51
+ COMMAND ${CMAKE_COMMAND} -E make_directory doc/man
52
+ COMMAND ${DOXYGEN_EXECUTABLE} "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile.man"
53
+ WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
54
+ DEPENDS msgpuck.h
55
+ COMMENT "Generating man pages" VERBATIM)
56
+ add_custom_target(man DEPENDS doc/man/man3/msgpuck.h.3)
57
+
58
+ set(GENERATE_HTML "YES")
59
+ set(GENERATE_MAN "NO")
60
+ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in"
61
+ "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile.html")
62
+ add_custom_command(OUTPUT doc/html/index.html
63
+ COMMAND ${CMAKE_COMMAND} -E make_directory doc/html
64
+ COMMAND ${DOXYGEN_EXECUTABLE} "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile.html"
65
+ COMMAND ${CMAKE_COMMAND} -E rename doc/html/msgpuck_8h.html
66
+ doc/html/index.html
67
+ COMMAND sed s/msgpuck_8h\\.html/index\\.html/ -i doc/html/index.html
68
+ WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
69
+ DEPENDS msgpuck.h
70
+ COMMENT "Generating html documentation" VERBATIM)
71
+ add_custom_target(html DEPENDS doc/html/index.html)
72
+
73
+ add_custom_target(doc DEPENDS man html)