vrpayment-ruby-sdk 5.0.2 → 5.2.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.
Files changed (273) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +5 -5
  3. data/lib/vrpayment-ruby-sdk/api/subscription_suspension_service_api.rb +8 -18
  4. data/lib/vrpayment-ruby-sdk/api_client.rb +1 -1
  5. data/lib/vrpayment-ruby-sdk/models/abstract_payment_link_update.rb +13 -1
  6. data/lib/vrpayment-ruby-sdk/models/pan_type.rb +1 -0
  7. data/lib/vrpayment-ruby-sdk/models/payment_link.rb +13 -1
  8. data/lib/vrpayment-ruby-sdk/models/payment_link_active.rb +13 -1
  9. data/lib/vrpayment-ruby-sdk/models/payment_link_create.rb +13 -1
  10. data/lib/vrpayment-ruby-sdk/models/payment_link_update.rb +13 -1
  11. data/lib/vrpayment-ruby-sdk/models/scope.rb +51 -1
  12. data/lib/vrpayment-ruby-sdk/models/wallet_type.rb +34 -4
  13. data/lib/vrpayment-ruby-sdk/version.rb +1 -1
  14. data/vendor/bundle/ruby/3.3.0/cache/ethon-0.15.0.gem +0 -0
  15. data/vendor/bundle/ruby/3.3.0/cache/json-2.15.1.gem +0 -0
  16. data/vendor/bundle/ruby/3.3.0/cache/typhoeus-1.5.0.gem +0 -0
  17. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/{json-2.13.0 → json-2.15.1}/gem_make.out +10 -10
  18. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/json-2.15.1/json/ext/generator.so +0 -0
  19. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/json-2.15.1/json/ext/parser.so +0 -0
  20. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/{json-2.13.0 → json-2.15.1}/mkmf.log +11 -10
  21. data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/.github/workflows/ruby.yml +2 -2
  22. data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/CHANGELOG.md +0 -3
  23. data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/README.md +0 -23
  24. data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/curls/classes.rb +2 -12
  25. data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/curls/options.rb +3 -4
  26. data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/easy/callbacks.rb +1 -2
  27. data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/easy/informations.rb +0 -3
  28. data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/easy/response_callbacks.rb +1 -6
  29. data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/version.rb +1 -1
  30. data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/spec/ethon/easy/callbacks_spec.rb +0 -22
  31. data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/spec/ethon/easy/informations_spec.rb +0 -6
  32. data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/spec/ethon/easy/mirror_spec.rb +1 -1
  33. data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/spec/ethon/easy/operations_spec.rb +0 -3
  34. data/vendor/bundle/ruby/3.3.0/gems/{json-2.13.0 → json-2.15.1}/CHANGES.md +50 -9
  35. data/vendor/bundle/ruby/3.3.0/gems/{json-2.13.0 → json-2.15.1}/README.md +3 -1
  36. data/vendor/bundle/ruby/3.3.0/gems/{json-2.13.0 → json-2.15.1}/ext/json/ext/fbuffer/fbuffer.h +31 -5
  37. data/vendor/bundle/ruby/3.3.0/gems/{json-2.13.0 → json-2.15.1}/ext/json/ext/generator/generator.c +134 -104
  38. data/vendor/bundle/ruby/3.3.0/gems/{json-2.13.0 → json-2.15.1}/ext/json/ext/parser/parser.c +58 -8
  39. data/vendor/bundle/ruby/3.3.0/gems/json-2.15.1/ext/json/ext/simd/conf.rb +24 -0
  40. data/vendor/bundle/ruby/3.3.0/gems/{json-2.13.0 → json-2.15.1}/ext/json/ext/simd/simd.h +47 -46
  41. data/vendor/bundle/ruby/3.3.0/gems/{json-2.13.0 → json-2.15.1}/ext/json/ext/vendor/fpconv.c +12 -11
  42. data/vendor/bundle/ruby/3.3.0/gems/{json-2.13.0 → json-2.15.1}/lib/json/add/core.rb +1 -0
  43. data/vendor/bundle/ruby/3.3.0/gems/json-2.15.1/lib/json/add/string.rb +35 -0
  44. data/vendor/bundle/ruby/3.3.0/gems/{json-2.13.0 → json-2.15.1}/lib/json/common.rb +49 -23
  45. data/vendor/bundle/ruby/3.3.0/gems/{json-2.13.0 → json-2.15.1}/lib/json/ext/generator/state.rb +7 -14
  46. data/vendor/bundle/ruby/3.3.0/gems/json-2.15.1/lib/json/ext/generator.so +0 -0
  47. data/vendor/bundle/ruby/3.3.0/gems/json-2.15.1/lib/json/ext/parser.so +0 -0
  48. data/vendor/bundle/ruby/3.3.0/gems/{json-2.13.0 → json-2.15.1}/lib/json/generic_object.rb +0 -8
  49. data/vendor/bundle/ruby/3.3.0/gems/{json-2.13.0 → json-2.15.1}/lib/json/truffle_ruby/generator.rb +63 -45
  50. data/vendor/bundle/ruby/3.3.0/gems/{json-2.13.0 → json-2.15.1}/lib/json/version.rb +1 -1
  51. data/vendor/bundle/ruby/3.3.0/gems/{json-2.13.0 → json-2.15.1}/lib/json.rb +23 -1
  52. data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/CHANGELOG.md +43 -1
  53. data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/expectation.rb +4 -2
  54. data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/request/responseable.rb +1 -1
  55. data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/version.rb +1 -1
  56. data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/typhoeus.gemspec +14 -4
  57. data/vendor/bundle/ruby/3.3.0/specifications/{ethon-0.16.0.gemspec → ethon-0.15.0.gemspec} +3 -3
  58. data/vendor/bundle/ruby/3.3.0/specifications/{json-2.13.0.gemspec → json-2.15.1.gemspec} +0 -0
  59. data/vendor/bundle/ruby/3.3.0/specifications/{typhoeus-1.4.1.gemspec → typhoeus-1.5.0.gemspec} +7 -5
  60. metadata +205 -252
  61. data/vendor/bundle/ruby/3.3.0/cache/ethon-0.16.0.gem +0 -0
  62. data/vendor/bundle/ruby/3.3.0/cache/json-2.13.0.gem +0 -0
  63. data/vendor/bundle/ruby/3.3.0/cache/typhoeus-1.4.1.gem +0 -0
  64. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/json-2.13.0/json/ext/generator.so +0 -0
  65. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/json-2.13.0/json/ext/parser.so +0 -0
  66. data/vendor/bundle/ruby/3.3.0/gems/json-2.13.0/ext/json/ext/simd/conf.rb +0 -20
  67. data/vendor/bundle/ruby/3.3.0/gems/json-2.13.0/lib/json/ext/generator.so +0 -0
  68. data/vendor/bundle/ruby/3.3.0/gems/json-2.13.0/lib/json/ext/parser.so +0 -0
  69. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/.github/workflows/ci.yml +0 -30
  70. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/.github/workflows/experimental.yml +0 -33
  71. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/.gitignore +0 -8
  72. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/.rspec +0 -4
  73. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/Gemfile +0 -36
  74. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/Guardfile +0 -9
  75. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/Rakefile +0 -38
  76. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/perf/profile.rb +0 -14
  77. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/perf/vs_nethttp.rb +0 -64
  78. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/rack/typhoeus/middleware/params_decoder/helper_spec.rb +0 -156
  79. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/rack/typhoeus/middleware/params_decoder_spec.rb +0 -31
  80. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/spec_helper.rb +0 -29
  81. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/support/localhost_server.rb +0 -94
  82. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/support/memory_cache.rb +0 -15
  83. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/support/server.rb +0 -116
  84. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/adapters/faraday_spec.rb +0 -339
  85. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/cache/dalli_spec.rb +0 -41
  86. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/cache/redis_spec.rb +0 -41
  87. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/config_spec.rb +0 -15
  88. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/easy_factory_spec.rb +0 -143
  89. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/errors/no_stub_spec.rb +0 -13
  90. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/expectation_spec.rb +0 -280
  91. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/hydra/addable_spec.rb +0 -22
  92. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/hydra/before_spec.rb +0 -98
  93. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/hydra/block_connection_spec.rb +0 -18
  94. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/hydra/cacheable_spec.rb +0 -88
  95. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/hydra/memoizable_spec.rb +0 -53
  96. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/hydra/queueable_spec.rb +0 -98
  97. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/hydra/runnable_spec.rb +0 -137
  98. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/hydra/stubbable_spec.rb +0 -48
  99. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/hydra_spec.rb +0 -22
  100. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/pool_spec.rb +0 -137
  101. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/request/actions_spec.rb +0 -19
  102. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/request/before_spec.rb +0 -93
  103. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/request/block_connection_spec.rb +0 -75
  104. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/request/cacheable_spec.rb +0 -94
  105. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/request/callbacks_spec.rb +0 -91
  106. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/request/marshal_spec.rb +0 -60
  107. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/request/memoizable_spec.rb +0 -34
  108. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/request/operations_spec.rb +0 -101
  109. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/request/responseable_spec.rb +0 -13
  110. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/request/stubbable_spec.rb +0 -45
  111. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/request_spec.rb +0 -256
  112. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/response/header_spec.rb +0 -147
  113. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/response/informations_spec.rb +0 -323
  114. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/response/status_spec.rb +0 -256
  115. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/response_spec.rb +0 -100
  116. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus_spec.rb +0 -105
  117. /data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/{json-2.13.0 → json-2.15.1}/gem.build_complete +0 -0
  118. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/.gitignore +0 -0
  119. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/.rspec +0 -0
  120. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/Gemfile +0 -0
  121. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/Guardfile +0 -0
  122. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/LICENSE +0 -0
  123. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/Rakefile +0 -0
  124. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/ethon.gemspec +0 -0
  125. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/curl.rb +0 -0
  126. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/curls/codes.rb +0 -0
  127. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/curls/constants.rb +0 -0
  128. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/curls/form_options.rb +0 -0
  129. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/curls/functions.rb +0 -0
  130. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/curls/infos.rb +0 -0
  131. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/curls/messages.rb +0 -0
  132. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/curls/settings.rb +0 -0
  133. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/easy/debug_info.rb +0 -0
  134. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/easy/features.rb +0 -0
  135. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/easy/form.rb +0 -0
  136. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/easy/header.rb +0 -0
  137. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/easy/http/actionable.rb +0 -0
  138. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/easy/http/custom.rb +0 -0
  139. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/easy/http/delete.rb +0 -0
  140. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/easy/http/get.rb +0 -0
  141. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/easy/http/head.rb +0 -0
  142. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/easy/http/options.rb +0 -0
  143. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/easy/http/patch.rb +0 -0
  144. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/easy/http/post.rb +0 -0
  145. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/easy/http/postable.rb +0 -0
  146. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/easy/http/put.rb +0 -0
  147. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/easy/http/putable.rb +0 -0
  148. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/easy/http.rb +0 -0
  149. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/easy/mirror.rb +0 -0
  150. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/easy/operations.rb +0 -0
  151. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/easy/options.rb +0 -0
  152. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/easy/params.rb +0 -0
  153. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/easy/queryable.rb +0 -0
  154. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/easy/util.rb +0 -0
  155. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/easy.rb +0 -0
  156. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/errors/ethon_error.rb +0 -0
  157. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/errors/global_init.rb +0 -0
  158. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/errors/invalid_option.rb +0 -0
  159. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/errors/invalid_value.rb +0 -0
  160. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/errors/multi_add.rb +0 -0
  161. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/errors/multi_fdset.rb +0 -0
  162. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/errors/multi_remove.rb +0 -0
  163. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/errors/multi_timeout.rb +0 -0
  164. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/errors/select.rb +0 -0
  165. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/errors.rb +0 -0
  166. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/libc.rb +0 -0
  167. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/loggable.rb +0 -0
  168. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/multi/operations.rb +0 -0
  169. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/multi/options.rb +0 -0
  170. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/multi/stack.rb +0 -0
  171. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/multi.rb +0 -0
  172. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon.rb +0 -0
  173. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/profile/benchmarks.rb +0 -0
  174. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/profile/memory_leaks.rb +0 -0
  175. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/profile/perf_spec_helper.rb +0 -0
  176. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/profile/support/memory_test_helpers.rb +0 -0
  177. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/profile/support/os_memory_leak_tracker.rb +0 -0
  178. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/profile/support/ruby_object_leak_tracker.rb +0 -0
  179. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/spec/ethon/curl_spec.rb +0 -0
  180. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/spec/ethon/easy/debug_info_spec.rb +0 -0
  181. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/spec/ethon/easy/features_spec.rb +0 -0
  182. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/spec/ethon/easy/form_spec.rb +0 -0
  183. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/spec/ethon/easy/header_spec.rb +0 -0
  184. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/spec/ethon/easy/http/custom_spec.rb +0 -0
  185. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/spec/ethon/easy/http/delete_spec.rb +0 -0
  186. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/spec/ethon/easy/http/get_spec.rb +0 -0
  187. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/spec/ethon/easy/http/head_spec.rb +0 -0
  188. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/spec/ethon/easy/http/options_spec.rb +0 -0
  189. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/spec/ethon/easy/http/patch_spec.rb +0 -0
  190. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/spec/ethon/easy/http/post_spec.rb +0 -0
  191. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/spec/ethon/easy/http/put_spec.rb +0 -0
  192. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/spec/ethon/easy/http_spec.rb +0 -0
  193. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/spec/ethon/easy/options_spec.rb +0 -0
  194. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/spec/ethon/easy/queryable_spec.rb +0 -0
  195. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/spec/ethon/easy/response_callbacks_spec.rb +0 -0
  196. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/spec/ethon/easy/util_spec.rb +0 -0
  197. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/spec/ethon/easy_spec.rb +0 -0
  198. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/spec/ethon/libc_spec.rb +0 -0
  199. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/spec/ethon/loggable_spec.rb +0 -0
  200. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/spec/ethon/multi/operations_spec.rb +0 -0
  201. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/spec/ethon/multi/options_spec.rb +0 -0
  202. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/spec/ethon/multi/stack_spec.rb +0 -0
  203. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/spec/ethon/multi_spec.rb +0 -0
  204. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/spec/spec_helper.rb +0 -0
  205. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/spec/support/localhost_server.rb +0 -0
  206. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/spec/support/server.rb +0 -0
  207. /data/vendor/bundle/ruby/3.3.0/gems/{json-2.13.0 → json-2.15.1}/BSDL +0 -0
  208. /data/vendor/bundle/ruby/3.3.0/gems/{json-2.13.0 → json-2.15.1}/COPYING +0 -0
  209. /data/vendor/bundle/ruby/3.3.0/gems/{json-2.13.0 → json-2.15.1}/LEGAL +0 -0
  210. /data/vendor/bundle/ruby/3.3.0/gems/{json-2.13.0 → json-2.15.1}/ext/json/ext/generator/Makefile +0 -0
  211. /data/vendor/bundle/ruby/3.3.0/gems/{json-2.13.0 → json-2.15.1}/ext/json/ext/generator/extconf.rb +0 -0
  212. /data/vendor/bundle/ruby/3.3.0/gems/{json-2.13.0 → json-2.15.1}/ext/json/ext/parser/Makefile +0 -0
  213. /data/vendor/bundle/ruby/3.3.0/gems/{json-2.13.0 → json-2.15.1}/ext/json/ext/parser/extconf.rb +0 -0
  214. /data/vendor/bundle/ruby/3.3.0/gems/{json-2.13.0 → json-2.15.1}/ext/json/ext/vendor/jeaiii-ltoa.h +0 -0
  215. /data/vendor/bundle/ruby/3.3.0/gems/{json-2.13.0 → json-2.15.1}/json.gemspec +0 -0
  216. /data/vendor/bundle/ruby/3.3.0/gems/{json-2.13.0 → json-2.15.1}/lib/json/add/bigdecimal.rb +0 -0
  217. /data/vendor/bundle/ruby/3.3.0/gems/{json-2.13.0 → json-2.15.1}/lib/json/add/complex.rb +0 -0
  218. /data/vendor/bundle/ruby/3.3.0/gems/{json-2.13.0 → json-2.15.1}/lib/json/add/date.rb +0 -0
  219. /data/vendor/bundle/ruby/3.3.0/gems/{json-2.13.0 → json-2.15.1}/lib/json/add/date_time.rb +0 -0
  220. /data/vendor/bundle/ruby/3.3.0/gems/{json-2.13.0 → json-2.15.1}/lib/json/add/exception.rb +0 -0
  221. /data/vendor/bundle/ruby/3.3.0/gems/{json-2.13.0 → json-2.15.1}/lib/json/add/ostruct.rb +0 -0
  222. /data/vendor/bundle/ruby/3.3.0/gems/{json-2.13.0 → json-2.15.1}/lib/json/add/range.rb +0 -0
  223. /data/vendor/bundle/ruby/3.3.0/gems/{json-2.13.0 → json-2.15.1}/lib/json/add/rational.rb +0 -0
  224. /data/vendor/bundle/ruby/3.3.0/gems/{json-2.13.0 → json-2.15.1}/lib/json/add/regexp.rb +0 -0
  225. /data/vendor/bundle/ruby/3.3.0/gems/{json-2.13.0 → json-2.15.1}/lib/json/add/set.rb +0 -0
  226. /data/vendor/bundle/ruby/3.3.0/gems/{json-2.13.0 → json-2.15.1}/lib/json/add/struct.rb +0 -0
  227. /data/vendor/bundle/ruby/3.3.0/gems/{json-2.13.0 → json-2.15.1}/lib/json/add/symbol.rb +0 -0
  228. /data/vendor/bundle/ruby/3.3.0/gems/{json-2.13.0 → json-2.15.1}/lib/json/add/time.rb +0 -0
  229. /data/vendor/bundle/ruby/3.3.0/gems/{json-2.13.0 → json-2.15.1}/lib/json/ext.rb +0 -0
  230. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/CONTRIBUTING.md +0 -0
  231. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/LICENSE +0 -0
  232. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/README.md +0 -0
  233. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/UPGRADE.md +0 -0
  234. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/rack/typhoeus/middleware/params_decoder/helper.rb +0 -0
  235. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/rack/typhoeus/middleware/params_decoder.rb +0 -0
  236. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/rack/typhoeus.rb +0 -0
  237. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/adapters/faraday.rb +0 -0
  238. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/cache/dalli.rb +0 -0
  239. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/cache/rails.rb +0 -0
  240. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/cache/redis.rb +0 -0
  241. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/config.rb +0 -0
  242. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/easy_factory.rb +0 -0
  243. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/errors/no_stub.rb +0 -0
  244. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/errors/typhoeus_error.rb +0 -0
  245. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/errors.rb +0 -0
  246. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/hydra/addable.rb +0 -0
  247. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/hydra/before.rb +0 -0
  248. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/hydra/block_connection.rb +0 -0
  249. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/hydra/cacheable.rb +0 -0
  250. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/hydra/memoizable.rb +0 -0
  251. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/hydra/queueable.rb +0 -0
  252. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/hydra/runnable.rb +0 -0
  253. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/hydra/stubbable.rb +0 -0
  254. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/hydra.rb +0 -0
  255. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/pool.rb +0 -0
  256. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/railtie.rb +0 -0
  257. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/request/actions.rb +0 -0
  258. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/request/before.rb +0 -0
  259. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/request/block_connection.rb +0 -0
  260. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/request/cacheable.rb +0 -0
  261. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/request/callbacks.rb +0 -0
  262. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/request/marshal.rb +0 -0
  263. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/request/memoizable.rb +0 -0
  264. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/request/operations.rb +0 -0
  265. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/request/streamable.rb +0 -0
  266. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/request/stubbable.rb +0 -0
  267. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/request.rb +0 -0
  268. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/response/cacheable.rb +0 -0
  269. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/response/header.rb +0 -0
  270. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/response/informations.rb +0 -0
  271. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/response/status.rb +0 -0
  272. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/response.rb +0 -0
  273. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus.rb +0 -0
@@ -1,137 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe Typhoeus::Hydra::Runnable do
4
- let(:base_url) { "localhost:3001" }
5
- let(:options) { {} }
6
- let(:hydra) { Typhoeus::Hydra.new(options) }
7
- let(:receive_counter) { double :mark => :twain }
8
-
9
- describe "#run" do
10
- let(:requests) { [] }
11
-
12
- before do
13
- requests.each { |r| hydra.queue r }
14
- end
15
-
16
- it "runs multi#dequeue_many" do
17
- expect(hydra).to receive(:dequeue_many)
18
- hydra.run
19
- end
20
-
21
- it "runs multi#perform" do
22
- expect(hydra.multi).to receive(:perform)
23
- hydra.run
24
- end
25
-
26
- context "when request queued" do
27
- let(:first) { Typhoeus::Request.new("localhost:3001/first") }
28
- let(:requests) { [first] }
29
-
30
- it "sends" do
31
- hydra.run
32
- expect(first.response).to be
33
- end
34
- end
35
-
36
- context "when three request queued" do
37
- let(:first) { Typhoeus::Request.new("localhost:3001/first") }
38
- let(:second) { Typhoeus::Request.new("localhost:3001/second") }
39
- let(:third) { Typhoeus::Request.new("localhost:3001/third") }
40
- let(:requests) { [first, second, third] }
41
-
42
- it "sends first" do
43
- hydra.run
44
- expect(first.response).to be
45
- end
46
-
47
- it "sends second" do
48
- hydra.run
49
- expect(second.response).to be
50
- end
51
-
52
- it "sends third" do
53
- hydra.run
54
- expect(third.response).to be
55
- end
56
-
57
- it "sends first first" do
58
- first.on_complete do
59
- expect(second.response).to be_nil
60
- expect(third.response).to be_nil
61
- end
62
- end
63
-
64
- it "sends second second" do
65
- first.on_complete do
66
- expect(first.response).to be
67
- expect(third.response).to be_nil
68
- end
69
- end
70
-
71
- it "sends thirds last" do
72
- first.on_complete do
73
- expect(second.response).to be
74
- expect(third.response).to be
75
- end
76
- end
77
- end
78
-
79
- context "when really queued request" do
80
- let(:options) { {:max_concurrency => 1} }
81
- let(:first) { Typhoeus::Request.new("localhost:3001/first") }
82
- let(:second) { Typhoeus::Request.new("localhost:3001/second") }
83
- let(:third) { Typhoeus::Request.new("localhost:3001/third") }
84
- let(:requests) { [first, second, third] }
85
-
86
- it "sends first" do
87
- hydra.run
88
- expect(first.response).to be
89
- end
90
-
91
- it "sends second" do
92
- hydra.run
93
- expect(second.response).to be
94
- end
95
-
96
- it "sends third" do
97
- hydra.run
98
- expect(third.response).to be
99
- end
100
- end
101
-
102
- context "when request queued in callback" do
103
- let(:first) do
104
- Typhoeus::Request.new("localhost:3001/first").tap do |r|
105
- r.on_complete{ hydra.queue(second) }
106
- end
107
- end
108
- let(:second) { Typhoeus::Request.new("localhost:3001/second") }
109
- let(:requests) { [first] }
110
-
111
- before { Typhoeus.on_complete { |r| receive_counter.mark } }
112
- after { Typhoeus.on_complete.clear; Typhoeus.before.clear }
113
-
114
- context "when real request" do
115
- context "when max_concurrency default" do
116
- let(:options) { {} }
117
-
118
- it "calls on_complete callback once for every response" do
119
- expect(receive_counter).to receive(:mark).exactly(2).times
120
- hydra.run
121
- end
122
- end
123
- end
124
-
125
- context "when no real request" do
126
- context "when before hook returns and finishes response" do
127
- before { Typhoeus.before{ |request| request.finish(Typhoeus::Response.new) } }
128
-
129
- it "simulates real multi run and adds and finishes both requests" do
130
- expect(receive_counter).to receive(:mark).exactly(2).times
131
- hydra.run
132
- end
133
- end
134
- end
135
- end
136
- end
137
- end
@@ -1,48 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe Typhoeus::Hydra::Stubbable do
4
- let(:base_url) { "localhost:3001" }
5
- let(:request) { Typhoeus::Request.new(base_url) }
6
- let(:response) { Typhoeus::Response.new }
7
- let(:hydra) { Typhoeus::Hydra.new }
8
-
9
- before { Typhoeus.stub(base_url).and_return(response) }
10
-
11
- describe "#add" do
12
- it "checks expectations" do
13
- hydra.add(request)
14
- end
15
-
16
- context "when expectation found" do
17
- it "calls on_headers callbacks" do
18
- canary = :not_called
19
- request.on_headers do
20
- canary = :called
21
- end
22
- hydra.add(request)
23
- hydra.run
24
- expect(canary).to eq(:called)
25
- end
26
-
27
- it "calls on_body callbacks" do
28
- canary = :not_called
29
- request.on_body do
30
- canary = :called
31
- end
32
- hydra.add(request)
33
- hydra.run
34
- expect(canary).to eq(:called)
35
- end
36
-
37
- it "finishes response" do
38
- expect(request).to receive(:finish)
39
- hydra.add(request)
40
- end
41
-
42
- it "is a mock" do
43
- hydra.add(request)
44
- expect(request.response.mock).to be(true)
45
- end
46
- end
47
- end
48
- end
@@ -1,22 +0,0 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
2
-
3
- describe Typhoeus::Hydra do
4
- let(:base_url) { "localhost:3001" }
5
- let(:options) { {} }
6
- let(:hydra) { Typhoeus::Hydra.new(options) }
7
-
8
- describe "#new" do
9
- let(:options) { {:pipeling => true} }
10
-
11
- it "passes options to multi" do
12
- expect(Ethon::Multi).to receive(:new).with(options)
13
- hydra
14
- end
15
- end
16
-
17
- describe "#hydra" do
18
- it "returns a hydra" do
19
- expect(Typhoeus::Hydra.hydra).to be_a(Typhoeus::Hydra)
20
- end
21
- end
22
- end
@@ -1,137 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe Typhoeus::Pool do
4
- let(:easy) { Ethon::Easy.new }
5
- after { Typhoeus::Pool.clear }
6
-
7
- describe "#easies" do
8
- it "returns array" do
9
- expect(Typhoeus::Pool.send(:easies)).to be_a(Array)
10
- end
11
- end
12
-
13
- describe "#release" do
14
- it "resets easy" do
15
- expect(easy).to receive(:reset)
16
- Typhoeus::Pool.release(easy)
17
- end
18
-
19
- it "flush cookies to disk" do
20
- expect(easy).to receive(:cookielist=).with('flush')
21
- expect(easy).to receive(:reset)
22
- expect(easy).to receive(:cookielist=).with('all')
23
- Typhoeus::Pool.release(easy)
24
- end
25
-
26
- it "writes cookies to disk" do
27
- tempfile1 = Tempfile.new('cookies')
28
- tempfile2 = Tempfile.new('cookies')
29
-
30
- easy.cookiejar = tempfile1.path
31
- easy.url = "localhost:3001/cookies-test"
32
- easy.perform
33
-
34
- Typhoeus::Pool.release(easy)
35
-
36
- expect(File.zero?(tempfile1.path)).to be(false)
37
- expect(File.read(tempfile1.path)).to match(/\s+foo\s+bar$/)
38
- expect(File.read(tempfile1.path)).to match(/\s+bar\s+foo$/)
39
-
40
- # do it again - and check if tempfile1 wasn't change
41
- easy.cookiejar = tempfile2.path
42
- easy.url = "localhost:3001/cookies-test2"
43
- easy.perform
44
-
45
- Typhoeus::Pool.release(easy)
46
-
47
- # tempfile 1
48
- expect(File.zero?(tempfile1.path)).to be(false)
49
- expect(File.read(tempfile1.path)).to match(/\s+foo\s+bar$/)
50
- expect(File.read(tempfile1.path)).to match(/\s+bar\s+foo$/)
51
-
52
- # tempfile2
53
- expect(File.zero?(tempfile2.path)).to be(false)
54
- expect(File.read(tempfile2.path)).to match(/\s+foo2\s+bar$/)
55
- expect(File.read(tempfile2.path)).to match(/\s+bar2\s+foo$/)
56
- end
57
-
58
- it "puts easy back into pool" do
59
- Typhoeus::Pool.release(easy)
60
- expect(Typhoeus::Pool.send(:easies)).to include(easy)
61
- end
62
-
63
- context "when threaded access" do
64
- it "releases correct number of easies" do
65
- (0..9).map do |n|
66
- Thread.new do
67
- Typhoeus::Pool.release(Ethon::Easy.new)
68
- end
69
- end.map(&:join)
70
- expect(Typhoeus::Pool.send(:easies).size).to eq(10)
71
- end
72
- end
73
- end
74
-
75
- describe "#get" do
76
- context "when easy in pool" do
77
- before { Typhoeus::Pool.send(:easies) << easy }
78
-
79
- it "takes" do
80
- expect(Typhoeus::Pool.get).to eq(easy)
81
- end
82
- end
83
-
84
- context "when no easy in pool" do
85
- it "creates" do
86
- expect(Typhoeus::Pool.get).to be_a(Ethon::Easy)
87
- end
88
-
89
- context "when threaded access" do
90
- it "creates correct number of easies" do
91
- queue = Queue.new
92
- (0..9).map do |n|
93
- Thread.new do
94
- queue.enq(Typhoeus::Pool.get)
95
- end
96
- end.map(&:join)
97
-
98
- array = Array.new(queue.size) { queue.pop }
99
- expect(array.uniq.size).to eq(10)
100
- end
101
- end
102
- end
103
-
104
- context "when forked" do
105
- before do
106
- allow(Process).to receive(:pid).and_return(1)
107
- Typhoeus::Pool.send(:easies) << easy
108
- allow(Process).to receive(:pid).and_return(2)
109
- end
110
-
111
- after do
112
- allow(Process).to receive(:pid).and_call_original
113
- Typhoeus::Pool.instance_variable_set(:@pid, Process.pid)
114
- end
115
-
116
- it "creates" do
117
- expect(Typhoeus::Pool.get).to_not eq(easy)
118
- end
119
- end
120
- end
121
-
122
- describe "#with" do
123
- it "is re-entrant" do
124
- array = []
125
- Typhoeus::Pool.with_easy do |e1|
126
- array << e1
127
- Typhoeus::Pool.with_easy do |e2|
128
- array << e2
129
- Typhoeus::Pool.with_easy do |e3|
130
- array << e3
131
- end
132
- end
133
- end
134
- expect(array.uniq.size).to eq(3)
135
- end
136
- end
137
- end
@@ -1,19 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe Typhoeus::Request::Actions do
4
- [:get, :post, :put, :delete, :head, :patch, :options].each do |name|
5
- describe ".#{name}" do
6
- let(:response) { Typhoeus::Request.method(name).call("http://localhost:3001") }
7
-
8
- it "returns ok" do
9
- expect(response.return_code).to eq(:ok)
10
- end
11
-
12
- unless name == :head
13
- it "makes #{name.to_s.upcase} Request" do
14
- expect(response.response_body).to include("\"REQUEST_METHOD\":\"#{name.to_s.upcase}\"")
15
- end
16
- end
17
- end
18
- end
19
- end
@@ -1,93 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe Typhoeus::Request::Before do
4
- let(:request) { Typhoeus::Request.new("") }
5
- let(:receive_counter) { double :mark => :twain }
6
-
7
- describe "#queue" do
8
- context "when before" do
9
- context "when one" do
10
- it "executes" do
11
- Typhoeus.before { |r| receive_counter.mark }
12
- expect(receive_counter).to receive(:mark)
13
- request.run
14
- end
15
-
16
- context "when true" do
17
- it "calls super" do
18
- Typhoeus.before { true }
19
- expect(Typhoeus::Expectation).to receive(:response_for)
20
- request.run
21
- end
22
- end
23
-
24
- context "when false" do
25
- it "doesn't call super" do
26
- Typhoeus.before { false }
27
- expect(Typhoeus::Expectation).to receive(:response_for).never
28
- request.run
29
- end
30
-
31
- it "returns response" do
32
- Typhoeus.before { |r| r.response = 1; false }
33
- expect(request.run).to be(1)
34
- end
35
- end
36
-
37
- context "when a response" do
38
- it "doesn't call super" do
39
- Typhoeus.before { Typhoeus::Response.new }
40
- expect(Typhoeus::Expectation).to receive(:response_for).never
41
- request.run
42
- end
43
-
44
- it "returns response" do
45
- Typhoeus.before { |r| r.response = Typhoeus::Response.new }
46
- expect(request.run).to be_a(Typhoeus::Response)
47
- end
48
- end
49
- end
50
-
51
- context "when multi" do
52
- context "when all true" do
53
- before { 3.times { Typhoeus.before { |r| receive_counter.mark } } }
54
-
55
- it "calls super" do
56
- expect(Typhoeus::Expectation).to receive(:response_for)
57
- request.run
58
- end
59
-
60
- it "executes all" do
61
- expect(receive_counter).to receive(:mark).exactly(3)
62
- request.run
63
- end
64
- end
65
-
66
- context "when middle false" do
67
- before do
68
- Typhoeus.before { |r| receive_counter.mark }
69
- Typhoeus.before { |r| receive_counter.mark; nil }
70
- Typhoeus.before { |r| receive_counter.mark }
71
- end
72
-
73
- it "doesn't call super" do
74
- expect(Typhoeus::Expectation).to receive(:response_for).never
75
- request.run
76
- end
77
-
78
- it "executes only two" do
79
- expect(receive_counter).to receive(:mark).exactly(2).times
80
- request.run
81
- end
82
- end
83
- end
84
- end
85
-
86
- context "when no before" do
87
- it "calls super" do
88
- expect(Typhoeus::Expectation).to receive(:response_for)
89
- request.run
90
- end
91
- end
92
- end
93
- end
@@ -1,75 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe Typhoeus::Request::BlockConnection do
4
- let(:base_url) { "localhost:3001" }
5
- let(:request) { Typhoeus::Request.new(base_url, {:method => :get}) }
6
-
7
- describe "run" do
8
- context "when blocked" do
9
- before { request.block_connection = true }
10
-
11
- it "raises" do
12
- expect{ request.run }.to raise_error(Typhoeus::Errors::NoStub)
13
- end
14
- end
15
-
16
- context "when not blocked" do
17
- before { request.block_connection = false }
18
-
19
- it "doesn't raise" do
20
- expect{ request.run }.to_not raise_error
21
- end
22
- end
23
- end
24
-
25
- describe "#blocked?" do
26
- context "when local block_connection" do
27
- context "when true" do
28
- before { request.block_connection = true }
29
-
30
- it "returns true" do
31
- expect(request.blocked?).to be_truthy
32
- end
33
- end
34
-
35
- context "when false" do
36
- before { request.block_connection = false }
37
-
38
- it "returns false" do
39
- expect(request.blocked?).to be_falsey
40
- end
41
- end
42
- end
43
-
44
- context "when global block_connection" do
45
- context "when true" do
46
- before { Typhoeus::Config.block_connection = true }
47
- after { Typhoeus::Config.block_connection = false }
48
-
49
- it "returns true" do
50
- expect(request.blocked?).to be_truthy
51
- end
52
- end
53
-
54
- context "when false" do
55
- before { Typhoeus::Config.block_connection = false }
56
-
57
- it "returns false" do
58
- expect(request.blocked?).to be_falsey
59
- end
60
- end
61
- end
62
-
63
- context "when global and local block_connection" do
64
- before do
65
- Typhoeus::Config.block_connection = true
66
- request.block_connection = false
67
- end
68
- after { Typhoeus::Config.block_connection = false }
69
-
70
- it "takes local" do
71
- expect(request.blocked?).to be_falsey
72
- end
73
- end
74
- end
75
- end
@@ -1,94 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe Typhoeus::Request::Cacheable do
4
- let(:cache) { MemoryCache.new }
5
- let(:options) { {} }
6
- let(:request) { Typhoeus::Request.new("http://localhost:3001", options) }
7
- let(:response) { Typhoeus::Response.new }
8
-
9
- before { Typhoeus::Config.cache = cache }
10
- after { Typhoeus::Config.cache = false }
11
-
12
- describe "#response=" do
13
- context "when cache activated" do
14
- context "when request new" do
15
- it "caches response" do
16
- request.response = response
17
- expect(cache.memory[request]).to be
18
- end
19
-
20
- it "doesn't set cached on response" do
21
- request.response = response
22
- expect(request.response.cached?).to be_falsey
23
- end
24
- end
25
-
26
- context "when request in memory" do
27
- before { cache.memory[request] = response }
28
-
29
- it "finishes request" do
30
- expect(request).to receive(:finish).with(response)
31
- request.run
32
- end
33
-
34
- it "sets cached to true for response" do
35
- request.run
36
- expect(request.response.cached?).to be_truthy
37
- end
38
- end
39
- end
40
- end
41
-
42
- describe "#run" do
43
- context "when cache activated" do
44
- context "when request new" do
45
- it "fetches response" do
46
- expect(request.response).to_not be(response)
47
- end
48
- end
49
-
50
- context "when request in memory" do
51
- before { cache.memory[request] = response }
52
-
53
- it "finishes request" do
54
- expect(request).to receive(:finish).with(response)
55
- request.run
56
- end
57
- end
58
-
59
- context "when cache is specified on a request" do
60
- before { Typhoeus::Config.cache = false }
61
-
62
- context "when cache is false" do
63
- let(:options) { { :cache => false } }
64
-
65
- it "finishes request" do
66
- expect(request.response).to_not be(response)
67
- request.run
68
- end
69
- end
70
-
71
- context "when cache is defined" do
72
- let(:options) { { :cache => cache } }
73
-
74
- before { cache.memory[request] = response }
75
-
76
- it "finishes request" do
77
- expect(request).to receive(:finish).with(response)
78
- request.run
79
- end
80
- end
81
- end
82
- end
83
- end
84
-
85
- describe "#cache_ttl" do
86
- context "when option[:cache_ttl]" do
87
- let(:options) { {:cache_ttl => 1} }
88
-
89
- it "returns" do
90
- expect(request.cache_ttl).to be(1)
91
- end
92
- end
93
- end
94
- end