passbase 1.0.1 → 1.3.0
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 +15 -3
- data/README.md +16 -15
- data/docs/Cursor.md +8 -7
- data/docs/Identity.md +24 -17
- data/docs/IdentityApi.md +204 -61
- data/docs/IdentityOwner.md +22 -0
- data/docs/IdentityResource.md +10 -9
- data/docs/PaginatedIdentities.md +10 -9
- data/docs/PaginatedResources.md +10 -9
- data/docs/ProjectApi.md +29 -12
- data/docs/ProjectSettings.md +18 -17
- data/docs/ProjectSettingsCustomizations.md +12 -11
- data/docs/ProjectSettingsVerificationSteps.md +10 -9
- data/docs/Resource.md +18 -17
- data/docs/ResourceFile.md +14 -13
- data/docs/ResourceInput.md +16 -15
- data/docs/User.md +12 -11
- data/docs/WatchlistResponse.md +16 -15
- data/lib/passbase.rb +2 -1
- data/lib/passbase/api/identity_api.rb +109 -30
- data/lib/passbase/api/project_api.rb +5 -4
- data/lib/passbase/api_client.rb +42 -51
- data/lib/passbase/api_error.rb +1 -1
- data/lib/passbase/configuration.rb +42 -13
- data/lib/passbase/models/cursor.rb +18 -8
- data/lib/passbase/models/identity.rb +48 -9
- data/lib/passbase/models/identity_owner.rb +239 -0
- data/lib/passbase/models/identity_resource.rb +18 -8
- data/lib/passbase/models/paginated_identities.rb +18 -8
- data/lib/passbase/models/paginated_resources.rb +18 -8
- data/lib/passbase/models/project_settings.rb +19 -9
- data/lib/passbase/models/project_settings_customizations.rb +18 -42
- data/lib/passbase/models/project_settings_verification_steps.rb +18 -8
- data/lib/passbase/models/resource.rb +18 -8
- data/lib/passbase/models/resource_file.rb +18 -8
- data/lib/passbase/models/resource_input.rb +18 -8
- data/lib/passbase/models/user.rb +18 -8
- data/lib/passbase/models/watchlist_response.rb +18 -8
- data/lib/passbase/version.rb +3 -3
- data/passbase.gemspec +4 -4
- data/spec/api/identity_api_spec.rb +21 -7
- data/spec/api/project_api_spec.rb +1 -1
- data/spec/api_client_spec.rb +1 -1
- data/spec/configuration_spec.rb +4 -4
- data/spec/models/cursor_spec.rb +4 -11
- data/spec/models/identity_owner_spec.rb +46 -0
- data/spec/models/identity_resource_spec.rb +4 -11
- data/spec/models/identity_spec.rb +23 -12
- data/spec/models/paginated_identities_spec.rb +4 -11
- data/spec/models/paginated_resources_spec.rb +4 -11
- data/spec/models/project_settings_customizations_spec.rb +4 -15
- data/spec/models/project_settings_spec.rb +5 -12
- data/spec/models/project_settings_verification_steps_spec.rb +4 -11
- data/spec/models/resource_file_spec.rb +4 -11
- data/spec/models/resource_input_spec.rb +4 -11
- data/spec/models/resource_spec.rb +5 -12
- data/spec/models/user_spec.rb +4 -11
- data/spec/models/watchlist_response_spec.rb +4 -11
- data/spec/spec_helper.rb +1 -1
- data/vendor/bundle/ruby/2.7.0/bin/htmldiff +1 -1
- data/vendor/bundle/ruby/2.7.0/bin/ldiff +1 -1
- data/vendor/bundle/ruby/2.7.0/cache/faraday-1.4.2.gem +0 -0
- data/vendor/bundle/ruby/2.7.0/cache/faraday-em_http-1.0.0.gem +0 -0
- data/vendor/bundle/ruby/2.7.0/cache/faraday-em_synchrony-1.0.0.gem +0 -0
- data/vendor/bundle/ruby/2.7.0/cache/faraday-excon-1.1.0.gem +0 -0
- data/vendor/bundle/ruby/2.7.0/cache/faraday-net_http-1.0.1.gem +0 -0
- data/vendor/bundle/ruby/2.7.0/cache/faraday-net_http_persistent-1.1.0.gem +0 -0
- data/vendor/bundle/ruby/2.7.0/cache/ruby2_keywords-0.0.4.gem +0 -0
- data/vendor/bundle/ruby/2.7.0/extensions/x86_64-linux/2.7.0/byebug-11.1.3/byebug/byebug.so +0 -0
- data/vendor/bundle/ruby/2.7.0/extensions/x86_64-linux/{2.7.0-static → 2.7.0}/byebug-11.1.3/gem.build_complete +0 -0
- data/vendor/bundle/ruby/2.7.0/extensions/x86_64-linux/{2.7.0-static → 2.7.0}/byebug-11.1.3/gem_make.out +2 -2
- data/vendor/bundle/ruby/2.7.0/extensions/x86_64-linux/{2.7.0-static → 2.7.0}/jaro_winkler-1.5.4/gem.build_complete +0 -0
- data/vendor/bundle/ruby/2.7.0/extensions/x86_64-linux/2.7.0/jaro_winkler-1.5.4/gem_make.out +67 -0
- data/vendor/bundle/ruby/2.7.0/extensions/x86_64-linux/2.7.0/jaro_winkler-1.5.4/jaro_winkler/jaro_winkler_ext.so +0 -0
- data/vendor/bundle/ruby/2.7.0/extensions/x86_64-linux/{2.7.0-static → 2.7.0}/psych-3.2.0/gem.build_complete +0 -0
- data/vendor/bundle/ruby/2.7.0/extensions/x86_64-linux/{2.7.0-static → 2.7.0}/psych-3.2.0/gem_make.out +2 -2
- data/vendor/bundle/ruby/2.7.0/extensions/x86_64-linux/2.7.0/psych-3.2.0/mkmf.log +196 -0
- data/vendor/bundle/ruby/2.7.0/extensions/x86_64-linux/2.7.0/psych-3.2.0/psych.so +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/byebug-11.1.3/ext/byebug/Makefile +13 -13
- data/vendor/bundle/ruby/2.7.0/gems/byebug-11.1.3/ext/byebug/breakpoint.o +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/byebug-11.1.3/ext/byebug/byebug.o +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/byebug-11.1.3/ext/byebug/byebug.so +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/byebug-11.1.3/ext/byebug/context.o +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/byebug-11.1.3/ext/byebug/locker.o +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/byebug-11.1.3/ext/byebug/threads.o +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/byebug-11.1.3/lib/byebug/byebug.so +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/CHANGELOG.md +104 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/LICENSE.md +1 -1
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/README.md +3 -5
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/Rakefile +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/examples/client_spec.rb +1 -1
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/examples/client_test.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/lib/faraday.rb +55 -41
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/lib/faraday/adapter.rb +1 -8
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/lib/faraday/adapter/httpclient.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/lib/faraday/adapter/patron.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/lib/faraday/adapter/rack.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/lib/faraday/adapter/test.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/lib/faraday/adapter/typhoeus.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/lib/faraday/adapter_registry.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/lib/faraday/autoload.rb +1 -6
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/lib/faraday/connection.rb +11 -4
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/lib/faraday/dependency_loader.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/lib/faraday/encoders/flat_params_encoder.rb +9 -2
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/lib/faraday/encoders/nested_params_encoder.rb +7 -2
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/lib/faraday/error.rb +20 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/lib/faraday/file_part.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/lib/faraday/logging/formatter.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/faraday-1.4.2/lib/faraday/methods.rb +6 -0
- data/vendor/bundle/ruby/2.7.0/gems/faraday-1.4.2/lib/faraday/middleware.rb +31 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/lib/faraday/middleware_registry.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/lib/faraday/options.rb +4 -8
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/lib/faraday/options/connection_options.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/lib/faraday/options/env.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/lib/faraday/options/proxy_options.rb +4 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/lib/faraday/options/request_options.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/lib/faraday/options/ssl_options.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/lib/faraday/param_part.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/lib/faraday/parameters.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/lib/faraday/rack_builder.rb +13 -12
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/lib/faraday/request.rb +20 -10
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/lib/faraday/request/authorization.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/lib/faraday/request/basic_authentication.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/lib/faraday/request/instrumentation.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/lib/faraday/request/multipart.rb +9 -2
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/lib/faraday/request/retry.rb +2 -2
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/lib/faraday/request/token_authentication.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/lib/faraday/request/url_encoded.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/lib/faraday/response.rb +0 -6
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/lib/faraday/response/logger.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/lib/faraday/response/raise_error.rb +12 -1
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/lib/faraday/utils.rb +2 -2
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/lib/faraday/utils/headers.rb +2 -2
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/lib/faraday/utils/params_hash.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/faraday-1.4.2/lib/faraday/version.rb +5 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/spec/external_adapters/faraday_specs_setup.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/spec/faraday/adapter/em_http_spec.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/spec/faraday/adapter/em_synchrony_spec.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/spec/faraday/adapter/excon_spec.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/spec/faraday/adapter/httpclient_spec.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/spec/faraday/adapter/net_http_spec.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/spec/faraday/adapter/patron_spec.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/spec/faraday/adapter/rack_spec.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/faraday-1.4.2/spec/faraday/adapter/test_spec.rb +260 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/spec/faraday/adapter/typhoeus_spec.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/spec/faraday/adapter_registry_spec.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/spec/faraday/adapter_spec.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/spec/faraday/composite_read_io_spec.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/spec/faraday/connection_spec.rb +38 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/spec/faraday/error_spec.rb +15 -0
- data/vendor/bundle/ruby/2.7.0/gems/faraday-1.4.2/spec/faraday/middleware_spec.rb +52 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/spec/faraday/options/env_spec.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/spec/faraday/options/options_spec.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/spec/faraday/options/proxy_options_spec.rb +7 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/spec/faraday/options/request_options_spec.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/spec/faraday/params_encoders/flat_spec.rb +8 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/spec/faraday/params_encoders/nested_spec.rb +8 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/spec/faraday/rack_builder_spec.rb +149 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/spec/faraday/request/authorization_spec.rb +2 -2
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/spec/faraday/request/instrumentation_spec.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/spec/faraday/request/multipart_spec.rb +41 -13
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/spec/faraday/request/retry_spec.rb +1 -1
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/spec/faraday/request/url_encoded_spec.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/spec/faraday/request_spec.rb +16 -5
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/spec/faraday/response/logger_spec.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/spec/faraday/response/middleware_spec.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/spec/faraday/response/raise_error_spec.rb +63 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/spec/faraday/response_spec.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/spec/faraday/utils/headers_spec.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/spec/faraday/utils_spec.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/spec/faraday_spec.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/spec/spec_helper.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/spec/support/disabling_stub.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/spec/support/fake_safe_buffer.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/spec/support/helper_methods.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/spec/support/shared_examples/adapter.rb +2 -1
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/spec/support/shared_examples/params_encoder.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/spec/support/shared_examples/request_method.rb +39 -11
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/spec/support/streaming_response_checker.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/spec/support/webmock_rack_app.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/faraday-em_http-1.0.0/LICENSE.md +21 -0
- data/vendor/bundle/ruby/2.7.0/gems/faraday-em_http-1.0.0/README.md +61 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-em_http-1.0.0}/lib/faraday/adapter/em_http.rb +23 -20
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-em_http-1.0.0}/lib/faraday/adapter/em_http_ssl_patch.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/faraday-em_http-1.0.0/lib/faraday/em_http.rb +11 -0
- data/vendor/bundle/ruby/2.7.0/gems/faraday-em_http-1.0.0/lib/faraday/em_http/version.rb +7 -0
- data/vendor/bundle/ruby/2.7.0/gems/faraday-em_synchrony-1.0.0/LICENSE.md +21 -0
- data/vendor/bundle/ruby/2.7.0/gems/faraday-em_synchrony-1.0.0/README.md +65 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-em_synchrony-1.0.0}/lib/faraday/adapter/em_synchrony.rb +16 -13
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-em_synchrony-1.0.0}/lib/faraday/adapter/em_synchrony/parallel_manager.rb +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/faraday-em_synchrony-1.0.0/lib/faraday/em_synchrony.rb +12 -0
- data/vendor/bundle/ruby/2.7.0/gems/faraday-em_synchrony-1.0.0/lib/faraday/em_synchrony/version.rb +7 -0
- data/vendor/bundle/ruby/2.7.0/gems/faraday-excon-1.1.0/LICENSE.md +21 -0
- data/vendor/bundle/ruby/2.7.0/gems/faraday-excon-1.1.0/README.md +61 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-excon-1.1.0}/lib/faraday/adapter/excon.rb +2 -2
- data/vendor/bundle/ruby/2.7.0/gems/faraday-excon-1.1.0/lib/faraday/excon.rb +11 -0
- data/vendor/bundle/ruby/2.7.0/gems/faraday-excon-1.1.0/lib/faraday/excon/version.rb +7 -0
- data/vendor/bundle/ruby/2.7.0/gems/faraday-net_http-1.0.1/LICENSE.md +21 -0
- data/vendor/bundle/ruby/2.7.0/gems/faraday-net_http-1.0.1/README.md +57 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-net_http-1.0.1}/lib/faraday/adapter/net_http.rb +21 -27
- data/vendor/bundle/ruby/2.7.0/gems/faraday-net_http-1.0.1/lib/faraday/net_http.rb +10 -0
- data/vendor/bundle/ruby/2.7.0/gems/faraday-net_http-1.0.1/lib/faraday/net_http/version.rb +7 -0
- data/vendor/bundle/ruby/2.7.0/gems/faraday-net_http_persistent-1.1.0/LICENSE.md +21 -0
- data/vendor/bundle/ruby/2.7.0/gems/faraday-net_http_persistent-1.1.0/README.md +73 -0
- data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-net_http_persistent-1.1.0}/lib/faraday/adapter/net_http_persistent.rb +11 -11
- data/vendor/bundle/ruby/2.7.0/gems/faraday-net_http_persistent-1.1.0/lib/faraday/net_http_persistent.rb +17 -0
- data/vendor/bundle/ruby/2.7.0/gems/faraday-net_http_persistent-1.1.0/lib/faraday/net_http_persistent/version.rb +7 -0
- data/vendor/bundle/ruby/2.7.0/gems/jaro_winkler-1.5.4/ext/jaro_winkler/Makefile +14 -14
- data/vendor/bundle/ruby/2.7.0/gems/jaro_winkler-1.5.4/ext/jaro_winkler/adj_matrix.o +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/jaro_winkler-1.5.4/ext/jaro_winkler/codepoints.o +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/jaro_winkler-1.5.4/ext/jaro_winkler/jaro.o +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/jaro_winkler-1.5.4/ext/jaro_winkler/jaro_winkler.o +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/jaro_winkler-1.5.4/ext/jaro_winkler/jaro_winkler_ext.so +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/jaro_winkler-1.5.4/lib/jaro_winkler/jaro_winkler_ext.so +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/psych-3.2.0/ext/psych/Makefile +14 -14
- data/vendor/bundle/ruby/2.7.0/gems/psych-3.2.0/ext/psych/api.o +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/psych-3.2.0/ext/psych/dumper.o +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/psych-3.2.0/ext/psych/emitter.o +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/psych-3.2.0/ext/psych/loader.o +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/psych-3.2.0/ext/psych/parser.o +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/psych-3.2.0/ext/psych/psych.o +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/psych-3.2.0/ext/psych/psych_emitter.o +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/psych-3.2.0/ext/psych/psych_parser.o +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/psych-3.2.0/ext/psych/psych_to_ruby.o +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/psych-3.2.0/ext/psych/psych_yaml_tree.o +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/psych-3.2.0/ext/psych/reader.o +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/psych-3.2.0/ext/psych/scanner.o +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/psych-3.2.0/ext/psych/writer.o +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/ruby2_keywords-0.0.4/LICENSE +22 -0
- data/vendor/bundle/ruby/2.7.0/gems/ruby2_keywords-0.0.4/README.md +67 -0
- data/vendor/bundle/ruby/2.7.0/gems/ruby2_keywords-0.0.4/lib/ruby2_keywords.rb +57 -0
- data/vendor/bundle/ruby/2.7.0/specifications/ast-2.4.1.gemspec +2 -2
- data/vendor/bundle/ruby/2.7.0/specifications/byebug-11.1.3.gemspec +2 -2
- data/vendor/bundle/ruby/2.7.0/specifications/coderay-1.1.3.gemspec +2 -2
- data/vendor/bundle/ruby/2.7.0/specifications/diff-lcs-1.4.4.gemspec +2 -2
- data/vendor/bundle/ruby/2.7.0/specifications/faraday-1.4.2.gemspec +0 -0
- data/vendor/bundle/ruby/2.7.0/specifications/faraday-em_http-1.0.0.gemspec +52 -0
- data/vendor/bundle/ruby/2.7.0/specifications/faraday-em_synchrony-1.0.0.gemspec +56 -0
- data/vendor/bundle/ruby/2.7.0/specifications/faraday-excon-1.1.0.gemspec +52 -0
- data/vendor/bundle/ruby/2.7.0/specifications/faraday-net_http-1.0.1.gemspec +50 -0
- data/vendor/bundle/ruby/2.7.0/specifications/faraday-net_http_persistent-1.1.0.gemspec +48 -0
- data/vendor/bundle/ruby/2.7.0/specifications/jaro_winkler-1.5.4.gemspec +2 -2
- data/vendor/bundle/ruby/2.7.0/specifications/method_source-1.0.0.gemspec +2 -2
- data/vendor/bundle/ruby/2.7.0/specifications/multipart-post-2.1.1.gemspec +2 -2
- data/vendor/bundle/ruby/2.7.0/specifications/parallel-1.19.2.gemspec +2 -2
- data/vendor/bundle/ruby/2.7.0/specifications/parser-2.7.1.4.gemspec +2 -2
- data/vendor/bundle/ruby/2.7.0/specifications/pry-0.13.1.gemspec +2 -2
- data/vendor/bundle/ruby/2.7.0/specifications/pry-byebug-3.9.0.gemspec +2 -2
- data/vendor/bundle/ruby/2.7.0/specifications/psych-3.2.0.gemspec +2 -2
- data/vendor/bundle/ruby/2.7.0/specifications/rainbow-3.0.0.gemspec +2 -2
- data/vendor/bundle/ruby/2.7.0/specifications/rake-13.0.1.gemspec +2 -2
- data/vendor/bundle/ruby/2.7.0/specifications/rspec-3.9.0.gemspec +2 -2
- data/vendor/bundle/ruby/2.7.0/specifications/rspec-core-3.9.2.gemspec +2 -2
- data/vendor/bundle/ruby/2.7.0/specifications/rspec-expectations-3.9.2.gemspec +2 -2
- data/vendor/bundle/ruby/2.7.0/specifications/rspec-mocks-3.9.1.gemspec +2 -2
- data/vendor/bundle/ruby/2.7.0/specifications/rspec-support-3.9.3.gemspec +2 -2
- data/vendor/bundle/ruby/2.7.0/specifications/rubocop-0.66.0.gemspec +2 -2
- data/vendor/bundle/ruby/2.7.0/specifications/ruby-progressbar-1.10.1.gemspec +2 -2
- data/vendor/bundle/ruby/2.7.0/specifications/ruby2_keywords-0.0.4.gemspec +19 -0
- data/vendor/bundle/ruby/2.7.0/specifications/unicode-display_width-1.5.0.gemspec +2 -2
- data/walkthrough.md +1 -1
- metadata +172 -125
- data/vendor/bundle/ruby/2.7.0/cache/faraday-1.0.1.gem +0 -0
- data/vendor/bundle/ruby/2.7.0/extensions/x86_64-linux/2.7.0-static/byebug-11.1.3/byebug/byebug.so +0 -0
- data/vendor/bundle/ruby/2.7.0/extensions/x86_64-linux/2.7.0-static/jaro_winkler-1.5.4/gem_make.out +0 -64
- data/vendor/bundle/ruby/2.7.0/extensions/x86_64-linux/2.7.0-static/jaro_winkler-1.5.4/jaro_winkler/jaro_winkler_ext.so +0 -0
- data/vendor/bundle/ruby/2.7.0/extensions/x86_64-linux/2.7.0-static/psych-3.2.0/mkmf.log +0 -197
- data/vendor/bundle/ruby/2.7.0/extensions/x86_64-linux/2.7.0-static/psych-3.2.0/psych.so +0 -0
- data/vendor/bundle/ruby/2.7.0/gems/faraday-1.0.1/lib/faraday/middleware.rb +0 -21
- data/vendor/bundle/ruby/2.7.0/gems/faraday-1.0.1/spec/faraday/adapter/net_http_persistent_spec.rb +0 -57
- data/vendor/bundle/ruby/2.7.0/gems/faraday-1.0.1/spec/faraday/middleware_spec.rb +0 -26
- data/vendor/bundle/ruby/2.7.0/specifications/faraday-1.0.1.gemspec +0 -0
data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/spec/faraday/response_spec.rb
RENAMED
File without changes
|
File without changes
|
data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/spec/faraday/utils_spec.rb
RENAMED
File without changes
|
File without changes
|
File without changes
|
data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/spec/support/disabling_stub.rb
RENAMED
File without changes
|
data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/spec/support/fake_safe_buffer.rb
RENAMED
File without changes
|
data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/spec/support/helper_methods.rb
RENAMED
File without changes
|
@@ -33,6 +33,7 @@ shared_examples 'adapter examples' do |**options|
|
|
33
33
|
|
34
34
|
let(:protocol) { ssl_mode? ? 'https' : 'http' }
|
35
35
|
let(:remote) { "#{protocol}://example.com" }
|
36
|
+
let(:stub_remote) { remote }
|
36
37
|
|
37
38
|
let(:conn) do
|
38
39
|
conn_options[:ssl] ||= {}
|
@@ -46,7 +47,7 @@ shared_examples 'adapter examples' do |**options|
|
|
46
47
|
end
|
47
48
|
end
|
48
49
|
|
49
|
-
let!(:request_stub) { stub_request(http_method,
|
50
|
+
let!(:request_stub) { stub_request(http_method, stub_remote) }
|
50
51
|
|
51
52
|
after do
|
52
53
|
expect(request_stub).to have_been_requested unless request_stub.disabled?
|
File without changes
|
@@ -1,5 +1,19 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
shared_examples 'proxy examples' do
|
4
|
+
it 'handles requests with proxy' do
|
5
|
+
res = conn.public_send(http_method, '/')
|
6
|
+
|
7
|
+
expect(res.status).to eq(200)
|
8
|
+
end
|
9
|
+
|
10
|
+
it 'handles proxy failures' do
|
11
|
+
request_stub.to_return(status: 407)
|
12
|
+
|
13
|
+
expect { conn.public_send(http_method, '/') }.to raise_error(Faraday::ProxyAuthError)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
3
17
|
shared_examples 'a request method' do |http_method|
|
4
18
|
let(:query_or_body) { method_with_body?(http_method) ? :body : :query }
|
5
19
|
let(:response) { conn.public_send(http_method, '/') }
|
@@ -13,8 +27,8 @@ shared_examples 'a request method' do |http_method|
|
|
13
27
|
end
|
14
28
|
|
15
29
|
it 'handles headers with multiple values' do
|
16
|
-
request_stub.to_return(headers: { 'Set-Cookie' => '
|
17
|
-
expect(response.headers['set-cookie']).to eq('
|
30
|
+
request_stub.to_return(headers: { 'Set-Cookie' => 'name=value' })
|
31
|
+
expect(response.headers['set-cookie']).to eq('name=value')
|
18
32
|
end
|
19
33
|
|
20
34
|
it 'retrieves the response headers' do
|
@@ -119,7 +133,7 @@ shared_examples 'a request method' do |http_method|
|
|
119
133
|
request_stub.with(headers: { 'Content-Type' => %r{\Amultipart/form-data} }) do |request|
|
120
134
|
# WebMock does not support matching body for multipart/form-data requests yet :(
|
121
135
|
# https://github.com/bblimke/webmock/issues/623
|
122
|
-
request.body
|
136
|
+
request.body.include?('RubyMultipartPost')
|
123
137
|
end
|
124
138
|
conn.public_send(http_method, '/', payload)
|
125
139
|
end
|
@@ -218,17 +232,31 @@ shared_examples 'a request method' do |http_method|
|
|
218
232
|
end
|
219
233
|
end
|
220
234
|
|
221
|
-
|
222
|
-
|
235
|
+
context 'when a proxy is provided as option' do
|
236
|
+
before do
|
237
|
+
conn_options[:proxy] = 'http://env-proxy.com:80'
|
238
|
+
end
|
223
239
|
|
224
|
-
|
225
|
-
expect(res.status).to eq(200)
|
240
|
+
include_examples 'proxy examples'
|
226
241
|
end
|
227
242
|
|
228
|
-
|
229
|
-
|
230
|
-
request_stub.to_return(status: 407)
|
243
|
+
context 'when http_proxy env variable is set' do
|
244
|
+
let(:proxy_url) { 'http://env-proxy.com:80' }
|
231
245
|
|
232
|
-
|
246
|
+
around do |example|
|
247
|
+
with_env 'http_proxy' => proxy_url do
|
248
|
+
example.run
|
249
|
+
end
|
250
|
+
end
|
251
|
+
|
252
|
+
include_examples 'proxy examples'
|
253
|
+
|
254
|
+
context 'when the env proxy is ignored' do
|
255
|
+
around do |example|
|
256
|
+
with_env_proxy_disabled(&example)
|
257
|
+
end
|
258
|
+
|
259
|
+
include_examples 'proxy examples'
|
260
|
+
end
|
233
261
|
end
|
234
262
|
end
|
File without changes
|
data/vendor/bundle/ruby/2.7.0/gems/{faraday-1.0.1 → faraday-1.4.2}/spec/support/webmock_rack_app.rb
RENAMED
File without changes
|
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2020 Jan van der Pas
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
@@ -0,0 +1,61 @@
|
|
1
|
+
# Faraday Em::Http adapter
|
2
|
+
|
3
|
+
This gem is a [Faraday][faraday] adapter for the [Em::Http::Request][em_http_request] library.
|
4
|
+
Faraday is an HTTP client library that provides a common interface over many adapters.
|
5
|
+
Every adapter is defined into its own gem. This gem defines the adapter for Em::Http::Request.
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add these lines to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'em-http-request', '>= 1.1'
|
13
|
+
gem 'faraday-em_http'
|
14
|
+
```
|
15
|
+
|
16
|
+
And then execute:
|
17
|
+
|
18
|
+
$ bundle install
|
19
|
+
|
20
|
+
Or install them yourself as:
|
21
|
+
|
22
|
+
$ gem install em-http-request -v '>= 1.1'
|
23
|
+
$ gem install faraday-em_http
|
24
|
+
|
25
|
+
## Usage
|
26
|
+
|
27
|
+
Configure your Faraday connection to use this adapter like this:
|
28
|
+
|
29
|
+
```ruby
|
30
|
+
connection = Faraday.new(url, conn_options) do |conn|
|
31
|
+
conn.adapter(:em_http)
|
32
|
+
end
|
33
|
+
```
|
34
|
+
|
35
|
+
For more information on how to setup your Faraday connection and adapters usage, please refer to the [Faraday Website][faraday-website].
|
36
|
+
|
37
|
+
## Development
|
38
|
+
|
39
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
40
|
+
|
41
|
+
To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](rubygems).
|
42
|
+
|
43
|
+
## Contributing
|
44
|
+
|
45
|
+
Bug reports and pull requests are welcome on [GitHub][repo].
|
46
|
+
|
47
|
+
## License
|
48
|
+
|
49
|
+
The gem is available as open source under the terms of the [license][license].
|
50
|
+
|
51
|
+
## Code of Conduct
|
52
|
+
|
53
|
+
Everyone interacting in the Faraday Em::Http adapter project's codebase, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct][code-of-conduct].
|
54
|
+
|
55
|
+
[faraday]: https://github.com/lostisland/faraday
|
56
|
+
[faraday-website]: https://lostisland.github.io/faraday
|
57
|
+
[em_http_request]: https://github.com/igrigorik/em-http-request
|
58
|
+
[rubygems]: https://rubygems.org
|
59
|
+
[repo]: https://github.com/lostisland/faraday-em_http
|
60
|
+
[license]: https://github.com/lostisland/faraday-em_http/blob/main/LICENSE.md
|
61
|
+
[code-of-conduct]: https://github.com/lostisland/faraday-em_http/blob/main/CODE_OF_CONDUCT.md
|
@@ -78,7 +78,7 @@ module Faraday
|
|
78
78
|
# Reads out compression header settings from env into options
|
79
79
|
def configure_compression(options, env)
|
80
80
|
return unless (env[:method] == :get) &&
|
81
|
-
|
81
|
+
!options[:head].key?('accept-encoding')
|
82
82
|
|
83
83
|
options[:head]['accept-encoding'] = 'gzip, compressed'
|
84
84
|
end
|
@@ -90,7 +90,21 @@ module Faraday
|
|
90
90
|
|
91
91
|
include Options
|
92
92
|
|
93
|
-
dependency
|
93
|
+
dependency do
|
94
|
+
require 'em-http'
|
95
|
+
|
96
|
+
begin
|
97
|
+
require 'openssl'
|
98
|
+
rescue LoadError
|
99
|
+
warn 'Warning: no such file to load -- openssl. ' \
|
100
|
+
'Make sure it is installed if you want HTTPS support'
|
101
|
+
else
|
102
|
+
require 'em-http/version'
|
103
|
+
if EventMachine::HttpRequest::VERSION < '1.1.6'
|
104
|
+
require 'faraday/adapter/em_http_ssl_patch'
|
105
|
+
end
|
106
|
+
end
|
107
|
+
end
|
94
108
|
|
95
109
|
self.supports_parallel = true
|
96
110
|
|
@@ -118,9 +132,9 @@ module Faraday
|
|
118
132
|
perform_single_request(env)
|
119
133
|
.callback { env[:response].finish(env) }
|
120
134
|
.errback do
|
121
|
-
|
122
|
-
|
123
|
-
|
135
|
+
# TODO: no way to communicate the error in async mode
|
136
|
+
raise NotImplementedError
|
137
|
+
end
|
124
138
|
else
|
125
139
|
error = nil
|
126
140
|
# start EM, block until request is completed
|
@@ -128,9 +142,9 @@ module Faraday
|
|
128
142
|
perform_single_request(env)
|
129
143
|
.callback { EventMachine.stop }
|
130
144
|
.errback do |client|
|
131
|
-
|
132
|
-
|
133
|
-
|
145
|
+
error = error_message(client)
|
146
|
+
EventMachine.stop
|
147
|
+
end
|
134
148
|
end
|
135
149
|
raise_error(error) if error
|
136
150
|
end
|
@@ -231,7 +245,7 @@ module Faraday
|
|
231
245
|
|
232
246
|
def add(&block)
|
233
247
|
if running?
|
234
|
-
perform_request
|
248
|
+
perform_request(&block)
|
235
249
|
else
|
236
250
|
@registered_procs << block
|
237
251
|
end
|
@@ -273,14 +287,3 @@ module Faraday
|
|
273
287
|
end
|
274
288
|
end
|
275
289
|
end
|
276
|
-
|
277
|
-
if Faraday::Adapter::EMHttp.loaded?
|
278
|
-
begin
|
279
|
-
require 'openssl'
|
280
|
-
rescue LoadError
|
281
|
-
warn 'Warning: no such file to load -- openssl. ' \
|
282
|
-
'Make sure it is installed if you want HTTPS support'
|
283
|
-
else
|
284
|
-
require 'faraday/adapter/em_http_ssl_patch'
|
285
|
-
end
|
286
|
-
end
|
File without changes
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative 'adapter/em_http'
|
4
|
+
require_relative 'em_http/version'
|
5
|
+
|
6
|
+
module Faraday
|
7
|
+
# Main Faraday::EmHttp module
|
8
|
+
module EmHttp
|
9
|
+
Faraday::Adapter.register_middleware(em_http: Faraday::Adapter::EMHttp)
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2020 Jan van der Pas
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
@@ -0,0 +1,65 @@
|
|
1
|
+
# Faraday Em::Synchrony adapter
|
2
|
+
|
3
|
+
This gem is a [Faraday][faraday] adapter for the [Em::Synchrony][em_synchrony] library.
|
4
|
+
Faraday is an HTTP client library that provides a common interface over many adapters.
|
5
|
+
Every adapter is defined into its own gem. This gem defines the adapter for Em::Synchrony.
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add these lines to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'em-http-request', '>= 1.1'
|
13
|
+
gem 'em-synchrony', '>= 1.0.3'
|
14
|
+
gem 'faraday-em_http', '~> 1.0'
|
15
|
+
gem 'faraday-em_synchrony'
|
16
|
+
```
|
17
|
+
|
18
|
+
And then execute:
|
19
|
+
|
20
|
+
$ bundle install
|
21
|
+
|
22
|
+
Or install them yourself as:
|
23
|
+
|
24
|
+
$ gem install em-http-request -v '>= 1.1'
|
25
|
+
$ gem install em-synchrony -v '>= 1.0.3'
|
26
|
+
$ gem install faraday-em_http -v '~> 1.0'
|
27
|
+
$ gem install faraday-em_synchrony
|
28
|
+
|
29
|
+
## Usage
|
30
|
+
|
31
|
+
Configure your Faraday connection to use this adapter like this:
|
32
|
+
|
33
|
+
```ruby
|
34
|
+
connection = Faraday.new(url, conn_options) do |conn|
|
35
|
+
conn.adapter(:em_synchrony)
|
36
|
+
end
|
37
|
+
```
|
38
|
+
|
39
|
+
For more information on how to setup your Faraday connection and adapters usage, please refer to the [Faraday Website][faraday-website].
|
40
|
+
|
41
|
+
## Development
|
42
|
+
|
43
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
44
|
+
|
45
|
+
To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](rubygems).
|
46
|
+
|
47
|
+
## Contributing
|
48
|
+
|
49
|
+
Bug reports and pull requests are welcome on [GitHub][repo].
|
50
|
+
|
51
|
+
## License
|
52
|
+
|
53
|
+
The gem is available as open source under the terms of the [license][license].
|
54
|
+
|
55
|
+
## Code of Conduct
|
56
|
+
|
57
|
+
Everyone interacting in the Faraday Em::Synchrony adapter project's codebase, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct][code-of-conduct].
|
58
|
+
|
59
|
+
[faraday]: https://github.com/lostisland/faraday
|
60
|
+
[faraday-website]: https://lostisland.github.io/faraday
|
61
|
+
[em_synchrony]: https://github.com/igrigorik/em-synchrony
|
62
|
+
[rubygems]: https://rubygems.org
|
63
|
+
[repo]: https://github.com/lostisland/faraday-em_synchrony
|
64
|
+
[license]: https://github.com/lostisland/faraday-em_synchrony/blob/main/LICENSE.md
|
65
|
+
[code-of-conduct]: https://github.com/lostisland/faraday-em_synchrony/blob/main/CODE_OF_CONDUCT.md
|
@@ -12,6 +12,22 @@ module Faraday
|
|
12
12
|
require 'em-synchrony/em-http'
|
13
13
|
require 'em-synchrony/em-multi'
|
14
14
|
require 'fiber'
|
15
|
+
|
16
|
+
require 'faraday/adapter/em_synchrony/parallel_manager'
|
17
|
+
|
18
|
+
if Faraday::Adapter::EMSynchrony.loaded?
|
19
|
+
begin
|
20
|
+
require 'openssl'
|
21
|
+
rescue LoadError
|
22
|
+
warn 'Warning: no such file to load -- openssl. ' \
|
23
|
+
'Make sure it is installed if you want HTTPS support'
|
24
|
+
else
|
25
|
+
require 'em-http/version'
|
26
|
+
if EventMachine::HttpRequest::VERSION < '1.1.6'
|
27
|
+
require 'faraday/adapter/em_http_ssl_patch'
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
15
31
|
end
|
16
32
|
|
17
33
|
self.supports_parallel = true
|
@@ -135,16 +151,3 @@ module Faraday
|
|
135
151
|
end
|
136
152
|
end
|
137
153
|
end
|
138
|
-
|
139
|
-
require 'faraday/adapter/em_synchrony/parallel_manager'
|
140
|
-
|
141
|
-
if Faraday::Adapter::EMSynchrony.loaded?
|
142
|
-
begin
|
143
|
-
require 'openssl'
|
144
|
-
rescue LoadError
|
145
|
-
warn 'Warning: no such file to load -- openssl. ' \
|
146
|
-
'Make sure it is installed if you want HTTPS support'
|
147
|
-
else
|
148
|
-
require 'faraday/adapter/em_http_ssl_patch'
|
149
|
-
end
|
150
|
-
end
|
File without changes
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'faraday/em_http'
|
4
|
+
require_relative 'adapter/em_synchrony'
|
5
|
+
require_relative 'em_synchrony/version'
|
6
|
+
|
7
|
+
module Faraday
|
8
|
+
# Main Faraday::EmSynchrony module
|
9
|
+
module EmSynchrony
|
10
|
+
Faraday::Adapter.register_middleware(em_synchrony: Faraday::Adapter::EMSynchrony)
|
11
|
+
end
|
12
|
+
end
|