ory-kratos-client 0.7.6.alpha7 → 0.8.0.alpha2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +3 -3
- data/README.md +57 -40
- data/docs/AdminCreateIdentityBody.md +2 -0
- data/docs/AuthenticatorAssuranceLevel.md +15 -0
- data/docs/ErrorAuthenticatorAssuranceLevelNotSatisfied.md +34 -0
- data/docs/GenericError.md +2 -0
- data/docs/IdentityCredentials.md +1 -1
- data/docs/IdentityCredentialsType.md +15 -0
- data/docs/IdentitySchema.md +20 -0
- data/docs/MetadataApi.md +0 -61
- data/docs/NeedsPrivilegedSessionError.md +34 -0
- data/docs/SelfServiceBrowserLocationChangeRequiredError.md +34 -0
- data/docs/SelfServiceFlowExpiredError.md +36 -0
- data/docs/SelfServiceLoginFlow.md +7 -3
- data/docs/SelfServiceLogoutUrl.md +3 -1
- data/docs/SelfServiceRecoveryFlow.md +2 -0
- data/docs/SelfServiceRegistrationFlow.md +3 -1
- data/docs/SelfServiceSettingsFlow.md +2 -0
- data/docs/SelfServiceVerificationFlow.md +2 -0
- data/docs/Session.md +7 -3
- data/docs/SessionAuthenticationMethod.md +20 -0
- data/docs/SessionDevice.md +18 -0
- data/docs/SubmitSelfServiceLoginFlowBody.md +5 -2
- data/docs/SubmitSelfServiceLoginFlowWithLookupSecretMethodBody.md +22 -0
- data/docs/SubmitSelfServiceLoginFlowWithOidcMethodBody.md +3 -1
- data/docs/SubmitSelfServiceLoginFlowWithTotpMethodBody.md +22 -0
- data/docs/SubmitSelfServiceLoginFlowWithWebAuthnMethodBody.md +22 -0
- data/docs/SubmitSelfServiceRegistrationFlowWithOidcMethodBody.md +3 -1
- data/docs/SubmitSelfServiceSettingsFlowBody.md +5 -2
- data/docs/SubmitSelfServiceSettingsFlowWithLookupMethodBody.md +28 -0
- data/docs/SubmitSelfServiceSettingsFlowWithOidcMethodBody.md +2 -0
- data/docs/SubmitSelfServiceSettingsFlowWithTotpMethodBody.md +24 -0
- data/docs/SubmitSelfServiceSettingsFlowWithWebAuthnMethodBody.md +26 -0
- data/docs/UiNode.md +1 -1
- data/docs/UiNodeAnchorAttributes.md +4 -0
- data/docs/UiNodeAttributes.md +34 -0
- data/docs/UiNodeImageAttributes.md +9 -1
- data/docs/UiNodeInputAttributes.md +4 -0
- data/docs/{Meta.md → UiNodeMeta.md} +2 -2
- data/docs/UiNodeScriptAttributes.md +32 -0
- data/docs/UiNodeTextAttributes.md +4 -0
- data/docs/{V0alpha1Api.md → V0alpha2Api.md} +405 -172
- data/lib/ory-kratos-client/api/metadata_api.rb +1 -56
- data/lib/ory-kratos-client/api/{v0alpha1_api.rb → v0alpha2_api.rb} +372 -149
- data/lib/ory-kratos-client/api_client.rb +1 -1
- data/lib/ory-kratos-client/api_error.rb +1 -1
- data/lib/ory-kratos-client/configuration.rb +1 -1
- data/lib/ory-kratos-client/models/admin_create_identity_body.rb +11 -2
- data/lib/ory-kratos-client/models/admin_create_self_service_recovery_link_body.rb +1 -1
- data/lib/ory-kratos-client/models/admin_update_identity_body.rb +1 -1
- data/lib/ory-kratos-client/models/authenticator_assurance_level.rb +39 -0
- data/lib/ory-kratos-client/models/error_authenticator_assurance_level_not_satisfied.rb +305 -0
- data/lib/ory-kratos-client/models/generic_error.rb +12 -2
- data/lib/ory-kratos-client/models/health_not_ready_status.rb +1 -1
- data/lib/ory-kratos-client/models/health_status.rb +1 -1
- data/lib/ory-kratos-client/models/identity.rb +1 -1
- data/lib/ory-kratos-client/models/identity_credentials.rb +2 -3
- data/lib/ory-kratos-client/models/identity_credentials_type.rb +38 -0
- data/lib/ory-kratos-client/models/{successful_self_service_settings_without_browser.rb → identity_schema.rb} +19 -28
- data/lib/ory-kratos-client/models/identity_state.rb +1 -1
- data/lib/ory-kratos-client/models/inline_response200.rb +1 -1
- data/lib/ory-kratos-client/models/inline_response2001.rb +1 -1
- data/lib/ory-kratos-client/models/inline_response503.rb +1 -1
- data/lib/ory-kratos-client/models/json_error.rb +1 -1
- data/lib/ory-kratos-client/models/needs_privileged_session_error.rb +311 -0
- data/lib/ory-kratos-client/models/recovery_address.rb +1 -1
- data/lib/ory-kratos-client/models/self_service_browser_location_change_required_error.rb +306 -0
- data/lib/ory-kratos-client/models/self_service_error.rb +1 -1
- data/lib/ory-kratos-client/models/self_service_flow_expired_error.rb +316 -0
- data/lib/ory-kratos-client/models/self_service_login_flow.rb +32 -14
- data/lib/ory-kratos-client/models/self_service_logout_url.rb +18 -3
- data/lib/ory-kratos-client/models/self_service_recovery_flow.rb +12 -2
- data/lib/ory-kratos-client/models/self_service_recovery_flow_state.rb +1 -1
- data/lib/ory-kratos-client/models/self_service_recovery_link.rb +1 -1
- data/lib/ory-kratos-client/models/self_service_registration_flow.rb +13 -4
- data/lib/ory-kratos-client/models/self_service_settings_flow.rb +12 -2
- data/lib/ory-kratos-client/models/self_service_settings_flow_state.rb +1 -1
- data/lib/ory-kratos-client/models/self_service_verification_flow.rb +12 -2
- data/lib/ory-kratos-client/models/self_service_verification_flow_state.rb +1 -1
- data/lib/ory-kratos-client/models/session.rb +26 -5
- data/lib/ory-kratos-client/models/session_authentication_method.rb +263 -0
- data/lib/ory-kratos-client/models/session_device.rb +219 -0
- data/lib/ory-kratos-client/models/settings_profile_form_config.rb +1 -1
- data/lib/ory-kratos-client/models/submit_self_service_login_flow_body.rb +5 -3
- data/lib/ory-kratos-client/models/submit_self_service_login_flow_with_lookup_secret_method_body.rb +249 -0
- data/lib/ory-kratos-client/models/submit_self_service_login_flow_with_oidc_method_body.rb +16 -6
- data/lib/ory-kratos-client/models/submit_self_service_login_flow_with_password_method_body.rb +1 -1
- data/lib/ory-kratos-client/models/submit_self_service_login_flow_with_totp_method_body.rb +249 -0
- data/lib/ory-kratos-client/models/submit_self_service_login_flow_with_web_authn_method_body.rb +244 -0
- data/lib/ory-kratos-client/models/submit_self_service_logout_flow_without_browser_body.rb +1 -1
- data/lib/ory-kratos-client/models/submit_self_service_recovery_flow_body.rb +1 -1
- data/lib/ory-kratos-client/models/submit_self_service_recovery_flow_with_link_method_body.rb +1 -1
- data/lib/ory-kratos-client/models/submit_self_service_registration_flow_body.rb +1 -1
- data/lib/ory-kratos-client/models/submit_self_service_registration_flow_with_oidc_method_body.rb +16 -6
- data/lib/ory-kratos-client/models/submit_self_service_registration_flow_with_password_method_body.rb +1 -1
- data/lib/ory-kratos-client/models/submit_self_service_settings_flow_body.rb +5 -3
- data/lib/ory-kratos-client/models/submit_self_service_settings_flow_with_lookup_method_body.rb +274 -0
- data/lib/ory-kratos-client/models/submit_self_service_settings_flow_with_oidc_method_body.rb +12 -2
- data/lib/ory-kratos-client/models/submit_self_service_settings_flow_with_password_method_body.rb +1 -1
- data/lib/ory-kratos-client/models/submit_self_service_settings_flow_with_profile_method_body.rb +1 -1
- data/lib/ory-kratos-client/models/submit_self_service_settings_flow_with_totp_method_body.rb +254 -0
- data/lib/ory-kratos-client/models/submit_self_service_settings_flow_with_web_authn_method_body.rb +264 -0
- data/lib/ory-kratos-client/models/submit_self_service_verification_flow_body.rb +1 -1
- data/lib/ory-kratos-client/models/submit_self_service_verification_flow_with_link_method_body.rb +1 -1
- data/lib/ory-kratos-client/models/successful_self_service_login_without_browser.rb +1 -1
- data/lib/ory-kratos-client/models/successful_self_service_registration_without_browser.rb +1 -1
- data/lib/ory-kratos-client/models/ui_container.rb +1 -1
- data/lib/ory-kratos-client/models/ui_node.rb +2 -2
- data/lib/ory-kratos-client/models/ui_node_anchor_attributes.rb +31 -2
- data/lib/ory-kratos-client/models/ui_node_attributes.rb +23 -69
- data/lib/ory-kratos-client/models/ui_node_image_attributes.rb +54 -5
- data/lib/ory-kratos-client/models/ui_node_input_attributes.rb +26 -2
- data/lib/ory-kratos-client/models/{meta.rb → ui_node_meta.rb} +4 -4
- data/lib/ory-kratos-client/models/ui_node_script_attributes.rb +328 -0
- data/lib/ory-kratos-client/models/ui_node_text_attributes.rb +31 -2
- data/lib/ory-kratos-client/models/ui_text.rb +1 -1
- data/lib/ory-kratos-client/models/verifiable_identity_address.rb +1 -1
- data/lib/ory-kratos-client/models/version.rb +1 -1
- data/lib/ory-kratos-client/version.rb +2 -2
- data/lib/ory-kratos-client.rb +19 -4
- data/ory-kratos-client.gemspec +1 -1
- data/spec/api/metadata_api_spec.rb +1 -12
- data/spec/api/{v0alpha1_api_spec.rb → v0alpha2_api_spec.rb} +67 -22
- data/spec/api_client_spec.rb +1 -1
- data/spec/configuration_spec.rb +1 -1
- data/spec/models/admin_create_identity_body_spec.rb +7 -1
- data/spec/models/admin_create_self_service_recovery_link_body_spec.rb +1 -1
- data/spec/models/admin_update_identity_body_spec.rb +1 -1
- data/spec/models/authenticator_assurance_level_spec.rb +28 -0
- data/spec/models/error_authenticator_assurance_level_not_satisfied_spec.rb +82 -0
- data/spec/models/generic_error_spec.rb +7 -1
- data/spec/models/health_not_ready_status_spec.rb +1 -1
- data/spec/models/health_status_spec.rb +1 -1
- data/spec/models/identity_credentials_spec.rb +1 -1
- data/spec/models/identity_credentials_type_spec.rb +28 -0
- data/spec/models/{successful_self_service_settings_without_browser_spec.rb → identity_schema_spec.rb} +9 -9
- data/spec/models/identity_spec.rb +1 -1
- data/spec/models/identity_state_spec.rb +1 -1
- data/spec/models/inline_response2001_spec.rb +1 -1
- data/spec/models/inline_response200_spec.rb +1 -1
- data/spec/models/inline_response503_spec.rb +1 -1
- data/spec/models/json_error_spec.rb +1 -1
- data/spec/models/needs_privileged_session_error_spec.rb +82 -0
- data/spec/models/recovery_address_spec.rb +1 -1
- data/spec/models/self_service_browser_location_change_required_error_spec.rb +82 -0
- data/spec/models/self_service_error_spec.rb +1 -1
- data/spec/models/self_service_flow_expired_error_spec.rb +88 -0
- data/spec/models/self_service_login_flow_spec.rb +16 -4
- data/spec/models/self_service_logout_url_spec.rb +7 -1
- data/spec/models/self_service_recovery_flow_spec.rb +7 -1
- data/spec/models/self_service_recovery_flow_state_spec.rb +1 -1
- data/spec/models/self_service_recovery_link_spec.rb +1 -1
- data/spec/models/self_service_registration_flow_spec.rb +7 -1
- data/spec/models/self_service_settings_flow_spec.rb +7 -1
- data/spec/models/self_service_settings_flow_state_spec.rb +1 -1
- data/spec/models/self_service_verification_flow_spec.rb +7 -1
- data/spec/models/self_service_verification_flow_state_spec.rb +1 -1
- data/spec/models/session_authentication_method_spec.rb +44 -0
- data/spec/models/session_device_spec.rb +34 -0
- data/spec/models/session_spec.rb +13 -1
- data/spec/models/settings_profile_form_config_spec.rb +1 -1
- data/spec/models/submit_self_service_login_flow_body_spec.rb +1 -1
- data/spec/models/submit_self_service_login_flow_with_lookup_secret_method_body_spec.rb +46 -0
- data/spec/models/submit_self_service_login_flow_with_oidc_method_body_spec.rb +7 -1
- data/spec/models/submit_self_service_login_flow_with_password_method_body_spec.rb +1 -1
- data/spec/models/submit_self_service_login_flow_with_totp_method_body_spec.rb +46 -0
- data/spec/models/submit_self_service_login_flow_with_web_authn_method_body_spec.rb +46 -0
- data/spec/models/submit_self_service_logout_flow_without_browser_body_spec.rb +1 -1
- data/spec/models/submit_self_service_recovery_flow_body_spec.rb +1 -1
- data/spec/models/submit_self_service_recovery_flow_with_link_method_body_spec.rb +1 -1
- data/spec/models/submit_self_service_registration_flow_body_spec.rb +1 -1
- data/spec/models/submit_self_service_registration_flow_with_oidc_method_body_spec.rb +7 -1
- data/spec/models/submit_self_service_registration_flow_with_password_method_body_spec.rb +1 -1
- data/spec/models/submit_self_service_settings_flow_body_spec.rb +1 -1
- data/spec/models/submit_self_service_settings_flow_with_lookup_method_body_spec.rb +64 -0
- data/spec/models/submit_self_service_settings_flow_with_oidc_method_body_spec.rb +7 -1
- data/spec/models/submit_self_service_settings_flow_with_password_method_body_spec.rb +1 -1
- data/spec/models/submit_self_service_settings_flow_with_profile_method_body_spec.rb +1 -1
- data/spec/models/submit_self_service_settings_flow_with_totp_method_body_spec.rb +52 -0
- data/spec/models/submit_self_service_settings_flow_with_web_authn_method_body_spec.rb +58 -0
- data/spec/models/submit_self_service_verification_flow_body_spec.rb +1 -1
- data/spec/models/submit_self_service_verification_flow_with_link_method_body_spec.rb +1 -1
- data/spec/models/successful_self_service_login_without_browser_spec.rb +1 -1
- data/spec/models/successful_self_service_registration_without_browser_spec.rb +1 -1
- data/spec/models/ui_container_spec.rb +1 -1
- data/spec/models/ui_node_anchor_attributes_spec.rb +13 -1
- data/spec/models/ui_node_attributes_spec.rb +13 -1
- data/spec/models/ui_node_image_attributes_spec.rb +25 -1
- data/spec/models/ui_node_input_attributes_spec.rb +13 -1
- data/spec/models/{meta_spec.rb → ui_node_meta_spec.rb} +7 -7
- data/spec/models/ui_node_script_attributes_spec.rb +76 -0
- data/spec/models/ui_node_spec.rb +1 -1
- data/spec/models/ui_node_text_attributes_spec.rb +13 -1
- data/spec/models/ui_text_spec.rb +1 -1
- data/spec/models/verifiable_identity_address_spec.rb +1 -1
- data/spec/models/version_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- data/vendor/bundle/ruby/2.5.0/cache/ethon-0.15.0.gem +0 -0
- data/vendor/bundle/ruby/2.5.0/cache/psych-4.0.2.gem +0 -0
- data/vendor/bundle/ruby/2.5.0/extensions/x86_64-linux/2.5.0/byebug-11.1.3/gem_make.out +2 -2
- data/vendor/bundle/ruby/2.5.0/extensions/x86_64-linux/2.5.0/ffi-1.15.4/gem_make.out +2 -2
- data/vendor/bundle/ruby/2.5.0/extensions/x86_64-linux/2.5.0/jaro_winkler-1.5.4/gem_make.out +2 -2
- data/vendor/bundle/ruby/2.5.0/extensions/x86_64-linux/2.5.0/{psych-4.0.1 → psych-4.0.2}/gem.build_complete +0 -0
- data/vendor/bundle/ruby/2.5.0/extensions/x86_64-linux/2.5.0/{psych-4.0.1 → psych-4.0.2}/gem_make.out +6 -6
- data/vendor/bundle/ruby/2.5.0/extensions/x86_64-linux/2.5.0/{psych-4.0.1 → psych-4.0.2}/mkmf.log +0 -0
- data/vendor/bundle/ruby/2.5.0/extensions/x86_64-linux/2.5.0/{psych-4.0.1 → psych-4.0.2}/psych.so +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/byebug-11.1.3/ext/byebug/Makefile +2 -2
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/.github/workflows/ruby.yml +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/.gitignore +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/.rspec +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/CHANGELOG.md +5 -1
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/Gemfile +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/Guardfile +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/LICENSE +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/README.md +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/Rakefile +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/ethon.gemspec +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/lib/ethon/curl.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/lib/ethon/curls/classes.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/lib/ethon/curls/codes.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/lib/ethon/curls/constants.rb +17 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/lib/ethon/curls/form_options.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/lib/ethon/curls/functions.rb +1 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/lib/ethon/curls/infos.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/lib/ethon/curls/messages.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/lib/ethon/curls/options.rb +33 -2
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/lib/ethon/curls/settings.rb +2 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/lib/ethon/easy/callbacks.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/lib/ethon/easy/debug_info.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/lib/ethon/easy/features.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/lib/ethon/easy/form.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/lib/ethon/easy/header.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/lib/ethon/easy/http/actionable.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/lib/ethon/easy/http/custom.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/lib/ethon/easy/http/delete.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/lib/ethon/easy/http/get.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/lib/ethon/easy/http/head.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/lib/ethon/easy/http/options.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/lib/ethon/easy/http/patch.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/lib/ethon/easy/http/post.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/lib/ethon/easy/http/postable.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/lib/ethon/easy/http/put.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/lib/ethon/easy/http/putable.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/lib/ethon/easy/http.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/lib/ethon/easy/informations.rb +19 -1
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/lib/ethon/easy/mirror.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/lib/ethon/easy/operations.rb +1 -15
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/lib/ethon/easy/options.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/lib/ethon/easy/params.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/lib/ethon/easy/queryable.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/lib/ethon/easy/response_callbacks.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/lib/ethon/easy/util.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/lib/ethon/easy.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/lib/ethon/errors/ethon_error.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/lib/ethon/errors/global_init.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/lib/ethon/errors/invalid_option.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/lib/ethon/errors/invalid_value.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/lib/ethon/errors/multi_add.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/lib/ethon/errors/multi_fdset.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/lib/ethon/errors/multi_remove.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/lib/ethon/errors/multi_timeout.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/lib/ethon/errors/select.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/lib/ethon/errors.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/lib/ethon/libc.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/lib/ethon/loggable.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/lib/ethon/multi/operations.rb +45 -8
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/lib/ethon/multi/options.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/lib/ethon/multi/stack.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/lib/ethon/multi.rb +22 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/lib/ethon/version.rb +1 -1
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/lib/ethon.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/profile/benchmarks.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/profile/memory_leaks.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/profile/perf_spec_helper.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/profile/support/memory_test_helpers.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/profile/support/os_memory_leak_tracker.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/profile/support/ruby_object_leak_tracker.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/spec/ethon/curl_spec.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/spec/ethon/easy/callbacks_spec.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/spec/ethon/easy/debug_info_spec.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/spec/ethon/easy/features_spec.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/spec/ethon/easy/form_spec.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/spec/ethon/easy/header_spec.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/spec/ethon/easy/http/custom_spec.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/spec/ethon/easy/http/delete_spec.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/spec/ethon/easy/http/get_spec.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/spec/ethon/easy/http/head_spec.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/spec/ethon/easy/http/options_spec.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/spec/ethon/easy/http/patch_spec.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/spec/ethon/easy/http/post_spec.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/spec/ethon/easy/http/put_spec.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/spec/ethon/easy/http_spec.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/spec/ethon/easy/informations_spec.rb +22 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/spec/ethon/easy/mirror_spec.rb +1 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/spec/ethon/easy/operations_spec.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/spec/ethon/easy/options_spec.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/spec/ethon/easy/queryable_spec.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/spec/ethon/easy/response_callbacks_spec.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/spec/ethon/easy/util_spec.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/spec/ethon/easy_spec.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/spec/ethon/libc_spec.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/spec/ethon/loggable_spec.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/spec/ethon/multi/operations_spec.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/ethon-0.15.0/spec/ethon/multi/options_spec.rb +182 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/spec/ethon/multi/stack_spec.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/ethon-0.15.0/spec/ethon/multi_spec.rb +152 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/spec/spec_helper.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/spec/support/localhost_server.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/spec/support/server.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/ffi-1.15.4/ext/ffi_c/Makefile +2 -2
- data/vendor/bundle/ruby/2.5.0/gems/jaro_winkler-1.5.4/ext/jaro_winkler/Makefile +2 -2
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/.gitignore +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/Gemfile +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/LICENSE +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/Mavenfile +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/README.md +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/Rakefile +1 -1
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/bin/console +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/bin/setup +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/ext/psych/.sitearchdir.time +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/ext/psych/Makefile +2 -2
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/ext/psych/api.o +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/ext/psych/depend +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/ext/psych/dumper.o +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/ext/psych/emitter.o +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/ext/psych/extconf.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/ext/psych/loader.o +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/ext/psych/parser.o +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/ext/psych/psych.c +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/ext/psych/psych.h +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/ext/psych/psych.o +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1/lib → psych-4.0.2/ext/psych}/psych.so +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/ext/psych/psych_emitter.c +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/ext/psych/psych_emitter.h +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/ext/psych/psych_emitter.o +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/ext/psych/psych_parser.c +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/ext/psych/psych_parser.h +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/ext/psych/psych_parser.o +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/ext/psych/psych_to_ruby.c +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/ext/psych/psych_to_ruby.h +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/ext/psych/psych_to_ruby.o +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/ext/psych/psych_yaml_tree.c +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/ext/psych/psych_yaml_tree.h +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/ext/psych/psych_yaml_tree.o +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/ext/psych/reader.o +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/ext/psych/scanner.o +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/ext/psych/writer.o +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/ext/psych/yaml/LICENSE +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/ext/psych/yaml/api.c +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/ext/psych/yaml/config.h +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/ext/psych/yaml/dumper.c +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/ext/psych/yaml/emitter.c +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/ext/psych/yaml/loader.c +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/ext/psych/yaml/parser.c +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/ext/psych/yaml/reader.c +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/ext/psych/yaml/scanner.c +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/ext/psych/yaml/writer.c +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/ext/psych/yaml/yaml.h +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/ext/psych/yaml/yaml_private.h +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/lib/psych/class_loader.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/lib/psych/coder.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/lib/psych/core_ext.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/lib/psych/exception.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/lib/psych/handler.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/lib/psych/handlers/document_stream.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/lib/psych/handlers/recorder.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/lib/psych/json/ruby_events.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/lib/psych/json/stream.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/lib/psych/json/tree_builder.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/lib/psych/json/yaml_events.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/lib/psych/nodes/alias.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/lib/psych/nodes/document.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/lib/psych/nodes/mapping.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/lib/psych/nodes/node.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/lib/psych/nodes/scalar.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/lib/psych/nodes/sequence.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/lib/psych/nodes/stream.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/lib/psych/nodes.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/lib/psych/omap.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/lib/psych/parser.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/lib/psych/scalar_scanner.rb +8 -9
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/lib/psych/set.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/lib/psych/stream.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/lib/psych/streaming.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/lib/psych/syntax_error.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/lib/psych/tree_builder.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/lib/psych/versions.rb +1 -1
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/lib/psych/visitors/depth_first.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/lib/psych/visitors/emitter.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/lib/psych/visitors/json_tree.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/lib/psych/visitors/to_ruby.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/lib/psych/visitors/visitor.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/lib/psych/visitors/yaml_tree.rb +2 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/lib/psych/visitors.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/lib/psych/y.rb +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/lib/psych.rb +1 -1
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1/ext/psych → psych-4.0.2/lib}/psych.so +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/{psych-4.0.1 → psych-4.0.2}/psych.gemspec +0 -0
- data/vendor/bundle/ruby/2.5.0/specifications/{ethon-0.14.0.gemspec → ethon-0.15.0.gemspec} +3 -3
- data/vendor/bundle/ruby/2.5.0/specifications/{psych-4.0.1.gemspec → psych-4.0.2.gemspec} +3 -3
- metadata +271 -211
- data/docs/SuccessfulSelfServiceSettingsWithoutBrowser.md +0 -20
- data/vendor/bundle/ruby/2.5.0/cache/ethon-0.14.0.gem +0 -0
- data/vendor/bundle/ruby/2.5.0/cache/psych-4.0.1.gem +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/ethon-0.14.0/spec/ethon/multi/options_spec.rb +0 -69
- data/vendor/bundle/ruby/2.5.0/gems/ethon-0.14.0/spec/ethon/multi_spec.rb +0 -22
data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/lib/ethon/easy/operations.rb
RENAMED
@@ -4,20 +4,6 @@ module Ethon
|
|
4
4
|
# This module contains the logic to prepare and perform
|
5
5
|
# an easy.
|
6
6
|
module Operations
|
7
|
-
|
8
|
-
class PointerHelper
|
9
|
-
class<<self
|
10
|
-
def synchronize( &block )
|
11
|
-
(@mutex ||= Mutex.new).synchronize( &block )
|
12
|
-
end
|
13
|
-
|
14
|
-
def release( pointer )
|
15
|
-
synchronize { Curl.easy_cleanup pointer }
|
16
|
-
end
|
17
|
-
end
|
18
|
-
synchronize{}
|
19
|
-
end
|
20
|
-
|
21
7
|
# Returns a pointer to the curl easy handle.
|
22
8
|
#
|
23
9
|
# @example Return the handle.
|
@@ -25,7 +11,7 @@ module Ethon
|
|
25
11
|
#
|
26
12
|
# @return [ FFI::Pointer ] A pointer to the curl easy handle.
|
27
13
|
def handle
|
28
|
-
@handle ||= FFI::AutoPointer.new(Curl.easy_init,
|
14
|
+
@handle ||= FFI::AutoPointer.new(Curl.easy_init, Curl.method(:easy_cleanup))
|
29
15
|
end
|
30
16
|
|
31
17
|
# Sets a pointer to the curl easy handle.
|
File without changes
|
File without changes
|
data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/lib/ethon/easy/queryable.rb
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/lib/ethon/errors/ethon_error.rb
RENAMED
File without changes
|
data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/lib/ethon/errors/global_init.rb
RENAMED
File without changes
|
data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/lib/ethon/errors/invalid_option.rb
RENAMED
File without changes
|
data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/lib/ethon/errors/invalid_value.rb
RENAMED
File without changes
|
data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/lib/ethon/errors/multi_add.rb
RENAMED
File without changes
|
data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/lib/ethon/errors/multi_fdset.rb
RENAMED
File without changes
|
data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/lib/ethon/errors/multi_remove.rb
RENAMED
File without changes
|
data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/lib/ethon/errors/multi_timeout.rb
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/lib/ethon/multi/operations.rb
RENAMED
@@ -24,12 +24,16 @@ module Ethon
|
|
24
24
|
#
|
25
25
|
# @return [ void ]
|
26
26
|
def init_vars
|
27
|
-
@
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
27
|
+
if @execution_mode == :perform
|
28
|
+
@timeout = ::FFI::MemoryPointer.new(:long)
|
29
|
+
@timeval = Curl::Timeval.new
|
30
|
+
@fd_read = Curl::FDSet.new
|
31
|
+
@fd_write = Curl::FDSet.new
|
32
|
+
@fd_excep = Curl::FDSet.new
|
33
|
+
@max_fd = ::FFI::MemoryPointer.new(:int)
|
34
|
+
elsif @execution_mode == :socket_action
|
35
|
+
@running_count_pointer = FFI::MemoryPointer.new(:int)
|
36
|
+
end
|
33
37
|
end
|
34
38
|
|
35
39
|
# Perform multi.
|
@@ -39,6 +43,8 @@ module Ethon
|
|
39
43
|
# @example Perform multi.
|
40
44
|
# multi.perform
|
41
45
|
def perform
|
46
|
+
ensure_execution_mode(:perform)
|
47
|
+
|
42
48
|
Ethon.logger.debug(STARTED_MULTI)
|
43
49
|
while ongoing?
|
44
50
|
run
|
@@ -67,9 +73,38 @@ module Ethon
|
|
67
73
|
)
|
68
74
|
end
|
69
75
|
|
70
|
-
|
76
|
+
# Continue execution with an external IO loop.
|
77
|
+
#
|
78
|
+
# @example When no sockets are ready yet, or to begin.
|
79
|
+
# multi.socket_action
|
80
|
+
#
|
81
|
+
# @example When a socket is readable
|
82
|
+
# multi.socket_action(io_object, [:in])
|
83
|
+
#
|
84
|
+
# @example When a socket is readable and writable
|
85
|
+
# multi.socket_action(io_object, [:in, :out])
|
86
|
+
#
|
87
|
+
# @return [ Symbol ] The Curl.multi_socket_action return code.
|
88
|
+
def socket_action(io = nil, readiness = 0)
|
89
|
+
ensure_execution_mode(:socket_action)
|
90
|
+
|
91
|
+
fd = if io.nil?
|
92
|
+
::Ethon::Curl::SOCKET_TIMEOUT
|
93
|
+
elsif io.is_a?(Integer)
|
94
|
+
io
|
95
|
+
else
|
96
|
+
io.fileno
|
97
|
+
end
|
98
|
+
|
99
|
+
code = Curl.multi_socket_action(handle, fd, readiness, @running_count_pointer)
|
100
|
+
@running_count = @running_count_pointer.read_int
|
71
101
|
|
72
|
-
|
102
|
+
check
|
103
|
+
|
104
|
+
code
|
105
|
+
end
|
106
|
+
|
107
|
+
# Return whether the multi still contains requests or not.
|
73
108
|
#
|
74
109
|
# @example Return if ongoing.
|
75
110
|
# multi.ongoing?
|
@@ -79,6 +114,8 @@ module Ethon
|
|
79
114
|
easy_handles.size > 0 || (!defined?(@running_count) || running_count > 0)
|
80
115
|
end
|
81
116
|
|
117
|
+
private
|
118
|
+
|
82
119
|
# Get timeout.
|
83
120
|
#
|
84
121
|
# @example Get timeout.
|
File without changes
|
File without changes
|
@@ -74,10 +74,21 @@ module Ethon
|
|
74
74
|
# is 1 will not be treated as unlimited. Instead it will open only 1
|
75
75
|
# connection and try to pipeline on it.
|
76
76
|
# (Added in 7.30.0)
|
77
|
+
# @option options :execution_mode [Boolean]
|
78
|
+
# Either :perform (default) or :socket_action, specifies the usage
|
79
|
+
# method that will be used on this multi object. The default :perform
|
80
|
+
# mode provides a #perform function that uses curl_multi_perform
|
81
|
+
# behind the scenes to automatically continue execution until all
|
82
|
+
# requests have completed. The :socket_action mode provides an API
|
83
|
+
# that allows the {Multi} object to be integrated into an external
|
84
|
+
# IO loop, by calling #socket_action and responding to the
|
85
|
+
# socketfunction and timerfunction callbacks, using the underlying
|
86
|
+
# curl_multi_socket_action semantics.
|
77
87
|
#
|
78
88
|
# @return [ Multi ] The new multi.
|
79
89
|
def initialize(options = {})
|
80
90
|
Curl.init
|
91
|
+
@execution_mode = options.delete(:execution_mode) || :perform
|
81
92
|
set_attributes(options)
|
82
93
|
init_vars
|
83
94
|
end
|
@@ -100,5 +111,16 @@ module Ethon
|
|
100
111
|
method("#{key}=").call(value)
|
101
112
|
end
|
102
113
|
end
|
114
|
+
|
115
|
+
private
|
116
|
+
|
117
|
+
# Internal function to gate functions to a specific execution mode
|
118
|
+
#
|
119
|
+
# @raise ArgumentError
|
120
|
+
#
|
121
|
+
# @api private
|
122
|
+
def ensure_execution_mode(expected_mode)
|
123
|
+
raise ArgumentError, "Expected the Multi to be in #{expected_mode} but it was in #{@execution_mode}" if expected_mode != @execution_mode
|
124
|
+
end
|
103
125
|
end
|
104
126
|
end
|
File without changes
|
File without changes
|
File without changes
|
data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/profile/perf_spec_helper.rb
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/spec/ethon/easy/callbacks_spec.rb
RENAMED
File without changes
|
data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/spec/ethon/easy/debug_info_spec.rb
RENAMED
File without changes
|
data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/spec/ethon/easy/features_spec.rb
RENAMED
File without changes
|
data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/spec/ethon/easy/form_spec.rb
RENAMED
File without changes
|
data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/spec/ethon/easy/header_spec.rb
RENAMED
File without changes
|
data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/spec/ethon/easy/http/custom_spec.rb
RENAMED
File without changes
|
data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/spec/ethon/easy/http/delete_spec.rb
RENAMED
File without changes
|
data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/spec/ethon/easy/http/get_spec.rb
RENAMED
File without changes
|
data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/spec/ethon/easy/http/head_spec.rb
RENAMED
File without changes
|
File without changes
|
data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/spec/ethon/easy/http/patch_spec.rb
RENAMED
File without changes
|
data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/spec/ethon/easy/http/post_spec.rb
RENAMED
File without changes
|
data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/spec/ethon/easy/http/put_spec.rb
RENAMED
File without changes
|
data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/spec/ethon/easy/http_spec.rb
RENAMED
File without changes
|
@@ -94,5 +94,27 @@ describe Ethon::Easy::Informations do
|
|
94
94
|
end
|
95
95
|
end
|
96
96
|
|
97
|
+
describe "#size_upload" do
|
98
|
+
it "returns float" do
|
99
|
+
expect(easy.size_upload).to be_a(Float)
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
103
|
+
describe "#size_download" do
|
104
|
+
it "returns float" do
|
105
|
+
expect(easy.size_download).to be_a(Float)
|
106
|
+
end
|
107
|
+
end
|
97
108
|
|
109
|
+
describe "#speed_upload" do
|
110
|
+
it "returns float" do
|
111
|
+
expect(easy.speed_upload).to be_a(Float)
|
112
|
+
end
|
113
|
+
end
|
114
|
+
|
115
|
+
describe "#speed_download" do
|
116
|
+
it "returns float" do
|
117
|
+
expect(easy.speed_download).to be_a(Float)
|
118
|
+
end
|
119
|
+
end
|
98
120
|
end
|
data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/spec/ethon/easy/mirror_spec.rb
RENAMED
@@ -10,6 +10,7 @@ describe Ethon::Easy::Mirror do
|
|
10
10
|
:return_code, :response_code, :response_body, :response_headers,
|
11
11
|
:total_time, :starttransfer_time, :appconnect_time,
|
12
12
|
:pretransfer_time, :connect_time, :namelookup_time, :redirect_time,
|
13
|
+
:size_upload, :size_download, :speed_upload, :speed_upload,
|
13
14
|
:effective_url, :primary_ip, :redirect_count, :debug_info
|
14
15
|
].each do |name|
|
15
16
|
it "contains #{name}" do
|
data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/spec/ethon/easy/operations_spec.rb
RENAMED
File without changes
|
data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/spec/ethon/easy/options_spec.rb
RENAMED
File without changes
|
data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/spec/ethon/easy/queryable_spec.rb
RENAMED
File without changes
|
File without changes
|
data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/spec/ethon/easy/util_spec.rb
RENAMED
File without changes
|
File without changes
|
File without changes
|
data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/spec/ethon/loggable_spec.rb
RENAMED
File without changes
|
data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/spec/ethon/multi/operations_spec.rb
RENAMED
File without changes
|
@@ -0,0 +1,182 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require 'spec_helper'
|
3
|
+
|
4
|
+
describe Ethon::Multi::Options do
|
5
|
+
let(:multi) { Ethon::Multi.new }
|
6
|
+
|
7
|
+
[
|
8
|
+
:maxconnects, :pipelining, :socketdata, :socketfunction,
|
9
|
+
:timerdata, :timerfunction, :max_total_connections
|
10
|
+
].each do |name|
|
11
|
+
describe "#{name}=" do
|
12
|
+
it "responds_to" do
|
13
|
+
expect(multi).to respond_to("#{name}=")
|
14
|
+
end
|
15
|
+
|
16
|
+
it "sets option" do
|
17
|
+
expect(Ethon::Curl).to receive(:set_option).with(name, anything, anything, anything)
|
18
|
+
multi.method("#{name}=").call(1)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
context "socket_action mode" do
|
24
|
+
let(:multi) { Ethon::Multi.new(execution_mode: :socket_action) }
|
25
|
+
|
26
|
+
describe "#socketfunction callbacks" do
|
27
|
+
it "allows multi_code return values" do
|
28
|
+
calls = []
|
29
|
+
multi.socketfunction = proc do |handle, sock, what, userp, socketp|
|
30
|
+
calls << what
|
31
|
+
:ok
|
32
|
+
end
|
33
|
+
|
34
|
+
easy = Ethon::Easy.new
|
35
|
+
easy.url = "http://localhost:3001/?delay=1"
|
36
|
+
multi.add(easy)
|
37
|
+
expect(calls).to eq([])
|
38
|
+
5.times do
|
39
|
+
multi.socket_action
|
40
|
+
break unless calls.empty?
|
41
|
+
sleep 0.1
|
42
|
+
end
|
43
|
+
expect(calls.last).to eq(:in).or(eq(:out))
|
44
|
+
multi.delete(easy)
|
45
|
+
expect(calls.last).to eq(:remove)
|
46
|
+
end
|
47
|
+
|
48
|
+
it "allows integer return values (compatibility)" do
|
49
|
+
called = false
|
50
|
+
multi.socketfunction = proc do |handle, sock, what, userp, socketp|
|
51
|
+
called = true
|
52
|
+
0
|
53
|
+
end
|
54
|
+
|
55
|
+
easy = Ethon::Easy.new
|
56
|
+
easy.url = "http://localhost:3001/?delay=1"
|
57
|
+
multi.add(easy)
|
58
|
+
5.times do
|
59
|
+
multi.socket_action
|
60
|
+
break if called
|
61
|
+
sleep 0.1
|
62
|
+
end
|
63
|
+
multi.delete(easy)
|
64
|
+
|
65
|
+
expect(called).to be_truthy
|
66
|
+
end
|
67
|
+
|
68
|
+
it "errors on invalid return codes" do
|
69
|
+
called = false
|
70
|
+
multi.socketfunction = proc do |handle, sock, what, userp, socketp|
|
71
|
+
called = true
|
72
|
+
"hi"
|
73
|
+
end
|
74
|
+
|
75
|
+
easy = Ethon::Easy.new
|
76
|
+
easy.url = "http://localhost:3001/?delay=1"
|
77
|
+
multi.add(easy)
|
78
|
+
expect {
|
79
|
+
5.times do
|
80
|
+
multi.socket_action
|
81
|
+
break if called
|
82
|
+
sleep 0.1
|
83
|
+
end
|
84
|
+
}.to raise_error(ArgumentError)
|
85
|
+
expect { multi.delete(easy) }.to raise_error(ArgumentError)
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
describe "#timerfunction callbacks" do
|
90
|
+
it "allows multi_code return values" do
|
91
|
+
calls = []
|
92
|
+
multi.timerfunction = proc do |handle, timeout_ms, userp|
|
93
|
+
calls << timeout_ms
|
94
|
+
:ok
|
95
|
+
end
|
96
|
+
|
97
|
+
easy = Ethon::Easy.new
|
98
|
+
easy.url = "http://localhost:3001/?delay=1"
|
99
|
+
multi.add(easy)
|
100
|
+
expect(calls.last).to be >= 0 # adds an immediate timeout
|
101
|
+
|
102
|
+
multi.delete(easy)
|
103
|
+
expect(calls.last).to eq(-1) # cancels the timer
|
104
|
+
end
|
105
|
+
|
106
|
+
it "allows integer return values (compatibility)" do
|
107
|
+
called = false
|
108
|
+
multi.timerfunction = proc do |handle, timeout_ms, userp|
|
109
|
+
called = true
|
110
|
+
0
|
111
|
+
end
|
112
|
+
|
113
|
+
easy = Ethon::Easy.new
|
114
|
+
easy.url = "http://localhost:3001/?delay=1"
|
115
|
+
multi.add(easy)
|
116
|
+
multi.socket_action
|
117
|
+
multi.delete(easy)
|
118
|
+
|
119
|
+
expect(called).to be_truthy
|
120
|
+
end
|
121
|
+
|
122
|
+
it "errors on invalid return codes" do
|
123
|
+
called = false
|
124
|
+
multi.timerfunction = proc do |handle, timeout_ms, userp|
|
125
|
+
called = true
|
126
|
+
"hi"
|
127
|
+
end
|
128
|
+
|
129
|
+
easy = Ethon::Easy.new
|
130
|
+
easy.url = "http://localhost:3001/?delay=1"
|
131
|
+
expect { multi.add(easy) }.to raise_error(ArgumentError)
|
132
|
+
end
|
133
|
+
end
|
134
|
+
end
|
135
|
+
|
136
|
+
describe "#value_for" do
|
137
|
+
context "when option in bool" do
|
138
|
+
context "when value true" do
|
139
|
+
let(:value) { true }
|
140
|
+
|
141
|
+
it "returns 1" do
|
142
|
+
expect(multi.method(:value_for).call(value, :bool)).to eq(1)
|
143
|
+
end
|
144
|
+
end
|
145
|
+
|
146
|
+
context "when value false" do
|
147
|
+
let(:value) { false }
|
148
|
+
|
149
|
+
it "returns 0" do
|
150
|
+
expect(multi.method(:value_for).call(value, :bool)).to eq(0)
|
151
|
+
end
|
152
|
+
end
|
153
|
+
end
|
154
|
+
|
155
|
+
|
156
|
+
context "when value in int" do
|
157
|
+
let(:value) { "2" }
|
158
|
+
|
159
|
+
it "returns value casted to int" do
|
160
|
+
expect(multi.method(:value_for).call(value, :int)).to eq(2)
|
161
|
+
end
|
162
|
+
end
|
163
|
+
|
164
|
+
context "when value in unspecific_options" do
|
165
|
+
context "when value a string" do
|
166
|
+
let(:value) { "www.example.\0com" }
|
167
|
+
|
168
|
+
it "returns zero byte escaped string" do
|
169
|
+
expect(multi.method(:value_for).call(value, nil)).to eq("www.example.\\0com")
|
170
|
+
end
|
171
|
+
end
|
172
|
+
|
173
|
+
context "when value not a string" do
|
174
|
+
let(:value) { 1 }
|
175
|
+
|
176
|
+
it "returns value" do
|
177
|
+
expect(multi.method(:value_for).call(value, nil)).to eq(1)
|
178
|
+
end
|
179
|
+
end
|
180
|
+
end
|
181
|
+
end
|
182
|
+
end
|
data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/spec/ethon/multi/stack_spec.rb
RENAMED
File without changes
|
@@ -0,0 +1,152 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require 'spec_helper'
|
3
|
+
|
4
|
+
describe Ethon::Multi do
|
5
|
+
describe ".new" do
|
6
|
+
it "inits curl" do
|
7
|
+
expect(Ethon::Curl).to receive(:init)
|
8
|
+
Ethon::Multi.new
|
9
|
+
end
|
10
|
+
|
11
|
+
context "with default options" do
|
12
|
+
it "allows running #perform with the default execution_mode" do
|
13
|
+
Ethon::Multi.new.perform
|
14
|
+
end
|
15
|
+
|
16
|
+
it "refuses to run #socket_action" do
|
17
|
+
expect { Ethon::Multi.new.socket_action }.to raise_error(ArgumentError)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
context "when options not empty" do
|
22
|
+
context "when pipelining is set" do
|
23
|
+
let(:options) { { :pipelining => true } }
|
24
|
+
|
25
|
+
it "sets pipelining" do
|
26
|
+
expect_any_instance_of(Ethon::Multi).to receive(:pipelining=).with(true)
|
27
|
+
Ethon::Multi.new(options)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
context "when execution_mode option is :socket_action" do
|
32
|
+
let(:options) { { :execution_mode => :socket_action } }
|
33
|
+
let(:multi) { Ethon::Multi.new(options) }
|
34
|
+
|
35
|
+
it "refuses to run #perform" do
|
36
|
+
expect { multi.perform }.to raise_error(ArgumentError)
|
37
|
+
end
|
38
|
+
|
39
|
+
it "allows running #socket_action" do
|
40
|
+
multi.socket_action
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
describe "#socket_action" do
|
47
|
+
let(:options) { { :execution_mode => :socket_action } }
|
48
|
+
let(:select_state) { { :readers => [], :writers => [], :timeout => 0 } }
|
49
|
+
let(:multi) {
|
50
|
+
multi = Ethon::Multi.new(options)
|
51
|
+
multi.timerfunction = proc do |handle, timeout_ms, userp|
|
52
|
+
timeout_ms = nil if timeout_ms == -1
|
53
|
+
select_state[:timeout] = timeout_ms
|
54
|
+
:ok
|
55
|
+
end
|
56
|
+
multi.socketfunction = proc do |handle, sock, what, userp, socketp|
|
57
|
+
case what
|
58
|
+
when :remove
|
59
|
+
select_state[:readers].delete(sock)
|
60
|
+
select_state[:writers].delete(sock)
|
61
|
+
when :in
|
62
|
+
select_state[:readers].push(sock) unless select_state[:readers].include? sock
|
63
|
+
select_state[:writers].delete(sock)
|
64
|
+
when :out
|
65
|
+
select_state[:readers].delete(sock)
|
66
|
+
select_state[:writers].push(sock) unless select_state[:writers].include? sock
|
67
|
+
when :inout
|
68
|
+
select_state[:readers].push(sock) unless select_state[:readers].include? sock
|
69
|
+
select_state[:writers].push(sock) unless select_state[:writers].include? sock
|
70
|
+
else
|
71
|
+
raise ArgumentError, "invalid value for 'what' in socketfunction callback"
|
72
|
+
end
|
73
|
+
:ok
|
74
|
+
end
|
75
|
+
multi
|
76
|
+
}
|
77
|
+
|
78
|
+
def fds_to_ios(fds)
|
79
|
+
fds.map do |fd|
|
80
|
+
IO.for_fd(fd).tap { |io| io.autoclose = false }
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
def perform_socket_action_until_complete
|
85
|
+
multi.socket_action # start things off
|
86
|
+
|
87
|
+
while multi.ongoing?
|
88
|
+
readers, writers, _ = IO.select(
|
89
|
+
fds_to_ios(select_state[:readers]),
|
90
|
+
fds_to_ios(select_state[:writers]),
|
91
|
+
[],
|
92
|
+
select_state[:timeout]
|
93
|
+
)
|
94
|
+
|
95
|
+
to_notify = Hash.new { |hash, key| hash[key] = [] }
|
96
|
+
unless readers.nil?
|
97
|
+
readers.each do |reader|
|
98
|
+
to_notify[reader] << :in
|
99
|
+
end
|
100
|
+
end
|
101
|
+
unless writers.nil?
|
102
|
+
writers.each do |writer|
|
103
|
+
to_notify[writer] << :out
|
104
|
+
end
|
105
|
+
end
|
106
|
+
|
107
|
+
to_notify.each do |io, readiness|
|
108
|
+
multi.socket_action(io, readiness)
|
109
|
+
end
|
110
|
+
|
111
|
+
# if we didn't have anything to notify, then we timed out
|
112
|
+
multi.socket_action if to_notify.empty?
|
113
|
+
end
|
114
|
+
ensure
|
115
|
+
multi.easy_handles.dup.each do |h|
|
116
|
+
multi.delete(h)
|
117
|
+
end
|
118
|
+
end
|
119
|
+
|
120
|
+
it "supports an end-to-end request" do
|
121
|
+
easy = Ethon::Easy.new
|
122
|
+
easy.url = "http://localhost:3001/"
|
123
|
+
multi.add(easy)
|
124
|
+
|
125
|
+
perform_socket_action_until_complete
|
126
|
+
|
127
|
+
expect(multi.ongoing?).to eq(false)
|
128
|
+
end
|
129
|
+
|
130
|
+
it "supports multiple concurrent requests" do
|
131
|
+
handles = []
|
132
|
+
10.times do
|
133
|
+
easy = Ethon::Easy.new
|
134
|
+
easy.url = "http://localhost:3001/?delay=1"
|
135
|
+
multi.add(easy)
|
136
|
+
handles << easy
|
137
|
+
end
|
138
|
+
|
139
|
+
start = Time.now
|
140
|
+
perform_socket_action_until_complete
|
141
|
+
duration = Time.now - start
|
142
|
+
|
143
|
+
# these should have happened concurrently
|
144
|
+
expect(duration).to be < 2
|
145
|
+
expect(multi.ongoing?).to eq(false)
|
146
|
+
|
147
|
+
handles.each do |handle|
|
148
|
+
expect(handle.response_code).to eq(200)
|
149
|
+
end
|
150
|
+
end
|
151
|
+
end
|
152
|
+
end
|
File without changes
|
data/vendor/bundle/ruby/2.5.0/gems/{ethon-0.14.0 → ethon-0.15.0}/spec/support/localhost_server.rb
RENAMED
File without changes
|
File without changes
|