pingram 1.0.40 → 1.0.41

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 (220) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +5 -5
  3. data/lib/pingram/api/account_api.rb +191 -4
  4. data/lib/pingram/api/webhooks_api.rb +6 -6
  5. data/lib/pingram/api_client.rb +1 -1
  6. data/lib/pingram/models/account_get_response_billing_alerts.rb +1 -1
  7. data/lib/pingram/models/account_payment_methods.rb +214 -0
  8. data/lib/pingram/models/account_payment_methods_payment_methods_inner.rb +270 -0
  9. data/lib/pingram/models/assign_payment_method_request.rb +216 -0
  10. data/lib/pingram/models/billing_post_response_body.rb +1 -1
  11. data/lib/pingram/models/confirm_change_email_request.rb +14 -4
  12. data/lib/pingram/models/confirm_change_email_response.rb +192 -0
  13. data/lib/pingram/models/confirm_password_change_request.rb +191 -0
  14. data/lib/pingram/models/create_payment_method_setup_request.rb +191 -0
  15. data/lib/pingram/models/list_invoices_response_invoices_inner.rb +1 -1
  16. data/lib/pingram/models/logs_get_response_logs_inner.rb +10 -1
  17. data/lib/pingram/models/password_status_response.rb +195 -0
  18. data/lib/pingram/models/payment_method_setup.rb +191 -0
  19. data/lib/pingram/models/sign_in_username_request.rb +164 -0
  20. data/lib/pingram/models/sign_in_username_response.rb +165 -0
  21. data/lib/pingram/models/start_change_email_request.rb +13 -20
  22. data/lib/pingram/models/start_password_change_request.rb +185 -0
  23. data/lib/pingram/models/webhook_endpoint.rb +14 -5
  24. data/lib/pingram/models/webhook_endpoint_basic_auth.rb +193 -0
  25. data/lib/pingram/models/webhook_endpoint_upsert_request.rb +15 -5
  26. data/lib/pingram/models/webhook_endpoint_upsert_request_basic_auth.rb +176 -0
  27. data/lib/pingram/models/webhook_endpoints_response_endpoints_inner.rb +14 -5
  28. data/lib/pingram/version.rb +1 -1
  29. data/lib/pingram.rb +13 -0
  30. data/vendor/bundle/ruby/3.2.0/cache/ethon-0.19.1.gem +0 -0
  31. data/vendor/bundle/ruby/3.2.0/cache/io-console-0.9.5.gem +0 -0
  32. data/vendor/bundle/ruby/3.2.0/cache/typhoeus-1.7.1.gem +0 -0
  33. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/byebug-13.0.0/gem_make.out +5 -5
  34. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/date-3.6.0/gem_make.out +5 -5
  35. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/{io-console-0.9.4 → io-console-0.9.5}/gem_make.out +10 -10
  36. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/io-console-0.9.5/io/console.so +0 -0
  37. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/{io-console-0.9.4 → io-console-0.9.5}/mkmf.log +6 -6
  38. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/jaro_winkler-1.5.6/gem_make.out +5 -5
  39. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-5.5.0/gem_make.out +5 -5
  40. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/racc-1.8.1/gem_make.out +5 -5
  41. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/stringio-3.2.0/gem_make.out +5 -5
  42. data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/CHANGELOG.md +1120 -0
  43. data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/README.md +261 -0
  44. data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/curl.rb +22 -0
  45. data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/curls/classes.rb +337 -0
  46. data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/curls/codes.rb +28 -9
  47. data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/curls/constants.rb +61 -4
  48. data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/curls/form_options.rb +2 -1
  49. data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/curls/functions.rb +107 -0
  50. data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/curls/infos.rb +104 -5
  51. data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/curls/introspection.rb +139 -0
  52. data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/curls/introspection_constants.rb +42 -0
  53. data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/curls/mime.rb +187 -0
  54. data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/curls/optional.rb +14 -0
  55. data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/curls/options.rb +298 -71
  56. data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/curls/settings.rb +21 -0
  57. data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/curls/share.rb +165 -0
  58. data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/curls/share_constants.rb +47 -0
  59. data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/curls/url.rb +171 -0
  60. data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/curls/url_constants.rb +78 -0
  61. data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/easy/callbacks.rb +281 -0
  62. data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/easy/features.rb +4 -1
  63. data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/easy/files.rb +113 -0
  64. data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/easy/form.rb +65 -6
  65. data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/easy/header.rb +103 -0
  66. data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/easy/headers_api.rb +79 -0
  67. data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/easy/http/actionable.rb +25 -3
  68. data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/easy/http/get.rb +5 -1
  69. data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/easy/http/post.rb +1 -0
  70. data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/easy/http/postable.rb +9 -2
  71. data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/easy/http/putable.rb +40 -0
  72. data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/easy/http.rb +16 -4
  73. data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/easy/informations.rb +51 -2
  74. data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/easy/mime.rb +29 -0
  75. data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/easy/mirror.rb +49 -0
  76. data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/easy/operations.rb +317 -0
  77. data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/easy/options.rb +369 -0
  78. data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/easy/queryable.rb +59 -14
  79. data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/easy/response_callbacks.rb +33 -12
  80. data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/easy/share.rb +28 -0
  81. data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/easy/url.rb +32 -0
  82. data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/easy/util.rb +47 -0
  83. data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/easy.rb +185 -10
  84. data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/errors/fork_safety.rb +10 -0
  85. data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/errors/form_add.rb +12 -0
  86. data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/errors/global_init.rb +1 -1
  87. data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/errors/header.rb +12 -0
  88. data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/errors/invalid_option.rb +3 -1
  89. data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/errors/invalid_value.rb +15 -0
  90. data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/errors/mime.rb +17 -0
  91. data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/errors/multi_add.rb +1 -1
  92. data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/errors/multi_assign.rb +12 -0
  93. data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/errors/multi_fdset.rb +1 -1
  94. data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/errors/multi_perform.rb +12 -0
  95. data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/errors/multi_poll.rb +12 -0
  96. data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/errors/multi_remove.rb +1 -1
  97. data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/errors/multi_timeout.rb +2 -2
  98. data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/errors/multi_wait.rb +12 -0
  99. data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/errors/multi_wakeup.rb +12 -0
  100. data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/errors/select.rb +1 -1
  101. data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/errors/set_option.rb +27 -0
  102. data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/errors/share.rb +17 -0
  103. data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/errors/unsupported_option.rb +23 -0
  104. data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/errors/url.rb +17 -0
  105. data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/errors.rb +13 -0
  106. data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/libc.rb +50 -0
  107. data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/loggable.rb +1 -1
  108. data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/multi/operations.rb +472 -0
  109. data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/multi/options.rb +219 -0
  110. data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/multi/stack.rb +220 -0
  111. data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/multi.rb +51 -15
  112. data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/version.rb +1 -1
  113. data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon.rb +8 -9
  114. data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.9.4 → io-console-0.9.5}/ext/io/console/console.c +8 -3
  115. data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.9.4 → io-console-0.9.5}/ext/io/console/extconf.rb +7 -3
  116. data/vendor/bundle/ruby/3.2.0/gems/io-console-0.9.5/lib/io/console.so +0 -0
  117. data/vendor/bundle/ruby/3.2.0/gems/{typhoeus-1.6.0 → typhoeus-1.7.1}/CHANGELOG.md +228 -1
  118. data/vendor/bundle/ruby/3.2.0/gems/typhoeus-1.7.1/README.md +766 -0
  119. data/vendor/bundle/ruby/3.2.0/gems/{typhoeus-1.6.0 → typhoeus-1.7.1}/UPGRADE.md +29 -0
  120. data/vendor/bundle/ruby/3.2.0/gems/typhoeus-1.7.1/lib/rack/typhoeus/middleware/params_decoder/helper.rb +129 -0
  121. data/vendor/bundle/ruby/3.2.0/gems/{typhoeus-1.6.0 → typhoeus-1.7.1}/lib/rack/typhoeus/middleware/params_decoder.rb +8 -19
  122. data/vendor/bundle/ruby/3.2.0/gems/{typhoeus-1.6.0 → typhoeus-1.7.1}/lib/rack/typhoeus.rb +2 -0
  123. data/vendor/bundle/ruby/3.2.0/gems/{typhoeus-1.6.0 → typhoeus-1.7.1}/lib/typhoeus/adapters/faraday.rb +89 -28
  124. data/vendor/bundle/ruby/3.2.0/gems/{typhoeus-1.6.0 → typhoeus-1.7.1}/lib/typhoeus/cache/dalli.rb +2 -0
  125. data/vendor/bundle/ruby/3.2.0/gems/{typhoeus-1.6.0 → typhoeus-1.7.1}/lib/typhoeus/cache/rails.rb +3 -1
  126. data/vendor/bundle/ruby/3.2.0/gems/{typhoeus-1.6.0 → typhoeus-1.7.1}/lib/typhoeus/cache/redis.rb +2 -0
  127. data/vendor/bundle/ruby/3.2.0/gems/{typhoeus-1.6.0 → typhoeus-1.7.1}/lib/typhoeus/config.rb +51 -7
  128. data/vendor/bundle/ruby/3.2.0/gems/{typhoeus-1.6.0 → typhoeus-1.7.1}/lib/typhoeus/easy_factory.rb +129 -23
  129. data/vendor/bundle/ruby/3.2.0/gems/typhoeus-1.7.1/lib/typhoeus/errors/invalid_option.rb +23 -0
  130. data/vendor/bundle/ruby/3.2.0/gems/typhoeus-1.7.1/lib/typhoeus/errors/no_response.rb +18 -0
  131. data/vendor/bundle/ruby/3.2.0/gems/{typhoeus-1.6.0 → typhoeus-1.7.1}/lib/typhoeus/errors/no_stub.rb +8 -1
  132. data/vendor/bundle/ruby/3.2.0/gems/{typhoeus-1.6.0 → typhoeus-1.7.1}/lib/typhoeus/errors/typhoeus_error.rb +2 -0
  133. data/vendor/bundle/ruby/3.2.0/gems/{typhoeus-1.6.0 → typhoeus-1.7.1}/lib/typhoeus/errors.rb +4 -0
  134. data/vendor/bundle/ruby/3.2.0/gems/{typhoeus-1.6.0 → typhoeus-1.7.1}/lib/typhoeus/expectation.rb +33 -1
  135. data/vendor/bundle/ruby/3.2.0/gems/{typhoeus-1.6.0 → typhoeus-1.7.1}/lib/typhoeus/hydra/queueable.rb +29 -4
  136. data/vendor/bundle/ruby/3.2.0/gems/typhoeus-1.7.1/lib/typhoeus/hydra.rb +423 -0
  137. data/vendor/bundle/ruby/3.2.0/gems/typhoeus-1.7.1/lib/typhoeus/pool.rb +133 -0
  138. data/vendor/bundle/ruby/3.2.0/gems/{typhoeus-1.6.0 → typhoeus-1.7.1}/lib/typhoeus/railtie.rb +4 -2
  139. data/vendor/bundle/ruby/3.2.0/gems/{typhoeus-1.6.0 → typhoeus-1.7.1}/lib/typhoeus/request/actions.rb +2 -0
  140. data/vendor/bundle/ruby/3.2.0/gems/{typhoeus-1.6.0 → typhoeus-1.7.1}/lib/typhoeus/request/callbacks.rb +11 -4
  141. data/vendor/bundle/ruby/3.2.0/gems/{typhoeus-1.6.0 → typhoeus-1.7.1}/lib/typhoeus/request/marshal.rb +5 -2
  142. data/vendor/bundle/ruby/3.2.0/gems/{typhoeus-1.6.0 → typhoeus-1.7.1}/lib/typhoeus/request/streamable.rb +2 -0
  143. data/vendor/bundle/ruby/3.2.0/gems/typhoeus-1.7.1/lib/typhoeus/request.rb +510 -0
  144. data/vendor/bundle/ruby/3.2.0/gems/{typhoeus-1.6.0 → typhoeus-1.7.1}/lib/typhoeus/response/cacheable.rb +2 -0
  145. data/vendor/bundle/ruby/3.2.0/gems/typhoeus-1.7.1/lib/typhoeus/response/header.rb +325 -0
  146. data/vendor/bundle/ruby/3.2.0/gems/{typhoeus-1.6.0 → typhoeus-1.7.1}/lib/typhoeus/response/informations.rb +75 -12
  147. data/vendor/bundle/ruby/3.2.0/gems/{typhoeus-1.6.0 → typhoeus-1.7.1}/lib/typhoeus/response/status.rb +4 -13
  148. data/vendor/bundle/ruby/3.2.0/gems/{typhoeus-1.6.0 → typhoeus-1.7.1}/lib/typhoeus/response.rb +35 -0
  149. data/vendor/bundle/ruby/3.2.0/gems/{typhoeus-1.6.0 → typhoeus-1.7.1}/lib/typhoeus/version.rb +3 -1
  150. data/vendor/bundle/ruby/3.2.0/gems/typhoeus-1.7.1/lib/typhoeus.rb +206 -0
  151. data/vendor/bundle/ruby/3.2.0/gems/{typhoeus-1.6.0 → typhoeus-1.7.1}/typhoeus.gemspec +15 -3
  152. data/vendor/bundle/ruby/3.2.0/specifications/{ethon-0.18.0.gemspec → ethon-0.19.1.gemspec} +4 -4
  153. data/vendor/bundle/ruby/3.2.0/specifications/{io-console-0.9.4.gemspec → io-console-0.9.5.gemspec} +3 -3
  154. data/vendor/bundle/ruby/3.2.0/specifications/{typhoeus-1.6.0.gemspec → typhoeus-1.7.1.gemspec} +5 -5
  155. metadata +156 -129
  156. data/vendor/bundle/ruby/3.2.0/cache/ethon-0.18.0.gem +0 -0
  157. data/vendor/bundle/ruby/3.2.0/cache/io-console-0.9.4.gem +0 -0
  158. data/vendor/bundle/ruby/3.2.0/cache/typhoeus-1.6.0.gem +0 -0
  159. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/io-console-0.9.4/io/console.so +0 -0
  160. data/vendor/bundle/ruby/3.2.0/gems/ethon-0.18.0/CHANGELOG.md +0 -417
  161. data/vendor/bundle/ruby/3.2.0/gems/ethon-0.18.0/README.md +0 -118
  162. data/vendor/bundle/ruby/3.2.0/gems/ethon-0.18.0/lib/ethon/curls/classes.rb +0 -65
  163. data/vendor/bundle/ruby/3.2.0/gems/ethon-0.18.0/lib/ethon/curls/functions.rb +0 -58
  164. data/vendor/bundle/ruby/3.2.0/gems/ethon-0.18.0/lib/ethon/curls/settings.rb +0 -12
  165. data/vendor/bundle/ruby/3.2.0/gems/ethon-0.18.0/lib/ethon/easy/callbacks.rb +0 -155
  166. data/vendor/bundle/ruby/3.2.0/gems/ethon-0.18.0/lib/ethon/easy/header.rb +0 -61
  167. data/vendor/bundle/ruby/3.2.0/gems/ethon-0.18.0/lib/ethon/easy/http/putable.rb +0 -25
  168. data/vendor/bundle/ruby/3.2.0/gems/ethon-0.18.0/lib/ethon/easy/mirror.rb +0 -36
  169. data/vendor/bundle/ruby/3.2.0/gems/ethon-0.18.0/lib/ethon/easy/operations.rb +0 -64
  170. data/vendor/bundle/ruby/3.2.0/gems/ethon-0.18.0/lib/ethon/easy/options.rb +0 -50
  171. data/vendor/bundle/ruby/3.2.0/gems/ethon-0.18.0/lib/ethon/easy/util.rb +0 -28
  172. data/vendor/bundle/ruby/3.2.0/gems/ethon-0.18.0/lib/ethon/errors/invalid_value.rb +0 -13
  173. data/vendor/bundle/ruby/3.2.0/gems/ethon-0.18.0/lib/ethon/libc.rb +0 -21
  174. data/vendor/bundle/ruby/3.2.0/gems/ethon-0.18.0/lib/ethon/multi/operations.rb +0 -228
  175. data/vendor/bundle/ruby/3.2.0/gems/ethon-0.18.0/lib/ethon/multi/options.rb +0 -117
  176. data/vendor/bundle/ruby/3.2.0/gems/ethon-0.18.0/lib/ethon/multi/stack.rb +0 -49
  177. data/vendor/bundle/ruby/3.2.0/gems/io-console-0.9.4/lib/io/console.so +0 -0
  178. data/vendor/bundle/ruby/3.2.0/gems/typhoeus-1.6.0/README.md +0 -588
  179. data/vendor/bundle/ruby/3.2.0/gems/typhoeus-1.6.0/lib/rack/typhoeus/middleware/params_decoder/helper.rb +0 -76
  180. data/vendor/bundle/ruby/3.2.0/gems/typhoeus-1.6.0/lib/typhoeus/hydra/addable.rb +0 -23
  181. data/vendor/bundle/ruby/3.2.0/gems/typhoeus-1.6.0/lib/typhoeus/hydra/before.rb +0 -31
  182. data/vendor/bundle/ruby/3.2.0/gems/typhoeus-1.6.0/lib/typhoeus/hydra/block_connection.rb +0 -35
  183. data/vendor/bundle/ruby/3.2.0/gems/typhoeus-1.6.0/lib/typhoeus/hydra/cacheable.rb +0 -15
  184. data/vendor/bundle/ruby/3.2.0/gems/typhoeus-1.6.0/lib/typhoeus/hydra/memoizable.rb +0 -56
  185. data/vendor/bundle/ruby/3.2.0/gems/typhoeus-1.6.0/lib/typhoeus/hydra/runnable.rb +0 -19
  186. data/vendor/bundle/ruby/3.2.0/gems/typhoeus-1.6.0/lib/typhoeus/hydra/stubbable.rb +0 -28
  187. data/vendor/bundle/ruby/3.2.0/gems/typhoeus-1.6.0/lib/typhoeus/hydra.rb +0 -95
  188. data/vendor/bundle/ruby/3.2.0/gems/typhoeus-1.6.0/lib/typhoeus/pool.rb +0 -70
  189. data/vendor/bundle/ruby/3.2.0/gems/typhoeus-1.6.0/lib/typhoeus/request/before.rb +0 -30
  190. data/vendor/bundle/ruby/3.2.0/gems/typhoeus-1.6.0/lib/typhoeus/request/block_connection.rb +0 -52
  191. data/vendor/bundle/ruby/3.2.0/gems/typhoeus-1.6.0/lib/typhoeus/request/cacheable.rb +0 -38
  192. data/vendor/bundle/ruby/3.2.0/gems/typhoeus-1.6.0/lib/typhoeus/request/memoizable.rb +0 -38
  193. data/vendor/bundle/ruby/3.2.0/gems/typhoeus-1.6.0/lib/typhoeus/request/operations.rb +0 -40
  194. data/vendor/bundle/ruby/3.2.0/gems/typhoeus-1.6.0/lib/typhoeus/request/responseable.rb +0 -29
  195. data/vendor/bundle/ruby/3.2.0/gems/typhoeus-1.6.0/lib/typhoeus/request/stubbable.rb +0 -30
  196. data/vendor/bundle/ruby/3.2.0/gems/typhoeus-1.6.0/lib/typhoeus/request.rb +0 -223
  197. data/vendor/bundle/ruby/3.2.0/gems/typhoeus-1.6.0/lib/typhoeus/response/header.rb +0 -105
  198. data/vendor/bundle/ruby/3.2.0/gems/typhoeus-1.6.0/lib/typhoeus.rb +0 -143
  199. /data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/{io-console-0.9.4 → io-console-0.9.5}/gem.build_complete +0 -0
  200. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/LICENSE +0 -0
  201. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/ethon.gemspec +0 -0
  202. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/curls/messages.rb +0 -0
  203. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/easy/debug_info.rb +0 -0
  204. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/easy/http/custom.rb +0 -0
  205. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/easy/http/delete.rb +0 -0
  206. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/easy/http/head.rb +0 -0
  207. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/easy/http/options.rb +0 -0
  208. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/easy/http/patch.rb +0 -0
  209. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/easy/http/put.rb +0 -0
  210. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/easy/params.rb +0 -0
  211. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/errors/ethon_error.rb +0 -0
  212. /data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.9.4 → io-console-0.9.5}/.document +0 -0
  213. /data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.9.4 → io-console-0.9.5}/BSDL +0 -0
  214. /data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.9.4 → io-console-0.9.5}/COPYING +0 -0
  215. /data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.9.4 → io-console-0.9.5}/README.md +0 -0
  216. /data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.9.4 → io-console-0.9.5}/ext/io/console/Makefile +0 -0
  217. /data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.9.4 → io-console-0.9.5}/ext/io/console/win32_vk.inc +0 -0
  218. /data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.9.4 → io-console-0.9.5}/lib/io/console/size.rb +0 -0
  219. /data/vendor/bundle/ruby/3.2.0/gems/{typhoeus-1.6.0 → typhoeus-1.7.1}/CONTRIBUTING.md +0 -0
  220. /data/vendor/bundle/ruby/3.2.0/gems/{typhoeus-1.6.0 → typhoeus-1.7.1}/LICENSE +0 -0
@@ -1,155 +0,0 @@
1
- # frozen_string_literal: true
2
- module Ethon
3
- class Easy
4
-
5
- # This module contains all the logic around the callbacks,
6
- # which are needed to interact with libcurl.
7
- #
8
- # @api private
9
- module Callbacks
10
-
11
- # :nodoc:
12
- def self.included(base)
13
- base.send(:attr_accessor, *[:response_body, :response_headers, :debug_info])
14
- end
15
-
16
- # Set writefunction and headerfunction callback.
17
- # They are called by libcurl in order to provide the header and
18
- # the body from the request.
19
- #
20
- # @example Set callbacks.
21
- # easy.set_callbacks
22
- def set_callbacks
23
- Curl.set_option(:writefunction, body_write_callback, handle)
24
- Curl.set_option(:headerfunction, header_write_callback, handle)
25
- Curl.set_option(:debugfunction, debug_callback, handle)
26
- @response_body = String.new
27
- @response_headers = String.new
28
- @headers_called = false
29
- @debug_info = Ethon::Easy::DebugInfo.new
30
- end
31
-
32
- # Returns the body write callback.
33
- #
34
- # @example Return the callback.
35
- # easy.body_write_callback
36
- #
37
- # @return [ Proc ] The callback.
38
- def body_write_callback
39
- @body_write_callback ||= proc do |stream, size, num, object|
40
- headers_user_callback_result = headers
41
- result = body(chunk = stream.read_string(size * num))
42
- @response_body << chunk if result == :unyielded
43
- (result != :abort && headers_user_callback_result != :abort) ? size * num : -1
44
- end
45
- end
46
-
47
- # Returns the header write callback.
48
- #
49
- # @example Return the callback.
50
- # easy.header_write_callback
51
- #
52
- # @return [ Proc ] The callback.
53
- def header_write_callback
54
- @header_write_callback ||= proc {|stream, size, num, object|
55
- @response_headers << stream.read_string(size * num)
56
- size * num
57
- }
58
- end
59
-
60
- # Returns the debug callback. This callback is currently used
61
- # write the raw http request headers.
62
- #
63
- # @example Return the callback.
64
- # easy.debug_callback
65
- #
66
- # @return [ Proc ] The callback.
67
- def debug_callback
68
- @debug_callback ||= proc {|handle, type, data, size, udata|
69
- message = data.read_string(size)
70
- @debug_info.add type, message
71
-
72
- if [:ssl_data_in, :ssl_data_out].include?(type)
73
- print "[#{size} bytes data]\n"
74
- elsif [:data_in, :data_out].include?(type)
75
- # print "} [#{size} bytes data]\n"
76
- else
77
- print message
78
- end
79
- 0
80
- }
81
- end
82
-
83
- def set_progress_callback
84
- if Curl.version_info[:version] >= "7.32.0"
85
- Curl.set_option(:xferinfofunction, progress_callback, handle)
86
- else
87
- Curl.set_option(:progressfunction, progress_callback, handle)
88
- end
89
- end
90
-
91
- # Returns the progress callback.
92
- #
93
- # @example Return the callback.
94
- # easy.progress_callback
95
- #
96
- # @return [ Proc ] The callback.
97
- def progress_callback
98
- @progress_callback ||= proc { |_, dltotal, dlnow, ultotal, ulnow|
99
- progress(dltotal, dlnow, ultotal, ulnow)
100
- 0
101
- }
102
- end
103
-
104
- # Set the read callback. This callback is used by libcurl to
105
- # read data when performing a PUT request.
106
- #
107
- # @example Set the callback.
108
- # easy.set_read_callback("a=1")
109
- #
110
- # @param [ String ] body The body.
111
- def set_read_callback(body)
112
- @request_body_read = 0
113
- readfunction do |stream, size, num, object|
114
- size = size * num
115
- body_size = if body.respond_to?(:bytesize)
116
- body.bytesize
117
- elsif body.respond_to?(:size)
118
- body.size
119
- elsif body.is_a?(File)
120
- File.size(body.path)
121
- end
122
-
123
- left = body_size - @request_body_read
124
- size = left if size > left
125
-
126
- if size > 0
127
- chunk = if body.respond_to?(:byteslice)
128
- body.byteslice(@request_body_read, size)
129
- elsif body.respond_to?(:read)
130
- body.read(size)
131
- else
132
- body[@request_body_read, size]
133
- end
134
-
135
- stream.write_string(
136
- chunk, size
137
- )
138
- @request_body_read += size
139
- end
140
- size
141
- end
142
- end
143
-
144
- # Returns the body read callback.
145
- #
146
- # @example Return the callback.
147
- # easy.read_callback
148
- #
149
- # @return [ Proc ] The callback.
150
- def read_callback
151
- @read_callback
152
- end
153
- end
154
- end
155
- end
@@ -1,61 +0,0 @@
1
- # frozen_string_literal: true
2
- module Ethon
3
- class Easy
4
- # This module contains the logic around adding headers to libcurl.
5
- #
6
- # @api private
7
- module Header
8
- # Return headers, return empty hash if none.
9
- #
10
- # @example Return the headers.
11
- # easy.headers
12
- #
13
- # @return [ Hash ] The headers.
14
- def headers
15
- @headers ||= {}
16
- end
17
-
18
- # Set the headers.
19
- #
20
- # @example Set the headers.
21
- # easy.headers = {'User-Agent' => 'ethon'}
22
- #
23
- # @param [ Hash ] headers The headers.
24
- def headers=(headers)
25
- headers ||= {}
26
- header_list = nil
27
- headers.each do |k, v|
28
- header_list = Curl.slist_append(header_list, compose_header(k,v))
29
- end
30
- Curl.set_option(:httpheader, header_list, handle)
31
-
32
- @header_list = header_list && FFI::AutoPointer.new(header_list, Curl.method(:slist_free_all))
33
- end
34
-
35
- # Return header_list.
36
- #
37
- # @example Return header_list.
38
- # easy.header_list
39
- #
40
- # @return [ FFI::Pointer ] The header list.
41
- def header_list
42
- @header_list
43
- end
44
-
45
- # Compose libcurl header string from key and value.
46
- # Also replaces null bytes, because libcurl will complain
47
- # otherwise.
48
- #
49
- # @example Compose header.
50
- # easy.compose_header('User-Agent', 'Ethon')
51
- #
52
- # @param [ String ] key The header name.
53
- # @param [ String ] value The header value.
54
- #
55
- # @return [ String ] The composed header.
56
- def compose_header(key, value)
57
- Util.escape_zero_byte("#{key}: #{value}")
58
- end
59
- end
60
- end
61
- end
@@ -1,25 +0,0 @@
1
- # frozen_string_literal: true
2
- module Ethon
3
- class Easy
4
- module Http
5
-
6
- # This module contains logic about setting up a PUT body.
7
- module Putable
8
- # Set things up when form is provided.
9
- # Deals with multipart forms.
10
- #
11
- # @example Setup.
12
- # put.set_form(easy)
13
- #
14
- # @param [ Easy ] easy The easy to setup.
15
- def set_form(easy)
16
- easy.upload = true
17
- form.escape = true
18
- form.params_encoding = params_encoding
19
- easy.infilesize = form.to_s.bytesize
20
- easy.set_read_callback(form.to_s)
21
- end
22
- end
23
- end
24
- end
25
- end
@@ -1,36 +0,0 @@
1
- # frozen_string_literal: true
2
- module Ethon
3
- class Easy
4
- class Mirror
5
- attr_reader :options
6
- alias_method :to_hash, :options
7
-
8
- INFORMATIONS_TO_MIRROR = Informations::AVAILABLE_INFORMATIONS.keys +
9
- [:return_code, :response_headers, :response_body, :debug_info]
10
-
11
- INFORMATIONS_TO_LOG = [:effective_url, :response_code, :return_code, :total_time]
12
-
13
- def self.from_easy(easy)
14
- options = {}
15
- INFORMATIONS_TO_MIRROR.each do |info|
16
- options[info] = easy.send(info)
17
- end
18
- new(options)
19
- end
20
-
21
- def initialize(options = {})
22
- @options = options
23
- end
24
-
25
- def log_informations
26
- Hash[*INFORMATIONS_TO_LOG.map do |info|
27
- [info, options[info]]
28
- end.flatten]
29
- end
30
-
31
- INFORMATIONS_TO_MIRROR.each do |info|
32
- eval %Q|def #{info}; options[#{info}]; end|
33
- end
34
- end
35
- end
36
- end
@@ -1,64 +0,0 @@
1
- # frozen_string_literal: true
2
- module Ethon
3
- class Easy
4
- # This module contains the logic to prepare and perform
5
- # an easy.
6
- module Operations
7
- # Returns a pointer to the curl easy handle.
8
- #
9
- # @example Return the handle.
10
- # easy.handle
11
- #
12
- # @return [ FFI::Pointer ] A pointer to the curl easy handle.
13
- def handle
14
- @handle ||= FFI::AutoPointer.new(Curl.easy_init, Curl.method(:easy_cleanup))
15
- end
16
-
17
- # Sets a pointer to the curl easy handle.
18
- # @param [ ::FFI::Pointer ] Easy handle that will be assigned.
19
- def handle=(h)
20
- @handle = h
21
- end
22
-
23
- # Perform the easy request.
24
- #
25
- # @example Perform the request.
26
- # easy.perform
27
- #
28
- # @return [ Integer ] The return code.
29
- def perform
30
- @return_code = Curl.easy_perform(handle)
31
- if Ethon.logger.debug?
32
- Ethon.logger.debug { "ETHON: performed #{log_inspect}" }
33
- end
34
- complete
35
- @return_code
36
- end
37
-
38
- # Clean up the easy.
39
- #
40
- # @example Perform clean up.
41
- # easy.cleanup
42
- #
43
- # @return the result of the free which is nil
44
- def cleanup
45
- handle.free
46
- end
47
-
48
- # Prepare the easy. Options, headers and callbacks
49
- # were set.
50
- #
51
- # @example Prepare easy.
52
- # easy.prepare
53
- #
54
- # @deprecated It is no longer necessary to call prepare.
55
- def prepare
56
- Ethon.logger.warn(
57
- "ETHON: It is no longer necessary to call "+
58
- "Easy#prepare. It's going to be removed "+
59
- "in future versions."
60
- )
61
- end
62
- end
63
- end
64
- end
@@ -1,50 +0,0 @@
1
- # frozen_string_literal: true
2
- module Ethon
3
- class Easy
4
-
5
- # This module contains the logic and knowledge about the
6
- # available options on easy.
7
- module Options
8
- attr_reader :url
9
-
10
- def url=(value)
11
- @url = value
12
- Curl.set_option(:url, value, handle)
13
- end
14
-
15
- def escape=( b )
16
- @escape = b
17
- end
18
-
19
- def escape?
20
- return true if !defined?(@escape) || @escape.nil?
21
- @escape
22
- end
23
-
24
- def multipart=(b)
25
- @multipart = b
26
- end
27
-
28
- def multipart?
29
- !!@multipart
30
- end
31
-
32
- Curl.easy_options(nil).each do |opt, props|
33
- method_name = "#{opt}=".freeze
34
- unless method_defined? method_name
35
- define_method(method_name) do |value|
36
- Curl.set_option(opt, value, handle)
37
- value
38
- end
39
- end
40
- next if props[:type] != :callback || method_defined?(opt)
41
- define_method(opt) do |&block|
42
- @procs ||= {}
43
- @procs[opt.to_sym] = block
44
- Curl.set_option(opt, block, handle)
45
- nil
46
- end
47
- end
48
- end
49
- end
50
- end
@@ -1,28 +0,0 @@
1
- # frozen_string_literal: true
2
- module Ethon
3
- class Easy # :nodoc:
4
-
5
- # This module contains small helpers.
6
- #
7
- # @api private
8
- module Util
9
-
10
- # Escapes zero bytes in strings.
11
- #
12
- # @example Escape zero bytes.
13
- # Util.escape_zero_byte("1\0")
14
- # #=> "1\\0"
15
- #
16
- # @param [ Object ] value The value to escape.
17
- #
18
- # @return [ String, Object ] Escaped String if
19
- # zero byte found, original object if not.
20
- def escape_zero_byte(value)
21
- return value unless value.to_s.include?(0.chr)
22
- value.to_s.gsub(0.chr, '\\\0')
23
- end
24
-
25
- extend self
26
- end
27
- end
28
- end
@@ -1,13 +0,0 @@
1
- # frozen_string_literal: true
2
- module Ethon
3
- module Errors
4
-
5
- # Raises when option is invalid.
6
- class InvalidValue < EthonError
7
- def initialize(option, value)
8
- super("The value: #{value} is invalid for option: #{option}.")
9
- end
10
- end
11
- end
12
- end
13
-
@@ -1,21 +0,0 @@
1
- # frozen_string_literal: true
2
- module Ethon
3
-
4
- # FFI Wrapper module for Libc.
5
- #
6
- # @api private
7
- module Libc
8
- extend FFI::Library
9
- ffi_lib 'c'
10
-
11
- # :nodoc:
12
- def self.windows?
13
- Gem.win_platform?
14
- end
15
-
16
- unless windows?
17
- attach_function :getdtablesize, [], :int
18
- attach_function :free, [:pointer], :void
19
- end
20
- end
21
- end
@@ -1,228 +0,0 @@
1
- # frozen_string_literal: true
2
- module Ethon
3
- class Multi # :nodoc
4
- # This module contains logic to run a multi.
5
- module Operations
6
- STARTED_MULTI = "ETHON: started MULTI"
7
- PERFORMED_MULTI = "ETHON: performed MULTI"
8
-
9
- # Return the multi handle. Inititialize multi handle,
10
- # in case it didn't happened already.
11
- #
12
- # @example Return multi handle.
13
- # multi.handle
14
- #
15
- # @return [ FFI::Pointer ] The multi handle.
16
- def handle
17
- @handle ||= FFI::AutoPointer.new(Curl.multi_init, Curl.method(:multi_cleanup))
18
- end
19
-
20
- # Initialize variables.
21
- #
22
- # @example Initialize variables.
23
- # multi.init_vars
24
- #
25
- # @return [ void ]
26
- def init_vars
27
- if @execution_mode == :perform
28
- @timeout = ::FFI::MemoryPointer.new(:long)
29
- @timeval = Curl::Timeval.new
30
- @fd_read = Curl::FDSet.new
31
- @fd_write = Curl::FDSet.new
32
- @fd_excep = Curl::FDSet.new
33
- @max_fd = ::FFI::MemoryPointer.new(:int)
34
- elsif @execution_mode == :socket_action
35
- @running_count_pointer = FFI::MemoryPointer.new(:int)
36
- end
37
- end
38
-
39
- # Perform multi.
40
- #
41
- # @return [ nil ]
42
- #
43
- # @example Perform multi.
44
- # multi.perform
45
- def perform
46
- ensure_execution_mode(:perform)
47
-
48
- Ethon.logger.debug(STARTED_MULTI)
49
- while ongoing?
50
- run
51
- timeout = get_timeout
52
- next if timeout == 0
53
- reset_fds
54
- set_fds(timeout)
55
- end
56
- Ethon.logger.debug(PERFORMED_MULTI)
57
- nil
58
- end
59
-
60
- # Prepare multi.
61
- #
62
- # @return [ nil ]
63
- #
64
- # @example Prepare multi.
65
- # multi.prepare
66
- #
67
- # @deprecated It is no longer necessary to call prepare.
68
- def prepare
69
- Ethon.logger.warn(
70
- "ETHON: It is no longer necessay to call "+
71
- "Multi#prepare. Its going to be removed "+
72
- "in future versions."
73
- )
74
- end
75
-
76
- # Continue execution with an external IO loop.
77
- #
78
- # @example When no sockets are ready yet, or to begin.
79
- # multi.socket_action
80
- #
81
- # @example When a socket is readable
82
- # multi.socket_action(io_object, [:in])
83
- #
84
- # @example When a socket is readable and writable
85
- # multi.socket_action(io_object, [:in, :out])
86
- #
87
- # @return [ Symbol ] The Curl.multi_socket_action return code.
88
- def socket_action(io = nil, readiness = 0)
89
- ensure_execution_mode(:socket_action)
90
-
91
- fd = if io.nil?
92
- ::Ethon::Curl::SOCKET_TIMEOUT
93
- elsif io.is_a?(Integer)
94
- io
95
- else
96
- io.fileno
97
- end
98
-
99
- code = Curl.multi_socket_action(handle, fd, readiness, @running_count_pointer)
100
- @running_count = @running_count_pointer.read_int
101
-
102
- check
103
-
104
- code
105
- end
106
-
107
- # Return whether the multi still contains requests or not.
108
- #
109
- # @example Return if ongoing.
110
- # multi.ongoing?
111
- #
112
- # @return [ Boolean ] True if ongoing, else false.
113
- def ongoing?
114
- easy_handles.size > 0 || (!defined?(@running_count) || running_count > 0)
115
- end
116
-
117
- private
118
-
119
- # Get timeout.
120
- #
121
- # @example Get timeout.
122
- # multi.get_timeout
123
- #
124
- # @return [ Integer ] The timeout.
125
- #
126
- # @raise [ Ethon::Errors::MultiTimeout ] If getting the timeout fails.
127
- def get_timeout
128
- code = Curl.multi_timeout(handle, @timeout)
129
- raise Errors::MultiTimeout.new(code) unless code == :ok
130
- timeout = @timeout.read_long
131
- timeout = 1 if timeout < 0
132
- timeout
133
- end
134
-
135
- # Reset file describtors.
136
- #
137
- # @example Reset fds.
138
- # multi.reset_fds
139
- #
140
- # @return [ void ]
141
- def reset_fds
142
- @fd_read.clear
143
- @fd_write.clear
144
- @fd_excep.clear
145
- end
146
-
147
- # Set fds.
148
- #
149
- # @example Set fds.
150
- # multi.set_fds
151
- #
152
- # @return [ void ]
153
- #
154
- # @raise [ Ethon::Errors::MultiFdset ] If setting the file descriptors fails.
155
- # @raise [ Ethon::Errors::Select ] If select fails.
156
- def set_fds(timeout)
157
- code = Curl.multi_fdset(handle, @fd_read, @fd_write, @fd_excep, @max_fd)
158
- raise Errors::MultiFdset.new(code) unless code == :ok
159
- max_fd = @max_fd.read_int
160
- if max_fd == -1
161
- sleep(0.001)
162
- else
163
- @timeval[:sec] = timeout / 1000
164
- @timeval[:usec] = (timeout * 1000) % 1000000
165
- loop do
166
- code = Curl.select(max_fd + 1, @fd_read, @fd_write, @fd_excep, @timeval)
167
- break unless code < 0 && ::FFI.errno == Errno::EINTR::Errno
168
- end
169
- raise Errors::Select.new(::FFI.errno) if code < 0
170
- end
171
- end
172
-
173
- # Check.
174
- #
175
- # @example Check.
176
- # multi.check
177
- #
178
- # @return [ void ]
179
- def check
180
- msgs_left = ::FFI::MemoryPointer.new(:int)
181
- while true
182
- msg = Curl.multi_info_read(handle, msgs_left)
183
- break if msg.null?
184
- next if msg[:code] != :done
185
- easy = easy_handles.find{ |e| e.handle == msg[:easy_handle] }
186
- easy.return_code = msg[:data][:code]
187
- Ethon.logger.debug { "ETHON: performed #{easy.log_inspect}" }
188
- delete(easy)
189
- easy.complete
190
- end
191
- end
192
-
193
- # Run.
194
- #
195
- # @example Run
196
- # multi.run
197
- #
198
- # @return [ void ]
199
- def run
200
- running_count_pointer = FFI::MemoryPointer.new(:int)
201
- begin code = trigger(running_count_pointer) end while code == :call_multi_perform
202
- check
203
- end
204
-
205
- # Trigger.
206
- #
207
- # @example Trigger.
208
- # multi.trigger
209
- #
210
- # @return [ Symbol ] The Curl.multi_perform return code.
211
- def trigger(running_count_pointer)
212
- code = Curl.multi_perform(handle, running_count_pointer)
213
- @running_count = running_count_pointer.read_int
214
- code
215
- end
216
-
217
- # Return number of running requests.
218
- #
219
- # @example Return count.
220
- # multi.running_count
221
- #
222
- # @return [ Integer ] Number running requests.
223
- def running_count
224
- @running_count ||= nil
225
- end
226
- end
227
- end
228
- end