iron_admin 0.5.0 → 0.6.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/app/assets/config/iron_admin_manifest.js +12 -0
- data/app/components/iron_admin/dashboards/metric_card_component.html.haml +8 -3
- data/app/components/iron_admin/dashboards/metric_card_component.rb +21 -1
- data/app/components/iron_admin/form/belongs_to_component.rb +60 -6
- data/app/components/iron_admin/form/nested_form_component.html.haml +28 -0
- data/app/components/iron_admin/form/nested_form_component.rb +81 -0
- data/app/components/iron_admin/resources/data_table_component.html.haml +1 -1
- data/app/components/iron_admin/resources/data_table_component.rb +6 -0
- data/app/components/iron_admin/resources/show_field_component.rb +2 -0
- data/app/controllers/iron_admin/application_controller.rb +32 -1
- data/app/controllers/iron_admin/concerns/action_executable.rb +44 -0
- data/app/controllers/iron_admin/concerns/filterable.rb +84 -0
- data/app/controllers/iron_admin/concerns/json_params_coercion.rb +67 -0
- data/app/controllers/iron_admin/concerns/nested_permittable.rb +36 -0
- data/app/controllers/iron_admin/concerns/scopeable.rb +84 -0
- data/app/controllers/iron_admin/concerns/searchable.rb +13 -16
- data/app/controllers/iron_admin/exports_controller.rb +15 -11
- data/app/controllers/iron_admin/imports_controller.rb +83 -0
- data/app/controllers/iron_admin/live_controller.rb +12 -0
- data/app/controllers/iron_admin/resources_controller.rb +118 -117
- data/app/controllers/iron_admin/search_controller.rb +5 -5
- data/app/controllers/iron_admin/tools_controller.rb +63 -4
- data/app/helpers/iron_admin/application_helper.rb +33 -14
- data/app/helpers/iron_admin/field_display_helper.rb +160 -1
- data/app/javascript/iron_admin/controllers/cp_nested_form_controller.js +113 -0
- data/app/javascript/iron_admin/controllers/filter_operator_controller.js +10 -0
- data/app/javascript/iron_admin/index.js +4 -0
- data/app/views/iron_admin/dashboard/index.html.haml +7 -2
- data/app/views/iron_admin/form/_nested_row.html.haml +70 -0
- data/app/views/iron_admin/imports/new.html.haml +27 -0
- data/app/views/iron_admin/imports/preview.html.haml +31 -0
- data/app/views/iron_admin/resources/_form.html.haml +81 -5
- data/app/views/iron_admin/resources/action_form.html.haml +62 -0
- data/app/views/iron_admin/resources/bulk_action_form.html.haml +62 -0
- data/app/views/iron_admin/resources/index.html.haml +60 -18
- data/app/views/iron_admin/tools/action_form.html.haml +57 -0
- data/app/views/iron_admin/tools/show.html.haml +20 -1
- data/config/importmap.rb +2 -0
- data/config/locales/en.yml +36 -0
- data/config/routes.rb +7 -0
- data/docs/components/filter-components.md +60 -0
- data/docs/getting-started/quick-start.md +17 -1
- data/docs/guides/authentication.md +7 -6
- data/docs/guides/custom-adapters.md +628 -0
- data/docs/guides/extending.md +132 -3
- data/docs/guides/fields.md +1 -1
- data/docs/guides/resources.md +78 -2
- data/docs/guides/troubleshooting.md +29 -0
- data/docs/reference/routes.md +10 -0
- data/lib/generators/iron_admin/install/install_generator.rb +28 -4
- data/lib/generators/iron_admin/install_audit/install_audit_generator.rb +26 -10
- data/lib/iron_admin/action_field.rb +56 -0
- data/lib/iron_admin/adapters/active_record.rb +237 -0
- data/lib/iron_admin/adapters/base.rb +340 -0
- data/lib/iron_admin/adapters/http/column_descriptor.rb +10 -0
- data/lib/iron_admin/adapters/http/configuration.rb +27 -0
- data/lib/iron_admin/adapters/http/connection.rb +117 -0
- data/lib/iron_admin/adapters/http/model_proxy.rb +75 -0
- data/lib/iron_admin/adapters/http/query.rb +111 -0
- data/lib/iron_admin/adapters/http/record.rb +83 -0
- data/lib/iron_admin/adapters/http/type_inferrer.rb +51 -0
- data/lib/iron_admin/adapters/http.rb +241 -0
- data/lib/iron_admin/adapters/mongoid/association_wrapper.rb +74 -0
- data/lib/iron_admin/adapters/mongoid/column_descriptor.rb +10 -0
- data/lib/iron_admin/adapters/mongoid.rb +284 -0
- data/lib/iron_admin/adapters/registry.rb +44 -0
- data/lib/iron_admin/concerns/importable.rb +81 -0
- data/lib/iron_admin/concerns/live_updatable.rb +38 -0
- data/lib/iron_admin/concerns/nestable.rb +69 -0
- data/lib/iron_admin/concerns/soft_deletable.rb +61 -0
- data/lib/iron_admin/configuration.rb +20 -0
- data/lib/iron_admin/dashboard.rb +15 -20
- data/lib/iron_admin/engine.rb +28 -1
- data/lib/iron_admin/errors.rb +29 -0
- data/lib/iron_admin/field_inferrer.rb +61 -22
- data/lib/iron_admin/filters/active_record_query_builder.rb +63 -0
- data/lib/iron_admin/filters/base_query_builder.rb +55 -0
- data/lib/iron_admin/filters/http_query_builder.rb +39 -0
- data/lib/iron_admin/filters/mongoid_query_builder.rb +58 -0
- data/lib/iron_admin/filters/query_builder.rb +12 -0
- data/lib/iron_admin/import/column_mapper.rb +42 -0
- data/lib/iron_admin/import/import_preview.rb +10 -0
- data/lib/iron_admin/import/import_result.rb +10 -0
- data/lib/iron_admin/import/importer.rb +231 -0
- data/lib/iron_admin/import/parser/csv.rb +34 -0
- data/lib/iron_admin/import/parser/json.rb +36 -0
- data/lib/iron_admin/import/type_caster.rb +47 -0
- data/lib/iron_admin/live/broadcaster.rb +43 -0
- data/lib/iron_admin/live/poll_cache.rb +28 -0
- data/lib/iron_admin/live.rb +29 -0
- data/lib/iron_admin/nested_association.rb +15 -0
- data/lib/iron_admin/nested_attributes_validator.rb +25 -0
- data/lib/iron_admin/policy.rb +72 -13
- data/lib/iron_admin/resource.rb +148 -90
- data/lib/iron_admin/resource_registry.rb +77 -4
- data/lib/iron_admin/tool.rb +50 -0
- data/lib/iron_admin/tool_action.rb +73 -0
- data/lib/iron_admin/tool_context.rb +49 -0
- data/lib/iron_admin/version.rb +1 -1
- data/lib/iron_admin.rb +28 -0
- data/vendor/bundle/ruby/3.2.0/cache/addressable-2.9.0.gem +0 -0
- data/vendor/bundle/ruby/3.2.0/cache/crack-1.0.1.gem +0 -0
- data/vendor/bundle/ruby/3.2.0/cache/faraday-2.14.1.gem +0 -0
- data/vendor/bundle/ruby/3.2.0/cache/faraday-net_http-3.4.2.gem +0 -0
- data/vendor/bundle/ruby/3.2.0/cache/hashdiff-1.2.1.gem +0 -0
- data/vendor/bundle/ruby/3.2.0/cache/net-http-0.9.1.gem +0 -0
- data/vendor/bundle/ruby/3.2.0/cache/public_suffix-7.0.5.gem +0 -0
- data/vendor/bundle/ruby/3.2.0/cache/rexml-3.4.4.gem +0 -0
- data/vendor/bundle/ruby/3.2.0/cache/webmock-3.26.2.gem +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/bigdecimal-4.0.1/bigdecimal.so +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/bigdecimal-4.0.1/gem_make.out +6 -6
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/bigdecimal-4.0.1/mkmf.log +25 -25
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/date-3.5.1/date_core.so +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/date-3.5.1/gem_make.out +6 -6
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/date-3.5.1/mkmf.log +4 -4
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/erb-6.0.1/erb/escape.so +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/erb-6.0.1/gem_make.out +6 -6
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/erb-6.0.1/mkmf.log +2 -2
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/io-console-0.8.2/gem_make.out +6 -6
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/io-console-0.8.2/io/console.so +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/io-console-0.8.2/mkmf.log +22 -22
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/json-2.18.1/gem_make.out +6 -6
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/json-2.18.1/json/ext/generator.so +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/json-2.18.1/json/ext/parser.so +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/json-2.18.1/mkmf.log +9 -9
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/nio4r-2.7.5/gem_make.out +6 -6
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/nio4r-2.7.5/mkmf.log +12 -12
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/nio4r-2.7.5/nio4r_ext.so +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/prism-1.9.0/gem_make.out +6 -6
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/prism-1.9.0/mkmf.log +6 -6
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/prism-1.9.0/prism/prism.so +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-5.3.1/gem_make.out +6 -6
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-5.3.1/mkmf.log +7 -7
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-5.3.1/psych.so +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/racc-1.8.1/gem_make.out +6 -6
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/racc-1.8.1/racc/cparse.so +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/redcarpet-3.6.1/gem_make.out +6 -6
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/redcarpet-3.6.1/redcarpet.so +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/stringio-3.2.0/gem_make.out +6 -6
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/stringio-3.2.0/mkmf.log +2 -2
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/stringio-3.2.0/stringio.so +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/websocket-driver-0.8.0/gem_make.out +6 -6
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/websocket-driver-0.8.0/websocket_mask.so +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/addressable-2.9.0/CHANGELOG.md +326 -0
- data/vendor/bundle/ruby/3.2.0/gems/addressable-2.9.0/LICENSE.txt +202 -0
- data/vendor/bundle/ruby/3.2.0/gems/addressable-2.9.0/README.md +121 -0
- data/vendor/bundle/ruby/3.2.0/gems/addressable-2.9.0/lib/addressable/idna/native.rb +66 -0
- data/vendor/bundle/ruby/3.2.0/gems/addressable-2.9.0/lib/addressable/idna/pure.rb +4710 -0
- data/vendor/bundle/ruby/3.2.0/gems/addressable-2.9.0/lib/addressable/idna.rb +26 -0
- data/vendor/bundle/ruby/3.2.0/gems/addressable-2.9.0/lib/addressable/template.rb +1040 -0
- data/vendor/bundle/ruby/3.2.0/gems/addressable-2.9.0/lib/addressable/uri.rb +2602 -0
- data/vendor/bundle/ruby/3.2.0/gems/addressable-2.9.0/lib/addressable/version.rb +31 -0
- data/vendor/bundle/ruby/3.2.0/gems/addressable-2.9.0/lib/addressable.rb +4 -0
- data/vendor/bundle/ruby/3.2.0/gems/bigdecimal-4.0.1/ext/bigdecimal/Makefile +3 -3
- data/vendor/bundle/ruby/3.2.0/gems/bigdecimal-4.0.1/lib/bigdecimal.so +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/crack-1.0.1/History +58 -0
- data/vendor/bundle/ruby/3.2.0/gems/crack-1.0.1/LICENSE +20 -0
- data/vendor/bundle/ruby/3.2.0/gems/crack-1.0.1/README.md +43 -0
- data/vendor/bundle/ruby/3.2.0/gems/crack-1.0.1/lib/crack/json.rb +113 -0
- data/vendor/bundle/ruby/3.2.0/gems/crack-1.0.1/lib/crack/util.rb +17 -0
- data/vendor/bundle/ruby/3.2.0/gems/crack-1.0.1/lib/crack/version.rb +3 -0
- data/vendor/bundle/ruby/3.2.0/gems/crack-1.0.1/lib/crack/xml.rb +240 -0
- data/vendor/bundle/ruby/3.2.0/gems/crack-1.0.1/lib/crack.rb +8 -0
- data/vendor/bundle/ruby/3.2.0/gems/date-3.5.1/ext/date/Makefile +3 -3
- data/vendor/bundle/ruby/3.2.0/gems/date-3.5.1/lib/date_core.so +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/erb-6.0.1/ext/erb/escape/Makefile +3 -3
- data/vendor/bundle/ruby/3.2.0/gems/erb-6.0.1/lib/erb/escape.so +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/CHANGELOG.md +574 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/LICENSE.md +20 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/README.md +67 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/Rakefile +12 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/examples/client_spec.rb +119 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/examples/client_test.rb +144 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/adapter/test.rb +311 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/adapter.rb +101 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/adapter_registry.rb +30 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/connection.rb +565 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/encoders/flat_params_encoder.rb +105 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/encoders/nested_params_encoder.rb +183 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/error.rb +202 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/logging/formatter.rb +118 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/methods.rb +6 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/middleware.rb +72 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/middleware_registry.rb +83 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/options/connection_options.rb +23 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/options/env.rb +204 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/options/proxy_options.rb +38 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/options/request_options.rb +23 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/options/ssl_options.rb +76 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/options.rb +219 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/parameters.rb +5 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/rack_builder.rb +248 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/request/authorization.rb +54 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/request/instrumentation.rb +58 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/request/json.rb +70 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/request/url_encoded.rb +60 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/request.rb +139 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/response/json.rb +74 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/response/logger.rb +39 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/response/raise_error.rb +83 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/response.rb +95 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/utils/headers.rb +150 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/utils/params_hash.rb +61 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/utils.rb +121 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/version.rb +5 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday.rb +158 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/external_adapters/faraday_specs_setup.rb +14 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/adapter/test_spec.rb +442 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/adapter_registry_spec.rb +28 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/adapter_spec.rb +55 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/connection_spec.rb +841 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/error_spec.rb +175 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/middleware_registry_spec.rb +31 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/middleware_spec.rb +213 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/options/env_spec.rb +76 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/options/options_spec.rb +297 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/options/proxy_options_spec.rb +79 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/options/request_options_spec.rb +19 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/params_encoders/flat_spec.rb +42 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/params_encoders/nested_spec.rb +151 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/rack_builder_spec.rb +317 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/request/authorization_spec.rb +118 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/request/instrumentation_spec.rb +74 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/request/json_spec.rb +199 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/request/url_encoded_spec.rb +93 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/request_spec.rb +110 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/response/json_spec.rb +206 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/response/logger_spec.rb +299 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/response/raise_error_spec.rb +286 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/response_spec.rb +84 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/utils/headers_spec.rb +109 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/utils_spec.rb +120 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday_spec.rb +43 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/spec_helper.rb +133 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/support/disabling_stub.rb +14 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/support/fake_safe_buffer.rb +15 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/support/faraday_middleware_subclasses.rb +18 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/support/helper_methods.rb +96 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/support/shared_examples/adapter.rb +105 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/support/shared_examples/params_encoder.rb +18 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/support/shared_examples/request_method.rb +263 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/support/streaming_response_checker.rb +35 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-net_http-3.4.2/LICENSE.md +21 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-net_http-3.4.2/README.md +57 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-net_http-3.4.2/lib/faraday/adapter/net_http.rb +206 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-net_http-3.4.2/lib/faraday/net_http/version.rb +7 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-net_http-3.4.2/lib/faraday/net_http.rb +10 -0
- data/vendor/bundle/ruby/3.2.0/gems/hashdiff-1.2.1/Gemfile +8 -0
- data/vendor/bundle/ruby/3.2.0/gems/hashdiff-1.2.1/LICENSE +19 -0
- data/vendor/bundle/ruby/3.2.0/gems/hashdiff-1.2.1/README.md +323 -0
- data/vendor/bundle/ruby/3.2.0/gems/hashdiff-1.2.1/Rakefile +18 -0
- data/vendor/bundle/ruby/3.2.0/gems/hashdiff-1.2.1/changelog.md +127 -0
- data/vendor/bundle/ruby/3.2.0/gems/hashdiff-1.2.1/hashdiff.gemspec +39 -0
- data/vendor/bundle/ruby/3.2.0/gems/hashdiff-1.2.1/lib/hashdiff/compare_hashes.rb +101 -0
- data/vendor/bundle/ruby/3.2.0/gems/hashdiff-1.2.1/lib/hashdiff/diff.rb +185 -0
- data/vendor/bundle/ruby/3.2.0/gems/hashdiff-1.2.1/lib/hashdiff/lcs.rb +66 -0
- data/vendor/bundle/ruby/3.2.0/gems/hashdiff-1.2.1/lib/hashdiff/lcs_compare_arrays.rb +32 -0
- data/vendor/bundle/ruby/3.2.0/gems/hashdiff-1.2.1/lib/hashdiff/linear_compare_array.rb +159 -0
- data/vendor/bundle/ruby/3.2.0/gems/hashdiff-1.2.1/lib/hashdiff/patch.rb +88 -0
- data/vendor/bundle/ruby/3.2.0/gems/hashdiff-1.2.1/lib/hashdiff/util.rb +155 -0
- data/vendor/bundle/ruby/3.2.0/gems/hashdiff-1.2.1/lib/hashdiff/version.rb +5 -0
- data/vendor/bundle/ruby/3.2.0/gems/hashdiff-1.2.1/lib/hashdiff.rb +10 -0
- data/vendor/bundle/ruby/3.2.0/gems/io-console-0.8.2/ext/io/console/Makefile +3 -3
- data/vendor/bundle/ruby/3.2.0/gems/io-console-0.8.2/lib/io/console.so +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/json-2.18.1/ext/json/ext/generator/Makefile +3 -3
- data/vendor/bundle/ruby/3.2.0/gems/json-2.18.1/ext/json/ext/parser/Makefile +3 -3
- data/vendor/bundle/ruby/3.2.0/gems/json-2.18.1/lib/json/ext/generator.so +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/json-2.18.1/lib/json/ext/parser.so +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/net-http-0.9.1/BSDL +22 -0
- data/vendor/bundle/ruby/3.2.0/gems/net-http-0.9.1/COPYING +56 -0
- data/vendor/bundle/ruby/3.2.0/gems/net-http-0.9.1/README.md +93 -0
- data/vendor/bundle/ruby/3.2.0/gems/net-http-0.9.1/doc/net-http/examples.rdoc +31 -0
- data/vendor/bundle/ruby/3.2.0/gems/net-http-0.9.1/doc/net-http/included_getters.rdoc +3 -0
- data/vendor/bundle/ruby/3.2.0/gems/net-http-0.9.1/lib/net/http/exceptions.rb +35 -0
- data/vendor/bundle/ruby/3.2.0/gems/net-http-0.9.1/lib/net/http/generic_request.rb +429 -0
- data/vendor/bundle/ruby/3.2.0/gems/net-http-0.9.1/lib/net/http/header.rb +985 -0
- data/vendor/bundle/ruby/3.2.0/gems/net-http-0.9.1/lib/net/http/proxy_delta.rb +17 -0
- data/vendor/bundle/ruby/3.2.0/gems/net-http-0.9.1/lib/net/http/request.rb +88 -0
- data/vendor/bundle/ruby/3.2.0/gems/net-http-0.9.1/lib/net/http/requests.rb +444 -0
- data/vendor/bundle/ruby/3.2.0/gems/net-http-0.9.1/lib/net/http/response.rb +739 -0
- data/vendor/bundle/ruby/3.2.0/gems/net-http-0.9.1/lib/net/http/responses.rb +1242 -0
- data/vendor/bundle/ruby/3.2.0/gems/net-http-0.9.1/lib/net/http/status.rb +84 -0
- data/vendor/bundle/ruby/3.2.0/gems/net-http-0.9.1/lib/net/http.rb +2608 -0
- data/vendor/bundle/ruby/3.2.0/gems/net-http-0.9.1/lib/net/https.rb +23 -0
- data/vendor/bundle/ruby/3.2.0/gems/nio4r-2.7.5/ext/nio4r/Makefile +3 -3
- data/vendor/bundle/ruby/3.2.0/gems/nio4r-2.7.5/lib/nio4r_ext.so +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/prism-1.9.0/ext/prism/Makefile +3 -3
- data/vendor/bundle/ruby/3.2.0/gems/prism-1.9.0/lib/prism/prism.so +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/psych-5.3.1/ext/psych/Makefile +3 -3
- data/vendor/bundle/ruby/3.2.0/gems/psych-5.3.1/lib/psych.so +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/public_suffix-7.0.5/CHANGELOG.md +649 -0
- data/vendor/bundle/ruby/3.2.0/gems/public_suffix-7.0.5/Gemfile +16 -0
- data/vendor/bundle/ruby/3.2.0/gems/public_suffix-7.0.5/LICENSE.txt +22 -0
- data/vendor/bundle/ruby/3.2.0/gems/public_suffix-7.0.5/README.md +231 -0
- data/vendor/bundle/ruby/3.2.0/gems/public_suffix-7.0.5/SECURITY.md +24 -0
- data/vendor/bundle/ruby/3.2.0/gems/public_suffix-7.0.5/data/list.txt +16298 -0
- data/vendor/bundle/ruby/3.2.0/gems/public_suffix-7.0.5/lib/public_suffix/domain.rb +235 -0
- data/vendor/bundle/ruby/3.2.0/gems/public_suffix-7.0.5/lib/public_suffix/errors.rb +41 -0
- data/vendor/bundle/ruby/3.2.0/gems/public_suffix-7.0.5/lib/public_suffix/list.rb +247 -0
- data/vendor/bundle/ruby/3.2.0/gems/public_suffix-7.0.5/lib/public_suffix/rule.rb +350 -0
- data/vendor/bundle/ruby/3.2.0/gems/public_suffix-7.0.5/lib/public_suffix/version.rb +14 -0
- data/vendor/bundle/ruby/3.2.0/gems/public_suffix-7.0.5/lib/public_suffix.rb +177 -0
- data/vendor/bundle/ruby/3.2.0/gems/racc-1.8.1/ext/racc/cparse/Makefile +3 -3
- data/vendor/bundle/ruby/3.2.0/gems/racc-1.8.1/lib/racc/cparse.so +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/redcarpet-3.6.1/ext/redcarpet/Makefile +3 -3
- data/vendor/bundle/ruby/3.2.0/gems/redcarpet-3.6.1/lib/redcarpet.so +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/LICENSE.txt +22 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/NEWS.md +843 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/README.md +57 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/doc/rexml/context.rdoc +143 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/doc/rexml/tasks/rdoc/child.rdoc +87 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/doc/rexml/tasks/rdoc/document.rdoc +276 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/doc/rexml/tasks/rdoc/element.rdoc +602 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/doc/rexml/tasks/rdoc/node.rdoc +97 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/doc/rexml/tasks/rdoc/parent.rdoc +267 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/doc/rexml/tasks/tocs/child_toc.rdoc +12 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/doc/rexml/tasks/tocs/document_toc.rdoc +30 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/doc/rexml/tasks/tocs/element_toc.rdoc +55 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/doc/rexml/tasks/tocs/master_toc.rdoc +135 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/doc/rexml/tasks/tocs/node_toc.rdoc +16 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/doc/rexml/tasks/tocs/parent_toc.rdoc +25 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/doc/rexml/tutorial.rdoc +1358 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/attlistdecl.rb +63 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/attribute.rb +210 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/cdata.rb +68 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/child.rb +96 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/comment.rb +80 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/doctype.rb +306 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/document.rb +471 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/dtd/attlistdecl.rb +11 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/dtd/dtd.rb +47 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/dtd/elementdecl.rb +18 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/dtd/entitydecl.rb +57 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/dtd/notationdecl.rb +40 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/element.rb +2578 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/encoding.rb +48 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/entity.rb +142 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/formatters/default.rb +116 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/formatters/pretty.rb +142 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/formatters/transitive.rb +58 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/functions.rb +446 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/instruction.rb +79 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/light/node.rb +188 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/namespace.rb +63 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/node.rb +80 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/output.rb +30 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/parent.rb +166 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/parseexception.rb +53 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/parsers/baseparser.rb +949 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/parsers/lightparser.rb +59 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/parsers/pullparser.rb +213 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/parsers/sax2parser.rb +270 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/parsers/streamparser.rb +67 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/parsers/treeparser.rb +89 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/parsers/ultralightparser.rb +57 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/parsers/xpathparser.rb +739 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/quickpath.rb +267 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/rexml.rb +39 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/sax2listener.rb +98 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/security.rb +28 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/source.rb +388 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/streamlistener.rb +93 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/text.rb +420 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/undefinednamespaceexception.rb +9 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/validation/relaxng.rb +540 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/validation/validation.rb +144 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/validation/validationexception.rb +10 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/xmldecl.rb +130 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/xmltokens.rb +85 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/xpath.rb +70 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/xpath_parser.rb +980 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml.rb +3 -0
- data/vendor/bundle/ruby/3.2.0/gems/stringio-3.2.0/ext/stringio/Makefile +3 -3
- data/vendor/bundle/ruby/3.2.0/gems/stringio-3.2.0/lib/stringio.so +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/CHANGELOG.md +2148 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/LICENSE +20 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/README.md +1229 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/api.rb +111 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/assertion_failure.rb +13 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/callback_registry.rb +37 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/config.rb +20 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/cucumber.rb +12 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/deprecation.rb +11 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/errors.rb +19 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/http_lib_adapters/async_http_client_adapter.rb +228 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/http_lib_adapters/curb_adapter.rb +354 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/http_lib_adapters/em_http_request_adapter.rb +239 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/http_lib_adapters/excon_adapter.rb +167 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/http_lib_adapters/http_lib_adapter.rb +9 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/http_lib_adapters/http_lib_adapter_registry.rb +21 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/http_lib_adapters/http_rb/client.rb +17 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/http_lib_adapters/http_rb/request.rb +28 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/http_lib_adapters/http_rb/response.rb +95 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/http_lib_adapters/http_rb/streamer.rb +44 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/http_lib_adapters/http_rb/webmock.rb +77 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/http_lib_adapters/http_rb_adapter.rb +39 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/http_lib_adapters/httpclient_adapter.rb +260 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/http_lib_adapters/manticore_adapter.rb +147 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/http_lib_adapters/net_http.rb +310 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/http_lib_adapters/net_http_response.rb +36 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/http_lib_adapters/patron_adapter.rb +132 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/http_lib_adapters/typhoeus_hydra_adapter.rb +190 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/matchers/any_arg_matcher.rb +15 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/matchers/hash_argument_matcher.rb +23 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/matchers/hash_excluding_matcher.rb +17 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/matchers/hash_including_matcher.rb +19 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/minitest.rb +43 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/rack_response.rb +73 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/request_body_diff.rb +66 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/request_execution_verifier.rb +79 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/request_pattern.rb +428 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/request_registry.rb +37 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/request_signature.rb +56 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/request_signature_snippet.rb +63 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/request_stub.rb +134 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/response.rb +161 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/responses_sequence.rb +42 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/rspec/matchers/request_pattern_matcher.rb +80 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/rspec/matchers/webmock_matcher.rb +69 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/rspec/matchers.rb +29 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/rspec.rb +44 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/stub_registry.rb +84 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/stub_request_snippet.rb +40 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/test_unit.rb +22 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/util/hash_counter.rb +45 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/util/hash_keys_stringifier.rb +27 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/util/hash_validator.rb +19 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/util/headers.rb +77 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/util/parsers/json.rb +72 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/util/parsers/parse_error.rb +7 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/util/parsers/xml.rb +16 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/util/query_mapper.rb +283 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/util/uri.rb +113 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/util/values_stringifier.rb +22 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/util/version_checker.rb +113 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/version.rb +5 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/webmock.rb +175 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock.rb +61 -0
- data/vendor/bundle/ruby/3.2.0/gems/websocket-driver-0.8.0/ext/websocket-driver/Makefile +3 -3
- data/vendor/bundle/ruby/3.2.0/gems/websocket-driver-0.8.0/lib/websocket_mask.so +0 -0
- data/vendor/bundle/ruby/3.2.0/specifications/addressable-2.9.0.gemspec +29 -0
- data/vendor/bundle/ruby/3.2.0/specifications/crack-1.0.1.gemspec +27 -0
- data/vendor/bundle/ruby/3.2.0/specifications/faraday-2.14.1.gemspec +0 -0
- data/vendor/bundle/ruby/3.2.0/specifications/faraday-net_http-3.4.2.gemspec +26 -0
- data/vendor/bundle/ruby/3.2.0/specifications/hashdiff-1.2.1.gemspec +30 -0
- data/vendor/bundle/ruby/3.2.0/specifications/net-http-0.9.1.gemspec +27 -0
- data/vendor/bundle/ruby/3.2.0/specifications/public_suffix-7.0.5.gemspec +24 -0
- data/vendor/bundle/ruby/3.2.0/specifications/rexml-3.4.4.gemspec +25 -0
- data/vendor/bundle/ruby/3.2.0/specifications/webmock-3.26.2.gemspec +44 -0
- metadata +377 -2
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'cgi/escape'
|
|
4
|
+
require 'cgi/util' if RUBY_VERSION < '3.5'
|
|
5
|
+
require 'date'
|
|
6
|
+
require 'set'
|
|
7
|
+
require 'forwardable'
|
|
8
|
+
require 'faraday/version'
|
|
9
|
+
require 'faraday/methods'
|
|
10
|
+
require 'faraday/error'
|
|
11
|
+
require 'faraday/middleware_registry'
|
|
12
|
+
require 'faraday/utils'
|
|
13
|
+
require 'faraday/options'
|
|
14
|
+
require 'faraday/connection'
|
|
15
|
+
require 'faraday/rack_builder'
|
|
16
|
+
require 'faraday/parameters'
|
|
17
|
+
require 'faraday/middleware'
|
|
18
|
+
require 'faraday/adapter'
|
|
19
|
+
require 'faraday/request'
|
|
20
|
+
require 'faraday/response'
|
|
21
|
+
require 'faraday/net_http'
|
|
22
|
+
# This is the main namespace for Faraday.
|
|
23
|
+
#
|
|
24
|
+
# It provides methods to create {Connection} objects, and HTTP-related
|
|
25
|
+
# methods to use directly.
|
|
26
|
+
#
|
|
27
|
+
# @example Helpful class methods for easy usage
|
|
28
|
+
# Faraday.get "http://faraday.com"
|
|
29
|
+
#
|
|
30
|
+
# @example Helpful class method `.new` to create {Connection} objects.
|
|
31
|
+
# conn = Faraday.new "http://faraday.com"
|
|
32
|
+
# conn.get '/'
|
|
33
|
+
#
|
|
34
|
+
module Faraday
|
|
35
|
+
CONTENT_TYPE = 'Content-Type'
|
|
36
|
+
|
|
37
|
+
class << self
|
|
38
|
+
# The root path that Faraday is being loaded from.
|
|
39
|
+
#
|
|
40
|
+
# This is the root from where the libraries are auto-loaded.
|
|
41
|
+
#
|
|
42
|
+
# @return [String]
|
|
43
|
+
attr_accessor :root_path
|
|
44
|
+
|
|
45
|
+
# Gets or sets the path that the Faraday libs are loaded from.
|
|
46
|
+
# @return [String]
|
|
47
|
+
attr_accessor :lib_path
|
|
48
|
+
|
|
49
|
+
# @overload default_adapter
|
|
50
|
+
# Gets the Symbol key identifying a default Adapter to use
|
|
51
|
+
# for the default {Faraday::Connection}. Defaults to `:net_http`.
|
|
52
|
+
# @return [Symbol] the default adapter
|
|
53
|
+
# @overload default_adapter=(adapter)
|
|
54
|
+
# Updates default adapter while resetting {.default_connection}.
|
|
55
|
+
# @return [Symbol] the new default_adapter.
|
|
56
|
+
attr_reader :default_adapter
|
|
57
|
+
|
|
58
|
+
# Option for the default_adapter
|
|
59
|
+
# @return [Hash] default_adapter options
|
|
60
|
+
attr_accessor :default_adapter_options
|
|
61
|
+
|
|
62
|
+
# Documented below, see default_connection
|
|
63
|
+
attr_writer :default_connection
|
|
64
|
+
|
|
65
|
+
# Tells Faraday to ignore the environment proxy (http_proxy).
|
|
66
|
+
# Defaults to `false`.
|
|
67
|
+
# @return [Boolean]
|
|
68
|
+
attr_accessor :ignore_env_proxy
|
|
69
|
+
|
|
70
|
+
# Initializes a new {Connection}.
|
|
71
|
+
#
|
|
72
|
+
# @param url [String,Hash] The optional String base URL to use as a prefix
|
|
73
|
+
# for all requests. Can also be the options Hash. Any of these
|
|
74
|
+
# values will be set on every request made, unless overridden
|
|
75
|
+
# for a specific request.
|
|
76
|
+
# @param options [Hash]
|
|
77
|
+
# @option options [String] :url Base URL
|
|
78
|
+
# @option options [Hash] :params Hash of unencoded URI query params.
|
|
79
|
+
# @option options [Hash] :headers Hash of unencoded HTTP headers.
|
|
80
|
+
# @option options [Hash] :request Hash of request options.
|
|
81
|
+
# @option options [Hash] :ssl Hash of SSL options.
|
|
82
|
+
# @option options [Hash] :proxy Hash of Proxy options.
|
|
83
|
+
# @return [Faraday::Connection]
|
|
84
|
+
#
|
|
85
|
+
# @example With an URL argument
|
|
86
|
+
# Faraday.new 'http://faraday.com'
|
|
87
|
+
# # => Faraday::Connection to http://faraday.com
|
|
88
|
+
#
|
|
89
|
+
# @example With an URL argument and an options hash
|
|
90
|
+
# Faraday.new 'http://faraday.com', params: { page: 1 }
|
|
91
|
+
# # => Faraday::Connection to http://faraday.com?page=1
|
|
92
|
+
#
|
|
93
|
+
# @example With everything in an options hash
|
|
94
|
+
# Faraday.new url: 'http://faraday.com',
|
|
95
|
+
# params: { page: 1 }
|
|
96
|
+
# # => Faraday::Connection to http://faraday.com?page=1
|
|
97
|
+
def new(url = nil, options = {}, &block)
|
|
98
|
+
options = Utils.deep_merge(default_connection_options, options)
|
|
99
|
+
Faraday::Connection.new(url, options, &block)
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# Documented elsewhere, see default_adapter reader
|
|
103
|
+
def default_adapter=(adapter)
|
|
104
|
+
@default_connection = nil
|
|
105
|
+
@default_adapter = adapter
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
def respond_to_missing?(symbol, include_private = false)
|
|
109
|
+
default_connection.respond_to?(symbol, include_private) || super
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# @overload default_connection
|
|
113
|
+
# Gets the default connection used for simple scripts.
|
|
114
|
+
# @return [Faraday::Connection] a connection configured with
|
|
115
|
+
# the default_adapter.
|
|
116
|
+
# @overload default_connection=(connection)
|
|
117
|
+
# @param connection [Faraday::Connection]
|
|
118
|
+
# Sets the default {Faraday::Connection} for simple scripts that
|
|
119
|
+
# access the Faraday constant directly, such as
|
|
120
|
+
# <code>Faraday.get "https://faraday.com"</code>.
|
|
121
|
+
def default_connection
|
|
122
|
+
@default_connection ||= Connection.new(default_connection_options)
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# Gets the default connection options used when calling {Faraday#new}.
|
|
126
|
+
#
|
|
127
|
+
# @return [Faraday::ConnectionOptions]
|
|
128
|
+
def default_connection_options
|
|
129
|
+
@default_connection_options ||= ConnectionOptions.new
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
# Sets the default options used when calling {Faraday#new}.
|
|
133
|
+
#
|
|
134
|
+
# @param options [Hash, Faraday::ConnectionOptions]
|
|
135
|
+
def default_connection_options=(options)
|
|
136
|
+
@default_connection = nil
|
|
137
|
+
@default_connection_options = ConnectionOptions.from(options)
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
private
|
|
141
|
+
|
|
142
|
+
# Internal: Proxies method calls on the Faraday constant to
|
|
143
|
+
# .default_connection.
|
|
144
|
+
def method_missing(name, *args, &block)
|
|
145
|
+
if default_connection.respond_to?(name)
|
|
146
|
+
default_connection.send(name, *args, &block)
|
|
147
|
+
else
|
|
148
|
+
super
|
|
149
|
+
end
|
|
150
|
+
end
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
self.ignore_env_proxy = false
|
|
154
|
+
self.root_path = File.expand_path __dir__
|
|
155
|
+
self.lib_path = File.expand_path 'faraday', __dir__
|
|
156
|
+
self.default_adapter = :net_http
|
|
157
|
+
self.default_adapter_options = {}
|
|
158
|
+
end
|
data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/external_adapters/faraday_specs_setup.rb
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'webmock/rspec'
|
|
4
|
+
WebMock.disable_net_connect!(allow_localhost: true)
|
|
5
|
+
|
|
6
|
+
require_relative '../support/helper_methods'
|
|
7
|
+
require_relative '../support/disabling_stub'
|
|
8
|
+
require_relative '../support/streaming_response_checker'
|
|
9
|
+
require_relative '../support/shared_examples/adapter'
|
|
10
|
+
require_relative '../support/shared_examples/request_method'
|
|
11
|
+
|
|
12
|
+
RSpec.configure do |config|
|
|
13
|
+
config.include Faraday::HelperMethods
|
|
14
|
+
end
|
|
@@ -0,0 +1,442 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
RSpec.describe Faraday::Adapter::Test do
|
|
4
|
+
let(:stubs) do
|
|
5
|
+
described_class::Stubs.new do |stub|
|
|
6
|
+
stub.get('http://domain.test/hello') do
|
|
7
|
+
[200, { 'Content-Type' => 'text/html' }, 'domain: hello']
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
stub.get('http://wrong.test/hello') do
|
|
11
|
+
[200, { 'Content-Type' => 'text/html' }, 'wrong: hello']
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
stub.get('http://wrong.test/bait') do
|
|
15
|
+
[404, { 'Content-Type' => 'text/html' }]
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
stub.get('/hello') do
|
|
19
|
+
[200, { 'Content-Type' => 'text/html' }, 'hello']
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
stub.get('/method-echo') do |env|
|
|
23
|
+
[200, { 'Content-Type' => 'text/html' }, env[:method].to_s]
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
stub.get(%r{\A/resources/\d+(?:\?|\z)}) do
|
|
27
|
+
[200, { 'Content-Type' => 'text/html' }, 'show']
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
stub.get(%r{\A/resources/(specified)\z}) do |_env, meta|
|
|
31
|
+
[200, { 'Content-Type' => 'text/html' }, "show #{meta[:match_data][1]}"]
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
let(:connection) do
|
|
37
|
+
Faraday.new do |builder|
|
|
38
|
+
builder.adapter :test, stubs
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
let(:response) { connection.get('/hello') }
|
|
43
|
+
|
|
44
|
+
context 'with simple path sets status' do
|
|
45
|
+
subject { response.status }
|
|
46
|
+
|
|
47
|
+
it { is_expected.to eq 200 }
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
context 'with simple path sets headers' do
|
|
51
|
+
subject { response.headers['Content-Type'] }
|
|
52
|
+
|
|
53
|
+
it { is_expected.to eq 'text/html' }
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
context 'with simple path sets body' do
|
|
57
|
+
subject { response.body }
|
|
58
|
+
|
|
59
|
+
it { is_expected.to eq 'hello' }
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
context 'with host points to the right stub' do
|
|
63
|
+
subject { connection.get('http://domain.test/hello').body }
|
|
64
|
+
|
|
65
|
+
it { is_expected.to eq 'domain: hello' }
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
describe 'can be called several times' do
|
|
69
|
+
subject { connection.get('/hello').body }
|
|
70
|
+
|
|
71
|
+
it { is_expected.to eq 'hello' }
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
describe 'can handle regular expression path' do
|
|
75
|
+
subject { connection.get('/resources/1').body }
|
|
76
|
+
|
|
77
|
+
it { is_expected.to eq 'show' }
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
describe 'can handle single parameter block' do
|
|
81
|
+
subject { connection.get('/method-echo').body }
|
|
82
|
+
|
|
83
|
+
it { is_expected.to eq 'get' }
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
describe 'can handle regular expression path with captured result' do
|
|
87
|
+
subject { connection.get('/resources/specified').body }
|
|
88
|
+
|
|
89
|
+
it { is_expected.to eq 'show specified' }
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
context 'with get params' do
|
|
93
|
+
subject { connection.get('/param?a=1').body }
|
|
94
|
+
|
|
95
|
+
before do
|
|
96
|
+
stubs.get('/param?a=1') { [200, {}, 'a'] }
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
it { is_expected.to eq 'a' }
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
describe 'ignoring unspecified get params' do
|
|
103
|
+
before do
|
|
104
|
+
stubs.get('/optional?a=1') { [200, {}, 'a'] }
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
context 'with multiple params' do
|
|
108
|
+
subject { connection.get('/optional?a=1&b=1').body }
|
|
109
|
+
|
|
110
|
+
it { is_expected.to eq 'a' }
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
context 'with single param' do
|
|
114
|
+
subject { connection.get('/optional?a=1').body }
|
|
115
|
+
|
|
116
|
+
it { is_expected.to eq 'a' }
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
context 'without params' do
|
|
120
|
+
subject(:request) { connection.get('/optional') }
|
|
121
|
+
|
|
122
|
+
it do
|
|
123
|
+
expect { request }.to raise_error(
|
|
124
|
+
Faraday::Adapter::Test::Stubs::NotFound
|
|
125
|
+
)
|
|
126
|
+
end
|
|
127
|
+
end
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
context 'with http headers' do
|
|
131
|
+
before do
|
|
132
|
+
stubs.get('/yo', 'X-HELLO' => 'hello') { [200, {}, 'a'] }
|
|
133
|
+
stubs.get('/yo') { [200, {}, 'b'] }
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
context 'with header' do
|
|
137
|
+
subject do
|
|
138
|
+
connection.get('/yo') { |env| env.headers['X-HELLO'] = 'hello' }.body
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
it { is_expected.to eq 'a' }
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
context 'without header' do
|
|
145
|
+
subject do
|
|
146
|
+
connection.get('/yo').body
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
it { is_expected.to eq 'b' }
|
|
150
|
+
end
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
describe 'different outcomes for the same request' do
|
|
154
|
+
def make_request
|
|
155
|
+
connection.get('/foo')
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
subject(:request) { make_request.body }
|
|
159
|
+
|
|
160
|
+
before do
|
|
161
|
+
stubs.get('/foo') { [200, { 'Content-Type' => 'text/html' }, 'hello'] }
|
|
162
|
+
stubs.get('/foo') { [200, { 'Content-Type' => 'text/html' }, 'world'] }
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
context 'the first request' do
|
|
166
|
+
it { is_expected.to eq 'hello' }
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
context 'the second request' do
|
|
170
|
+
before do
|
|
171
|
+
make_request
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
it { is_expected.to eq 'world' }
|
|
175
|
+
end
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
describe 'yielding env to stubs' do
|
|
179
|
+
subject { connection.get('http://foo.com/foo?a=1').body }
|
|
180
|
+
|
|
181
|
+
before do
|
|
182
|
+
stubs.get '/foo' do |env|
|
|
183
|
+
expect(env[:url].path).to eq '/foo'
|
|
184
|
+
expect(env[:url].host).to eq 'foo.com'
|
|
185
|
+
expect(env[:params]['a']).to eq '1'
|
|
186
|
+
expect(env[:request_headers]['Accept']).to eq 'text/plain'
|
|
187
|
+
[200, {}, 'a']
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
connection.headers['Accept'] = 'text/plain'
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
it { is_expected.to eq 'a' }
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
describe 'params parsing' do
|
|
197
|
+
subject { connection.get('http://foo.com/foo?a[b]=1').body }
|
|
198
|
+
|
|
199
|
+
context 'with default encoder' do
|
|
200
|
+
before do
|
|
201
|
+
stubs.get '/foo' do |env|
|
|
202
|
+
expect(env[:params]['a']['b']).to eq '1'
|
|
203
|
+
[200, {}, 'a']
|
|
204
|
+
end
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
it { is_expected.to eq 'a' }
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
context 'with nested encoder' do
|
|
211
|
+
before do
|
|
212
|
+
stubs.get '/foo' do |env|
|
|
213
|
+
expect(env[:params]['a']['b']).to eq '1'
|
|
214
|
+
[200, {}, 'a']
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
connection.options.params_encoder = Faraday::NestedParamsEncoder
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
it { is_expected.to eq 'a' }
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
context 'with flat encoder' do
|
|
224
|
+
before do
|
|
225
|
+
stubs.get '/foo' do |env|
|
|
226
|
+
expect(env[:params]['a[b]']).to eq '1'
|
|
227
|
+
[200, {}, 'a']
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
connection.options.params_encoder = Faraday::FlatParamsEncoder
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
it { is_expected.to eq 'a' }
|
|
234
|
+
end
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
describe 'raising an error if no stub was found' do
|
|
238
|
+
describe 'for request' do
|
|
239
|
+
subject(:request) { connection.get('/invalid') { [200, {}, []] } }
|
|
240
|
+
|
|
241
|
+
it { expect { request }.to raise_error described_class::Stubs::NotFound }
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
describe 'for specified host' do
|
|
245
|
+
subject(:request) { connection.get('http://domain.test/bait') }
|
|
246
|
+
|
|
247
|
+
it { expect { request }.to raise_error described_class::Stubs::NotFound }
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
describe 'for request without specified header' do
|
|
251
|
+
subject(:request) { connection.get('/yo') }
|
|
252
|
+
|
|
253
|
+
before do
|
|
254
|
+
stubs.get('/yo', 'X-HELLO' => 'hello') { [200, {}, 'a'] }
|
|
255
|
+
end
|
|
256
|
+
|
|
257
|
+
it { expect { request }.to raise_error described_class::Stubs::NotFound }
|
|
258
|
+
end
|
|
259
|
+
end
|
|
260
|
+
|
|
261
|
+
describe 'for request with non default params encoder' do
|
|
262
|
+
let(:connection) do
|
|
263
|
+
Faraday.new(request: { params_encoder: Faraday::FlatParamsEncoder }) do |builder|
|
|
264
|
+
builder.adapter :test, stubs
|
|
265
|
+
end
|
|
266
|
+
end
|
|
267
|
+
let(:stubs) do
|
|
268
|
+
described_class::Stubs.new do |stubs|
|
|
269
|
+
stubs.get('/path?a=x&a=y&a=z') { [200, {}, 'a'] }
|
|
270
|
+
end
|
|
271
|
+
end
|
|
272
|
+
|
|
273
|
+
context 'when all flat param values are correctly set' do
|
|
274
|
+
subject(:request) { connection.get('/path?a=x&a=y&a=z') }
|
|
275
|
+
|
|
276
|
+
it { expect(request.status).to eq 200 }
|
|
277
|
+
end
|
|
278
|
+
|
|
279
|
+
shared_examples 'raise NotFound when params do not satisfy the flat param values' do |params|
|
|
280
|
+
subject(:request) { connection.get('/path', params) }
|
|
281
|
+
|
|
282
|
+
context "with #{params.inspect}" do
|
|
283
|
+
it { expect { request }.to raise_error described_class::Stubs::NotFound }
|
|
284
|
+
end
|
|
285
|
+
end
|
|
286
|
+
|
|
287
|
+
it_behaves_like 'raise NotFound when params do not satisfy the flat param values', { a: %w[x] }
|
|
288
|
+
it_behaves_like 'raise NotFound when params do not satisfy the flat param values', { a: %w[x y] }
|
|
289
|
+
it_behaves_like 'raise NotFound when params do not satisfy the flat param values', { a: %w[x z y] } # NOTE: The order of the value is also compared.
|
|
290
|
+
it_behaves_like 'raise NotFound when params do not satisfy the flat param values', { b: %w[x y z] }
|
|
291
|
+
end
|
|
292
|
+
|
|
293
|
+
describe 'strict_mode' do
|
|
294
|
+
let(:stubs) do
|
|
295
|
+
described_class::Stubs.new(strict_mode: true) do |stubs|
|
|
296
|
+
stubs.get('/strict?a=12&b=xy', 'Authorization' => 'Bearer m_ck', 'X-C' => 'hello') { [200, {}, 'a'] }
|
|
297
|
+
stubs.get('/with_user_agent?a=12&b=xy', authorization: 'Bearer m_ck', 'User-Agent' => 'My Agent') { [200, {}, 'a'] }
|
|
298
|
+
end
|
|
299
|
+
end
|
|
300
|
+
|
|
301
|
+
context 'when params and headers are exactly set' do
|
|
302
|
+
subject(:request) { connection.get('/strict', { a: '12', b: 'xy' }, { authorization: 'Bearer m_ck', x_c: 'hello' }) }
|
|
303
|
+
|
|
304
|
+
it { expect(request.status).to eq 200 }
|
|
305
|
+
end
|
|
306
|
+
|
|
307
|
+
context 'when params and headers are exactly set with a custom user agent' do
|
|
308
|
+
subject(:request) { connection.get('/with_user_agent', { a: '12', b: 'xy' }, { authorization: 'Bearer m_ck', 'User-Agent' => 'My Agent' }) }
|
|
309
|
+
|
|
310
|
+
it { expect(request.status).to eq 200 }
|
|
311
|
+
end
|
|
312
|
+
|
|
313
|
+
shared_examples 'raise NotFound when params do not satisfy the strict check' do |params|
|
|
314
|
+
subject(:request) { connection.get('/strict', params, { 'Authorization' => 'Bearer m_ck', 'X-C' => 'hello' }) }
|
|
315
|
+
|
|
316
|
+
context "with #{params.inspect}" do
|
|
317
|
+
it { expect { request }.to raise_error described_class::Stubs::NotFound }
|
|
318
|
+
end
|
|
319
|
+
end
|
|
320
|
+
|
|
321
|
+
it_behaves_like 'raise NotFound when params do not satisfy the strict check', { a: '12' }
|
|
322
|
+
it_behaves_like 'raise NotFound when params do not satisfy the strict check', { b: 'xy' }
|
|
323
|
+
it_behaves_like 'raise NotFound when params do not satisfy the strict check', { a: '123', b: 'xy' }
|
|
324
|
+
it_behaves_like 'raise NotFound when params do not satisfy the strict check', { a: '12', b: 'xyz' }
|
|
325
|
+
it_behaves_like 'raise NotFound when params do not satisfy the strict check', { a: '12', b: 'xy', c: 'hello' }
|
|
326
|
+
it_behaves_like 'raise NotFound when params do not satisfy the strict check', { additional: 'special', a: '12', b: 'xy', c: 'hello' }
|
|
327
|
+
|
|
328
|
+
shared_examples 'raise NotFound when headers do not satisfy the strict check' do |path, headers|
|
|
329
|
+
subject(:request) { connection.get(path, { a: 12, b: 'xy' }, headers) }
|
|
330
|
+
|
|
331
|
+
context "with #{headers.inspect}" do
|
|
332
|
+
it { expect { request }.to raise_error described_class::Stubs::NotFound }
|
|
333
|
+
end
|
|
334
|
+
end
|
|
335
|
+
|
|
336
|
+
it_behaves_like 'raise NotFound when headers do not satisfy the strict check', '/strict', { authorization: 'Bearer m_ck' }
|
|
337
|
+
it_behaves_like 'raise NotFound when headers do not satisfy the strict check', '/strict', { 'X-C' => 'hello' }
|
|
338
|
+
it_behaves_like 'raise NotFound when headers do not satisfy the strict check', '/strict', { authorization: 'Bearer m_ck', 'x-c': 'Hi' }
|
|
339
|
+
it_behaves_like 'raise NotFound when headers do not satisfy the strict check', '/strict', { authorization: 'Basic m_ck', 'x-c': 'hello' }
|
|
340
|
+
it_behaves_like 'raise NotFound when headers do not satisfy the strict check', '/strict', { authorization: 'Bearer m_ck', 'x-c': 'hello', x_special: 'special' }
|
|
341
|
+
it_behaves_like 'raise NotFound when headers do not satisfy the strict check', '/with_user_agent', { authorization: 'Bearer m_ck' }
|
|
342
|
+
it_behaves_like 'raise NotFound when headers do not satisfy the strict check', '/with_user_agent', { authorization: 'Bearer m_ck', user_agent: 'Unknown' }
|
|
343
|
+
it_behaves_like 'raise NotFound when headers do not satisfy the strict check', '/with_user_agent', { authorization: 'Bearer m_ck', user_agent: 'My Agent', x_special: 'special' }
|
|
344
|
+
|
|
345
|
+
context 'when strict_mode is disabled' do
|
|
346
|
+
before do
|
|
347
|
+
stubs.strict_mode = false
|
|
348
|
+
end
|
|
349
|
+
|
|
350
|
+
shared_examples 'does not raise NotFound even when params do not satisfy the strict check' do |params|
|
|
351
|
+
subject(:request) { connection.get('/strict', params, { 'Authorization' => 'Bearer m_ck', 'X-C' => 'hello' }) }
|
|
352
|
+
|
|
353
|
+
context "with #{params.inspect}" do
|
|
354
|
+
it { expect(request.status).to eq 200 }
|
|
355
|
+
end
|
|
356
|
+
end
|
|
357
|
+
|
|
358
|
+
it_behaves_like 'does not raise NotFound even when params do not satisfy the strict check', { a: '12', b: 'xy' }
|
|
359
|
+
it_behaves_like 'does not raise NotFound even when params do not satisfy the strict check', { a: '12', b: 'xy', c: 'hello' }
|
|
360
|
+
it_behaves_like 'does not raise NotFound even when params do not satisfy the strict check', { additional: 'special', a: '12', b: 'xy', c: 'hello' }
|
|
361
|
+
|
|
362
|
+
shared_examples 'does not raise NotFound even when headers do not satisfy the strict check' do |path, headers|
|
|
363
|
+
subject(:request) { connection.get(path, { a: 12, b: 'xy' }, headers) }
|
|
364
|
+
|
|
365
|
+
context "with #{headers.inspect}" do
|
|
366
|
+
it { expect(request.status).to eq 200 }
|
|
367
|
+
end
|
|
368
|
+
end
|
|
369
|
+
|
|
370
|
+
it_behaves_like 'does not raise NotFound even when headers do not satisfy the strict check', '/strict', { authorization: 'Bearer m_ck', 'x-c': 'hello' }
|
|
371
|
+
it_behaves_like 'does not raise NotFound even when headers do not satisfy the strict check', '/strict', { authorization: 'Bearer m_ck', 'x-c': 'hello', x_special: 'special' }
|
|
372
|
+
it_behaves_like 'does not raise NotFound even when headers do not satisfy the strict check', '/strict', { authorization: 'Bearer m_ck', 'x-c': 'hello', user_agent: 'Special Agent' }
|
|
373
|
+
it_behaves_like 'does not raise NotFound even when headers do not satisfy the strict check', '/with_user_agent', { authorization: 'Bearer m_ck', user_agent: 'My Agent' }
|
|
374
|
+
it_behaves_like 'does not raise NotFound even when headers do not satisfy the strict check', '/with_user_agent', { authorization: 'Bearer m_ck', user_agent: 'My Agent', x_special: 'special' }
|
|
375
|
+
end
|
|
376
|
+
|
|
377
|
+
describe 'body_match?' do
|
|
378
|
+
let(:stubs) do
|
|
379
|
+
described_class::Stubs.new do |stubs|
|
|
380
|
+
stubs.post('/no_check') { [200, {}, 'ok'] }
|
|
381
|
+
stubs.post('/with_string', 'abc') { [200, {}, 'ok'] }
|
|
382
|
+
stubs.post(
|
|
383
|
+
'/with_proc',
|
|
384
|
+
->(request_body) { JSON.parse(request_body, symbolize_names: true) == { x: '!', a: [{ m: [{ a: true }], n: 123 }] } },
|
|
385
|
+
{ content_type: 'application/json' }
|
|
386
|
+
) do
|
|
387
|
+
[200, {}, 'ok']
|
|
388
|
+
end
|
|
389
|
+
end
|
|
390
|
+
end
|
|
391
|
+
|
|
392
|
+
context 'when trying without any args for body' do
|
|
393
|
+
subject(:without_body) { connection.post('/no_check') }
|
|
394
|
+
|
|
395
|
+
it { expect(without_body.status).to eq 200 }
|
|
396
|
+
end
|
|
397
|
+
|
|
398
|
+
context 'when trying with string body stubs' do
|
|
399
|
+
subject(:with_string) { connection.post('/with_string', 'abc') }
|
|
400
|
+
|
|
401
|
+
it { expect(with_string.status).to eq 200 }
|
|
402
|
+
end
|
|
403
|
+
|
|
404
|
+
context 'when trying with proc body stubs' do
|
|
405
|
+
subject(:with_proc) do
|
|
406
|
+
connection.post('/with_proc', JSON.dump(a: [{ n: 123, m: [{ a: true }] }], x: '!'), { 'Content-Type' => 'application/json' })
|
|
407
|
+
end
|
|
408
|
+
|
|
409
|
+
it { expect(with_proc.status).to eq 200 }
|
|
410
|
+
end
|
|
411
|
+
end
|
|
412
|
+
end
|
|
413
|
+
|
|
414
|
+
describe 'request timeout' do
|
|
415
|
+
subject(:request) do
|
|
416
|
+
connection.get('/sleep') do |req|
|
|
417
|
+
req.options.timeout = timeout
|
|
418
|
+
end
|
|
419
|
+
end
|
|
420
|
+
|
|
421
|
+
before do
|
|
422
|
+
stubs.get('/sleep') do
|
|
423
|
+
sleep(0.01)
|
|
424
|
+
[200, {}, '']
|
|
425
|
+
end
|
|
426
|
+
end
|
|
427
|
+
|
|
428
|
+
context 'when request is within timeout' do
|
|
429
|
+
let(:timeout) { 1 }
|
|
430
|
+
|
|
431
|
+
it { expect(request.status).to eq 200 }
|
|
432
|
+
end
|
|
433
|
+
|
|
434
|
+
context 'when request is too slow' do
|
|
435
|
+
let(:timeout) { 0.001 }
|
|
436
|
+
|
|
437
|
+
it 'raises an exception' do
|
|
438
|
+
expect { request }.to raise_error(Faraday::TimeoutError)
|
|
439
|
+
end
|
|
440
|
+
end
|
|
441
|
+
end
|
|
442
|
+
end
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
RSpec.describe Faraday::AdapterRegistry do
|
|
4
|
+
describe '#initialize' do
|
|
5
|
+
subject(:registry) { described_class.new }
|
|
6
|
+
|
|
7
|
+
it { expect { registry.get(:FinFangFoom) }.to raise_error(NameError) }
|
|
8
|
+
it { expect { registry.get('FinFangFoom') }.to raise_error(NameError) }
|
|
9
|
+
|
|
10
|
+
it 'looks up class by string name' do
|
|
11
|
+
expect(registry.get('Faraday::Connection')).to eq(Faraday::Connection)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
it 'looks up class by symbol name' do
|
|
15
|
+
expect(registry.get(:Faraday)).to eq(Faraday)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
it 'caches lookups with implicit name' do
|
|
19
|
+
registry.set :symbol
|
|
20
|
+
expect(registry.get('symbol')).to eq(:symbol)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
it 'caches lookups with explicit name' do
|
|
24
|
+
registry.set 'string', :name
|
|
25
|
+
expect(registry.get(:name)).to eq('string')
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
RSpec.describe Faraday::Adapter do
|
|
4
|
+
let(:adapter) { Faraday::Adapter.new }
|
|
5
|
+
let(:request) { {} }
|
|
6
|
+
|
|
7
|
+
context '#request_timeout' do
|
|
8
|
+
it 'gets :read timeout' do
|
|
9
|
+
expect(timeout(:read)).to eq(nil)
|
|
10
|
+
|
|
11
|
+
request[:timeout] = 5
|
|
12
|
+
request[:write_timeout] = 1
|
|
13
|
+
|
|
14
|
+
expect(timeout(:read)).to eq(5)
|
|
15
|
+
|
|
16
|
+
request[:read_timeout] = 2
|
|
17
|
+
|
|
18
|
+
expect(timeout(:read)).to eq(2)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
it 'gets :open timeout' do
|
|
22
|
+
expect(timeout(:open)).to eq(nil)
|
|
23
|
+
|
|
24
|
+
request[:timeout] = 5
|
|
25
|
+
request[:write_timeout] = 1
|
|
26
|
+
|
|
27
|
+
expect(timeout(:open)).to eq(5)
|
|
28
|
+
|
|
29
|
+
request[:open_timeout] = 2
|
|
30
|
+
|
|
31
|
+
expect(timeout(:open)).to eq(2)
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
it 'gets :write timeout' do
|
|
35
|
+
expect(timeout(:write)).to eq(nil)
|
|
36
|
+
|
|
37
|
+
request[:timeout] = 5
|
|
38
|
+
request[:read_timeout] = 1
|
|
39
|
+
|
|
40
|
+
expect(timeout(:write)).to eq(5)
|
|
41
|
+
|
|
42
|
+
request[:write_timeout] = 2
|
|
43
|
+
|
|
44
|
+
expect(timeout(:write)).to eq(2)
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
it 'attempts unknown timeout type' do
|
|
48
|
+
expect { timeout(:unknown) }.to raise_error(ArgumentError)
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
def timeout(type)
|
|
52
|
+
adapter.send(:request_timeout, type, request)
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|