pingram 1.0.40 → 1.0.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +5 -5
- data/lib/pingram/api/account_api.rb +191 -4
- data/lib/pingram/api/webhooks_api.rb +6 -6
- data/lib/pingram/api_client.rb +1 -1
- data/lib/pingram/models/account_get_response_billing_alerts.rb +1 -1
- data/lib/pingram/models/account_payment_methods.rb +214 -0
- data/lib/pingram/models/account_payment_methods_payment_methods_inner.rb +270 -0
- data/lib/pingram/models/assign_payment_method_request.rb +216 -0
- data/lib/pingram/models/billing_post_response_body.rb +1 -1
- data/lib/pingram/models/confirm_change_email_request.rb +14 -4
- data/lib/pingram/models/confirm_change_email_response.rb +192 -0
- data/lib/pingram/models/confirm_password_change_request.rb +191 -0
- data/lib/pingram/models/create_payment_method_setup_request.rb +191 -0
- data/lib/pingram/models/list_invoices_response_invoices_inner.rb +1 -1
- data/lib/pingram/models/logs_get_response_logs_inner.rb +10 -1
- data/lib/pingram/models/password_status_response.rb +195 -0
- data/lib/pingram/models/payment_method_setup.rb +191 -0
- data/lib/pingram/models/sign_in_username_request.rb +164 -0
- data/lib/pingram/models/sign_in_username_response.rb +165 -0
- data/lib/pingram/models/start_change_email_request.rb +13 -20
- data/lib/pingram/models/start_password_change_request.rb +185 -0
- data/lib/pingram/models/webhook_endpoint.rb +14 -5
- data/lib/pingram/models/webhook_endpoint_basic_auth.rb +193 -0
- data/lib/pingram/models/webhook_endpoint_upsert_request.rb +15 -5
- data/lib/pingram/models/webhook_endpoint_upsert_request_basic_auth.rb +176 -0
- data/lib/pingram/models/webhook_endpoints_response_endpoints_inner.rb +14 -5
- data/lib/pingram/version.rb +1 -1
- data/lib/pingram.rb +13 -0
- data/vendor/bundle/ruby/3.2.0/cache/ethon-0.19.1.gem +0 -0
- data/vendor/bundle/ruby/3.2.0/cache/io-console-0.9.5.gem +0 -0
- data/vendor/bundle/ruby/3.2.0/cache/typhoeus-1.7.1.gem +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/byebug-13.0.0/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/date-3.6.0/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/{io-console-0.9.4 → io-console-0.9.5}/gem_make.out +10 -10
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/io-console-0.9.5/io/console.so +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/{io-console-0.9.4 → io-console-0.9.5}/mkmf.log +6 -6
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/jaro_winkler-1.5.6/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-5.5.0/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/racc-1.8.1/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/stringio-3.2.0/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/CHANGELOG.md +1120 -0
- data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/README.md +261 -0
- data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/curl.rb +22 -0
- data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/curls/classes.rb +337 -0
- data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/curls/codes.rb +28 -9
- data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/curls/constants.rb +61 -4
- data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/curls/form_options.rb +2 -1
- data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/curls/functions.rb +107 -0
- data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/curls/infos.rb +104 -5
- data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/curls/introspection.rb +139 -0
- data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/curls/introspection_constants.rb +42 -0
- data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/curls/mime.rb +187 -0
- data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/curls/optional.rb +14 -0
- data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/curls/options.rb +298 -71
- data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/curls/settings.rb +21 -0
- data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/curls/share.rb +165 -0
- data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/curls/share_constants.rb +47 -0
- data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/curls/url.rb +171 -0
- data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/curls/url_constants.rb +78 -0
- data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/easy/callbacks.rb +281 -0
- data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/easy/features.rb +4 -1
- data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/easy/files.rb +113 -0
- data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/easy/form.rb +65 -6
- data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/easy/header.rb +103 -0
- data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/easy/headers_api.rb +79 -0
- data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/easy/http/actionable.rb +25 -3
- data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/easy/http/get.rb +5 -1
- data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/easy/http/post.rb +1 -0
- data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/easy/http/postable.rb +9 -2
- data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/easy/http/putable.rb +40 -0
- data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/easy/http.rb +16 -4
- data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/easy/informations.rb +51 -2
- data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/easy/mime.rb +29 -0
- data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/easy/mirror.rb +49 -0
- data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/easy/operations.rb +317 -0
- data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/easy/options.rb +369 -0
- data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/easy/queryable.rb +59 -14
- data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/easy/response_callbacks.rb +33 -12
- data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/easy/share.rb +28 -0
- data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/easy/url.rb +32 -0
- data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/easy/util.rb +47 -0
- data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/easy.rb +185 -10
- data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/errors/fork_safety.rb +10 -0
- data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/errors/form_add.rb +12 -0
- data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/errors/global_init.rb +1 -1
- data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/errors/header.rb +12 -0
- data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/errors/invalid_option.rb +3 -1
- data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/errors/invalid_value.rb +15 -0
- data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/errors/mime.rb +17 -0
- data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/errors/multi_add.rb +1 -1
- data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/errors/multi_assign.rb +12 -0
- data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/errors/multi_fdset.rb +1 -1
- data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/errors/multi_perform.rb +12 -0
- data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/errors/multi_poll.rb +12 -0
- data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/errors/multi_remove.rb +1 -1
- data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/errors/multi_timeout.rb +2 -2
- data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/errors/multi_wait.rb +12 -0
- data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/errors/multi_wakeup.rb +12 -0
- data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/errors/select.rb +1 -1
- data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/errors/set_option.rb +27 -0
- data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/errors/share.rb +17 -0
- data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/errors/unsupported_option.rb +23 -0
- data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/errors/url.rb +17 -0
- data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/errors.rb +13 -0
- data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/libc.rb +50 -0
- data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/loggable.rb +1 -1
- data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/multi/operations.rb +472 -0
- data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/multi/options.rb +219 -0
- data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/multi/stack.rb +220 -0
- data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/multi.rb +51 -15
- data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/version.rb +1 -1
- data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon.rb +8 -9
- data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.9.4 → io-console-0.9.5}/ext/io/console/console.c +8 -3
- data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.9.4 → io-console-0.9.5}/ext/io/console/extconf.rb +7 -3
- data/vendor/bundle/ruby/3.2.0/gems/io-console-0.9.5/lib/io/console.so +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/{typhoeus-1.6.0 → typhoeus-1.7.1}/CHANGELOG.md +228 -1
- data/vendor/bundle/ruby/3.2.0/gems/typhoeus-1.7.1/README.md +766 -0
- data/vendor/bundle/ruby/3.2.0/gems/{typhoeus-1.6.0 → typhoeus-1.7.1}/UPGRADE.md +29 -0
- data/vendor/bundle/ruby/3.2.0/gems/typhoeus-1.7.1/lib/rack/typhoeus/middleware/params_decoder/helper.rb +129 -0
- data/vendor/bundle/ruby/3.2.0/gems/{typhoeus-1.6.0 → typhoeus-1.7.1}/lib/rack/typhoeus/middleware/params_decoder.rb +8 -19
- data/vendor/bundle/ruby/3.2.0/gems/{typhoeus-1.6.0 → typhoeus-1.7.1}/lib/rack/typhoeus.rb +2 -0
- data/vendor/bundle/ruby/3.2.0/gems/{typhoeus-1.6.0 → typhoeus-1.7.1}/lib/typhoeus/adapters/faraday.rb +89 -28
- data/vendor/bundle/ruby/3.2.0/gems/{typhoeus-1.6.0 → typhoeus-1.7.1}/lib/typhoeus/cache/dalli.rb +2 -0
- data/vendor/bundle/ruby/3.2.0/gems/{typhoeus-1.6.0 → typhoeus-1.7.1}/lib/typhoeus/cache/rails.rb +3 -1
- data/vendor/bundle/ruby/3.2.0/gems/{typhoeus-1.6.0 → typhoeus-1.7.1}/lib/typhoeus/cache/redis.rb +2 -0
- data/vendor/bundle/ruby/3.2.0/gems/{typhoeus-1.6.0 → typhoeus-1.7.1}/lib/typhoeus/config.rb +51 -7
- data/vendor/bundle/ruby/3.2.0/gems/{typhoeus-1.6.0 → typhoeus-1.7.1}/lib/typhoeus/easy_factory.rb +129 -23
- data/vendor/bundle/ruby/3.2.0/gems/typhoeus-1.7.1/lib/typhoeus/errors/invalid_option.rb +23 -0
- data/vendor/bundle/ruby/3.2.0/gems/typhoeus-1.7.1/lib/typhoeus/errors/no_response.rb +18 -0
- data/vendor/bundle/ruby/3.2.0/gems/{typhoeus-1.6.0 → typhoeus-1.7.1}/lib/typhoeus/errors/no_stub.rb +8 -1
- data/vendor/bundle/ruby/3.2.0/gems/{typhoeus-1.6.0 → typhoeus-1.7.1}/lib/typhoeus/errors/typhoeus_error.rb +2 -0
- data/vendor/bundle/ruby/3.2.0/gems/{typhoeus-1.6.0 → typhoeus-1.7.1}/lib/typhoeus/errors.rb +4 -0
- data/vendor/bundle/ruby/3.2.0/gems/{typhoeus-1.6.0 → typhoeus-1.7.1}/lib/typhoeus/expectation.rb +33 -1
- data/vendor/bundle/ruby/3.2.0/gems/{typhoeus-1.6.0 → typhoeus-1.7.1}/lib/typhoeus/hydra/queueable.rb +29 -4
- data/vendor/bundle/ruby/3.2.0/gems/typhoeus-1.7.1/lib/typhoeus/hydra.rb +423 -0
- data/vendor/bundle/ruby/3.2.0/gems/typhoeus-1.7.1/lib/typhoeus/pool.rb +133 -0
- data/vendor/bundle/ruby/3.2.0/gems/{typhoeus-1.6.0 → typhoeus-1.7.1}/lib/typhoeus/railtie.rb +4 -2
- data/vendor/bundle/ruby/3.2.0/gems/{typhoeus-1.6.0 → typhoeus-1.7.1}/lib/typhoeus/request/actions.rb +2 -0
- data/vendor/bundle/ruby/3.2.0/gems/{typhoeus-1.6.0 → typhoeus-1.7.1}/lib/typhoeus/request/callbacks.rb +11 -4
- data/vendor/bundle/ruby/3.2.0/gems/{typhoeus-1.6.0 → typhoeus-1.7.1}/lib/typhoeus/request/marshal.rb +5 -2
- data/vendor/bundle/ruby/3.2.0/gems/{typhoeus-1.6.0 → typhoeus-1.7.1}/lib/typhoeus/request/streamable.rb +2 -0
- data/vendor/bundle/ruby/3.2.0/gems/typhoeus-1.7.1/lib/typhoeus/request.rb +510 -0
- data/vendor/bundle/ruby/3.2.0/gems/{typhoeus-1.6.0 → typhoeus-1.7.1}/lib/typhoeus/response/cacheable.rb +2 -0
- data/vendor/bundle/ruby/3.2.0/gems/typhoeus-1.7.1/lib/typhoeus/response/header.rb +325 -0
- data/vendor/bundle/ruby/3.2.0/gems/{typhoeus-1.6.0 → typhoeus-1.7.1}/lib/typhoeus/response/informations.rb +75 -12
- data/vendor/bundle/ruby/3.2.0/gems/{typhoeus-1.6.0 → typhoeus-1.7.1}/lib/typhoeus/response/status.rb +4 -13
- data/vendor/bundle/ruby/3.2.0/gems/{typhoeus-1.6.0 → typhoeus-1.7.1}/lib/typhoeus/response.rb +35 -0
- data/vendor/bundle/ruby/3.2.0/gems/{typhoeus-1.6.0 → typhoeus-1.7.1}/lib/typhoeus/version.rb +3 -1
- data/vendor/bundle/ruby/3.2.0/gems/typhoeus-1.7.1/lib/typhoeus.rb +206 -0
- data/vendor/bundle/ruby/3.2.0/gems/{typhoeus-1.6.0 → typhoeus-1.7.1}/typhoeus.gemspec +15 -3
- data/vendor/bundle/ruby/3.2.0/specifications/{ethon-0.18.0.gemspec → ethon-0.19.1.gemspec} +4 -4
- data/vendor/bundle/ruby/3.2.0/specifications/{io-console-0.9.4.gemspec → io-console-0.9.5.gemspec} +3 -3
- data/vendor/bundle/ruby/3.2.0/specifications/{typhoeus-1.6.0.gemspec → typhoeus-1.7.1.gemspec} +5 -5
- metadata +156 -129
- data/vendor/bundle/ruby/3.2.0/cache/ethon-0.18.0.gem +0 -0
- data/vendor/bundle/ruby/3.2.0/cache/io-console-0.9.4.gem +0 -0
- data/vendor/bundle/ruby/3.2.0/cache/typhoeus-1.6.0.gem +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/io-console-0.9.4/io/console.so +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/ethon-0.18.0/CHANGELOG.md +0 -417
- data/vendor/bundle/ruby/3.2.0/gems/ethon-0.18.0/README.md +0 -118
- data/vendor/bundle/ruby/3.2.0/gems/ethon-0.18.0/lib/ethon/curls/classes.rb +0 -65
- data/vendor/bundle/ruby/3.2.0/gems/ethon-0.18.0/lib/ethon/curls/functions.rb +0 -58
- data/vendor/bundle/ruby/3.2.0/gems/ethon-0.18.0/lib/ethon/curls/settings.rb +0 -12
- data/vendor/bundle/ruby/3.2.0/gems/ethon-0.18.0/lib/ethon/easy/callbacks.rb +0 -155
- data/vendor/bundle/ruby/3.2.0/gems/ethon-0.18.0/lib/ethon/easy/header.rb +0 -61
- data/vendor/bundle/ruby/3.2.0/gems/ethon-0.18.0/lib/ethon/easy/http/putable.rb +0 -25
- data/vendor/bundle/ruby/3.2.0/gems/ethon-0.18.0/lib/ethon/easy/mirror.rb +0 -36
- data/vendor/bundle/ruby/3.2.0/gems/ethon-0.18.0/lib/ethon/easy/operations.rb +0 -64
- data/vendor/bundle/ruby/3.2.0/gems/ethon-0.18.0/lib/ethon/easy/options.rb +0 -50
- data/vendor/bundle/ruby/3.2.0/gems/ethon-0.18.0/lib/ethon/easy/util.rb +0 -28
- data/vendor/bundle/ruby/3.2.0/gems/ethon-0.18.0/lib/ethon/errors/invalid_value.rb +0 -13
- data/vendor/bundle/ruby/3.2.0/gems/ethon-0.18.0/lib/ethon/libc.rb +0 -21
- data/vendor/bundle/ruby/3.2.0/gems/ethon-0.18.0/lib/ethon/multi/operations.rb +0 -228
- data/vendor/bundle/ruby/3.2.0/gems/ethon-0.18.0/lib/ethon/multi/options.rb +0 -117
- data/vendor/bundle/ruby/3.2.0/gems/ethon-0.18.0/lib/ethon/multi/stack.rb +0 -49
- data/vendor/bundle/ruby/3.2.0/gems/io-console-0.9.4/lib/io/console.so +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/typhoeus-1.6.0/README.md +0 -588
- data/vendor/bundle/ruby/3.2.0/gems/typhoeus-1.6.0/lib/rack/typhoeus/middleware/params_decoder/helper.rb +0 -76
- data/vendor/bundle/ruby/3.2.0/gems/typhoeus-1.6.0/lib/typhoeus/hydra/addable.rb +0 -23
- data/vendor/bundle/ruby/3.2.0/gems/typhoeus-1.6.0/lib/typhoeus/hydra/before.rb +0 -31
- data/vendor/bundle/ruby/3.2.0/gems/typhoeus-1.6.0/lib/typhoeus/hydra/block_connection.rb +0 -35
- data/vendor/bundle/ruby/3.2.0/gems/typhoeus-1.6.0/lib/typhoeus/hydra/cacheable.rb +0 -15
- data/vendor/bundle/ruby/3.2.0/gems/typhoeus-1.6.0/lib/typhoeus/hydra/memoizable.rb +0 -56
- data/vendor/bundle/ruby/3.2.0/gems/typhoeus-1.6.0/lib/typhoeus/hydra/runnable.rb +0 -19
- data/vendor/bundle/ruby/3.2.0/gems/typhoeus-1.6.0/lib/typhoeus/hydra/stubbable.rb +0 -28
- data/vendor/bundle/ruby/3.2.0/gems/typhoeus-1.6.0/lib/typhoeus/hydra.rb +0 -95
- data/vendor/bundle/ruby/3.2.0/gems/typhoeus-1.6.0/lib/typhoeus/pool.rb +0 -70
- data/vendor/bundle/ruby/3.2.0/gems/typhoeus-1.6.0/lib/typhoeus/request/before.rb +0 -30
- data/vendor/bundle/ruby/3.2.0/gems/typhoeus-1.6.0/lib/typhoeus/request/block_connection.rb +0 -52
- data/vendor/bundle/ruby/3.2.0/gems/typhoeus-1.6.0/lib/typhoeus/request/cacheable.rb +0 -38
- data/vendor/bundle/ruby/3.2.0/gems/typhoeus-1.6.0/lib/typhoeus/request/memoizable.rb +0 -38
- data/vendor/bundle/ruby/3.2.0/gems/typhoeus-1.6.0/lib/typhoeus/request/operations.rb +0 -40
- data/vendor/bundle/ruby/3.2.0/gems/typhoeus-1.6.0/lib/typhoeus/request/responseable.rb +0 -29
- data/vendor/bundle/ruby/3.2.0/gems/typhoeus-1.6.0/lib/typhoeus/request/stubbable.rb +0 -30
- data/vendor/bundle/ruby/3.2.0/gems/typhoeus-1.6.0/lib/typhoeus/request.rb +0 -223
- data/vendor/bundle/ruby/3.2.0/gems/typhoeus-1.6.0/lib/typhoeus/response/header.rb +0 -105
- data/vendor/bundle/ruby/3.2.0/gems/typhoeus-1.6.0/lib/typhoeus.rb +0 -143
- /data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/{io-console-0.9.4 → io-console-0.9.5}/gem.build_complete +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/LICENSE +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/ethon.gemspec +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/curls/messages.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/easy/debug_info.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/easy/http/custom.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/easy/http/delete.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/easy/http/head.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/easy/http/options.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/easy/http/patch.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/easy/http/put.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/easy/params.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/errors/ethon_error.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.9.4 → io-console-0.9.5}/.document +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.9.4 → io-console-0.9.5}/BSDL +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.9.4 → io-console-0.9.5}/COPYING +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.9.4 → io-console-0.9.5}/README.md +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.9.4 → io-console-0.9.5}/ext/io/console/Makefile +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.9.4 → io-console-0.9.5}/ext/io/console/win32_vk.inc +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.9.4 → io-console-0.9.5}/lib/io/console/size.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{typhoeus-1.6.0 → typhoeus-1.7.1}/CONTRIBUTING.md +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{typhoeus-1.6.0 → typhoeus-1.7.1}/LICENSE +0 -0
|
@@ -1,223 +0,0 @@
|
|
|
1
|
-
require 'zlib'
|
|
2
|
-
require 'digest/sha1'
|
|
3
|
-
require 'typhoeus/request/actions'
|
|
4
|
-
require 'typhoeus/request/before'
|
|
5
|
-
require 'typhoeus/request/block_connection'
|
|
6
|
-
require 'typhoeus/request/cacheable'
|
|
7
|
-
require 'typhoeus/request/callbacks'
|
|
8
|
-
require 'typhoeus/request/marshal'
|
|
9
|
-
require 'typhoeus/request/memoizable'
|
|
10
|
-
require 'typhoeus/request/operations'
|
|
11
|
-
require 'typhoeus/request/responseable'
|
|
12
|
-
require 'typhoeus/request/streamable'
|
|
13
|
-
require 'typhoeus/request/stubbable'
|
|
14
|
-
|
|
15
|
-
module Typhoeus
|
|
16
|
-
|
|
17
|
-
# This class represents a request.
|
|
18
|
-
#
|
|
19
|
-
# @example (see #initialize)
|
|
20
|
-
#
|
|
21
|
-
# @example Make a request with the shortcut.
|
|
22
|
-
# response = Typhoeus.get("www.example.com")
|
|
23
|
-
#
|
|
24
|
-
# @see (see #initialize)
|
|
25
|
-
class Request
|
|
26
|
-
extend Request::Actions
|
|
27
|
-
include Request::Callbacks::Types
|
|
28
|
-
include Request::Callbacks
|
|
29
|
-
include Request::Streamable
|
|
30
|
-
include Request::Marshal
|
|
31
|
-
include Request::Operations
|
|
32
|
-
include Request::Responseable
|
|
33
|
-
include Request::Memoizable
|
|
34
|
-
include Request::Cacheable
|
|
35
|
-
include Request::BlockConnection
|
|
36
|
-
include Request::Stubbable
|
|
37
|
-
include Request::Before
|
|
38
|
-
|
|
39
|
-
# Returns the provided base url.
|
|
40
|
-
#
|
|
41
|
-
# @return [ String ]
|
|
42
|
-
attr_accessor :base_url
|
|
43
|
-
|
|
44
|
-
# Returns options, which includes default parameters.
|
|
45
|
-
#
|
|
46
|
-
# @return [ Hash ]
|
|
47
|
-
attr_accessor :options
|
|
48
|
-
|
|
49
|
-
# Returns the hydra in which the request ran, if any.
|
|
50
|
-
#
|
|
51
|
-
# @return [ Typhoeus::Hydra ]
|
|
52
|
-
#
|
|
53
|
-
# @api private
|
|
54
|
-
attr_accessor :hydra
|
|
55
|
-
|
|
56
|
-
# Returns the original options provided.
|
|
57
|
-
#
|
|
58
|
-
# @return [ Hash ]
|
|
59
|
-
#
|
|
60
|
-
# @api private
|
|
61
|
-
attr_accessor :original_options
|
|
62
|
-
|
|
63
|
-
# @return [ Boolean ]
|
|
64
|
-
#
|
|
65
|
-
# @api private
|
|
66
|
-
attr_accessor :block_connection
|
|
67
|
-
|
|
68
|
-
# Creates a new request.
|
|
69
|
-
#
|
|
70
|
-
# @example Simplest request.
|
|
71
|
-
# response = Typhoeus::Request.new("www.example.com").run
|
|
72
|
-
#
|
|
73
|
-
# @example Request with url parameters.
|
|
74
|
-
# response = Typhoeus::Request.new(
|
|
75
|
-
# "www.example.com",
|
|
76
|
-
# params: {a: 1}
|
|
77
|
-
# ).run
|
|
78
|
-
#
|
|
79
|
-
# @example Request with a body.
|
|
80
|
-
# response = Typhoeus::Request.new(
|
|
81
|
-
# "www.example.com",
|
|
82
|
-
# body: {b: 2}
|
|
83
|
-
# ).run
|
|
84
|
-
#
|
|
85
|
-
# @example Request with parameters and body.
|
|
86
|
-
# response = Typhoeus::Request.new(
|
|
87
|
-
# "www.example.com",
|
|
88
|
-
# params: {a: 1},
|
|
89
|
-
# body: {b: 2}
|
|
90
|
-
# ).run
|
|
91
|
-
#
|
|
92
|
-
# @example Create a request and allow follow redirections.
|
|
93
|
-
# response = Typhoeus::Request.new(
|
|
94
|
-
# "www.example.com",
|
|
95
|
-
# followlocation: true
|
|
96
|
-
# ).run
|
|
97
|
-
#
|
|
98
|
-
# @param [ String ] base_url The url to request.
|
|
99
|
-
# @param [ options ] options The options.
|
|
100
|
-
#
|
|
101
|
-
# @option options [ Hash ] :params Translated
|
|
102
|
-
# into url parameters.
|
|
103
|
-
# @option options [ Hash ] :body Translated
|
|
104
|
-
# into HTTP POST request body.
|
|
105
|
-
#
|
|
106
|
-
# @return [ Typhoeus::Request ] The request.
|
|
107
|
-
#
|
|
108
|
-
# @note See {http://rubydoc.info/github/typhoeus/ethon/Ethon/Easy/Options Ethon::Easy::Options} for more options.
|
|
109
|
-
#
|
|
110
|
-
# @see Typhoeus::Hydra
|
|
111
|
-
# @see Typhoeus::Response
|
|
112
|
-
# @see Typhoeus::Request::Actions
|
|
113
|
-
def initialize(base_url, options = {})
|
|
114
|
-
@base_url = base_url
|
|
115
|
-
@original_options = options
|
|
116
|
-
@options = options.dup
|
|
117
|
-
|
|
118
|
-
set_defaults
|
|
119
|
-
end
|
|
120
|
-
|
|
121
|
-
# Return the url.
|
|
122
|
-
# In contrast to base_url which returns the value you specified, url returns
|
|
123
|
-
# the full url including the parameters.
|
|
124
|
-
#
|
|
125
|
-
# @example Get the url.
|
|
126
|
-
# request.url
|
|
127
|
-
#
|
|
128
|
-
# @since 0.5.5
|
|
129
|
-
def url
|
|
130
|
-
easy = EasyFactory.new(self).get
|
|
131
|
-
url = easy.url
|
|
132
|
-
Typhoeus::Pool.release(easy)
|
|
133
|
-
url
|
|
134
|
-
end
|
|
135
|
-
|
|
136
|
-
# Returns whether other is equal to self.
|
|
137
|
-
#
|
|
138
|
-
# @example Are request equal?
|
|
139
|
-
# request.eql?(other_request)
|
|
140
|
-
#
|
|
141
|
-
# @param [ Object ] other The object to check.
|
|
142
|
-
#
|
|
143
|
-
# @return [ Boolean ] Returns true if equal, else false.
|
|
144
|
-
#
|
|
145
|
-
# @api private
|
|
146
|
-
def eql?(other)
|
|
147
|
-
self.class == other.class &&
|
|
148
|
-
self.base_url == other.base_url &&
|
|
149
|
-
fuzzy_hash_eql?(self.options, other.options)
|
|
150
|
-
end
|
|
151
|
-
|
|
152
|
-
# Overrides Object#hash.
|
|
153
|
-
#
|
|
154
|
-
# @return [ Integer ] The integer representing the request.
|
|
155
|
-
#
|
|
156
|
-
# @api private
|
|
157
|
-
def hash
|
|
158
|
-
Zlib.crc32 cache_key
|
|
159
|
-
end
|
|
160
|
-
|
|
161
|
-
# Returns a cache key for use with caching methods that required a string
|
|
162
|
-
# for a key. Will get used by ActiveSupport::Cache stores automatically.
|
|
163
|
-
#
|
|
164
|
-
# @return [ String ] The cache key.
|
|
165
|
-
def cache_key
|
|
166
|
-
Digest::SHA1.hexdigest "#{self.class.name}#{base_url}#{hashable_string_for(options)}"
|
|
167
|
-
end
|
|
168
|
-
|
|
169
|
-
# Mimics libcurls POST body generation. This is not accurate, but good
|
|
170
|
-
# enough for VCR.
|
|
171
|
-
#
|
|
172
|
-
# @return [ String ] The encoded body.
|
|
173
|
-
# otherwise.
|
|
174
|
-
#
|
|
175
|
-
# @api private
|
|
176
|
-
def encoded_body
|
|
177
|
-
Ethon::Easy::Form.new(nil, options[:body]).to_s
|
|
178
|
-
end
|
|
179
|
-
|
|
180
|
-
private
|
|
181
|
-
|
|
182
|
-
# Checks if two hashes are equal or not, discarding
|
|
183
|
-
# first-level hash order.
|
|
184
|
-
#
|
|
185
|
-
# @param [ Hash ] left
|
|
186
|
-
# @param [ Hash ] right hash to check for equality
|
|
187
|
-
#
|
|
188
|
-
# @return [ Boolean ] Returns true if hashes have
|
|
189
|
-
# same values for same keys and same length,
|
|
190
|
-
# even if the keys are given in a different order.
|
|
191
|
-
def fuzzy_hash_eql?(left, right)
|
|
192
|
-
return true if (left == right)
|
|
193
|
-
|
|
194
|
-
(left.count == right.count) && left.inject(true) do |res, kvp|
|
|
195
|
-
res && (kvp[1] == right[kvp[0]])
|
|
196
|
-
end
|
|
197
|
-
end
|
|
198
|
-
|
|
199
|
-
def hashable_string_for(obj)
|
|
200
|
-
case obj
|
|
201
|
-
when Hash
|
|
202
|
-
hashable_string_for(obj.sort_by {|sub_obj| sub_obj.first.to_s})
|
|
203
|
-
when Array
|
|
204
|
-
obj.map {|sub_obj| hashable_string_for(sub_obj)}.to_s
|
|
205
|
-
else
|
|
206
|
-
obj.to_s
|
|
207
|
-
end
|
|
208
|
-
end
|
|
209
|
-
|
|
210
|
-
# Sets default header and verbose when turned on.
|
|
211
|
-
def set_defaults
|
|
212
|
-
default_user_agent = Config.user_agent || Typhoeus::USER_AGENT
|
|
213
|
-
|
|
214
|
-
options[:headers] = {'User-Agent' => default_user_agent}.merge(options[:headers] || {})
|
|
215
|
-
options[:headers]['Expect'] ||= ''
|
|
216
|
-
options[:verbose] = Typhoeus::Config.verbose if options[:verbose].nil? && !Typhoeus::Config.verbose.nil?
|
|
217
|
-
options[:timeout] = Typhoeus::Config.timeout if options[:timeout].nil? && !Typhoeus::Config.timeout.nil?
|
|
218
|
-
options[:connecttimeout] = Typhoeus::Config.connecttimeout if options[:connecttimeout].nil? && !Typhoeus::Config.connecttimeout.nil?
|
|
219
|
-
options[:maxredirs] ||= 50
|
|
220
|
-
options[:proxy] = Typhoeus::Config.proxy unless options.has_key?(:proxy) || Typhoeus::Config.proxy.nil?
|
|
221
|
-
end
|
|
222
|
-
end
|
|
223
|
-
end
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
require 'delegate'
|
|
2
|
-
|
|
3
|
-
module Typhoeus
|
|
4
|
-
class Response
|
|
5
|
-
|
|
6
|
-
# This class represents the response header.
|
|
7
|
-
# It can be accessed like a hash.
|
|
8
|
-
# Values can be strings (normal case) or arrays of strings (for duplicates headers)
|
|
9
|
-
#
|
|
10
|
-
# @api private
|
|
11
|
-
class Header < DelegateClass(Hash)
|
|
12
|
-
|
|
13
|
-
# Create a new header.
|
|
14
|
-
#
|
|
15
|
-
# @example Create new header.
|
|
16
|
-
# Header.new(raw)
|
|
17
|
-
#
|
|
18
|
-
# @param [ String ] raw The raw header.
|
|
19
|
-
def initialize(raw)
|
|
20
|
-
super({})
|
|
21
|
-
@raw = raw
|
|
22
|
-
@sanitized = {}
|
|
23
|
-
parse
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
def [](key)
|
|
27
|
-
fetch(key) { @sanitized[key.to_s.downcase] }
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
# Parses the raw header.
|
|
31
|
-
#
|
|
32
|
-
# @example Parse header.
|
|
33
|
-
# header.parse
|
|
34
|
-
def parse
|
|
35
|
-
case @raw
|
|
36
|
-
when Hash
|
|
37
|
-
raw.each do |k, v|
|
|
38
|
-
process_pair(k, v)
|
|
39
|
-
end
|
|
40
|
-
when String
|
|
41
|
-
raw.split(/\r?\n(?!\s)/).each do |header|
|
|
42
|
-
header.strip!
|
|
43
|
-
next if header.empty? || header.start_with?( 'HTTP/' )
|
|
44
|
-
process_line(header)
|
|
45
|
-
end
|
|
46
|
-
end
|
|
47
|
-
end
|
|
48
|
-
|
|
49
|
-
private
|
|
50
|
-
|
|
51
|
-
# Processes line and saves the result.
|
|
52
|
-
#
|
|
53
|
-
# @return [ void ]
|
|
54
|
-
def process_line(header)
|
|
55
|
-
key, value = header.split(':', 2)
|
|
56
|
-
process_pair(key.strip, (value ? value.strip.gsub(/\r?\n\s*/, ' ') : ''))
|
|
57
|
-
end
|
|
58
|
-
|
|
59
|
-
# Sets key value pair for self and @sanitized.
|
|
60
|
-
#
|
|
61
|
-
# @return [ void ]
|
|
62
|
-
def process_pair(key, value)
|
|
63
|
-
set_value(key, value, self)
|
|
64
|
-
@sanitized[key.downcase] = self[key]
|
|
65
|
-
end
|
|
66
|
-
|
|
67
|
-
# Sets value for key in specified hash
|
|
68
|
-
#
|
|
69
|
-
# @return [ void ]
|
|
70
|
-
def set_value(key, value, hash)
|
|
71
|
-
current_value = hash[key]
|
|
72
|
-
if current_value
|
|
73
|
-
if current_value.is_a? Array
|
|
74
|
-
current_value << value
|
|
75
|
-
else
|
|
76
|
-
hash[key] = [current_value, value]
|
|
77
|
-
end
|
|
78
|
-
else
|
|
79
|
-
hash[key] = value
|
|
80
|
-
end
|
|
81
|
-
end
|
|
82
|
-
|
|
83
|
-
# Returns the raw header or empty string.
|
|
84
|
-
#
|
|
85
|
-
# @example Return raw header.
|
|
86
|
-
# header.raw
|
|
87
|
-
#
|
|
88
|
-
# @return [ String ] The raw header.
|
|
89
|
-
def raw
|
|
90
|
-
@raw || ''
|
|
91
|
-
end
|
|
92
|
-
|
|
93
|
-
# Sets the default proc for the specified hash independent of the Ruby version.
|
|
94
|
-
#
|
|
95
|
-
# @return [ void ]
|
|
96
|
-
def set_default_proc_on(hash, default_proc)
|
|
97
|
-
if hash.respond_to?(:default_proc=)
|
|
98
|
-
hash.default_proc = default_proc
|
|
99
|
-
else
|
|
100
|
-
hash.replace(Hash.new(&default_proc).merge(hash))
|
|
101
|
-
end
|
|
102
|
-
end
|
|
103
|
-
end
|
|
104
|
-
end
|
|
105
|
-
end
|
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
require 'digest/sha2'
|
|
2
|
-
require 'ethon'
|
|
3
|
-
|
|
4
|
-
require 'typhoeus/config'
|
|
5
|
-
require 'typhoeus/easy_factory'
|
|
6
|
-
require 'typhoeus/errors'
|
|
7
|
-
require 'typhoeus/expectation'
|
|
8
|
-
require 'typhoeus/hydra'
|
|
9
|
-
require 'typhoeus/pool'
|
|
10
|
-
require 'typhoeus/request'
|
|
11
|
-
require 'typhoeus/response'
|
|
12
|
-
require 'typhoeus/version'
|
|
13
|
-
|
|
14
|
-
# If we are using any Rack-based application, then we need the Typhoeus rack
|
|
15
|
-
# middleware to ensure our app is running properly.
|
|
16
|
-
if defined?(Rack)
|
|
17
|
-
require "rack/typhoeus"
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
# If the Redis gem is available, load the redis cache adapter
|
|
21
|
-
if defined?(Redis)
|
|
22
|
-
require "typhoeus/cache/redis"
|
|
23
|
-
end
|
|
24
|
-
|
|
25
|
-
# If the Dalli gem is available, load the Dalli cache adapter
|
|
26
|
-
if defined?(Dalli)
|
|
27
|
-
require "typhoeus/cache/dalli"
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
# If we are using Rails, load the Rails cache adapter
|
|
31
|
-
if defined?(Rails)
|
|
32
|
-
require "typhoeus/cache/rails"
|
|
33
|
-
end
|
|
34
|
-
|
|
35
|
-
# If we are using Rails, then we will include the Typhoeus railtie.
|
|
36
|
-
# if defined?(Rails)
|
|
37
|
-
# require "typhoeus/railtie"
|
|
38
|
-
# end
|
|
39
|
-
|
|
40
|
-
# Typhoeus is a HTTP client library based on Ethon which
|
|
41
|
-
# wraps libcurl. Sitting on top of libcurl makes Typhoeus
|
|
42
|
-
# very reliable and fast.
|
|
43
|
-
#
|
|
44
|
-
# There are some gems using Typhoeus like
|
|
45
|
-
# {https://github.com/myronmarston/vcr VCR},
|
|
46
|
-
# {https://github.com/bblimke/webmock WebMock} or
|
|
47
|
-
# {https://github.com/technoweenie/faraday Faraday}. VCR
|
|
48
|
-
# and WebMock provide their own adapter whereas
|
|
49
|
-
# Faraday relies on {Faraday::Adapter::Typhoeus}
|
|
50
|
-
# since Typhoeus version 0.5.
|
|
51
|
-
#
|
|
52
|
-
# @example (see Typhoeus::Request)
|
|
53
|
-
# @example (see Typhoeus::Hydra)
|
|
54
|
-
#
|
|
55
|
-
# @see Typhoeus::Request
|
|
56
|
-
# @see Typhoeus::Hydra
|
|
57
|
-
# @see Faraday::Adapter::Typhoeus
|
|
58
|
-
#
|
|
59
|
-
# @since 0.5.0
|
|
60
|
-
module Typhoeus
|
|
61
|
-
extend Request::Actions
|
|
62
|
-
extend Request::Callbacks::Types
|
|
63
|
-
|
|
64
|
-
# The default Typhoeus user agent.
|
|
65
|
-
USER_AGENT = "Typhoeus - https://github.com/typhoeus/typhoeus"
|
|
66
|
-
|
|
67
|
-
# Set the Typhoeus configuration options by passing a block.
|
|
68
|
-
#
|
|
69
|
-
# @example (see Typhoeus::Config)
|
|
70
|
-
#
|
|
71
|
-
# @yield [ Typhoeus::Config ]
|
|
72
|
-
#
|
|
73
|
-
# @return [ Typhoeus::Config ] The configuration.
|
|
74
|
-
#
|
|
75
|
-
# @see Typhoeus::Config
|
|
76
|
-
def self.configure
|
|
77
|
-
yield Config
|
|
78
|
-
end
|
|
79
|
-
|
|
80
|
-
# Stub out a specific request.
|
|
81
|
-
#
|
|
82
|
-
# @example (see Typhoeus::Expectation)
|
|
83
|
-
#
|
|
84
|
-
# @param [ String ] base_url The url to stub out.
|
|
85
|
-
# @param [ Hash ] options The options to stub out.
|
|
86
|
-
#
|
|
87
|
-
# @return [ Typhoeus::Expectation ] The expecatation.
|
|
88
|
-
#
|
|
89
|
-
# @see Typhoeus::Expectation
|
|
90
|
-
def self.stub(base_url, options = {}, &block)
|
|
91
|
-
expectation = Expectation.all.find{ |e| e.base_url == base_url && e.options == options }
|
|
92
|
-
if expectation.nil?
|
|
93
|
-
expectation = Expectation.new(base_url, options)
|
|
94
|
-
Expectation.all << expectation
|
|
95
|
-
end
|
|
96
|
-
|
|
97
|
-
expectation.and_return(&block) unless block.nil?
|
|
98
|
-
expectation
|
|
99
|
-
end
|
|
100
|
-
|
|
101
|
-
# Add before callbacks.
|
|
102
|
-
#
|
|
103
|
-
# @example Add before callback.
|
|
104
|
-
# Typhoeus.before { |request| p request.base_url }
|
|
105
|
-
#
|
|
106
|
-
# @param [ Block ] block The callback.
|
|
107
|
-
#
|
|
108
|
-
# @yield [ Typhoeus::Request ]
|
|
109
|
-
#
|
|
110
|
-
# @return [ Array<Block> ] All before blocks.
|
|
111
|
-
def self.before(&block)
|
|
112
|
-
@before ||= []
|
|
113
|
-
@before << block if block_given?
|
|
114
|
-
@before
|
|
115
|
-
end
|
|
116
|
-
|
|
117
|
-
# Execute given block as if block connection is turned off.
|
|
118
|
-
# The old block connection state is restored afterwards.
|
|
119
|
-
#
|
|
120
|
-
# @example Make a real request, no matter if it's blocked.
|
|
121
|
-
# Typhoeus::Config.block_connection = true
|
|
122
|
-
# Typhoeus.get("www.example.com").code
|
|
123
|
-
# #=> raise Typhoeus::Errors::NoStub
|
|
124
|
-
#
|
|
125
|
-
# Typhoeus.with_connection do
|
|
126
|
-
# Typhoeus.get("www.example.com").code
|
|
127
|
-
# #=> :ok
|
|
128
|
-
# end
|
|
129
|
-
#
|
|
130
|
-
# @yield Yields control to the block after disabling block_connection.
|
|
131
|
-
# Afterwards, the block_connection is set to its original
|
|
132
|
-
# value.
|
|
133
|
-
# @return [ Object ] Returns the return value of the block.
|
|
134
|
-
#
|
|
135
|
-
# @see Typhoeus::Config.block_connection
|
|
136
|
-
def self.with_connection
|
|
137
|
-
old = Config.block_connection
|
|
138
|
-
Config.block_connection = false
|
|
139
|
-
result = yield if block_given?
|
|
140
|
-
Config.block_connection = old
|
|
141
|
-
result
|
|
142
|
-
end
|
|
143
|
-
end
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/curls/messages.rb
RENAMED
|
File without changes
|
/data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/easy/debug_info.rb
RENAMED
|
File without changes
|
/data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/easy/http/custom.rb
RENAMED
|
File without changes
|
/data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/easy/http/delete.rb
RENAMED
|
File without changes
|
/data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/easy/http/head.rb
RENAMED
|
File without changes
|
/data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/easy/http/options.rb
RENAMED
|
File without changes
|
/data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/easy/http/patch.rb
RENAMED
|
File without changes
|
/data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/easy/http/put.rb
RENAMED
|
File without changes
|
|
File without changes
|
/data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.18.0 → ethon-0.19.1}/lib/ethon/errors/ethon_error.rb
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.9.4 → io-console-0.9.5}/ext/io/console/Makefile
RENAMED
|
File without changes
|
|
File without changes
|
/data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.9.4 → io-console-0.9.5}/lib/io/console/size.rb
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|