cybrid_api_organization_ruby 0.124.85 → 0.124.86

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 (255) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +4 -4
  3. data/README.md +5 -5
  4. data/cybrid_api_organization_ruby.gemspec +1 -1
  5. data/lib/cybrid_api_organization_ruby/api/organizations_organization_api.rb +1 -1
  6. data/lib/cybrid_api_organization_ruby/api/subscription_deliveries_organization_api.rb +1 -1
  7. data/lib/cybrid_api_organization_ruby/api/subscription_events_organization_api.rb +1 -1
  8. data/lib/cybrid_api_organization_ruby/api/subscriptions_organization_api.rb +1 -1
  9. data/lib/cybrid_api_organization_ruby/api_client.rb +1 -1
  10. data/lib/cybrid_api_organization_ruby/api_error.rb +1 -1
  11. data/lib/cybrid_api_organization_ruby/configuration.rb +1 -1
  12. data/lib/cybrid_api_organization_ruby/models/error_response_organization_model.rb +1 -1
  13. data/lib/cybrid_api_organization_ruby/models/organization_organization_model.rb +1 -1
  14. data/lib/cybrid_api_organization_ruby/models/patch_organization_organization_model.rb +1 -1
  15. data/lib/cybrid_api_organization_ruby/models/post_subscription_delivery_organization_model.rb +1 -1
  16. data/lib/cybrid_api_organization_ruby/models/post_subscription_organization_model.rb +1 -1
  17. data/lib/cybrid_api_organization_ruby/models/subscription_delivery_list_organization_model.rb +1 -1
  18. data/lib/cybrid_api_organization_ruby/models/subscription_delivery_organization_model.rb +1 -1
  19. data/lib/cybrid_api_organization_ruby/models/subscription_environment_organization_model.rb +1 -1
  20. data/lib/cybrid_api_organization_ruby/models/subscription_event_list_organization_model.rb +1 -1
  21. data/lib/cybrid_api_organization_ruby/models/subscription_event_organization_model.rb +1 -1
  22. data/lib/cybrid_api_organization_ruby/models/subscription_list_organization_model.rb +1 -1
  23. data/lib/cybrid_api_organization_ruby/models/subscription_organization_model.rb +1 -1
  24. data/lib/cybrid_api_organization_ruby/models/subscription_state_organization_model.rb +1 -1
  25. data/lib/cybrid_api_organization_ruby/models/subscription_type_organization_model.rb +1 -1
  26. data/lib/cybrid_api_organization_ruby/version.rb +2 -2
  27. data/lib/cybrid_api_organization_ruby.rb +1 -1
  28. data/spec/api/organizations_organization_api_spec.rb +1 -1
  29. data/spec/api/subscription_deliveries_organization_api_spec.rb +1 -1
  30. data/spec/api/subscription_events_organization_api_spec.rb +1 -1
  31. data/spec/api/subscriptions_organization_api_spec.rb +1 -1
  32. data/spec/api_client_spec.rb +1 -1
  33. data/spec/configuration_spec.rb +1 -1
  34. data/spec/models/error_response_organization_model_spec.rb +1 -1
  35. data/spec/models/organization_organization_model_spec.rb +1 -1
  36. data/spec/models/patch_organization_organization_model_spec.rb +1 -1
  37. data/spec/models/post_subscription_delivery_organization_model_spec.rb +1 -1
  38. data/spec/models/post_subscription_organization_model_spec.rb +1 -1
  39. data/spec/models/subscription_delivery_list_organization_model_spec.rb +1 -1
  40. data/spec/models/subscription_delivery_organization_model_spec.rb +1 -1
  41. data/spec/models/subscription_environment_organization_model_spec.rb +1 -1
  42. data/spec/models/subscription_event_list_organization_model_spec.rb +1 -1
  43. data/spec/models/subscription_event_organization_model_spec.rb +1 -1
  44. data/spec/models/subscription_list_organization_model_spec.rb +1 -1
  45. data/spec/models/subscription_organization_model_spec.rb +1 -1
  46. data/spec/models/subscription_state_organization_model_spec.rb +1 -1
  47. data/spec/models/subscription_type_organization_model_spec.rb +1 -1
  48. data/spec/spec_helper.rb +1 -1
  49. data/vendor/bundle/ruby/3.3.0/cache/ethon-0.15.0.gem +0 -0
  50. data/vendor/bundle/ruby/3.3.0/cache/typhoeus-1.5.0.gem +0 -0
  51. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/byebug-12.0.0/gem_make.out +5 -5
  52. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/date-3.4.1/gem_make.out +5 -5
  53. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/jaro_winkler-1.5.6/gem_make.out +5 -5
  54. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/psych-5.2.6/gem_make.out +5 -5
  55. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/racc-1.8.1/gem_make.out +5 -5
  56. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/stringio-3.1.7/gem_make.out +5 -5
  57. data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/.github/workflows/ruby.yml +41 -0
  58. data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → ethon-0.15.0}/.gitignore +4 -4
  59. data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → ethon-0.15.0}/.rspec +0 -1
  60. data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/CHANGELOG.md +1 -29
  61. data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/Gemfile +43 -0
  62. data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → ethon-0.15.0}/Guardfile +3 -2
  63. data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/README.md +0 -23
  64. data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → ethon-0.15.0}/Rakefile +7 -5
  65. data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/ethon.gemspec +3 -6
  66. data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/curls/classes.rb +2 -12
  67. data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/curls/codes.rb +2 -3
  68. data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/curls/options.rb +3 -4
  69. data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/easy/callbacks.rb +1 -2
  70. data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/easy/informations.rb +0 -3
  71. data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/easy/response_callbacks.rb +1 -6
  72. data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/version.rb +1 -1
  73. data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/profile/benchmarks.rb +104 -0
  74. data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/profile/memory_leaks.rb +114 -0
  75. data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/profile/perf_spec_helper.rb +37 -0
  76. data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/profile/support/memory_test_helpers.rb +76 -0
  77. data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/profile/support/os_memory_leak_tracker.rb +48 -0
  78. data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/profile/support/ruby_object_leak_tracker.rb +49 -0
  79. data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/curl_spec.rb +38 -0
  80. data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/easy/callbacks_spec.rb +59 -0
  81. data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/easy/debug_info_spec.rb +54 -0
  82. data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/easy/features_spec.rb +24 -0
  83. data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/easy/form_spec.rb +104 -0
  84. data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/easy/header_spec.rb +79 -0
  85. data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/easy/http/custom_spec.rb +177 -0
  86. data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/easy/http/delete_spec.rb +21 -0
  87. data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/easy/http/get_spec.rb +126 -0
  88. data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/easy/http/head_spec.rb +80 -0
  89. data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/easy/http/options_spec.rb +51 -0
  90. data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/easy/http/patch_spec.rb +51 -0
  91. data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/easy/http/post_spec.rb +317 -0
  92. data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/easy/http/put_spec.rb +168 -0
  93. data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/easy/http_spec.rb +64 -0
  94. data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/easy/informations_spec.rb +120 -0
  95. data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/easy/mirror_spec.rb +47 -0
  96. data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/easy/operations_spec.rb +268 -0
  97. data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/easy/options_spec.rb +193 -0
  98. data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/easy/queryable_spec.rb +235 -0
  99. data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/easy/response_callbacks_spec.rb +152 -0
  100. data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/easy/util_spec.rb +28 -0
  101. data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/easy_spec.rb +203 -0
  102. data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/libc_spec.rb +14 -0
  103. data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/loggable_spec.rb +22 -0
  104. data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/multi/operations_spec.rb +298 -0
  105. data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/multi/options_spec.rb +182 -0
  106. data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/multi/stack_spec.rb +80 -0
  107. data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/multi_spec.rb +152 -0
  108. data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/spec_helper.rb +28 -0
  109. data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → ethon-0.15.0}/spec/support/localhost_server.rb +2 -1
  110. data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → ethon-0.15.0}/spec/support/server.rb +10 -11
  111. data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/CHANGELOG.md +43 -1
  112. data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/expectation.rb +4 -2
  113. data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/request/responseable.rb +1 -1
  114. data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/version.rb +1 -1
  115. data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/typhoeus.gemspec +14 -4
  116. data/vendor/bundle/ruby/3.3.0/specifications/{ethon-0.17.0.gemspec → ethon-0.15.0.gemspec} +5 -6
  117. data/vendor/bundle/ruby/3.3.0/specifications/typhoeus-1.5.0.gemspec +26 -0
  118. metadata +156 -160
  119. data/vendor/bundle/ruby/3.3.0/cache/ethon-0.17.0.gem +0 -0
  120. data/vendor/bundle/ruby/3.3.0/cache/typhoeus-1.4.1.gem +0 -0
  121. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/.github/workflows/ci.yml +0 -30
  122. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/.github/workflows/experimental.yml +0 -33
  123. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/Gemfile +0 -36
  124. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/perf/profile.rb +0 -14
  125. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/perf/vs_nethttp.rb +0 -64
  126. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/rack/typhoeus/middleware/params_decoder/helper_spec.rb +0 -156
  127. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/rack/typhoeus/middleware/params_decoder_spec.rb +0 -31
  128. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/spec_helper.rb +0 -29
  129. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/support/memory_cache.rb +0 -15
  130. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/adapters/faraday_spec.rb +0 -339
  131. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/cache/dalli_spec.rb +0 -41
  132. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/cache/redis_spec.rb +0 -41
  133. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/config_spec.rb +0 -15
  134. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/easy_factory_spec.rb +0 -143
  135. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/errors/no_stub_spec.rb +0 -13
  136. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/expectation_spec.rb +0 -280
  137. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/hydra/addable_spec.rb +0 -22
  138. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/hydra/before_spec.rb +0 -98
  139. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/hydra/block_connection_spec.rb +0 -18
  140. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/hydra/cacheable_spec.rb +0 -88
  141. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/hydra/memoizable_spec.rb +0 -53
  142. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/hydra/queueable_spec.rb +0 -98
  143. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/hydra/runnable_spec.rb +0 -137
  144. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/hydra/stubbable_spec.rb +0 -48
  145. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/hydra_spec.rb +0 -22
  146. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/pool_spec.rb +0 -137
  147. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/request/actions_spec.rb +0 -19
  148. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/request/before_spec.rb +0 -93
  149. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/request/block_connection_spec.rb +0 -75
  150. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/request/cacheable_spec.rb +0 -94
  151. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/request/callbacks_spec.rb +0 -91
  152. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/request/marshal_spec.rb +0 -60
  153. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/request/memoizable_spec.rb +0 -34
  154. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/request/operations_spec.rb +0 -101
  155. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/request/responseable_spec.rb +0 -13
  156. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/request/stubbable_spec.rb +0 -45
  157. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/request_spec.rb +0 -256
  158. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/response/header_spec.rb +0 -147
  159. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/response/informations_spec.rb +0 -323
  160. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/response/status_spec.rb +0 -256
  161. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/response_spec.rb +0 -100
  162. data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus_spec.rb +0 -105
  163. data/vendor/bundle/ruby/3.3.0/specifications/typhoeus-1.4.1.gemspec +0 -24
  164. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/LICENSE +0 -0
  165. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/curl.rb +0 -0
  166. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/curls/constants.rb +0 -0
  167. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/curls/form_options.rb +0 -0
  168. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/curls/functions.rb +0 -0
  169. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/curls/infos.rb +0 -0
  170. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/curls/messages.rb +0 -0
  171. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/curls/settings.rb +0 -0
  172. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/easy/debug_info.rb +0 -0
  173. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/easy/features.rb +0 -0
  174. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/easy/form.rb +0 -0
  175. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/easy/header.rb +0 -0
  176. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/easy/http/actionable.rb +0 -0
  177. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/easy/http/custom.rb +0 -0
  178. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/easy/http/delete.rb +0 -0
  179. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/easy/http/get.rb +0 -0
  180. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/easy/http/head.rb +0 -0
  181. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/easy/http/options.rb +0 -0
  182. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/easy/http/patch.rb +0 -0
  183. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/easy/http/post.rb +0 -0
  184. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/easy/http/postable.rb +0 -0
  185. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/easy/http/put.rb +0 -0
  186. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/easy/http/putable.rb +0 -0
  187. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/easy/http.rb +0 -0
  188. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/easy/mirror.rb +0 -0
  189. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/easy/operations.rb +0 -0
  190. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/easy/options.rb +0 -0
  191. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/easy/params.rb +0 -0
  192. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/easy/queryable.rb +0 -0
  193. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/easy/util.rb +0 -0
  194. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/easy.rb +0 -0
  195. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/errors/ethon_error.rb +0 -0
  196. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/errors/global_init.rb +0 -0
  197. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/errors/invalid_option.rb +0 -0
  198. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/errors/invalid_value.rb +0 -0
  199. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/errors/multi_add.rb +0 -0
  200. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/errors/multi_fdset.rb +0 -0
  201. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/errors/multi_remove.rb +0 -0
  202. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/errors/multi_timeout.rb +0 -0
  203. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/errors/select.rb +0 -0
  204. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/errors.rb +0 -0
  205. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/libc.rb +0 -0
  206. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/loggable.rb +0 -0
  207. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/multi/operations.rb +0 -0
  208. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/multi/options.rb +0 -0
  209. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/multi/stack.rb +0 -0
  210. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/multi.rb +0 -0
  211. /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon.rb +0 -0
  212. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/CONTRIBUTING.md +0 -0
  213. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/LICENSE +0 -0
  214. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/README.md +0 -0
  215. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/UPGRADE.md +0 -0
  216. /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
  217. /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
  218. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/rack/typhoeus.rb +0 -0
  219. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/adapters/faraday.rb +0 -0
  220. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/cache/dalli.rb +0 -0
  221. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/cache/rails.rb +0 -0
  222. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/cache/redis.rb +0 -0
  223. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/config.rb +0 -0
  224. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/easy_factory.rb +0 -0
  225. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/errors/no_stub.rb +0 -0
  226. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/errors/typhoeus_error.rb +0 -0
  227. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/errors.rb +0 -0
  228. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/hydra/addable.rb +0 -0
  229. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/hydra/before.rb +0 -0
  230. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/hydra/block_connection.rb +0 -0
  231. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/hydra/cacheable.rb +0 -0
  232. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/hydra/memoizable.rb +0 -0
  233. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/hydra/queueable.rb +0 -0
  234. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/hydra/runnable.rb +0 -0
  235. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/hydra/stubbable.rb +0 -0
  236. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/hydra.rb +0 -0
  237. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/pool.rb +0 -0
  238. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/railtie.rb +0 -0
  239. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/request/actions.rb +0 -0
  240. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/request/before.rb +0 -0
  241. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/request/block_connection.rb +0 -0
  242. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/request/cacheable.rb +0 -0
  243. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/request/callbacks.rb +0 -0
  244. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/request/marshal.rb +0 -0
  245. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/request/memoizable.rb +0 -0
  246. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/request/operations.rb +0 -0
  247. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/request/streamable.rb +0 -0
  248. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/request/stubbable.rb +0 -0
  249. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/request.rb +0 -0
  250. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/response/cacheable.rb +0 -0
  251. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/response/header.rb +0 -0
  252. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/response/informations.rb +0 -0
  253. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/response/status.rb +0 -0
  254. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/response.rb +0 -0
  255. /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus.rb +0 -0
@@ -1,143 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe Typhoeus::EasyFactory do
4
- let(:base_url) { "http://localhost:3001" }
5
- let(:hydra) { Typhoeus::Hydra.new(:max_concurrency => 1) }
6
- let(:options) { {} }
7
- let(:request) { Typhoeus::Request.new(base_url, options) }
8
- let(:easy_factory) { described_class.new(request, hydra) }
9
-
10
- describe "#get" do
11
- context "when option[:cache_ttl]" do
12
- let(:options) { {:cache_ttl => 1} }
13
-
14
- it "creates Ethon::Easy" do
15
- expect(easy_factory.get).to be_a(Ethon::Easy)
16
- end
17
- end
18
-
19
- context "timeouts" do
20
- it "sets nosignal to true by default" do
21
- expect(easy_factory.easy).to receive(:http_request).with(anything(), anything(), hash_including(:nosignal => true))
22
- easy_factory.get
23
- end
24
-
25
- context "when timeout is not a whole number and timeout_ms is not set" do
26
- let(:options) { {:timeout => 0.1} }
27
- it "ceils timeout and sets timeout_ms" do
28
- expect(easy_factory.easy).to receive(:http_request).with(anything(), anything(), hash_including(:timeout_ms => 100, :timeout => 1))
29
- easy_factory.get
30
- end
31
- end
32
-
33
- context "when timeout is not a whole number and timeout_ms is set" do
34
- let(:options) { {:timeout => 0.1, :timeout_ms => 123} }
35
- it "ceils timeout and does not change timeout_ms" do
36
- expect(easy_factory.easy).to receive(:http_request).with(anything(), anything(), hash_including(:timeout_ms => 123, :timeout => 1))
37
- easy_factory.get
38
- end
39
- end
40
-
41
- context "when connecttimeout is not a whole number and connecttimeout_ms is not set" do
42
- let(:options) { {:connecttimeout => 0.1} }
43
- it "ceils connecttimeout and sets connecttimeout_ms" do
44
- expect(easy_factory.easy).to receive(:http_request).with(anything(), anything(), hash_including(:connecttimeout_ms => 100, :connecttimeout => 1))
45
- easy_factory.get
46
- end
47
- end
48
-
49
- context "when connecttimeout is not a whole number and connecttimeout_ms is set" do
50
- let(:options) { {:connecttimeout => 0.1, :connecttimeout_ms => 123} }
51
- it "ceils connecttimeout and does not change connecttimeout_ms" do
52
- expect(easy_factory.easy).to receive(:http_request).with(anything(), anything(), hash_including(:connecttimeout_ms => 123, :connecttimeout => 1))
53
- easy_factory.get
54
- end
55
- end
56
-
57
-
58
- end
59
-
60
- context "when invalid option" do
61
- let(:options) { {:invalid => 1} }
62
-
63
- it "reraises" do
64
- expect{ easy_factory.get }.to raise_error(Ethon::Errors::InvalidOption)
65
- end
66
- end
67
-
68
- context "when removed option" do
69
- let(:options) { {:cache_timeout => 1} }
70
-
71
- it "reraises with help" do
72
- expect{ easy_factory.get }.to raise_error(
73
- Ethon::Errors::InvalidOption, /The option cache_timeout was removed/
74
- )
75
- end
76
- end
77
-
78
- context "when changed option" do
79
- let(:options) { {:proxy_auth_method => 1} }
80
-
81
- it "reraises with help" do
82
- expect{ easy_factory.get }.to raise_error(
83
- Ethon::Errors::InvalidOption, /Please try proxyauth instead of proxy_auth_method/
84
- )
85
- end
86
- end
87
-
88
- context "when renamed option" do
89
- let(:options) { {:connect_timeout => 1} }
90
-
91
- it "warns" do
92
- expect(easy_factory).to receive(:warn).with(
93
- "Deprecated option connect_timeout. Please use connecttimeout instead."
94
- )
95
- easy_factory.get
96
- end
97
-
98
- it "passes correct option" do
99
- expect(easy_factory).to receive(:warn)
100
- expect(easy_factory.easy).to receive(:connecttimeout=).with(1)
101
- easy_factory.get
102
- end
103
- end
104
- end
105
-
106
- describe "#set_callback" do
107
- it "sets easy.on_progress callback when an on_progress callback is provided" do
108
- request.on_progress { 1 }
109
- expect(easy_factory.easy).to receive(:on_progress)
110
- easy_factory.send(:set_callback)
111
- end
112
-
113
- it "sets easy.on_complete callback" do
114
- expect(easy_factory.easy).to receive(:on_complete)
115
- easy_factory.send(:set_callback)
116
- end
117
-
118
- it "finishes request" do
119
- easy_factory.send(:set_callback)
120
- expect(request).to receive(:finish)
121
- easy_factory.easy.complete
122
- end
123
-
124
- it "resets easy" do
125
- easy_factory.send(:set_callback)
126
- expect(easy_factory.easy).to receive(:reset)
127
- easy_factory.easy.complete
128
- end
129
-
130
- it "pushes easy back into the pool" do
131
- easy_factory.send(:set_callback)
132
- easy_factory.easy.complete
133
- expect(Typhoeus::Pool.send(:easies)).to include(easy_factory.easy)
134
- end
135
-
136
- it "adds next request" do
137
- easy_factory.hydra.instance_variable_set(:@queued_requests, [request])
138
- expect(easy_factory.hydra).to receive(:add).with(request)
139
- easy_factory.send(:set_callback)
140
- easy_factory.easy.complete
141
- end
142
- end
143
- end
@@ -1,13 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe Typhoeus::Errors::NoStub do
4
- let(:base_url) { "localhost:3001" }
5
- let(:request) { Typhoeus::Request.new(base_url) }
6
- let(:message) { "The connection is blocked and no stub defined: " }
7
-
8
- subject { Typhoeus::Errors::NoStub }
9
-
10
- it "displays the request url" do
11
- expect { raise subject.new(request) }.to raise_error(subject, message + base_url)
12
- end
13
- end
@@ -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