vrpayment-ruby-sdk 5.1.0 → 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 (280) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +5 -5
  3. data/lib/vrpayment-ruby-sdk/api/charge_flow_service_api.rb +1 -1
  4. data/lib/vrpayment-ruby-sdk/api/human_user_service_api.rb +1 -1
  5. data/lib/vrpayment-ruby-sdk/api/subscription_suspension_service_api.rb +8 -18
  6. data/lib/vrpayment-ruby-sdk/api/transaction_iframe_service_api.rb +1 -1
  7. data/lib/vrpayment-ruby-sdk/api/transaction_lightbox_service_api.rb +1 -1
  8. data/lib/vrpayment-ruby-sdk/api/transaction_mobile_sdk_service_api.rb +1 -1
  9. data/lib/vrpayment-ruby-sdk/api/transaction_payment_page_service_api.rb +1 -1
  10. data/lib/vrpayment-ruby-sdk/api/transaction_service_api.rb +1 -1
  11. data/lib/vrpayment-ruby-sdk/api_client.rb +1 -1
  12. data/lib/vrpayment-ruby-sdk/models/abstract_payment_link_update.rb +13 -1
  13. data/lib/vrpayment-ruby-sdk/models/pan_type.rb +1 -0
  14. data/lib/vrpayment-ruby-sdk/models/payment_link.rb +13 -1
  15. data/lib/vrpayment-ruby-sdk/models/payment_link_active.rb +13 -1
  16. data/lib/vrpayment-ruby-sdk/models/payment_link_create.rb +13 -1
  17. data/lib/vrpayment-ruby-sdk/models/payment_link_update.rb +13 -1
  18. data/lib/vrpayment-ruby-sdk/models/scope.rb +51 -1
  19. data/lib/vrpayment-ruby-sdk/models/wallet_type.rb +34 -4
  20. data/lib/vrpayment-ruby-sdk/version.rb +1 -1
  21. data/vendor/bundle/ruby/3.3.0/cache/ethon-0.15.0.gem +0 -0
  22. data/vendor/bundle/ruby/3.3.0/cache/json-2.15.1.gem +0 -0
  23. data/vendor/bundle/ruby/3.3.0/cache/typhoeus-1.5.0.gem +0 -0
  24. 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
  25. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/json-2.15.1/json/ext/generator.so +0 -0
  26. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/json-2.15.1/json/ext/parser.so +0 -0
  27. 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
  28. data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/.github/workflows/ruby.yml +2 -2
  29. data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/CHANGELOG.md +0 -3
  30. data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/README.md +0 -23
  31. data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/curls/classes.rb +2 -12
  32. data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/curls/options.rb +3 -4
  33. data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/easy/callbacks.rb +1 -2
  34. data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/easy/informations.rb +0 -3
  35. data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/easy/response_callbacks.rb +1 -6
  36. data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/version.rb +1 -1
  37. data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/spec/ethon/easy/callbacks_spec.rb +0 -22
  38. data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/spec/ethon/easy/informations_spec.rb +0 -6
  39. data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/spec/ethon/easy/mirror_spec.rb +1 -1
  40. data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/spec/ethon/easy/operations_spec.rb +0 -3
  41. data/vendor/bundle/ruby/3.3.0/gems/{json-2.13.0 → json-2.15.1}/CHANGES.md +50 -9
  42. data/vendor/bundle/ruby/3.3.0/gems/{json-2.13.0 → json-2.15.1}/README.md +3 -1
  43. data/vendor/bundle/ruby/3.3.0/gems/{json-2.13.0 → json-2.15.1}/ext/json/ext/fbuffer/fbuffer.h +31 -5
  44. data/vendor/bundle/ruby/3.3.0/gems/{json-2.13.0 → json-2.15.1}/ext/json/ext/generator/generator.c +134 -104
  45. data/vendor/bundle/ruby/3.3.0/gems/{json-2.13.0 → json-2.15.1}/ext/json/ext/parser/parser.c +58 -8
  46. data/vendor/bundle/ruby/3.3.0/gems/json-2.15.1/ext/json/ext/simd/conf.rb +24 -0
  47. data/vendor/bundle/ruby/3.3.0/gems/{json-2.13.0 → json-2.15.1}/ext/json/ext/simd/simd.h +47 -46
  48. data/vendor/bundle/ruby/3.3.0/gems/{json-2.13.0 → json-2.15.1}/ext/json/ext/vendor/fpconv.c +12 -11
  49. data/vendor/bundle/ruby/3.3.0/gems/{json-2.13.0 → json-2.15.1}/lib/json/add/core.rb +1 -0
  50. data/vendor/bundle/ruby/3.3.0/gems/json-2.15.1/lib/json/add/string.rb +35 -0
  51. data/vendor/bundle/ruby/3.3.0/gems/{json-2.13.0 → json-2.15.1}/lib/json/common.rb +49 -23
  52. data/vendor/bundle/ruby/3.3.0/gems/{json-2.13.0 → json-2.15.1}/lib/json/ext/generator/state.rb +7 -14
  53. data/vendor/bundle/ruby/3.3.0/gems/json-2.15.1/lib/json/ext/generator.so +0 -0
  54. data/vendor/bundle/ruby/3.3.0/gems/json-2.15.1/lib/json/ext/parser.so +0 -0
  55. data/vendor/bundle/ruby/3.3.0/gems/{json-2.13.0 → json-2.15.1}/lib/json/generic_object.rb +0 -8
  56. data/vendor/bundle/ruby/3.3.0/gems/{json-2.13.0 → json-2.15.1}/lib/json/truffle_ruby/generator.rb +63 -45
  57. data/vendor/bundle/ruby/3.3.0/gems/{json-2.13.0 → json-2.15.1}/lib/json/version.rb +1 -1
  58. data/vendor/bundle/ruby/3.3.0/gems/{json-2.13.0 → json-2.15.1}/lib/json.rb +23 -1
  59. data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/CHANGELOG.md +43 -1
  60. data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/expectation.rb +4 -2
  61. data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/request/responseable.rb +1 -1
  62. data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/version.rb +1 -1
  63. data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/typhoeus.gemspec +14 -4
  64. data/vendor/bundle/ruby/3.3.0/specifications/{ethon-0.16.0.gemspec → ethon-0.15.0.gemspec} +3 -3
  65. data/vendor/bundle/ruby/3.3.0/specifications/{json-2.13.0.gemspec → json-2.15.1.gemspec} +0 -0
  66. data/vendor/bundle/ruby/3.3.0/specifications/{typhoeus-1.4.1.gemspec → typhoeus-1.5.0.gemspec} +7 -5
  67. metadata +205 -252
  68. data/vendor/bundle/ruby/3.3.0/cache/ethon-0.16.0.gem +0 -0
  69. data/vendor/bundle/ruby/3.3.0/cache/json-2.13.0.gem +0 -0
  70. data/vendor/bundle/ruby/3.3.0/cache/typhoeus-1.4.1.gem +0 -0
  71. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/json-2.13.0/json/ext/generator.so +0 -0
  72. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/json-2.13.0/json/ext/parser.so +0 -0
  73. data/vendor/bundle/ruby/3.3.0/gems/json-2.13.0/ext/json/ext/simd/conf.rb +0 -20
  74. data/vendor/bundle/ruby/3.3.0/gems/json-2.13.0/lib/json/ext/generator.so +0 -0
  75. data/vendor/bundle/ruby/3.3.0/gems/json-2.13.0/lib/json/ext/parser.so +0 -0
  76. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/.github/workflows/ci.yml +0 -30
  77. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/.github/workflows/experimental.yml +0 -33
  78. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/.gitignore +0 -8
  79. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/.rspec +0 -4
  80. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/Gemfile +0 -36
  81. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/Guardfile +0 -9
  82. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/Rakefile +0 -38
  83. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/perf/profile.rb +0 -14
  84. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/perf/vs_nethttp.rb +0 -64
  85. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/rack/typhoeus/middleware/params_decoder/helper_spec.rb +0 -156
  86. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/rack/typhoeus/middleware/params_decoder_spec.rb +0 -31
  87. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/spec_helper.rb +0 -29
  88. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/support/localhost_server.rb +0 -94
  89. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/support/memory_cache.rb +0 -15
  90. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/support/server.rb +0 -116
  91. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/adapters/faraday_spec.rb +0 -339
  92. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/cache/dalli_spec.rb +0 -41
  93. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/cache/redis_spec.rb +0 -41
  94. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/config_spec.rb +0 -15
  95. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/easy_factory_spec.rb +0 -143
  96. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/errors/no_stub_spec.rb +0 -13
  97. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/expectation_spec.rb +0 -280
  98. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/hydra/addable_spec.rb +0 -22
  99. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/hydra/before_spec.rb +0 -98
  100. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/hydra/block_connection_spec.rb +0 -18
  101. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/hydra/cacheable_spec.rb +0 -88
  102. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/hydra/memoizable_spec.rb +0 -53
  103. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/hydra/queueable_spec.rb +0 -98
  104. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/hydra/runnable_spec.rb +0 -137
  105. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/hydra/stubbable_spec.rb +0 -48
  106. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/hydra_spec.rb +0 -22
  107. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/pool_spec.rb +0 -137
  108. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/request/actions_spec.rb +0 -19
  109. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/request/before_spec.rb +0 -93
  110. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/request/block_connection_spec.rb +0 -75
  111. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/request/cacheable_spec.rb +0 -94
  112. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/request/callbacks_spec.rb +0 -91
  113. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/request/marshal_spec.rb +0 -60
  114. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/request/memoizable_spec.rb +0 -34
  115. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/request/operations_spec.rb +0 -101
  116. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/request/responseable_spec.rb +0 -13
  117. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/request/stubbable_spec.rb +0 -45
  118. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/request_spec.rb +0 -256
  119. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/response/header_spec.rb +0 -147
  120. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/response/informations_spec.rb +0 -323
  121. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/response/status_spec.rb +0 -256
  122. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/response_spec.rb +0 -100
  123. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus_spec.rb +0 -105
  124. /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
  125. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/.gitignore +0 -0
  126. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/.rspec +0 -0
  127. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/Gemfile +0 -0
  128. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/Guardfile +0 -0
  129. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/LICENSE +0 -0
  130. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/Rakefile +0 -0
  131. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/ethon.gemspec +0 -0
  132. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/curl.rb +0 -0
  133. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/curls/codes.rb +0 -0
  134. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/curls/constants.rb +0 -0
  135. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/curls/form_options.rb +0 -0
  136. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/curls/functions.rb +0 -0
  137. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/curls/infos.rb +0 -0
  138. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/curls/messages.rb +0 -0
  139. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/curls/settings.rb +0 -0
  140. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/easy/debug_info.rb +0 -0
  141. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/easy/features.rb +0 -0
  142. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/easy/form.rb +0 -0
  143. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/easy/header.rb +0 -0
  144. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/easy/http/actionable.rb +0 -0
  145. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/easy/http/custom.rb +0 -0
  146. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/easy/http/delete.rb +0 -0
  147. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/easy/http/get.rb +0 -0
  148. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/easy/http/head.rb +0 -0
  149. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/easy/http/options.rb +0 -0
  150. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/easy/http/patch.rb +0 -0
  151. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/easy/http/post.rb +0 -0
  152. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/easy/http/postable.rb +0 -0
  153. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/easy/http/put.rb +0 -0
  154. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/easy/http/putable.rb +0 -0
  155. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/easy/http.rb +0 -0
  156. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/easy/mirror.rb +0 -0
  157. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/easy/operations.rb +0 -0
  158. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/easy/options.rb +0 -0
  159. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/easy/params.rb +0 -0
  160. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/easy/queryable.rb +0 -0
  161. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/easy/util.rb +0 -0
  162. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/easy.rb +0 -0
  163. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/errors/ethon_error.rb +0 -0
  164. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/errors/global_init.rb +0 -0
  165. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/errors/invalid_option.rb +0 -0
  166. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/errors/invalid_value.rb +0 -0
  167. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/errors/multi_add.rb +0 -0
  168. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/errors/multi_fdset.rb +0 -0
  169. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/errors/multi_remove.rb +0 -0
  170. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/errors/multi_timeout.rb +0 -0
  171. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/errors/select.rb +0 -0
  172. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/errors.rb +0 -0
  173. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/libc.rb +0 -0
  174. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/loggable.rb +0 -0
  175. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/multi/operations.rb +0 -0
  176. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/multi/options.rb +0 -0
  177. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/multi/stack.rb +0 -0
  178. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon/multi.rb +0 -0
  179. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/lib/ethon.rb +0 -0
  180. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/profile/benchmarks.rb +0 -0
  181. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/profile/memory_leaks.rb +0 -0
  182. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/profile/perf_spec_helper.rb +0 -0
  183. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/profile/support/memory_test_helpers.rb +0 -0
  184. /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
  185. /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
  186. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/spec/ethon/curl_spec.rb +0 -0
  187. /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
  188. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/spec/ethon/easy/features_spec.rb +0 -0
  189. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/spec/ethon/easy/form_spec.rb +0 -0
  190. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/spec/ethon/easy/header_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/custom_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/delete_spec.rb +0 -0
  193. /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
  194. /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
  195. /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
  196. /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
  197. /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
  198. /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
  199. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/spec/ethon/easy/http_spec.rb +0 -0
  200. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/spec/ethon/easy/options_spec.rb +0 -0
  201. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/spec/ethon/easy/queryable_spec.rb +0 -0
  202. /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
  203. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/spec/ethon/easy/util_spec.rb +0 -0
  204. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/spec/ethon/easy_spec.rb +0 -0
  205. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/spec/ethon/libc_spec.rb +0 -0
  206. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/spec/ethon/loggable_spec.rb +0 -0
  207. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/spec/ethon/multi/operations_spec.rb +0 -0
  208. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/spec/ethon/multi/options_spec.rb +0 -0
  209. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/spec/ethon/multi/stack_spec.rb +0 -0
  210. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/spec/ethon/multi_spec.rb +0 -0
  211. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/spec/spec_helper.rb +0 -0
  212. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/spec/support/localhost_server.rb +0 -0
  213. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.16.0 → ethon-0.15.0}/spec/support/server.rb +0 -0
  214. /data/vendor/bundle/ruby/3.3.0/gems/{json-2.13.0 → json-2.15.1}/BSDL +0 -0
  215. /data/vendor/bundle/ruby/3.3.0/gems/{json-2.13.0 → json-2.15.1}/COPYING +0 -0
  216. /data/vendor/bundle/ruby/3.3.0/gems/{json-2.13.0 → json-2.15.1}/LEGAL +0 -0
  217. /data/vendor/bundle/ruby/3.3.0/gems/{json-2.13.0 → json-2.15.1}/ext/json/ext/generator/Makefile +0 -0
  218. /data/vendor/bundle/ruby/3.3.0/gems/{json-2.13.0 → json-2.15.1}/ext/json/ext/generator/extconf.rb +0 -0
  219. /data/vendor/bundle/ruby/3.3.0/gems/{json-2.13.0 → json-2.15.1}/ext/json/ext/parser/Makefile +0 -0
  220. /data/vendor/bundle/ruby/3.3.0/gems/{json-2.13.0 → json-2.15.1}/ext/json/ext/parser/extconf.rb +0 -0
  221. /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
  222. /data/vendor/bundle/ruby/3.3.0/gems/{json-2.13.0 → json-2.15.1}/json.gemspec +0 -0
  223. /data/vendor/bundle/ruby/3.3.0/gems/{json-2.13.0 → json-2.15.1}/lib/json/add/bigdecimal.rb +0 -0
  224. /data/vendor/bundle/ruby/3.3.0/gems/{json-2.13.0 → json-2.15.1}/lib/json/add/complex.rb +0 -0
  225. /data/vendor/bundle/ruby/3.3.0/gems/{json-2.13.0 → json-2.15.1}/lib/json/add/date.rb +0 -0
  226. /data/vendor/bundle/ruby/3.3.0/gems/{json-2.13.0 → json-2.15.1}/lib/json/add/date_time.rb +0 -0
  227. /data/vendor/bundle/ruby/3.3.0/gems/{json-2.13.0 → json-2.15.1}/lib/json/add/exception.rb +0 -0
  228. /data/vendor/bundle/ruby/3.3.0/gems/{json-2.13.0 → json-2.15.1}/lib/json/add/ostruct.rb +0 -0
  229. /data/vendor/bundle/ruby/3.3.0/gems/{json-2.13.0 → json-2.15.1}/lib/json/add/range.rb +0 -0
  230. /data/vendor/bundle/ruby/3.3.0/gems/{json-2.13.0 → json-2.15.1}/lib/json/add/rational.rb +0 -0
  231. /data/vendor/bundle/ruby/3.3.0/gems/{json-2.13.0 → json-2.15.1}/lib/json/add/regexp.rb +0 -0
  232. /data/vendor/bundle/ruby/3.3.0/gems/{json-2.13.0 → json-2.15.1}/lib/json/add/set.rb +0 -0
  233. /data/vendor/bundle/ruby/3.3.0/gems/{json-2.13.0 → json-2.15.1}/lib/json/add/struct.rb +0 -0
  234. /data/vendor/bundle/ruby/3.3.0/gems/{json-2.13.0 → json-2.15.1}/lib/json/add/symbol.rb +0 -0
  235. /data/vendor/bundle/ruby/3.3.0/gems/{json-2.13.0 → json-2.15.1}/lib/json/add/time.rb +0 -0
  236. /data/vendor/bundle/ruby/3.3.0/gems/{json-2.13.0 → json-2.15.1}/lib/json/ext.rb +0 -0
  237. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/CONTRIBUTING.md +0 -0
  238. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/LICENSE +0 -0
  239. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/README.md +0 -0
  240. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/UPGRADE.md +0 -0
  241. /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
  242. /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
  243. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/rack/typhoeus.rb +0 -0
  244. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/adapters/faraday.rb +0 -0
  245. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/cache/dalli.rb +0 -0
  246. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/cache/rails.rb +0 -0
  247. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/cache/redis.rb +0 -0
  248. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/config.rb +0 -0
  249. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/easy_factory.rb +0 -0
  250. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/errors/no_stub.rb +0 -0
  251. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/errors/typhoeus_error.rb +0 -0
  252. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/errors.rb +0 -0
  253. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/hydra/addable.rb +0 -0
  254. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/hydra/before.rb +0 -0
  255. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/hydra/block_connection.rb +0 -0
  256. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/hydra/cacheable.rb +0 -0
  257. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/hydra/memoizable.rb +0 -0
  258. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/hydra/queueable.rb +0 -0
  259. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/hydra/runnable.rb +0 -0
  260. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/hydra/stubbable.rb +0 -0
  261. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/hydra.rb +0 -0
  262. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/pool.rb +0 -0
  263. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/railtie.rb +0 -0
  264. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/request/actions.rb +0 -0
  265. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/request/before.rb +0 -0
  266. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/request/block_connection.rb +0 -0
  267. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/request/cacheable.rb +0 -0
  268. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/request/callbacks.rb +0 -0
  269. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/request/marshal.rb +0 -0
  270. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/request/memoizable.rb +0 -0
  271. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/request/operations.rb +0 -0
  272. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/request/streamable.rb +0 -0
  273. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/request/stubbable.rb +0 -0
  274. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/request.rb +0 -0
  275. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/response/cacheable.rb +0 -0
  276. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/response/header.rb +0 -0
  277. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/response/informations.rb +0 -0
  278. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/response/status.rb +0 -0
  279. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/response.rb +0 -0
  280. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus.rb +0 -0
@@ -1,280 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe Typhoeus::Expectation do
4
- let(:options) { {} }
5
- let(:base_url) { "www.example.com" }
6
- let(:expectation) { described_class.new(base_url, options) }
7
-
8
- describe ".new" do
9
- it "sets base_url" do
10
- expect(expectation.instance_variable_get(:@base_url)).to eq(base_url)
11
- end
12
-
13
- it "sets options" do
14
- expect(expectation.instance_variable_get(:@options)).to eq(options)
15
- end
16
-
17
- it "initializes response_counter" do
18
- expect(expectation.instance_variable_get(:@response_counter)).to eq(0)
19
- end
20
- end
21
-
22
- describe ".all" do
23
- context "when @expectations nil" do
24
- it "returns empty array" do
25
- expect(Typhoeus::Expectation.all).to eq([])
26
- end
27
- end
28
-
29
- context "when @expectations not nil" do
30
- let(:expectations) { [1] }
31
-
32
- it "returns @expectations" do
33
- Typhoeus::Expectation.instance_variable_set(:@expectations, expectations)
34
- expect(Typhoeus::Expectation.all).to be(expectations)
35
- end
36
- end
37
- end
38
-
39
- describe ".clear" do
40
- let(:expectations) { double(:clear) }
41
-
42
- it "clears all" do
43
- expect(expectations).to receive(:clear)
44
- Typhoeus::Expectation.instance_variable_set(:@expectations, expectations)
45
- Typhoeus::Expectation.clear
46
- Typhoeus::Expectation.instance_variable_set(:@expectations, nil)
47
- end
48
- end
49
-
50
- describe ".response_for" do
51
- let(:request) { Typhoeus::Request.new("") }
52
- let(:stubbed_response) { Typhoeus::Response.new }
53
-
54
- it "finds a matching expectation and returns its next response" do
55
- Typhoeus::Expectation.all << expectation
56
- expect(expectation).to receive(:matches?).with(request).and_return(true)
57
- expect(expectation).to receive(:response).with(request).and_return(stubbed_response)
58
-
59
- response = Typhoeus::Expectation.response_for(request)
60
-
61
- expect(response).to be(stubbed_response)
62
- end
63
-
64
- it "returns nil if no matching expectation is found" do
65
- response = Typhoeus::Expectation.response_for(request)
66
- expect(response).to be(nil)
67
- end
68
- end
69
-
70
- describe "#stubbed_from" do
71
- it "sets value" do
72
- expectation.stubbed_from(:webmock)
73
- expect(expectation.from).to eq(:webmock)
74
- end
75
-
76
- it "returns self" do
77
- expect(expectation.stubbed_from(:webmock)).to be(expectation)
78
- end
79
- end
80
-
81
- describe "#and_return" do
82
- context "when value" do
83
- it "adds to responses" do
84
- expectation.and_return(1)
85
- expect(expectation.responses).to eq([1])
86
- end
87
- end
88
-
89
- context "when array" do
90
- it "adds to responses" do
91
- expectation.and_return([1, 2])
92
- expect(expectation.responses).to eq([1, 2])
93
- end
94
- end
95
-
96
- context "when block" do
97
- it "adds to responses" do
98
- block = Proc.new {}
99
- expectation.and_return(&block)
100
- expect(expectation.responses).to eq([block])
101
- end
102
- end
103
- end
104
-
105
- describe "#responses" do
106
- it "returns responses" do
107
- expect(expectation.responses).to be_a(Array)
108
- end
109
- end
110
-
111
- describe "#response" do
112
- let(:request) { Typhoeus::Request.new("") }
113
-
114
- before { expectation.instance_variable_set(:@responses, responses) }
115
-
116
- context "when one response" do
117
- context "is pre-constructed" do
118
- let(:responses) { [Typhoeus::Response.new] }
119
-
120
- it "returns response" do
121
- expect(expectation.response(request)).to be(responses[0])
122
- end
123
- end
124
-
125
- context "is lazily-constructed" do
126
- def construct_response(request)
127
- @request_from_response_construction = request
128
- lazily_constructed_response
129
- end
130
-
131
- let(:lazily_constructed_response) { Typhoeus::Response.new }
132
- let(:responses) { [ Proc.new { |request| construct_response(request) } ] }
133
-
134
- it "returns response" do
135
- expect(expectation.response(request)).to be(lazily_constructed_response)
136
- expect(@request_from_response_construction).to be(request)
137
- end
138
- end
139
- end
140
-
141
- context "when multiple responses" do
142
- let(:responses) { [Typhoeus::Response.new, Typhoeus::Response.new, Typhoeus::Response.new] }
143
-
144
- it "returns one by one" do
145
- 3.times do |i|
146
- expect(expectation.response(request)).to be(responses[i])
147
- end
148
- end
149
- end
150
- end
151
-
152
- describe "#matches?" do
153
- let(:request) { double(:base_url => nil) }
154
-
155
- it "calls url_match?" do
156
- expect(expectation).to receive(:url_match?)
157
- expectation.matches?(request)
158
- end
159
-
160
- it "calls options_match?" do
161
- expect(expectation).to receive(:url_match?).and_return(true)
162
- expect(expectation).to receive(:options_match?)
163
- expectation.matches?(request)
164
- end
165
- end
166
-
167
- describe "#url_match?" do
168
- let(:request_url) { "www.example.com" }
169
- let(:request) { Typhoeus::Request.new(request_url) }
170
- let(:url_match) { expectation.method(:url_match?).call(request.base_url) }
171
-
172
- context "when string" do
173
- context "when match" do
174
- it "returns true" do
175
- expect(url_match).to be_truthy
176
- end
177
- end
178
-
179
- context "when no match" do
180
- let(:base_url) { "no_match" }
181
-
182
- it "returns false" do
183
- expect(url_match).to be_falsey
184
- end
185
- end
186
- end
187
-
188
- context "when regexp" do
189
- context "when match" do
190
- let(:base_url) { /example/ }
191
-
192
- it "returns true" do
193
- expect(url_match).to be_truthy
194
- end
195
- end
196
-
197
- context "when no match" do
198
- let(:base_url) { /nomatch/ }
199
-
200
- it "returns false" do
201
- expect(url_match).to be_falsey
202
- end
203
-
204
- context "with nil request_url" do
205
- let(:request_url) { nil }
206
-
207
- it "returns false" do
208
- expect(url_match).to be_falsey
209
- end
210
- end
211
- end
212
- end
213
-
214
- context "when nil" do
215
- let(:base_url) { nil }
216
-
217
- it "returns true" do
218
- expect(url_match).to be_truthy
219
- end
220
- end
221
-
222
- context "when not string, regexp, nil" do
223
- let(:base_url) { 1 }
224
-
225
- it "returns false" do
226
- expect(url_match).to be_falsey
227
- end
228
- end
229
- end
230
-
231
- describe "options_match?" do
232
- let(:request_options) { {} }
233
- let(:request) { Typhoeus::Request.new(nil, request_options) }
234
- let(:options_match) { expectation.method(:options_match?).call(request) }
235
-
236
- context "when match" do
237
- let(:options) { { :a => 1 } }
238
- let(:request_options) { options }
239
-
240
- it "returns true" do
241
- expect(options_match).to be_truthy
242
- end
243
- end
244
-
245
- context "when options are a subset from request_options" do
246
- let(:options) { { :a => 1 } }
247
- let(:request_options) { { :a => 1, :b => 2 } }
248
-
249
- it "returns true" do
250
- expect(options_match).to be_truthy
251
- end
252
- end
253
-
254
- context "when options are nested" do
255
- let(:options) { { :a => { :b => 1 } } }
256
- let(:request_options) { options }
257
-
258
- it "returns true" do
259
- expect(options_match).to be_truthy
260
- end
261
- end
262
-
263
- context "when options contains an array" do
264
- let(:options) { { :a => [1, 2] } }
265
- let(:request_options) { options }
266
-
267
- it "returns true" do
268
- expect(options_match).to be_truthy
269
- end
270
- end
271
-
272
- context "when no match" do
273
- let(:options) { { :a => 1 } }
274
-
275
- it "returns false" do
276
- expect(options_match).to be_falsey
277
- end
278
- end
279
- end
280
- end
@@ -1,22 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe Typhoeus::Hydra::Addable do
4
- let(:hydra) { Typhoeus::Hydra.new() }
5
- let(:request) { Typhoeus::Request.new("localhost:3001", {:method => :get}) }
6
-
7
- it "asks easy factory for an easy" do
8
- multi = double
9
- expect(Typhoeus::EasyFactory).to receive(:new).with(request, hydra).and_return(double(:get => 1))
10
- expect(hydra).to receive(:multi).and_return(multi)
11
- expect(multi).to receive(:add).with(1)
12
- hydra.add(request)
13
- end
14
-
15
- it "adds easy to multi" do
16
- multi = double
17
- expect(Typhoeus::EasyFactory).to receive(:new).with(request, hydra).and_return(double(:get => 1))
18
- expect(hydra).to receive(:multi).and_return(multi)
19
- expect(multi).to receive(:add).with(1)
20
- hydra.add(request)
21
- end
22
- end
@@ -1,98 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe Typhoeus::Hydra::Before do
4
- let(:request) { Typhoeus::Request.new("") }
5
- let(:hydra) { Typhoeus::Hydra.new }
6
- let(:receive_counter) { double :mark => :twain }
7
-
8
- describe "#add" do
9
- context "when before" do
10
- context "when one" do
11
- it "executes" do
12
- Typhoeus.before { |r| receive_counter.mark }
13
- expect(receive_counter).to receive(:mark)
14
- hydra.add(request)
15
- end
16
-
17
- context "when true" do
18
- it "calls super" do
19
- Typhoeus.before { true }
20
- expect(Typhoeus::Expectation).to receive(:response_for)
21
- hydra.add(request)
22
- end
23
- end
24
-
25
- context "when falsy" do
26
- context "when queue requests" do
27
- let(:queued_request) { Typhoeus::Request.new("") }
28
-
29
- before { hydra.queue(queued_request) }
30
-
31
- it "dequeues" do
32
- Typhoeus.before { false }
33
- hydra.add(request)
34
- expect(hydra.queued_requests).to be_empty
35
- end
36
- end
37
-
38
- context "when false" do
39
- it "doesn't call super" do
40
- Typhoeus.before { false }
41
- expect(Typhoeus::Expectation).to receive(:response_for).never
42
- hydra.add(request)
43
- end
44
- end
45
-
46
- context "when response" do
47
- it "doesn't call super" do
48
- Typhoeus.before { Typhoeus::Response.new }
49
- expect(Typhoeus::Expectation).to receive(:response_for).never
50
- hydra.add(request)
51
- end
52
- end
53
- end
54
- end
55
-
56
- context "when multi" do
57
- context "when all true" do
58
- before { 3.times { Typhoeus.before { |r| receive_counter.mark } } }
59
-
60
- it "calls super" do
61
- expect(Typhoeus::Expectation).to receive(:response_for)
62
- hydra.add(request)
63
- end
64
-
65
- it "executes all" do
66
- expect(receive_counter).to receive(:mark).exactly(3).times
67
- hydra.add(request)
68
- end
69
- end
70
-
71
- context "when middle false" do
72
- before do
73
- Typhoeus.before { |r| receive_counter.mark }
74
- Typhoeus.before { |r| receive_counter.mark; nil }
75
- Typhoeus.before { |r| receive_counter.mark }
76
- end
77
-
78
- it "doesn't call super" do
79
- expect(Typhoeus::Expectation).to receive(:response_for).never
80
- hydra.add(request)
81
- end
82
-
83
- it "executes only two" do
84
- expect(receive_counter).to receive(:mark).exactly(2).times
85
- hydra.add(request)
86
- end
87
- end
88
- end
89
- end
90
-
91
- context "when no before" do
92
- it "calls super" do
93
- expect(Typhoeus::Expectation).to receive(:response_for)
94
- hydra.add(request)
95
- end
96
- end
97
- end
98
- end
@@ -1,18 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe Typhoeus::Hydra::BlockConnection do
4
- let(:base_url) { "localhost:3001" }
5
- let(:hydra) { Typhoeus::Hydra.new() }
6
- let(:request) { Typhoeus::Request.new(base_url, {:method => :get}) }
7
-
8
- describe "add" do
9
- context "when block_connection activated" do
10
- before { Typhoeus::Config.block_connection = true }
11
- after { Typhoeus::Config.block_connection = false }
12
-
13
- it "raises" do
14
- expect{ hydra.add(request) }.to raise_error(Typhoeus::Errors::NoStub)
15
- end
16
- end
17
- end
18
- end
@@ -1,88 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe Typhoeus::Hydra::Cacheable do
4
- let(:base_url) { "localhost:3001" }
5
- let(:hydra) { Typhoeus::Hydra.new() }
6
- let(:request) { Typhoeus::Request.new(base_url, {:method => :get}) }
7
- let(:response) { Typhoeus::Response.new }
8
- let(:cache) { MemoryCache.new }
9
-
10
- describe "add" do
11
- context "when cache activated" do
12
- before { Typhoeus::Config.cache = cache }
13
- after { Typhoeus::Config.cache = false }
14
-
15
- context "when request new" do
16
- it "sets no response" do
17
- hydra.add(request)
18
- expect(request.response).to be_nil
19
- end
20
-
21
- it "doesn't call complete" do
22
- expect(request).to receive(:complete).never
23
- hydra.add(request)
24
- end
25
- end
26
-
27
- context "when request in memory" do
28
- before { cache.memory[request] = response }
29
-
30
- it "returns response with cached status" do
31
- hydra.add(request)
32
- expect(response.cached?).to be_truthy
33
- end
34
-
35
- context "when no queued requests" do
36
- it "finishes request" do
37
- expect(request).to receive(:finish).with(response)
38
- hydra.add(request)
39
- expect(response.cached?).to be_truthy
40
- end
41
- end
42
-
43
- context "when queued requests" do
44
- let(:queued_request) { Typhoeus::Request.new(base_url, {:method => :get}) }
45
-
46
- before { cache.memory[queued_request] = response }
47
-
48
- it "finishes both requests" do
49
- hydra.queue(queued_request)
50
- expect(request).to receive(:finish).with(response)
51
- expect(queued_request).to receive(:finish).with(response)
52
- hydra.add(request)
53
- end
54
- end
55
- end
56
-
57
- context "when cache is specified on a request" do
58
- before { Typhoeus::Config.cache = false }
59
-
60
- context "when cache is false" do
61
- let(:non_cached_request) { Typhoeus::Request.new(base_url, {:method => :get, :cache => false}) }
62
-
63
- it "initiates an HTTP call" do
64
- expect(Typhoeus::EasyFactory).to receive(:new).with(non_cached_request, hydra).and_call_original
65
-
66
- hydra.add(non_cached_request)
67
- end
68
- end
69
-
70
- context "when cache is defined" do
71
- let(:cached_request) { Typhoeus::Request.new(base_url, {:method => :get, :cache => cache}) }
72
-
73
- before { cache.memory[cached_request] = response }
74
-
75
- it "uses the cache instead of making a new request" do
76
- expect(Typhoeus::EasyFactory).not_to receive(:new)
77
-
78
- hydra.add(cached_request)
79
-
80
- expect(cached_request.response).to be_cached
81
- expect(cached_request.response).to eq(response)
82
- end
83
- end
84
- end
85
-
86
- end
87
- end
88
- end
@@ -1,53 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe Typhoeus::Hydra::Memoizable do
4
- let(:base_url) { "localhost:3001" }
5
- let(:hydra) { Typhoeus::Hydra.new() }
6
- let(:request) { Typhoeus::Request.new(base_url) }
7
-
8
- describe "add" do
9
- context "when memoization activated" do
10
- before { Typhoeus::Config.memoize = true }
11
-
12
- context "when request new" do
13
- it "sets no response" do
14
- hydra.add(request)
15
- expect(request.response).to be_nil
16
- end
17
-
18
- it "doesn't call complete" do
19
- expect(request).to receive(:complete).never
20
- hydra.add(request)
21
- end
22
- end
23
-
24
- context "when request in memory" do
25
- let(:response) { Typhoeus::Response.new }
26
- before { hydra.memory[request] = response }
27
-
28
- it "finishes request" do
29
- expect(request).to receive(:finish).with(response, true)
30
- hydra.add(request)
31
- end
32
-
33
- context "when queued request" do
34
- let(:queued_request) { Typhoeus::Request.new(base_url) }
35
-
36
- it "dequeues" do
37
- hydra.queue(queued_request)
38
- expect(request).to receive(:finish).with(response, true)
39
- expect(queued_request).to receive(:finish).with(response, true)
40
- hydra.add(request)
41
- end
42
- end
43
- end
44
- end
45
- end
46
-
47
- describe "#run" do
48
- it "clears memory before starting" do
49
- expect(hydra.memory).to receive(:clear)
50
- hydra.run
51
- end
52
- end
53
- end
@@ -1,98 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe Typhoeus::Hydra::Queueable do
4
- let(:base_url) { "localhost:3001" }
5
- let(:options) { {} }
6
- let(:hydra) { Typhoeus::Hydra.new(options) }
7
-
8
- describe "#queue" do
9
- let(:request) { Typhoeus::Request.new("") }
10
-
11
- it "accepts requests" do
12
- hydra.queue(request)
13
- end
14
-
15
- it "sets hydra on request" do
16
- hydra.queue(request)
17
- expect(request.hydra).to eq(hydra)
18
- end
19
-
20
- it "adds to queued requests" do
21
- hydra.queue(request)
22
- expect(hydra.queued_requests).to include(request)
23
- end
24
-
25
- it "adds to front of queued requests" do
26
- hydra.queue_front(request)
27
- expect(hydra.queued_requests.first).to be(request)
28
- end
29
- end
30
-
31
- describe "#abort" do
32
- before { hydra.queued_requests << 1 }
33
-
34
- it "clears queue" do
35
- hydra.abort
36
- expect(hydra.queued_requests).to be_empty
37
- end
38
- end
39
-
40
- describe "#dequeue_many" do
41
- before do
42
- requests.each { |r| hydra.queue r }
43
- end
44
-
45
- context "when no request queued" do
46
- let(:requests) { [] }
47
-
48
- it "does nothing" do
49
- expect(hydra).to_not receive(:add)
50
- hydra.dequeue_many
51
- end
52
- end
53
-
54
- context "when request queued" do
55
- let(:first) { Typhoeus::Request.new("localhost:3001/first") }
56
- let(:requests) { [first] }
57
-
58
- it "adds request from queue to multi" do
59
- expect(hydra).to receive(:add).with(first)
60
- hydra.dequeue_many
61
- end
62
- end
63
-
64
- context "when three request queued" do
65
- let(:first) { Typhoeus::Request.new("localhost:3001/first") }
66
- let(:second) { Typhoeus::Request.new("localhost:3001/second") }
67
- let(:third) { Typhoeus::Request.new("localhost:3001/third") }
68
- let(:requests) { [first, second, third] }
69
-
70
- it "adds requests from queue to multi" do
71
- expect(hydra).to receive(:add).with(first)
72
- expect(hydra).to receive(:add).with(second)
73
- expect(hydra).to receive(:add).with(third)
74
- hydra.dequeue_many
75
- end
76
-
77
- context "when max_concurrency is two" do
78
- let(:options) { {:max_concurrency => 2} }
79
- it "adds requests from queue to multi" do
80
- expect(hydra).to receive(:add).with(first)
81
- expect(hydra).to receive(:add).with(second)
82
- expect(hydra).to_not receive(:add).with(third)
83
- hydra.dequeue_many
84
- end
85
- end
86
-
87
- context "when max_concurrency is a string" do
88
- let(:options) { {:max_concurrency => "2"} }
89
- it "adds requests from queue to multi" do
90
- expect(hydra).to receive(:add).with(first)
91
- expect(hydra).to receive(:add).with(second)
92
- expect(hydra).to_not receive(:add).with(third)
93
- hydra.dequeue_many
94
- end
95
- end
96
- end
97
- end
98
- end