cybrid_api_id_ruby 0.127.21 → 0.127.23
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 +10 -7
- data/README.md +5 -5
- data/cybrid_api_id_ruby.gemspec +1 -1
- data/lib/cybrid_api_id_ruby/api/bank_applications_idp_api.rb +1 -1
- data/lib/cybrid_api_id_ruby/api/customer_tokens_idp_api.rb +1 -1
- data/lib/cybrid_api_id_ruby/api/organization_applications_idp_api.rb +1 -1
- data/lib/cybrid_api_id_ruby/api/users_idp_api.rb +1 -1
- data/lib/cybrid_api_id_ruby/api_client.rb +1 -1
- data/lib/cybrid_api_id_ruby/api_error.rb +1 -1
- data/lib/cybrid_api_id_ruby/configuration.rb +1 -1
- data/lib/cybrid_api_id_ruby/models/application_idp_model.rb +1 -1
- data/lib/cybrid_api_id_ruby/models/application_list_idp_model.rb +1 -1
- data/lib/cybrid_api_id_ruby/models/application_with_secret_all_of_idp_model.rb +1 -1
- data/lib/cybrid_api_id_ruby/models/application_with_secret_idp_model.rb +1 -1
- data/lib/cybrid_api_id_ruby/models/customer_token_idp_model.rb +1 -1
- data/lib/cybrid_api_id_ruby/models/error_response_idp_model.rb +1 -1
- data/lib/cybrid_api_id_ruby/models/patch_user_idp_model.rb +1 -1
- data/lib/cybrid_api_id_ruby/models/post_bank_application_idp_model.rb +1 -1
- data/lib/cybrid_api_id_ruby/models/post_customer_token_idp_model.rb +1 -1
- data/lib/cybrid_api_id_ruby/models/post_organization_application_idp_model.rb +1 -1
- data/lib/cybrid_api_id_ruby/models/post_user_idp_model.rb +1 -1
- data/lib/cybrid_api_id_ruby/models/user_idp_model.rb +1 -1
- data/lib/cybrid_api_id_ruby/models/user_list_idp_model.rb +1 -1
- data/lib/cybrid_api_id_ruby/version.rb +2 -2
- data/lib/cybrid_api_id_ruby.rb +1 -1
- data/spec/api/bank_applications_idp_api_spec.rb +1 -1
- data/spec/api/customer_tokens_idp_api_spec.rb +1 -1
- data/spec/api/organization_applications_idp_api_spec.rb +1 -1
- data/spec/api/users_idp_api_spec.rb +1 -1
- data/spec/api_client_spec.rb +1 -1
- data/spec/configuration_spec.rb +1 -1
- data/spec/models/application_idp_model_spec.rb +1 -1
- data/spec/models/application_list_idp_model_spec.rb +1 -1
- data/spec/models/application_with_secret_all_of_idp_model_spec.rb +1 -1
- data/spec/models/application_with_secret_idp_model_spec.rb +1 -1
- data/spec/models/customer_token_idp_model_spec.rb +1 -1
- data/spec/models/error_response_idp_model_spec.rb +1 -1
- data/spec/models/patch_user_idp_model_spec.rb +1 -1
- data/spec/models/post_bank_application_idp_model_spec.rb +1 -1
- data/spec/models/post_customer_token_idp_model_spec.rb +1 -1
- data/spec/models/post_organization_application_idp_model_spec.rb +1 -1
- data/spec/models/post_user_idp_model_spec.rb +1 -1
- data/spec/models/user_idp_model_spec.rb +1 -1
- data/spec/models/user_list_idp_model_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- data/vendor/bundle/ruby/3.3.0/cache/ethon-0.18.0.gem +0 -0
- data/vendor/bundle/ruby/3.3.0/cache/logger-1.7.0.gem +0 -0
- data/vendor/bundle/ruby/3.3.0/cache/typhoeus-1.6.0.gem +0 -0
- data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/byebug-13.0.0/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/date-3.5.1/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/io-console-0.8.2/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.3.1/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.2.0/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.15.0 → ethon-0.18.0}/CHANGELOG.md +46 -1
- data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.15.0 → ethon-0.18.0}/README.md +23 -0
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.18.0/ethon.gemspec +37 -0
- data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.15.0 → ethon-0.18.0}/lib/ethon/curls/classes.rb +12 -2
- data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.15.0 → ethon-0.18.0}/lib/ethon/curls/codes.rb +3 -2
- data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.15.0 → ethon-0.18.0}/lib/ethon/curls/options.rb +4 -3
- data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.15.0 → ethon-0.18.0}/lib/ethon/easy/callbacks.rb +10 -3
- data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.15.0 → ethon-0.18.0}/lib/ethon/easy/informations.rb +3 -0
- data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.15.0 → ethon-0.18.0}/lib/ethon/easy/response_callbacks.rb +6 -1
- data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.15.0 → ethon-0.18.0}/lib/ethon/loggable.rb +0 -1
- data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.15.0 → ethon-0.18.0}/lib/ethon/version.rb +1 -1
- data/vendor/bundle/ruby/3.3.0/gems/logger-1.7.0/.document +4 -0
- data/vendor/bundle/ruby/3.3.0/gems/logger-1.7.0/.rdoc_options +3 -0
- data/vendor/bundle/ruby/3.3.0/gems/logger-1.7.0/BSDL +22 -0
- data/vendor/bundle/ruby/3.3.0/gems/logger-1.7.0/COPYING +56 -0
- data/vendor/bundle/ruby/3.3.0/gems/logger-1.7.0/README.md +104 -0
- data/vendor/bundle/ruby/3.3.0/gems/logger-1.7.0/lib/logger/errors.rb +9 -0
- data/vendor/bundle/ruby/3.3.0/gems/logger-1.7.0/lib/logger/formatter.rb +36 -0
- data/vendor/bundle/ruby/3.3.0/gems/logger-1.7.0/lib/logger/log_device.rb +265 -0
- data/vendor/bundle/ruby/3.3.0/gems/logger-1.7.0/lib/logger/period.rb +47 -0
- data/vendor/bundle/ruby/3.3.0/gems/logger-1.7.0/lib/logger/severity.rb +38 -0
- data/vendor/bundle/ruby/3.3.0/gems/logger-1.7.0/lib/logger/version.rb +5 -0
- data/vendor/bundle/ruby/3.3.0/gems/logger-1.7.0/lib/logger.rb +789 -0
- data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.5.0 → typhoeus-1.6.0}/CHANGELOG.md +14 -1
- data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.5.0 → typhoeus-1.6.0}/README.md +2 -2
- data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.5.0 → typhoeus-1.6.0}/lib/typhoeus/version.rb +1 -1
- data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.5.0 → typhoeus-1.6.0}/typhoeus.gemspec +1 -1
- data/vendor/bundle/ruby/3.3.0/specifications/ethon-0.18.0.gemspec +27 -0
- data/vendor/bundle/ruby/3.3.0/specifications/logger-1.7.0.gemspec +22 -0
- data/vendor/bundle/ruby/3.3.0/specifications/{typhoeus-1.5.0.gemspec → typhoeus-1.6.0.gemspec} +5 -5
- metadata +126 -156
- 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/gems/ethon-0.15.0/.github/workflows/ruby.yml +0 -41
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/.gitignore +0 -8
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/.rspec +0 -3
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/Gemfile +0 -43
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/Guardfile +0 -10
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/Rakefile +0 -40
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/ethon.gemspec +0 -26
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/profile/benchmarks.rb +0 -104
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/profile/memory_leaks.rb +0 -114
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/profile/perf_spec_helper.rb +0 -37
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/profile/support/memory_test_helpers.rb +0 -76
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/profile/support/os_memory_leak_tracker.rb +0 -48
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/profile/support/ruby_object_leak_tracker.rb +0 -49
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/curl_spec.rb +0 -38
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/easy/callbacks_spec.rb +0 -59
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/easy/debug_info_spec.rb +0 -54
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/easy/features_spec.rb +0 -24
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/easy/form_spec.rb +0 -104
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/easy/header_spec.rb +0 -79
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/easy/http/custom_spec.rb +0 -177
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/easy/http/delete_spec.rb +0 -21
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/easy/http/get_spec.rb +0 -126
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/easy/http/head_spec.rb +0 -80
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/easy/http/options_spec.rb +0 -51
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/easy/http/patch_spec.rb +0 -51
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/easy/http/post_spec.rb +0 -317
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/easy/http/put_spec.rb +0 -168
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/easy/http_spec.rb +0 -64
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/easy/informations_spec.rb +0 -120
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/easy/mirror_spec.rb +0 -47
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/easy/operations_spec.rb +0 -268
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/easy/options_spec.rb +0 -193
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/easy/queryable_spec.rb +0 -235
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/easy/response_callbacks_spec.rb +0 -152
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/easy/util_spec.rb +0 -28
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/easy_spec.rb +0 -203
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/libc_spec.rb +0 -14
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/loggable_spec.rb +0 -22
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/multi/operations_spec.rb +0 -298
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/multi/options_spec.rb +0 -182
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/multi/stack_spec.rb +0 -80
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/ethon/multi_spec.rb +0 -152
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/spec_helper.rb +0 -28
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/support/localhost_server.rb +0 -95
- data/vendor/bundle/ruby/3.3.0/gems/ethon-0.15.0/spec/support/server.rb +0 -115
- data/vendor/bundle/ruby/3.3.0/specifications/ethon-0.15.0.gemspec +0 -24
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.15.0 → ethon-0.18.0}/LICENSE +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.15.0 → ethon-0.18.0}/lib/ethon/curl.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.15.0 → ethon-0.18.0}/lib/ethon/curls/constants.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.15.0 → ethon-0.18.0}/lib/ethon/curls/form_options.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.15.0 → ethon-0.18.0}/lib/ethon/curls/functions.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.15.0 → ethon-0.18.0}/lib/ethon/curls/infos.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.15.0 → ethon-0.18.0}/lib/ethon/curls/messages.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.15.0 → ethon-0.18.0}/lib/ethon/curls/settings.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.15.0 → ethon-0.18.0}/lib/ethon/easy/debug_info.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.15.0 → ethon-0.18.0}/lib/ethon/easy/features.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.15.0 → ethon-0.18.0}/lib/ethon/easy/form.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.15.0 → ethon-0.18.0}/lib/ethon/easy/header.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.15.0 → ethon-0.18.0}/lib/ethon/easy/http/actionable.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.15.0 → ethon-0.18.0}/lib/ethon/easy/http/custom.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.15.0 → ethon-0.18.0}/lib/ethon/easy/http/delete.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.15.0 → ethon-0.18.0}/lib/ethon/easy/http/get.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.15.0 → ethon-0.18.0}/lib/ethon/easy/http/head.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.15.0 → ethon-0.18.0}/lib/ethon/easy/http/options.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.15.0 → ethon-0.18.0}/lib/ethon/easy/http/patch.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.15.0 → ethon-0.18.0}/lib/ethon/easy/http/post.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.15.0 → ethon-0.18.0}/lib/ethon/easy/http/postable.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.15.0 → ethon-0.18.0}/lib/ethon/easy/http/put.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.15.0 → ethon-0.18.0}/lib/ethon/easy/http/putable.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.15.0 → ethon-0.18.0}/lib/ethon/easy/http.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.15.0 → ethon-0.18.0}/lib/ethon/easy/mirror.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.15.0 → ethon-0.18.0}/lib/ethon/easy/operations.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.15.0 → ethon-0.18.0}/lib/ethon/easy/options.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.15.0 → ethon-0.18.0}/lib/ethon/easy/params.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.15.0 → ethon-0.18.0}/lib/ethon/easy/queryable.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.15.0 → ethon-0.18.0}/lib/ethon/easy/util.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.15.0 → ethon-0.18.0}/lib/ethon/easy.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.15.0 → ethon-0.18.0}/lib/ethon/errors/ethon_error.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.15.0 → ethon-0.18.0}/lib/ethon/errors/global_init.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.15.0 → ethon-0.18.0}/lib/ethon/errors/invalid_option.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.15.0 → ethon-0.18.0}/lib/ethon/errors/invalid_value.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.15.0 → ethon-0.18.0}/lib/ethon/errors/multi_add.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.15.0 → ethon-0.18.0}/lib/ethon/errors/multi_fdset.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.15.0 → ethon-0.18.0}/lib/ethon/errors/multi_remove.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.15.0 → ethon-0.18.0}/lib/ethon/errors/multi_timeout.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.15.0 → ethon-0.18.0}/lib/ethon/errors/select.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.15.0 → ethon-0.18.0}/lib/ethon/errors.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.15.0 → ethon-0.18.0}/lib/ethon/libc.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.15.0 → ethon-0.18.0}/lib/ethon/multi/operations.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.15.0 → ethon-0.18.0}/lib/ethon/multi/options.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.15.0 → ethon-0.18.0}/lib/ethon/multi/stack.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.15.0 → ethon-0.18.0}/lib/ethon/multi.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{ethon-0.15.0 → ethon-0.18.0}/lib/ethon.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.5.0 → typhoeus-1.6.0}/CONTRIBUTING.md +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.5.0 → typhoeus-1.6.0}/LICENSE +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.5.0 → typhoeus-1.6.0}/UPGRADE.md +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.5.0 → typhoeus-1.6.0}/lib/rack/typhoeus/middleware/params_decoder/helper.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.5.0 → typhoeus-1.6.0}/lib/rack/typhoeus/middleware/params_decoder.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.5.0 → typhoeus-1.6.0}/lib/rack/typhoeus.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.5.0 → typhoeus-1.6.0}/lib/typhoeus/adapters/faraday.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.5.0 → typhoeus-1.6.0}/lib/typhoeus/cache/dalli.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.5.0 → typhoeus-1.6.0}/lib/typhoeus/cache/rails.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.5.0 → typhoeus-1.6.0}/lib/typhoeus/cache/redis.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.5.0 → typhoeus-1.6.0}/lib/typhoeus/config.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.5.0 → typhoeus-1.6.0}/lib/typhoeus/easy_factory.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.5.0 → typhoeus-1.6.0}/lib/typhoeus/errors/no_stub.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.5.0 → typhoeus-1.6.0}/lib/typhoeus/errors/typhoeus_error.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.5.0 → typhoeus-1.6.0}/lib/typhoeus/errors.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.5.0 → typhoeus-1.6.0}/lib/typhoeus/expectation.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.5.0 → typhoeus-1.6.0}/lib/typhoeus/hydra/addable.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.5.0 → typhoeus-1.6.0}/lib/typhoeus/hydra/before.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.5.0 → typhoeus-1.6.0}/lib/typhoeus/hydra/block_connection.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.5.0 → typhoeus-1.6.0}/lib/typhoeus/hydra/cacheable.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.5.0 → typhoeus-1.6.0}/lib/typhoeus/hydra/memoizable.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.5.0 → typhoeus-1.6.0}/lib/typhoeus/hydra/queueable.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.5.0 → typhoeus-1.6.0}/lib/typhoeus/hydra/runnable.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.5.0 → typhoeus-1.6.0}/lib/typhoeus/hydra/stubbable.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.5.0 → typhoeus-1.6.0}/lib/typhoeus/hydra.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.5.0 → typhoeus-1.6.0}/lib/typhoeus/pool.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.5.0 → typhoeus-1.6.0}/lib/typhoeus/railtie.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.5.0 → typhoeus-1.6.0}/lib/typhoeus/request/actions.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.5.0 → typhoeus-1.6.0}/lib/typhoeus/request/before.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.5.0 → typhoeus-1.6.0}/lib/typhoeus/request/block_connection.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.5.0 → typhoeus-1.6.0}/lib/typhoeus/request/cacheable.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.5.0 → typhoeus-1.6.0}/lib/typhoeus/request/callbacks.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.5.0 → typhoeus-1.6.0}/lib/typhoeus/request/marshal.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.5.0 → typhoeus-1.6.0}/lib/typhoeus/request/memoizable.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.5.0 → typhoeus-1.6.0}/lib/typhoeus/request/operations.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.5.0 → typhoeus-1.6.0}/lib/typhoeus/request/responseable.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.5.0 → typhoeus-1.6.0}/lib/typhoeus/request/streamable.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.5.0 → typhoeus-1.6.0}/lib/typhoeus/request/stubbable.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.5.0 → typhoeus-1.6.0}/lib/typhoeus/request.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.5.0 → typhoeus-1.6.0}/lib/typhoeus/response/cacheable.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.5.0 → typhoeus-1.6.0}/lib/typhoeus/response/header.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.5.0 → typhoeus-1.6.0}/lib/typhoeus/response/informations.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.5.0 → typhoeus-1.6.0}/lib/typhoeus/response/status.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.5.0 → typhoeus-1.6.0}/lib/typhoeus/response.rb +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{typhoeus-1.5.0 → typhoeus-1.6.0}/lib/typhoeus.rb +0 -0
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
# vim:set filetype=ruby:
|
|
3
|
-
guard(
|
|
4
|
-
"rspec",
|
|
5
|
-
:all_after_pass => false,
|
|
6
|
-
:cli => "--fail-fast --tty --format documentation --colour") do
|
|
7
|
-
|
|
8
|
-
watch(%r{^spec/.+_spec\.rb$})
|
|
9
|
-
watch(%r{^lib/(.+)\.rb$}) { |match| "spec/#{match[1]}_spec.rb" }
|
|
10
|
-
end
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
require "bundler"
|
|
3
|
-
Bundler.setup
|
|
4
|
-
|
|
5
|
-
require "rake"
|
|
6
|
-
require "rspec/core/rake_task"
|
|
7
|
-
$LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
|
|
8
|
-
require "ethon/version"
|
|
9
|
-
|
|
10
|
-
task :gem => :build
|
|
11
|
-
task :build do
|
|
12
|
-
system "gem build ethon.gemspec"
|
|
13
|
-
end
|
|
14
|
-
|
|
15
|
-
task :install => :build do
|
|
16
|
-
system "gem install ethon-#{Ethon::VERSION}.gem"
|
|
17
|
-
end
|
|
18
|
-
|
|
19
|
-
task :release => :build do
|
|
20
|
-
system "git tag -a v#{Ethon::VERSION} -m 'Tagging #{Ethon::VERSION}'"
|
|
21
|
-
system "git push --tags"
|
|
22
|
-
system "gem push ethon-#{Ethon::VERSION}.gem"
|
|
23
|
-
end
|
|
24
|
-
|
|
25
|
-
RSpec::Core::RakeTask.new(:spec) do |t|
|
|
26
|
-
t.verbose = false
|
|
27
|
-
t.ruby_opts = "-W -I./spec -rspec_helper"
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
desc "Start up the test servers"
|
|
31
|
-
task :start do
|
|
32
|
-
require_relative 'spec/support/boot'
|
|
33
|
-
begin
|
|
34
|
-
Boot.start_servers(:rake)
|
|
35
|
-
rescue Exception
|
|
36
|
-
end
|
|
37
|
-
end
|
|
38
|
-
|
|
39
|
-
task :default => :spec
|
|
40
|
-
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
# encoding: utf-8
|
|
2
|
-
# frozen_string_literal: true
|
|
3
|
-
lib = File.expand_path('../lib/', __FILE__)
|
|
4
|
-
$:.unshift lib unless $:.include?(lib)
|
|
5
|
-
|
|
6
|
-
require 'ethon/version'
|
|
7
|
-
|
|
8
|
-
Gem::Specification.new do |s|
|
|
9
|
-
s.name = "ethon"
|
|
10
|
-
s.version = Ethon::VERSION
|
|
11
|
-
s.platform = Gem::Platform::RUBY
|
|
12
|
-
s.authors = ["Hans Hasselberg"]
|
|
13
|
-
s.email = ["me@hans.io"]
|
|
14
|
-
s.homepage = "https://github.com/typhoeus/ethon"
|
|
15
|
-
s.summary = "Libcurl wrapper."
|
|
16
|
-
s.description = "Very lightweight libcurl wrapper."
|
|
17
|
-
|
|
18
|
-
s.required_rubygems_version = ">= 1.3.6"
|
|
19
|
-
s.license = 'MIT'
|
|
20
|
-
|
|
21
|
-
s.add_dependency('ffi', ['>= 1.15.0'])
|
|
22
|
-
|
|
23
|
-
s.files = `git ls-files`.split("\n")
|
|
24
|
-
s.test_files = `git ls-files -- spec/*`.split("\n")
|
|
25
|
-
s.require_path = 'lib'
|
|
26
|
-
end
|
|
@@ -1,104 +0,0 @@
|
|
|
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
|
|
@@ -1,114 +0,0 @@
|
|
|
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
|
|
@@ -1,37 +0,0 @@
|
|
|
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
|
|
@@ -1,76 +0,0 @@
|
|
|
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
|
|
@@ -1,48 +0,0 @@
|
|
|
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
|
|
@@ -1,49 +0,0 @@
|
|
|
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
|
|
@@ -1,38 +0,0 @@
|
|
|
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
|
|
@@ -1,59 +0,0 @@
|
|
|
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
|
|
@@ -1,54 +0,0 @@
|
|
|
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
|
|
@@ -1,24 +0,0 @@
|
|
|
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
|