iron_admin 0.4.1 → 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/README.md +66 -30
- 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/installation.md +113 -27
- 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 +68 -10
- data/docs/reference/routes.md +10 -0
- data/lib/generators/iron_admin/install/install_generator.rb +49 -4
- data/lib/generators/iron_admin/install/templates/dashboard.rb.tt +5 -1
- data/lib/generators/iron_admin/install_audit/install_audit_generator.rb +26 -10
- data/lib/generators/iron_admin/resource/resource_generator.rb +1 -1
- data/lib/generators/iron_admin/resource/templates/resource.rb.tt +6 -2
- 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 +35 -22
- 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 +149 -91
- 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 +46 -10
- 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,297 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
RSpec.describe Faraday::Options do
|
|
4
|
+
SubOptions = Class.new(Faraday::Options.new(:sub_a, :sub_b))
|
|
5
|
+
ParentOptions = Faraday::Options.new(:a, :b, :c) do
|
|
6
|
+
options c: SubOptions
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
describe '#merge' do
|
|
10
|
+
it 'merges options with hashes' do
|
|
11
|
+
options = ParentOptions.new(1)
|
|
12
|
+
expect(options.a).to eq(1)
|
|
13
|
+
expect(options.b).to be_nil
|
|
14
|
+
|
|
15
|
+
dup = options.merge a: 2, b: 3
|
|
16
|
+
expect(dup.a).to eq(2)
|
|
17
|
+
expect(dup.b).to eq(3)
|
|
18
|
+
expect(options.a).to eq(1)
|
|
19
|
+
expect(options.b).to be_nil
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
it 'deeply merges two options' do
|
|
23
|
+
sub_opts1 = SubOptions.from(sub_a: 3)
|
|
24
|
+
sub_opts2 = SubOptions.from(sub_b: 4)
|
|
25
|
+
opt1 = ParentOptions.from(a: 1, c: sub_opts1)
|
|
26
|
+
opt2 = ParentOptions.from(b: 2, c: sub_opts2)
|
|
27
|
+
|
|
28
|
+
merged = opt1.merge(opt2)
|
|
29
|
+
|
|
30
|
+
expected_sub_opts = SubOptions.from(sub_a: 3, sub_b: 4)
|
|
31
|
+
expected = ParentOptions.from(a: 1, b: 2, c: expected_sub_opts)
|
|
32
|
+
expect(merged).to eq(expected)
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
it 'deeply merges options with hashes' do
|
|
36
|
+
sub_opts1 = SubOptions.from(sub_a: 3)
|
|
37
|
+
sub_opts2 = { sub_b: 4 }
|
|
38
|
+
opt1 = ParentOptions.from(a: 1, c: sub_opts1)
|
|
39
|
+
opt2 = { b: 2, c: sub_opts2 }
|
|
40
|
+
|
|
41
|
+
merged = opt1.merge(opt2)
|
|
42
|
+
|
|
43
|
+
expected_sub_opts = SubOptions.from(sub_a: 3, sub_b: 4)
|
|
44
|
+
expected = ParentOptions.from(a: 1, b: 2, c: expected_sub_opts)
|
|
45
|
+
expect(merged).to eq(expected)
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
it 'deeply merges options with nil' do
|
|
49
|
+
sub_opts = SubOptions.new(3, 4)
|
|
50
|
+
options = ParentOptions.new(1, 2, sub_opts)
|
|
51
|
+
expect(options.a).to eq(1)
|
|
52
|
+
expect(options.b).to eq(2)
|
|
53
|
+
expect(options.c.sub_a).to eq(3)
|
|
54
|
+
expect(options.c.sub_b).to eq(4)
|
|
55
|
+
|
|
56
|
+
options2 = ParentOptions.from(b: 5, c: nil)
|
|
57
|
+
|
|
58
|
+
merged = options.merge(options2)
|
|
59
|
+
|
|
60
|
+
expect(merged.b).to eq(5)
|
|
61
|
+
expect(merged.c).to eq(sub_opts)
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
it 'deeply merges options with options having nil sub-options' do
|
|
65
|
+
options = ParentOptions.from(a: 1)
|
|
66
|
+
|
|
67
|
+
sub_opts = SubOptions.new(3, 4)
|
|
68
|
+
options2 = ParentOptions.from(b: 2, c: sub_opts)
|
|
69
|
+
|
|
70
|
+
expect(options.a).to eq(1)
|
|
71
|
+
expect(options2.b).to eq(2)
|
|
72
|
+
expect(options2.c.sub_a).to eq(3)
|
|
73
|
+
expect(options2.c.sub_b).to eq(4)
|
|
74
|
+
|
|
75
|
+
merged = options.merge(options2)
|
|
76
|
+
|
|
77
|
+
expect(merged.c).to eq(sub_opts)
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
describe '#dup' do
|
|
81
|
+
it 'duplicate options but not sub-options' do
|
|
82
|
+
sub_opts = SubOptions.from(sub_a: 3)
|
|
83
|
+
opts = ParentOptions.from(b: 1, c: sub_opts)
|
|
84
|
+
|
|
85
|
+
duped = opts.dup
|
|
86
|
+
duped.b = 2
|
|
87
|
+
duped.c.sub_a = 4
|
|
88
|
+
|
|
89
|
+
expect(opts.b).to eq(1)
|
|
90
|
+
expect(opts.c.sub_a).to eq(4)
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
describe '#deep_dup' do
|
|
95
|
+
it 'duplicate options and also suboptions' do
|
|
96
|
+
sub_opts = SubOptions.from(sub_a: 3)
|
|
97
|
+
opts = ParentOptions.from(b: 1, c: sub_opts)
|
|
98
|
+
|
|
99
|
+
duped = opts.deep_dup
|
|
100
|
+
duped.b = 2
|
|
101
|
+
duped.c.sub_a = 4
|
|
102
|
+
|
|
103
|
+
expect(opts.b).to eq(1)
|
|
104
|
+
expect(opts.c.sub_a).to eq(3)
|
|
105
|
+
end
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
describe '#clear' do
|
|
109
|
+
it 'clears the options' do
|
|
110
|
+
options = SubOptions.new(1)
|
|
111
|
+
expect(options.empty?).not_to be_truthy
|
|
112
|
+
options.clear
|
|
113
|
+
expect(options.empty?).to be_truthy
|
|
114
|
+
end
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
describe '#empty?' do
|
|
118
|
+
it 'returns true only if all options are nil' do
|
|
119
|
+
options = SubOptions.new
|
|
120
|
+
expect(options.empty?).to be_truthy
|
|
121
|
+
options.sub_a = 1
|
|
122
|
+
expect(options.empty?).not_to be_truthy
|
|
123
|
+
options.delete(:sub_a)
|
|
124
|
+
expect(options.empty?).to be_truthy
|
|
125
|
+
end
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
describe '#each_key' do
|
|
129
|
+
it 'allows to iterate through keys' do
|
|
130
|
+
options = ParentOptions.new(1, 2, 3)
|
|
131
|
+
enum = options.each_key
|
|
132
|
+
expect(enum.next.to_sym).to eq(:a)
|
|
133
|
+
expect(enum.next.to_sym).to eq(:b)
|
|
134
|
+
expect(enum.next.to_sym).to eq(:c)
|
|
135
|
+
end
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
describe '#key?' do
|
|
139
|
+
it 'returns true if the key exists and is not nil' do
|
|
140
|
+
options = SubOptions.new
|
|
141
|
+
expect(options.key?(:sub_a)).not_to be_truthy
|
|
142
|
+
options.sub_a = 1
|
|
143
|
+
expect(options.key?(:sub_a)).to be_truthy
|
|
144
|
+
end
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
describe '#each_value' do
|
|
148
|
+
it 'allows to iterate through values' do
|
|
149
|
+
options = ParentOptions.new(1, 2, 3)
|
|
150
|
+
enum = options.each_value
|
|
151
|
+
expect(enum.next).to eq(1)
|
|
152
|
+
expect(enum.next).to eq(2)
|
|
153
|
+
expect(enum.next).to eq(3)
|
|
154
|
+
end
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
describe '#value?' do
|
|
158
|
+
it 'returns true if any key has that value' do
|
|
159
|
+
options = SubOptions.new
|
|
160
|
+
expect(options.value?(1)).not_to be_truthy
|
|
161
|
+
options.sub_a = 1
|
|
162
|
+
expect(options.value?(1)).to be_truthy
|
|
163
|
+
end
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
describe '#update' do
|
|
167
|
+
it 'updates options from hashes' do
|
|
168
|
+
options = ParentOptions.new(1)
|
|
169
|
+
expect(options.a).to eq(1)
|
|
170
|
+
expect(options.b).to be_nil
|
|
171
|
+
|
|
172
|
+
updated = options.update a: 2, b: 3
|
|
173
|
+
expect(options.a).to eq(2)
|
|
174
|
+
expect(options.b).to eq(3)
|
|
175
|
+
expect(updated).to eq(options)
|
|
176
|
+
end
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
describe '#delete' do
|
|
180
|
+
it 'allows to remove value for key' do
|
|
181
|
+
options = ParentOptions.new(1)
|
|
182
|
+
expect(options.a).to eq(1)
|
|
183
|
+
expect(options.delete(:a)).to eq(1)
|
|
184
|
+
expect(options.a).to be_nil
|
|
185
|
+
end
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
describe '#from' do
|
|
189
|
+
it { expect { ParentOptions.from invalid: 1 }.to raise_error(NoMethodError) }
|
|
190
|
+
|
|
191
|
+
it 'works with options' do
|
|
192
|
+
options = ParentOptions.new(1)
|
|
193
|
+
|
|
194
|
+
value = ParentOptions.from(options)
|
|
195
|
+
expect(value.a).to eq(1)
|
|
196
|
+
expect(value.b).to be_nil
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
it 'works with options with sub object' do
|
|
200
|
+
sub = SubOptions.new(1)
|
|
201
|
+
options = ParentOptions.from a: 1, c: sub
|
|
202
|
+
expect(options).to be_a_kind_of(ParentOptions)
|
|
203
|
+
expect(options.a).to eq(1)
|
|
204
|
+
expect(options.b).to be_nil
|
|
205
|
+
expect(options.c).to be_a_kind_of(SubOptions)
|
|
206
|
+
expect(options.c.sub_a).to eq(1)
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
it 'works with hash' do
|
|
210
|
+
options = ParentOptions.from a: 1
|
|
211
|
+
expect(options).to be_a_kind_of(ParentOptions)
|
|
212
|
+
expect(options.a).to eq(1)
|
|
213
|
+
expect(options.b).to be_nil
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
it 'works with hash with sub object' do
|
|
217
|
+
options = ParentOptions.from a: 1, c: { sub_a: 1 }
|
|
218
|
+
expect(options).to be_a_kind_of(ParentOptions)
|
|
219
|
+
expect(options.a).to eq(1)
|
|
220
|
+
expect(options.b).to be_nil
|
|
221
|
+
expect(options.c).to be_a_kind_of(SubOptions)
|
|
222
|
+
expect(options.c.sub_a).to eq(1)
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
it 'works with deep hash' do
|
|
226
|
+
hash = { b: 1 }
|
|
227
|
+
options = ParentOptions.from a: hash
|
|
228
|
+
expect(options.a[:b]).to eq(1)
|
|
229
|
+
|
|
230
|
+
hash[:b] = 2
|
|
231
|
+
expect(options.a[:b]).to eq(1)
|
|
232
|
+
|
|
233
|
+
options.a[:b] = 3
|
|
234
|
+
expect(hash[:b]).to eq(2)
|
|
235
|
+
expect(options.a[:b]).to eq(3)
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
it 'works with nil' do
|
|
239
|
+
options = ParentOptions.from(nil)
|
|
240
|
+
expect(options).to be_a_kind_of(ParentOptions)
|
|
241
|
+
expect(options.a).to be_nil
|
|
242
|
+
expect(options.b).to be_nil
|
|
243
|
+
end
|
|
244
|
+
|
|
245
|
+
it 'respects inheritance' do
|
|
246
|
+
subclass = Class.new(ParentOptions)
|
|
247
|
+
options = subclass.from(c: { sub_a: 'hello' })
|
|
248
|
+
expect(options.c).to be_a_kind_of(SubOptions)
|
|
249
|
+
expect(options.c.sub_a).to eq('hello')
|
|
250
|
+
end
|
|
251
|
+
end
|
|
252
|
+
|
|
253
|
+
describe '#memoized' do
|
|
254
|
+
subject(:options_class) { Class.new(ParentOptions) }
|
|
255
|
+
it 'requires block' do
|
|
256
|
+
expect { options_class.memoized(:a) }.to raise_error(ArgumentError)
|
|
257
|
+
end
|
|
258
|
+
|
|
259
|
+
it 'accepts block' do
|
|
260
|
+
options_class.memoized(:a) { :foo }
|
|
261
|
+
expect(options_class.new.a).to eql(:foo)
|
|
262
|
+
end
|
|
263
|
+
end
|
|
264
|
+
|
|
265
|
+
describe '#fetch' do
|
|
266
|
+
subject { SubOptions.new }
|
|
267
|
+
|
|
268
|
+
context 'when the fetched key has no value' do
|
|
269
|
+
it 'uses falsey default' do
|
|
270
|
+
expect(subject.fetch(:sub_a, false) { |_| :blah }).to be_falsey
|
|
271
|
+
end
|
|
272
|
+
|
|
273
|
+
it 'accepts block' do
|
|
274
|
+
expect(subject.fetch(:sub_a) { |k| "yo #{k.inspect}" }).to eq('yo :sub_a')
|
|
275
|
+
end
|
|
276
|
+
|
|
277
|
+
it 'needs a default if key is missing' do
|
|
278
|
+
expect { subject.fetch(:sub_a) }.to raise_error(Faraday::Options.fetch_error_class)
|
|
279
|
+
end
|
|
280
|
+
end
|
|
281
|
+
|
|
282
|
+
context 'when the fetched key has a value' do
|
|
283
|
+
before do
|
|
284
|
+
subject.sub_a = 1
|
|
285
|
+
end
|
|
286
|
+
|
|
287
|
+
it 'grabs value' do
|
|
288
|
+
expect(subject.fetch(:sub_a, false) { |_| :blah }).to eq(1)
|
|
289
|
+
end
|
|
290
|
+
|
|
291
|
+
it 'works with key' do
|
|
292
|
+
expect(subject.fetch(:sub_a)).to eq(1)
|
|
293
|
+
end
|
|
294
|
+
end
|
|
295
|
+
end
|
|
296
|
+
end
|
|
297
|
+
end
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
RSpec.describe Faraday::ProxyOptions do
|
|
4
|
+
describe '#from' do
|
|
5
|
+
it 'works with string' do
|
|
6
|
+
options = Faraday::ProxyOptions.from 'http://user:pass@example.org'
|
|
7
|
+
expect(options.user).to eq('user')
|
|
8
|
+
expect(options.password).to eq('pass')
|
|
9
|
+
expect(options.uri).to be_a_kind_of(URI)
|
|
10
|
+
expect(options.path).to eq('')
|
|
11
|
+
expect(options.port).to eq(80)
|
|
12
|
+
expect(options.host).to eq('example.org')
|
|
13
|
+
expect(options.scheme).to eq('http')
|
|
14
|
+
expect(options.inspect).to match('#<Faraday::ProxyOptions uri=')
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
it 'defaults to http' do
|
|
18
|
+
options = Faraday::ProxyOptions.from 'example.org'
|
|
19
|
+
expect(options.port).to eq(80)
|
|
20
|
+
expect(options.host).to eq('example.org')
|
|
21
|
+
expect(options.scheme).to eq('http')
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
it 'works with nil' do
|
|
25
|
+
options = Faraday::ProxyOptions.from nil
|
|
26
|
+
expect(options).to be_a_kind_of(Faraday::ProxyOptions)
|
|
27
|
+
expect(options.inspect).to eq('#<Faraday::ProxyOptions (empty)>')
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
it 'works with hash' do
|
|
31
|
+
hash = { user: 'user', password: 'pass', uri: 'http://@example.org' }
|
|
32
|
+
options = Faraday::ProxyOptions.from(hash)
|
|
33
|
+
expect(options.user).to eq('user')
|
|
34
|
+
expect(options.password).to eq('pass')
|
|
35
|
+
expect(options.uri).to be_a_kind_of(URI)
|
|
36
|
+
expect(options.path).to eq('')
|
|
37
|
+
expect(options.port).to eq(80)
|
|
38
|
+
expect(options.host).to eq('example.org')
|
|
39
|
+
expect(options.scheme).to eq('http')
|
|
40
|
+
expect(options.inspect).to match('#<Faraday::ProxyOptions uri=')
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
it 'works with option' do
|
|
44
|
+
opt_arg = { user: 'user', password: 'pass', uri: 'http://@example.org' }
|
|
45
|
+
option = Faraday::ConnectionOptions.from(proxy: opt_arg)
|
|
46
|
+
options = Faraday::ProxyOptions.from(option.proxy)
|
|
47
|
+
expect(options.user).to eq('user')
|
|
48
|
+
expect(options.password).to eq('pass')
|
|
49
|
+
expect(options.uri).to be_a_kind_of(URI)
|
|
50
|
+
expect(options.path).to eq('')
|
|
51
|
+
expect(options.port).to eq(80)
|
|
52
|
+
expect(options.host).to eq('example.org')
|
|
53
|
+
expect(options.scheme).to eq('http')
|
|
54
|
+
expect(options.inspect).to match('#<Faraday::ProxyOptions uri=')
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
it 'works with no auth' do
|
|
58
|
+
proxy = Faraday::ProxyOptions.from 'http://example.org'
|
|
59
|
+
expect(proxy.user).to be_nil
|
|
60
|
+
expect(proxy.password).to be_nil
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
it 'treats empty string as nil' do
|
|
64
|
+
proxy = nil
|
|
65
|
+
proxy_string = proxy.to_s # => empty string
|
|
66
|
+
options = Faraday::ProxyOptions.from proxy_string
|
|
67
|
+
expect(options).to be_a_kind_of(Faraday::ProxyOptions)
|
|
68
|
+
expect(options.inspect).to eq('#<Faraday::ProxyOptions (empty)>')
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
it 'allows hash access' do
|
|
73
|
+
proxy = Faraday::ProxyOptions.from 'http://a%40b:pw%20d@example.org'
|
|
74
|
+
expect(proxy.user).to eq('a@b')
|
|
75
|
+
expect(proxy[:user]).to eq('a@b')
|
|
76
|
+
expect(proxy.password).to eq('pw d')
|
|
77
|
+
expect(proxy[:password]).to eq('pw d')
|
|
78
|
+
end
|
|
79
|
+
end
|
data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/options/request_options_spec.rb
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
RSpec.describe Faraday::RequestOptions do
|
|
4
|
+
subject(:options) { Faraday::RequestOptions.new }
|
|
5
|
+
|
|
6
|
+
it 'allows to set the request proxy' do
|
|
7
|
+
expect(options.proxy).to be_nil
|
|
8
|
+
|
|
9
|
+
expect { options[:proxy] = { booya: 1 } }.to raise_error(NoMethodError)
|
|
10
|
+
|
|
11
|
+
options[:proxy] = { user: 'user' }
|
|
12
|
+
expect(options.proxy).to be_a_kind_of(Faraday::ProxyOptions)
|
|
13
|
+
expect(options.proxy.user).to eq('user')
|
|
14
|
+
|
|
15
|
+
options.proxy = nil
|
|
16
|
+
expect(options.proxy).to be_nil
|
|
17
|
+
expect(options.inspect).to eq('#<Faraday::RequestOptions (empty)>')
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'rack/utils'
|
|
4
|
+
|
|
5
|
+
RSpec.describe Faraday::FlatParamsEncoder do
|
|
6
|
+
it_behaves_like 'a params encoder'
|
|
7
|
+
|
|
8
|
+
it 'decodes arrays' do
|
|
9
|
+
query = 'a=one&a=two&a=three'
|
|
10
|
+
expected = { 'a' => %w[one two three] }
|
|
11
|
+
expect(subject.decode(query)).to eq(expected)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
it 'decodes boolean values' do
|
|
15
|
+
query = 'a=true&b=false'
|
|
16
|
+
expected = { 'a' => 'true', 'b' => 'false' }
|
|
17
|
+
expect(subject.decode(query)).to eq(expected)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
it 'encodes boolean values' do
|
|
21
|
+
params = { a: true, b: false }
|
|
22
|
+
expect(subject.encode(params)).to eq('a=true&b=false')
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
it 'encodes boolean values in array' do
|
|
26
|
+
params = { a: [true, false] }
|
|
27
|
+
expect(subject.encode(params)).to eq('a=true&a=false')
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
it 'encodes empty array in hash' do
|
|
31
|
+
params = { a: [] }
|
|
32
|
+
expect(subject.encode(params)).to eq('a=')
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
it 'encodes unsorted when asked' do
|
|
36
|
+
params = { b: false, a: true }
|
|
37
|
+
expect(subject.encode(params)).to eq('a=true&b=false')
|
|
38
|
+
Faraday::FlatParamsEncoder.sort_params = false
|
|
39
|
+
expect(subject.encode(params)).to eq('b=false&a=true')
|
|
40
|
+
Faraday::FlatParamsEncoder.sort_params = true
|
|
41
|
+
end
|
|
42
|
+
end
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'rack/utils'
|
|
4
|
+
|
|
5
|
+
RSpec.describe Faraday::NestedParamsEncoder do
|
|
6
|
+
it_behaves_like 'a params encoder'
|
|
7
|
+
|
|
8
|
+
it 'decodes arrays' do
|
|
9
|
+
query = 'a[1]=one&a[2]=two&a[3]=three'
|
|
10
|
+
expected = { 'a' => %w[one two three] }
|
|
11
|
+
expect(subject.decode(query)).to eq(expected)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
it 'decodes hashes' do
|
|
15
|
+
query = 'a[b1]=one&a[b2]=two&a[b][c]=foo'
|
|
16
|
+
expected = { 'a' => { 'b1' => 'one', 'b2' => 'two', 'b' => { 'c' => 'foo' } } }
|
|
17
|
+
expect(subject.decode(query)).to eq(expected)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
it 'decodes nested arrays rack compat' do
|
|
21
|
+
query = 'a[][one]=1&a[][two]=2&a[][one]=3&a[][two]=4'
|
|
22
|
+
expected = Rack::Utils.parse_nested_query(query)
|
|
23
|
+
expect(subject.decode(query)).to eq(expected)
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
it 'decodes nested array mixed types' do
|
|
27
|
+
query = 'a[][one]=1&a[]=2&a[]=&a[]'
|
|
28
|
+
expected = Rack::Utils.parse_nested_query(query)
|
|
29
|
+
expect(subject.decode(query)).to eq(expected)
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
it 'decodes nested ignores invalid array' do
|
|
33
|
+
query = '[][a]=1&b=2'
|
|
34
|
+
expected = { 'a' => '1', 'b' => '2' }
|
|
35
|
+
expect(subject.decode(query)).to eq(expected)
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
it 'decodes nested ignores repeated array notation' do
|
|
39
|
+
query = 'a[][][]=1'
|
|
40
|
+
expected = { 'a' => ['1'] }
|
|
41
|
+
expect(subject.decode(query)).to eq(expected)
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
it 'decodes nested ignores malformed keys' do
|
|
45
|
+
query = '=1&[]=2'
|
|
46
|
+
expected = {}
|
|
47
|
+
expect(subject.decode(query)).to eq(expected)
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
it 'decodes nested subkeys dont have to be in brackets' do
|
|
51
|
+
query = 'a[b]c[d]e=1'
|
|
52
|
+
expected = { 'a' => { 'b' => { 'c' => { 'd' => { 'e' => '1' } } } } }
|
|
53
|
+
expect(subject.decode(query)).to eq(expected)
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
it 'decodes nested final value overrides any type' do
|
|
57
|
+
query = 'a[b][c]=1&a[b]=2'
|
|
58
|
+
expected = { 'a' => { 'b' => '2' } }
|
|
59
|
+
expect(subject.decode(query)).to eq(expected)
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
it 'encodes rack compat' do
|
|
63
|
+
params = { a: [{ one: '1', two: '2' }, '3', ''] }
|
|
64
|
+
result = Faraday::Utils.unescape(Faraday::NestedParamsEncoder.encode(params)).split('&')
|
|
65
|
+
escaped = Rack::Utils.build_nested_query(params)
|
|
66
|
+
expected = Rack::Utils.unescape(escaped).split('&')
|
|
67
|
+
expect(result).to match_array(expected)
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
it 'encodes empty string array value' do
|
|
71
|
+
expected = 'baz=&foo%5Bbar%5D='
|
|
72
|
+
result = Faraday::NestedParamsEncoder.encode(foo: { bar: '' }, baz: '')
|
|
73
|
+
expect(result).to eq(expected)
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
it 'encodes nil array value' do
|
|
77
|
+
expected = 'baz&foo%5Bbar%5D'
|
|
78
|
+
result = Faraday::NestedParamsEncoder.encode(foo: { bar: nil }, baz: nil)
|
|
79
|
+
expect(result).to eq(expected)
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
it 'encodes empty array value' do
|
|
83
|
+
expected = 'baz%5B%5D&foo%5Bbar%5D%5B%5D'
|
|
84
|
+
result = Faraday::NestedParamsEncoder.encode(foo: { bar: [] }, baz: [])
|
|
85
|
+
expect(result).to eq(expected)
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
it 'encodes boolean values' do
|
|
89
|
+
params = { a: true, b: false }
|
|
90
|
+
expect(subject.encode(params)).to eq('a=true&b=false')
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
it 'encodes boolean values in array' do
|
|
94
|
+
params = { a: [true, false] }
|
|
95
|
+
expect(subject.encode(params)).to eq('a%5B%5D=true&a%5B%5D=false')
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
it 'encodes unsorted when asked' do
|
|
99
|
+
params = { b: false, a: true }
|
|
100
|
+
expect(subject.encode(params)).to eq('a=true&b=false')
|
|
101
|
+
Faraday::NestedParamsEncoder.sort_params = false
|
|
102
|
+
expect(subject.encode(params)).to eq('b=false&a=true')
|
|
103
|
+
Faraday::NestedParamsEncoder.sort_params = true
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
it 'encodes arrays indices when asked' do
|
|
107
|
+
params = { a: [0, 1, 2] }
|
|
108
|
+
expect(subject.encode(params)).to eq('a%5B%5D=0&a%5B%5D=1&a%5B%5D=2')
|
|
109
|
+
Faraday::NestedParamsEncoder.array_indices = true
|
|
110
|
+
expect(subject.encode(params)).to eq('a%5B0%5D=0&a%5B1%5D=1&a%5B2%5D=2')
|
|
111
|
+
Faraday::NestedParamsEncoder.array_indices = false
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
shared_examples 'a wrong decoding' do
|
|
115
|
+
it do
|
|
116
|
+
expect { subject.decode(query) }.to raise_error(TypeError) do |e|
|
|
117
|
+
expect(e.message).to eq(error_message)
|
|
118
|
+
end
|
|
119
|
+
end
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
context 'when expecting hash but getting string' do
|
|
123
|
+
let(:query) { 'a=1&a[b]=2' }
|
|
124
|
+
let(:error_message) { "expected Hash (got String) for param `a'" }
|
|
125
|
+
it_behaves_like 'a wrong decoding'
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
context 'when expecting hash but getting array' do
|
|
129
|
+
let(:query) { 'a[]=1&a[b]=2' }
|
|
130
|
+
let(:error_message) { "expected Hash (got Array) for param `a'" }
|
|
131
|
+
it_behaves_like 'a wrong decoding'
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
context 'when expecting nested hash but getting non nested' do
|
|
135
|
+
let(:query) { 'a[b]=1&a[b][c]=2' }
|
|
136
|
+
let(:error_message) { "expected Hash (got String) for param `b'" }
|
|
137
|
+
it_behaves_like 'a wrong decoding'
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
context 'when expecting array but getting hash' do
|
|
141
|
+
let(:query) { 'a[b]=1&a[]=2' }
|
|
142
|
+
let(:error_message) { "expected Array (got Hash) for param `a'" }
|
|
143
|
+
it_behaves_like 'a wrong decoding'
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
context 'when expecting array but getting string' do
|
|
147
|
+
let(:query) { 'a=1&a[]=2' }
|
|
148
|
+
let(:error_message) { "expected Array (got String) for param `a'" }
|
|
149
|
+
it_behaves_like 'a wrong decoding'
|
|
150
|
+
end
|
|
151
|
+
end
|