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.
- checksums.yaml +4 -4
- data/Gemfile.lock +4 -4
- data/README.md +5 -5
- data/cybrid_api_organization_ruby.gemspec +1 -1
- data/lib/cybrid_api_organization_ruby/api/organizations_organization_api.rb +1 -1
- data/lib/cybrid_api_organization_ruby/api/subscription_deliveries_organization_api.rb +1 -1
- data/lib/cybrid_api_organization_ruby/api/subscription_events_organization_api.rb +1 -1
- data/lib/cybrid_api_organization_ruby/api/subscriptions_organization_api.rb +1 -1
- data/lib/cybrid_api_organization_ruby/api_client.rb +1 -1
- data/lib/cybrid_api_organization_ruby/api_error.rb +1 -1
- data/lib/cybrid_api_organization_ruby/configuration.rb +1 -1
- data/lib/cybrid_api_organization_ruby/models/error_response_organization_model.rb +1 -1
- data/lib/cybrid_api_organization_ruby/models/organization_organization_model.rb +1 -1
- data/lib/cybrid_api_organization_ruby/models/patch_organization_organization_model.rb +1 -1
- data/lib/cybrid_api_organization_ruby/models/post_subscription_delivery_organization_model.rb +1 -1
- data/lib/cybrid_api_organization_ruby/models/post_subscription_organization_model.rb +1 -1
- data/lib/cybrid_api_organization_ruby/models/subscription_delivery_list_organization_model.rb +1 -1
- data/lib/cybrid_api_organization_ruby/models/subscription_delivery_organization_model.rb +1 -1
- data/lib/cybrid_api_organization_ruby/models/subscription_environment_organization_model.rb +1 -1
- data/lib/cybrid_api_organization_ruby/models/subscription_event_list_organization_model.rb +1 -1
- data/lib/cybrid_api_organization_ruby/models/subscription_event_organization_model.rb +1 -1
- data/lib/cybrid_api_organization_ruby/models/subscription_list_organization_model.rb +1 -1
- data/lib/cybrid_api_organization_ruby/models/subscription_organization_model.rb +1 -1
- data/lib/cybrid_api_organization_ruby/models/subscription_state_organization_model.rb +1 -1
- data/lib/cybrid_api_organization_ruby/models/subscription_type_organization_model.rb +1 -1
- data/lib/cybrid_api_organization_ruby/version.rb +2 -2
- data/lib/cybrid_api_organization_ruby.rb +1 -1
- data/spec/api/organizations_organization_api_spec.rb +1 -1
- data/spec/api/subscription_deliveries_organization_api_spec.rb +1 -1
- data/spec/api/subscription_events_organization_api_spec.rb +1 -1
- data/spec/api/subscriptions_organization_api_spec.rb +1 -1
- data/spec/api_client_spec.rb +1 -1
- data/spec/configuration_spec.rb +1 -1
- data/spec/models/error_response_organization_model_spec.rb +1 -1
- data/spec/models/organization_organization_model_spec.rb +1 -1
- data/spec/models/patch_organization_organization_model_spec.rb +1 -1
- data/spec/models/post_subscription_delivery_organization_model_spec.rb +1 -1
- data/spec/models/post_subscription_organization_model_spec.rb +1 -1
- data/spec/models/subscription_delivery_list_organization_model_spec.rb +1 -1
- data/spec/models/subscription_delivery_organization_model_spec.rb +1 -1
- data/spec/models/subscription_environment_organization_model_spec.rb +1 -1
- data/spec/models/subscription_event_list_organization_model_spec.rb +1 -1
- data/spec/models/subscription_event_organization_model_spec.rb +1 -1
- data/spec/models/subscription_list_organization_model_spec.rb +1 -1
- data/spec/models/subscription_organization_model_spec.rb +1 -1
- data/spec/models/subscription_state_organization_model_spec.rb +1 -1
- data/spec/models/subscription_type_organization_model_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- data/vendor/bundle/ruby/3.3.0/cache/ethon-0.15.0.gem +0 -0
- data/vendor/bundle/ruby/3.3.0/cache/typhoeus-1.5.0.gem +0 -0
- data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/byebug-12.0.0/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/date-3.4.1/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/jaro_winkler-1.5.6/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/psych-5.2.6/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/racc-1.8.1/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/stringio-3.1.7/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/.github/workflows/ruby.yml +41 -0
- data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → ethon-0.15.0}/.gitignore +4 -4
- data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → ethon-0.15.0}/.rspec +0 -1
- data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/CHANGELOG.md +1 -29
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/Gemfile +43 -0
- data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → ethon-0.15.0}/Guardfile +3 -2
- data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/README.md +0 -23
- data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → ethon-0.15.0}/Rakefile +7 -5
- data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/ethon.gemspec +3 -6
- data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/curls/classes.rb +2 -12
- data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/curls/codes.rb +2 -3
- data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/curls/options.rb +3 -4
- data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/easy/callbacks.rb +1 -2
- data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/easy/informations.rb +0 -3
- data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/easy/response_callbacks.rb +1 -6
- data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/version.rb +1 -1
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/profile/benchmarks.rb +104 -0
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/profile/memory_leaks.rb +114 -0
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/profile/perf_spec_helper.rb +37 -0
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/profile/support/memory_test_helpers.rb +76 -0
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/profile/support/os_memory_leak_tracker.rb +48 -0
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/profile/support/ruby_object_leak_tracker.rb +49 -0
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/curl_spec.rb +38 -0
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/easy/callbacks_spec.rb +59 -0
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/easy/debug_info_spec.rb +54 -0
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/easy/features_spec.rb +24 -0
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/easy/form_spec.rb +104 -0
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/easy/header_spec.rb +79 -0
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/easy/http/custom_spec.rb +177 -0
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/easy/http/delete_spec.rb +21 -0
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/easy/http/get_spec.rb +126 -0
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/easy/http/head_spec.rb +80 -0
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/easy/http/options_spec.rb +51 -0
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/easy/http/patch_spec.rb +51 -0
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/easy/http/post_spec.rb +317 -0
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/easy/http/put_spec.rb +168 -0
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/easy/http_spec.rb +64 -0
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/easy/informations_spec.rb +120 -0
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/easy/mirror_spec.rb +47 -0
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/easy/operations_spec.rb +268 -0
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/easy/options_spec.rb +193 -0
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/easy/queryable_spec.rb +235 -0
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/easy/response_callbacks_spec.rb +152 -0
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/easy/util_spec.rb +28 -0
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/easy_spec.rb +203 -0
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/libc_spec.rb +14 -0
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/loggable_spec.rb +22 -0
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/multi/operations_spec.rb +298 -0
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/multi/options_spec.rb +182 -0
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/multi/stack_spec.rb +80 -0
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/multi_spec.rb +152 -0
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/spec_helper.rb +28 -0
- data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → ethon-0.15.0}/spec/support/localhost_server.rb +2 -1
- data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → ethon-0.15.0}/spec/support/server.rb +10 -11
- data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/CHANGELOG.md +43 -1
- data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/expectation.rb +4 -2
- data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/request/responseable.rb +1 -1
- data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/version.rb +1 -1
- data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/typhoeus.gemspec +14 -4
- data/vendor/bundle/ruby/3.3.0/specifications/{ethon-0.17.0.gemspec → ethon-0.15.0.gemspec} +5 -6
- data/vendor/bundle/ruby/3.3.0/specifications/typhoeus-1.5.0.gemspec +26 -0
- metadata +156 -160
- data/vendor/bundle/ruby/3.3.0/cache/ethon-0.17.0.gem +0 -0
- data/vendor/bundle/ruby/3.3.0/cache/typhoeus-1.4.1.gem +0 -0
- data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/.github/workflows/ci.yml +0 -30
- data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/.github/workflows/experimental.yml +0 -33
- data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/Gemfile +0 -36
- data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/perf/profile.rb +0 -14
- data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/perf/vs_nethttp.rb +0 -64
- data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/rack/typhoeus/middleware/params_decoder/helper_spec.rb +0 -156
- data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/rack/typhoeus/middleware/params_decoder_spec.rb +0 -31
- data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/spec_helper.rb +0 -29
- data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/support/memory_cache.rb +0 -15
- data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/adapters/faraday_spec.rb +0 -339
- data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/cache/dalli_spec.rb +0 -41
- data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/cache/redis_spec.rb +0 -41
- data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/config_spec.rb +0 -15
- data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/easy_factory_spec.rb +0 -143
- data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/errors/no_stub_spec.rb +0 -13
- data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/expectation_spec.rb +0 -280
- data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/hydra/addable_spec.rb +0 -22
- data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/hydra/before_spec.rb +0 -98
- data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/hydra/block_connection_spec.rb +0 -18
- data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/hydra/cacheable_spec.rb +0 -88
- data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/hydra/memoizable_spec.rb +0 -53
- data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/hydra/queueable_spec.rb +0 -98
- data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/hydra/runnable_spec.rb +0 -137
- data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/hydra/stubbable_spec.rb +0 -48
- data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/hydra_spec.rb +0 -22
- data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/pool_spec.rb +0 -137
- data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/request/actions_spec.rb +0 -19
- data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/request/before_spec.rb +0 -93
- data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/request/block_connection_spec.rb +0 -75
- data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/request/cacheable_spec.rb +0 -94
- data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/request/callbacks_spec.rb +0 -91
- data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/request/marshal_spec.rb +0 -60
- data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/request/memoizable_spec.rb +0 -34
- data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/request/operations_spec.rb +0 -101
- data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/request/responseable_spec.rb +0 -13
- data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/request/stubbable_spec.rb +0 -45
- data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/request_spec.rb +0 -256
- data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/response/header_spec.rb +0 -147
- data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/response/informations_spec.rb +0 -323
- data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/response/status_spec.rb +0 -256
- data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/response_spec.rb +0 -100
- data/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus_spec.rb +0 -105
- data/vendor/bundle/ruby/3.3.0/specifications/typhoeus-1.4.1.gemspec +0 -24
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/LICENSE +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/curl.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/curls/constants.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/curls/form_options.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/curls/functions.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/curls/infos.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/curls/messages.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/curls/settings.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/easy/debug_info.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/easy/features.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/easy/form.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/easy/header.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/easy/http/actionable.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/easy/http/custom.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/easy/http/delete.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/easy/http/get.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/easy/http/head.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/easy/http/options.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/easy/http/patch.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/easy/http/post.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/easy/http/postable.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/easy/http/put.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/easy/http/putable.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/easy/http.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/easy/mirror.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/easy/operations.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/easy/options.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/easy/params.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/easy/queryable.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/easy/util.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/easy.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/errors/ethon_error.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/errors/global_init.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/errors/invalid_option.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/errors/invalid_value.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/errors/multi_add.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/errors/multi_fdset.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/errors/multi_remove.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/errors/multi_timeout.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/errors/select.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/errors.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/libc.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/loggable.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/multi/operations.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/multi/options.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/multi/stack.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/multi.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/CONTRIBUTING.md +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/LICENSE +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/README.md +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/UPGRADE.md +0 -0
- /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
- /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
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/rack/typhoeus.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/adapters/faraday.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/cache/dalli.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/cache/rails.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/cache/redis.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/config.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/easy_factory.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/errors/no_stub.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/errors/typhoeus_error.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/errors.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/hydra/addable.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/hydra/before.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/hydra/block_connection.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/hydra/cacheable.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/hydra/memoizable.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/hydra/queueable.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/hydra/runnable.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/hydra/stubbable.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/hydra.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/pool.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/railtie.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/request/actions.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/request/before.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/request/block_connection.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/request/cacheable.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/request/callbacks.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/request/marshal.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/request/memoizable.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/request/operations.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/request/streamable.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/request/stubbable.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/request.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/response/cacheable.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/response/header.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/response/informations.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/response/status.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus/response.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.4.1 → typhoeus-1.5.0}/lib/typhoeus.rb +0 -0
@@ -307,7 +307,6 @@ module Ethon
|
|
307
307
|
option :easy, :port, :int, 3
|
308
308
|
option :easy, :tcp_nodelay, :bool, 121
|
309
309
|
option :easy, :address_scope, :int, 171
|
310
|
-
option :easy, :tcp_fastopen, :bool, 212
|
311
310
|
option :easy, :tcp_keepalive, :bool, 213
|
312
311
|
option :easy, :tcp_keepidle, :int, 214
|
313
312
|
option :easy, :tcp_keepintvl, :int, 215
|
@@ -353,7 +352,7 @@ module Ethon
|
|
353
352
|
option :easy, :cookiesession, :bool, 96
|
354
353
|
option :easy, :cookielist, :string, 135
|
355
354
|
option :easy, :httpget, :bool, 80
|
356
|
-
option :easy, :http_version, :enum, 84, [:none, :httpv1_0, :httpv1_1, :httpv2_0
|
355
|
+
option :easy, :http_version, :enum, 84, [:none, :httpv1_0, :httpv1_1, :httpv2_0]
|
357
356
|
option :easy, :ignore_content_length, :bool, 136
|
358
357
|
option :easy, :http_content_decoding, :bool, 158
|
359
358
|
option :easy, :http_transfer_decoding, :bool, 157
|
@@ -441,7 +440,7 @@ module Ethon
|
|
441
440
|
option_alias :easy, :keypasswd, :sslkeypasswd
|
442
441
|
option :easy, :sslengine, :string, 89
|
443
442
|
option :easy, :sslengine_default, :none, 90
|
444
|
-
option :easy, :sslversion, :enum, 32, [:default, :tlsv1, :sslv2, :sslv3, :tlsv1_0, :tlsv1_1, :tlsv1_2
|
443
|
+
option :easy, :sslversion, :enum, 32, [:default, :tlsv1, :sslv2, :sslv3, :tlsv1_0, :tlsv1_1, :tlsv1_2]
|
445
444
|
option :easy, :ssl_verifypeer, :bool, 64
|
446
445
|
option :easy, :cainfo, :string, 65
|
447
446
|
option :easy, :issuercert, :string, 170
|
@@ -464,7 +463,7 @@ module Ethon
|
|
464
463
|
option :easy, :proxy_capath, :string, 247
|
465
464
|
option :easy, :proxy_ssl_verifypeer, :bool, 248
|
466
465
|
option :easy, :proxy_ssl_verifyhost, :int, 249
|
467
|
-
option :easy, :proxy_sslversion, :enum, 250, [:default, :tlsv1, :sslv2, :sslv3, :tlsv1_0, :tlsv1_1, :tlsv1_2
|
466
|
+
option :easy, :proxy_sslversion, :enum, 250, [:default, :tlsv1, :sslv2, :sslv3, :tlsv1_0, :tlsv1_1, :tlsv1_2]
|
468
467
|
option :easy, :proxy_tlsauth_username, :string, 251
|
469
468
|
option :easy, :proxy_tlsauth_password, :string, 252
|
470
469
|
option :easy, :proxy_tlsauth_type, :enum, 253, [:none, :srp]
|
data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/easy/callbacks.rb
RENAMED
@@ -52,9 +52,8 @@ module Ethon
|
|
52
52
|
# @return [ Proc ] The callback.
|
53
53
|
def header_write_callback
|
54
54
|
@header_write_callback ||= proc {|stream, size, num, object|
|
55
|
-
result = headers
|
56
55
|
@response_headers << stream.read_string(size * num)
|
57
|
-
|
56
|
+
size * num
|
58
57
|
}
|
59
58
|
end
|
60
59
|
|
data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.17.0 → ethon-0.15.0}/lib/ethon/easy/informations.rb
RENAMED
@@ -73,9 +73,6 @@ module Ethon
|
|
73
73
|
# actually followed.
|
74
74
|
:redirect_count => :long,
|
75
75
|
|
76
|
-
# URL a redirect would take you to, had you enabled redirects (Added in 7.18.2)
|
77
|
-
:redirect_url => :string,
|
78
|
-
|
79
76
|
# Return the bytes, the total amount of bytes that were uploaded
|
80
77
|
:size_upload => :double,
|
81
78
|
|
@@ -43,12 +43,7 @@ module Ethon
|
|
43
43
|
return if @headers_called
|
44
44
|
@headers_called = true
|
45
45
|
if defined?(@on_headers) and not @on_headers.nil?
|
46
|
-
|
47
|
-
@on_headers.each do |callback|
|
48
|
-
result = callback.call(self)
|
49
|
-
break if result == :abort
|
50
|
-
end
|
51
|
-
result
|
46
|
+
@on_headers.each{ |callback| callback.call(self) }
|
52
47
|
end
|
53
48
|
end
|
54
49
|
|
@@ -0,0 +1,104 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# frozen_string_literal: true
|
3
|
+
require 'ethon'
|
4
|
+
require 'open-uri'
|
5
|
+
require 'patron'
|
6
|
+
require 'curb'
|
7
|
+
require 'net/http'
|
8
|
+
require 'cgi'
|
9
|
+
require 'benchmark/ips'
|
10
|
+
|
11
|
+
require_relative '../spec/support/server'
|
12
|
+
require_relative '../spec/support/localhost_server'
|
13
|
+
|
14
|
+
LocalhostServer.new(TESTSERVER.new, 3000)
|
15
|
+
LocalhostServer.new(TESTSERVER.new, 3001)
|
16
|
+
LocalhostServer.new(TESTSERVER.new, 3002)
|
17
|
+
|
18
|
+
url = 'http://localhost:3000/'.freeze
|
19
|
+
uri = URI.parse('http://localhost:3000/').freeze
|
20
|
+
ethon = Ethon::Easy.new(url: url)
|
21
|
+
patron = Patron::Session.new
|
22
|
+
patron_url = Patron::Session.new(base_url: url)
|
23
|
+
curb = Curl::Easy.new(url)
|
24
|
+
|
25
|
+
puts '[Creation]'
|
26
|
+
Benchmark.ips do |x|
|
27
|
+
x.report('String.new') { '' }
|
28
|
+
x.report('Easy.new') { Ethon::Easy.new }
|
29
|
+
end
|
30
|
+
|
31
|
+
puts '[Escape]'
|
32
|
+
Benchmark.ips do |x|
|
33
|
+
x.report('CGI.escape') { CGI.escape("まつもと") }
|
34
|
+
x.report('Easy.escape') { ethon.escape("まつもと") }
|
35
|
+
end
|
36
|
+
|
37
|
+
puts '[Requests]'
|
38
|
+
Benchmark.ips do |x|
|
39
|
+
x.report('net/http') { Net::HTTP.get_response(uri) }
|
40
|
+
x.report('open-uri') { open url }
|
41
|
+
|
42
|
+
x.report('patron') do
|
43
|
+
patron.base_url = url
|
44
|
+
patron.get('/')
|
45
|
+
end
|
46
|
+
|
47
|
+
x.report('patron reuse') { patron_url.get('/') }
|
48
|
+
|
49
|
+
x.report('curb') do
|
50
|
+
curb.url = url
|
51
|
+
curb.perform
|
52
|
+
end
|
53
|
+
|
54
|
+
x.report('curb reuse') { curb.perform }
|
55
|
+
|
56
|
+
x.report('Easy.perform') do
|
57
|
+
ethon.url = url
|
58
|
+
ethon.perform
|
59
|
+
end
|
60
|
+
|
61
|
+
x.report('Easy.perform reuse') { ethon.perform }
|
62
|
+
end
|
63
|
+
|
64
|
+
puts "[ 4 delayed Requests ]"
|
65
|
+
Benchmark.ips do |x|
|
66
|
+
x.report('net/http') do
|
67
|
+
3.times do |i|
|
68
|
+
uri = URI.parse("http://localhost:300#{i}/?delay=1")
|
69
|
+
Net::HTTP.get_response(uri)
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
x.report("open-uri") do
|
74
|
+
3.times do |i|
|
75
|
+
open("http://localhost:300#{i}/?delay=1")
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
x.report("patron") do
|
80
|
+
sess = Patron::Session.new
|
81
|
+
3.times do |i|
|
82
|
+
sess.base_url = "http://localhost:300#{i}/?delay=1"
|
83
|
+
sess.get("/")
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
87
|
+
x.report("Easy.perform") do
|
88
|
+
easy = Ethon::Easy.new
|
89
|
+
3.times do |i|
|
90
|
+
easy.url = "http://localhost:300#{i}/?delay=1"
|
91
|
+
easy.perform
|
92
|
+
end
|
93
|
+
end
|
94
|
+
|
95
|
+
x.report("Multi.perform") do
|
96
|
+
multi = Ethon::Multi.new
|
97
|
+
3.times do |i|
|
98
|
+
easy = Ethon::Easy.new
|
99
|
+
easy.url = "http://localhost:300#{i}/?delay=1"
|
100
|
+
multi.add(easy)
|
101
|
+
end
|
102
|
+
multi.perform
|
103
|
+
end
|
104
|
+
end
|
@@ -0,0 +1,114 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require 'ethon'
|
3
|
+
require 'ethon/easy'
|
4
|
+
|
5
|
+
require_relative 'perf_spec_helper'
|
6
|
+
require 'rspec/autorun'
|
7
|
+
|
8
|
+
describe "low-level interactions with libcurl" do
|
9
|
+
describe Ethon::Multi do
|
10
|
+
memory_leak_test("init") do
|
11
|
+
Ethon::Multi.new
|
12
|
+
end
|
13
|
+
|
14
|
+
memory_leak_test("handle") do
|
15
|
+
Ethon::Multi.new.handle
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
describe Ethon::Easy do
|
20
|
+
memory_leak_test("init") do
|
21
|
+
Ethon::Easy.new
|
22
|
+
end
|
23
|
+
|
24
|
+
memory_leak_test("handle") do
|
25
|
+
Ethon::Easy.new.handle
|
26
|
+
end
|
27
|
+
|
28
|
+
memory_leak_test("headers") do
|
29
|
+
Ethon::Easy.new.headers = { "a" => 1, "b" => 2, "c" => 3, "d" => 4}
|
30
|
+
end
|
31
|
+
|
32
|
+
memory_leak_test("escape") do
|
33
|
+
Ethon::Easy.new.escape("the_sky&is_blue")
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
|
38
|
+
describe Ethon::Easy::Form do
|
39
|
+
memory_leak_test("init") do
|
40
|
+
Ethon::Easy::Form.new(nil, {})
|
41
|
+
end
|
42
|
+
|
43
|
+
memory_leak_test("first") do
|
44
|
+
Ethon::Easy::Form.new(nil, {}).first
|
45
|
+
end
|
46
|
+
|
47
|
+
memory_leak_test("last") do
|
48
|
+
Ethon::Easy::Form.new(nil, {}).last
|
49
|
+
end
|
50
|
+
|
51
|
+
memory_leak_test("materialized with some params") do
|
52
|
+
form = Ethon::Easy::Form.new(nil, { "a" => "1" })
|
53
|
+
form.materialize
|
54
|
+
end
|
55
|
+
|
56
|
+
memory_leak_test("materialized with a file") do
|
57
|
+
File.open(__FILE__, "r") do |file|
|
58
|
+
form = Ethon::Easy::Form.new(nil, { "a" => file })
|
59
|
+
form.materialize
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
describe "higher level operations" do
|
66
|
+
memory_leak_test("a simple request") do
|
67
|
+
Ethon::Easy.new(:url => "http://localhost:3001/",
|
68
|
+
:forbid_reuse => true).perform
|
69
|
+
end
|
70
|
+
|
71
|
+
memory_leak_test("a request with headers") do
|
72
|
+
Ethon::Easy.new(:url => "http://localhost:3001/",
|
73
|
+
:headers => { "Content-Type" => "application/json",
|
74
|
+
"Something" => "1",
|
75
|
+
"Else" => "qwerty",
|
76
|
+
"Long-String" => "aassddffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz"},
|
77
|
+
:forbid_reuse => true).perform
|
78
|
+
end
|
79
|
+
|
80
|
+
memory_leak_test("a request with headers and params") do
|
81
|
+
easy = Ethon::Easy.new(:url => "http://localhost:3001/",
|
82
|
+
:headers => { "Content-Type" => "application/json",
|
83
|
+
"Something" => "1",
|
84
|
+
"Else" => "qwerty",
|
85
|
+
"Long-String" => "aassddffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz"},
|
86
|
+
:forbid_reuse => true)
|
87
|
+
easy.http_request("http://localhost:3001/",
|
88
|
+
:get,
|
89
|
+
:params => { "param1" => "value1",
|
90
|
+
"param2" => "value2",
|
91
|
+
"param3" => "value3",
|
92
|
+
"param4" => "value4"})
|
93
|
+
end
|
94
|
+
|
95
|
+
memory_leak_test("a request with headers, params, and body") do
|
96
|
+
easy = Ethon::Easy.new(:url => "http://localhost:3001/",
|
97
|
+
:headers => { "Content-Type" => "application/json",
|
98
|
+
"Something" => "1",
|
99
|
+
"Else" => "qwerty",
|
100
|
+
"Long-String" => "aassddffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz"},
|
101
|
+
:forbid_reuse => true)
|
102
|
+
easy.http_request("http://localhost:3001/",
|
103
|
+
:get,
|
104
|
+
:params => { "param1" => "value1",
|
105
|
+
"param2" => "value2",
|
106
|
+
"param3" => "value3",
|
107
|
+
"param4" => "value4"},
|
108
|
+
:body => {
|
109
|
+
"body1" => "value1",
|
110
|
+
"body2" => "value2",
|
111
|
+
"body3" => "value3"
|
112
|
+
})
|
113
|
+
end
|
114
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
#### SETUP
|
3
|
+
require 'bundler'
|
4
|
+
Bundler.setup
|
5
|
+
require 'rspec'
|
6
|
+
|
7
|
+
require 'support/localhost_server'
|
8
|
+
require 'support/server'
|
9
|
+
require_relative 'support/memory_test_helpers'
|
10
|
+
|
11
|
+
require 'logger'
|
12
|
+
|
13
|
+
if ENV['VERBOSE']
|
14
|
+
Ethon.logger = Logger.new($stdout)
|
15
|
+
Ethon.logger.level = Logger::DEBUG
|
16
|
+
end
|
17
|
+
|
18
|
+
RSpec.configure do |config|
|
19
|
+
config.before(:suite) do
|
20
|
+
LocalhostServer.new(TESTSERVER.new, 3001)
|
21
|
+
end
|
22
|
+
config.include(MemoryTestHelpers)
|
23
|
+
config.extend(MemoryTestHelpers::TestMethods)
|
24
|
+
end
|
25
|
+
|
26
|
+
MemoryTestHelpers.setup
|
27
|
+
MemoryTestHelpers.logger = Logger.new($stdout)
|
28
|
+
MemoryTestHelpers.logger.level = Logger::INFO
|
29
|
+
MemoryTestHelpers.logger.formatter = proc do |severity, datetime, progname, msg|
|
30
|
+
"\t\t#{msg}\n"
|
31
|
+
end
|
32
|
+
|
33
|
+
if ENV['VERBOSE']
|
34
|
+
MemoryTestHelpers.logger.level = Logger::DEBUG
|
35
|
+
end
|
36
|
+
|
37
|
+
MemoryTestHelpers.iterations = ENV.fetch("ITERATIONS", 10_000).to_i
|
@@ -0,0 +1,76 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require_relative 'ruby_object_leak_tracker'
|
3
|
+
require_relative 'os_memory_leak_tracker'
|
4
|
+
|
5
|
+
module MemoryTestHelpers
|
6
|
+
class << self
|
7
|
+
attr_accessor :gc_proc, :iterations, :logger
|
8
|
+
|
9
|
+
def setup
|
10
|
+
if RUBY_PLATFORM == "java"
|
11
|
+
# for leak detection
|
12
|
+
JRuby.objectspace = true if defined?(JRuby)
|
13
|
+
# for gc
|
14
|
+
require 'java'
|
15
|
+
java_import 'java.lang.System'
|
16
|
+
self.gc_proc = proc { System.gc }
|
17
|
+
else
|
18
|
+
self.gc_proc = proc { GC.start }
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
module TestMethods
|
24
|
+
def memory_leak_test(description, &block)
|
25
|
+
context(description) do
|
26
|
+
it "doesn't leak ruby objects" do
|
27
|
+
object_leak_tracker = RubyObjectLeakTracker.new
|
28
|
+
track_memory_usage(object_leak_tracker, &block)
|
29
|
+
object_leak_tracker.total_difference_between_runs.should be <= 10
|
30
|
+
end
|
31
|
+
|
32
|
+
it "doesn't leak OS memory (C interop check)" do
|
33
|
+
os_memory_leak_tracker = OSMemoryLeakTracker.new
|
34
|
+
track_memory_usage(os_memory_leak_tracker, &block)
|
35
|
+
os_memory_leak_tracker.total_difference_between_runs.should be <= 10
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
def track_memory_usage(tracker)
|
42
|
+
# Intentionally do all this setup before we do any testing
|
43
|
+
logger = MemoryTestHelpers.logger
|
44
|
+
iterations = MemoryTestHelpers.iterations
|
45
|
+
|
46
|
+
checkpoint_frequency = (iterations / 10.0).to_i
|
47
|
+
gc_frequency = 20
|
48
|
+
|
49
|
+
warmup_iterations = [(iterations / 3.0).to_i, 500].min
|
50
|
+
logger.info "Performing #{warmup_iterations} warmup iterations"
|
51
|
+
warmup_iterations.times do
|
52
|
+
yield
|
53
|
+
MemoryTestHelpers.gc_proc.call
|
54
|
+
end
|
55
|
+
tracker.capture_initial_memory_usage
|
56
|
+
|
57
|
+
logger.info "Performing #{iterations} iterations (checkpoint every #{checkpoint_frequency})"
|
58
|
+
|
59
|
+
iterations.times do |i|
|
60
|
+
yield
|
61
|
+
|
62
|
+
last_iteration = (i == iterations - 1)
|
63
|
+
checkpoint = last_iteration || (i % checkpoint_frequency == 0)
|
64
|
+
|
65
|
+
if checkpoint || (i % gc_frequency == 0)
|
66
|
+
MemoryTestHelpers.gc_proc.call
|
67
|
+
end
|
68
|
+
|
69
|
+
if checkpoint
|
70
|
+
logger.info "Iteration #{i} checkpoint"
|
71
|
+
tracker.capture_memory_usage
|
72
|
+
tracker.dump_status(logger)
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
class OSMemoryLeakTracker
|
3
|
+
attr_reader :current_run
|
4
|
+
|
5
|
+
def initialize
|
6
|
+
@previous_run = @current_run = 0
|
7
|
+
end
|
8
|
+
|
9
|
+
def difference_between_runs(basis=@previous_run)
|
10
|
+
@current_run - basis
|
11
|
+
end
|
12
|
+
|
13
|
+
def total_difference_between_runs
|
14
|
+
difference_between_runs(@initial_count_run)
|
15
|
+
end
|
16
|
+
|
17
|
+
def capture_initial_memory_usage
|
18
|
+
capture_memory_usage
|
19
|
+
@initial_count_run = @current_run
|
20
|
+
end
|
21
|
+
|
22
|
+
def capture_memory_usage
|
23
|
+
@previous_run = @current_run
|
24
|
+
@current_run = rss_bytes
|
25
|
+
end
|
26
|
+
|
27
|
+
def dump_status(logger)
|
28
|
+
delta = difference_between_runs
|
29
|
+
logger.add(log_level(delta), sprintf("\tTotal memory usage (kb): %d (%+d)", current_run, delta))
|
30
|
+
end
|
31
|
+
|
32
|
+
private
|
33
|
+
# amount of memory the current process "is using", in RAM
|
34
|
+
# (doesn't include any swap memory that it may be using, just that in actual RAM)
|
35
|
+
# Code loosely based on https://github.com/rdp/os/blob/master/lib/os.rb
|
36
|
+
# returns 0 on windows
|
37
|
+
def rss_bytes
|
38
|
+
if ENV['OS'] == 'Windows_NT'
|
39
|
+
0
|
40
|
+
else
|
41
|
+
`ps -o rss= -p #{Process.pid}`.to_i # in kilobytes
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
def log_level(delta)
|
46
|
+
delta > 0 ? Logger::WARN : Logger::DEBUG
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
class RubyObjectLeakTracker
|
3
|
+
attr_reader :previous_count_hash, :current_count_hash
|
4
|
+
|
5
|
+
def initialize
|
6
|
+
@previous_count_hash = @current_count_hash = {}
|
7
|
+
end
|
8
|
+
|
9
|
+
def difference_between_runs(basis=@previous_count_hash)
|
10
|
+
@difference_between_runs ||= Hash[@current_count_hash.map do |object_class, count|
|
11
|
+
[object_class, count - (basis[object_class] || 0)]
|
12
|
+
end]
|
13
|
+
end
|
14
|
+
|
15
|
+
def total_difference_between_runs
|
16
|
+
difference_between_runs(@initial_count_hash).values.inject(0) { |sum, count| sum + count }
|
17
|
+
end
|
18
|
+
|
19
|
+
def capture_initial_memory_usage
|
20
|
+
capture_memory_usage
|
21
|
+
@initial_count_hash = @current_count_hash
|
22
|
+
end
|
23
|
+
|
24
|
+
def capture_memory_usage
|
25
|
+
@difference_between_runs = nil
|
26
|
+
@previous_count_hash = @current_count_hash
|
27
|
+
|
28
|
+
class_to_count = Hash.new { |hash, key| hash[key] = 0 }
|
29
|
+
ObjectSpace.each_object { |obj| class_to_count[obj.class] += 1 }
|
30
|
+
|
31
|
+
sorted_class_to_count = class_to_count.sort_by { |k, v| -v }
|
32
|
+
@current_count_hash = Hash[sorted_class_to_count]
|
33
|
+
end
|
34
|
+
|
35
|
+
def dump_status(logger)
|
36
|
+
diff = difference_between_runs
|
37
|
+
most_used_objects = current_count_hash.to_a.sort_by(&:last).reverse[0, 20]
|
38
|
+
|
39
|
+
most_used_objects.each do |object_class, count|
|
40
|
+
delta = diff[object_class]
|
41
|
+
logger.add(log_level(delta), sprintf("\t%s: %d (%+d)", object_class, count, delta))
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
private
|
46
|
+
def log_level(delta)
|
47
|
+
delta > 0 ? Logger::WARN : Logger::DEBUG
|
48
|
+
end
|
49
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require 'spec_helper'
|
3
|
+
|
4
|
+
describe Ethon::Curl do
|
5
|
+
describe ".init" do
|
6
|
+
before { Ethon::Curl.send(:class_variable_set, :@@initialized, false) }
|
7
|
+
|
8
|
+
context "when global_init fails" do
|
9
|
+
it "raises global init error" do
|
10
|
+
expect(Ethon::Curl).to receive(:global_init).and_return(1)
|
11
|
+
expect{ Ethon::Curl.init }.to raise_error(Ethon::Errors::GlobalInit)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
context "when global_init works" do
|
16
|
+
before { expect(Ethon::Curl).to receive(:global_init).and_return(0) }
|
17
|
+
|
18
|
+
it "doesn't raises global init error" do
|
19
|
+
expect{ Ethon::Curl.init }.to_not raise_error
|
20
|
+
end
|
21
|
+
|
22
|
+
it "logs" do
|
23
|
+
expect(Ethon.logger).to receive(:debug)
|
24
|
+
Ethon::Curl.init
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
context "when global_cleanup is called" do
|
29
|
+
before { expect(Ethon::Curl).to receive(:global_cleanup) }
|
30
|
+
|
31
|
+
it "logs" do
|
32
|
+
expect(Ethon.logger).to receive(:debug).twice
|
33
|
+
Ethon::Curl.init
|
34
|
+
Ethon::Curl.cleanup
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,59 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require 'spec_helper'
|
3
|
+
|
4
|
+
describe Ethon::Easy::Callbacks do
|
5
|
+
let!(:easy) { Ethon::Easy.new }
|
6
|
+
|
7
|
+
describe "#set_callbacks" do
|
8
|
+
before do
|
9
|
+
expect(Ethon::Curl).to receive(:set_option).exactly(3).times
|
10
|
+
end
|
11
|
+
|
12
|
+
it "sets write-, debug-, and headerfunction" do
|
13
|
+
easy.set_callbacks
|
14
|
+
end
|
15
|
+
|
16
|
+
it "resets @response_body" do
|
17
|
+
easy.set_callbacks
|
18
|
+
expect(easy.instance_variable_get(:@response_body)).to eq("")
|
19
|
+
end
|
20
|
+
|
21
|
+
it "resets @response_headers" do
|
22
|
+
easy.set_callbacks
|
23
|
+
expect(easy.instance_variable_get(:@response_headers)).to eq("")
|
24
|
+
end
|
25
|
+
|
26
|
+
it "resets @debug_info" do
|
27
|
+
easy.set_callbacks
|
28
|
+
expect(easy.instance_variable_get(:@debug_info).to_a).to eq([])
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
describe "#progress_callback" do
|
33
|
+
it "returns 0" do
|
34
|
+
expect(easy.progress_callback.call(0,1,1,1,1)).to be(0)
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
describe "#body_write_callback" do
|
39
|
+
let(:body_write_callback) { easy.instance_variable_get(:@body_write_callback) }
|
40
|
+
let(:stream) { double(:read_string => "") }
|
41
|
+
context "when body returns not :abort" do
|
42
|
+
it "returns number bigger than 0" do
|
43
|
+
expect(body_write_callback.call(stream, 1, 1, nil) > 0).to be(true)
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
context "when body returns :abort" do
|
48
|
+
before do
|
49
|
+
easy.on_body.clear
|
50
|
+
easy.on_body { :abort }
|
51
|
+
end
|
52
|
+
let(:body_write_callback) { easy.instance_variable_get(:@body_write_callback) }
|
53
|
+
|
54
|
+
it "returns -1 to indicate abort to libcurl" do
|
55
|
+
expect(body_write_callback.call(stream, 1, 1, nil)).to eq(-1)
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require 'spec_helper'
|
3
|
+
|
4
|
+
describe Ethon::Easy::DebugInfo do
|
5
|
+
let(:easy) { Ethon::Easy.new }
|
6
|
+
|
7
|
+
before do
|
8
|
+
easy.url = "http://localhost:3001/"
|
9
|
+
easy.perform
|
10
|
+
end
|
11
|
+
|
12
|
+
describe "#debug_info" do
|
13
|
+
context "when verbose is not set to true" do
|
14
|
+
it "does not save any debug info after a request" do
|
15
|
+
expect(easy.debug_info.to_a.length).to eq(0)
|
16
|
+
expect(easy.debug_info.to_h.values.flatten.length).to eq(0)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
context "when verbose is set to true" do
|
21
|
+
before do
|
22
|
+
easy.verbose = true
|
23
|
+
easy.perform
|
24
|
+
end
|
25
|
+
|
26
|
+
after do
|
27
|
+
easy.verbose = false
|
28
|
+
easy.reset
|
29
|
+
end
|
30
|
+
|
31
|
+
it "saves debug info after a request" do
|
32
|
+
expect(easy.debug_info.to_a.length).to be > 0
|
33
|
+
end
|
34
|
+
|
35
|
+
it "saves request headers" do
|
36
|
+
expect(easy.debug_info.header_out.join).to include('GET / HTTP/1.1')
|
37
|
+
end
|
38
|
+
|
39
|
+
it "saves response headers" do
|
40
|
+
expect(easy.debug_info.header_in.length).to be > 0
|
41
|
+
expect(easy.response_headers).to include(easy.debug_info.header_in.join)
|
42
|
+
end
|
43
|
+
|
44
|
+
it "saves incoming data" do
|
45
|
+
expect(easy.debug_info.data_in.length).to be > 0
|
46
|
+
expect(easy.response_body).to include(easy.debug_info.data_in.join)
|
47
|
+
end
|
48
|
+
|
49
|
+
it "saves debug text" do
|
50
|
+
expect(easy.debug_info.text.length).to be > 0
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require 'spec_helper'
|
3
|
+
|
4
|
+
describe Ethon::Easy::Informations do
|
5
|
+
|
6
|
+
describe "#supports_asynch_dns?" do
|
7
|
+
it "returns boolean" do
|
8
|
+
expect([true, false].include? Ethon::Easy.supports_asynch_dns?).to be_truthy
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
describe "#supports_zlib?" do
|
13
|
+
it "returns boolean" do
|
14
|
+
expect([true, false].include? Ethon::Easy.supports_zlib?).to be_truthy
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
describe "#supports_timeout_ms?" do
|
19
|
+
it "returns boolean" do
|
20
|
+
expect([true, false].include? Ethon::Easy.supports_timeout_ms?).to be_truthy
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|