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,350 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# = Public Suffix
|
|
4
|
+
#
|
|
5
|
+
# Domain name parser based on the Public Suffix List.
|
|
6
|
+
#
|
|
7
|
+
# Copyright (c) 2009-2026 Simone Carletti <weppos@weppos.net>
|
|
8
|
+
|
|
9
|
+
module PublicSuffix
|
|
10
|
+
|
|
11
|
+
# A Rule is a special object which holds a single definition
|
|
12
|
+
# of the Public Suffix List.
|
|
13
|
+
#
|
|
14
|
+
# There are 3 types of rules, each one represented by a specific
|
|
15
|
+
# subclass within the +PublicSuffix::Rule+ namespace.
|
|
16
|
+
#
|
|
17
|
+
# To create a new Rule, use the {PublicSuffix::Rule#factory} method.
|
|
18
|
+
#
|
|
19
|
+
# PublicSuffix::Rule.factory("ar")
|
|
20
|
+
# # => #<PublicSuffix::Rule::Normal>
|
|
21
|
+
#
|
|
22
|
+
module Rule
|
|
23
|
+
|
|
24
|
+
# @api internal
|
|
25
|
+
Entry = Struct.new(:type, :length, :private) # rubocop:disable Lint/StructNewOverride
|
|
26
|
+
|
|
27
|
+
# = Abstract rule class
|
|
28
|
+
#
|
|
29
|
+
# This represent the base class for a Rule definition
|
|
30
|
+
# in the {Public Suffix List}[https://publicsuffix.org].
|
|
31
|
+
#
|
|
32
|
+
# This is intended to be an Abstract class
|
|
33
|
+
# and you shouldn't create a direct instance. The only purpose
|
|
34
|
+
# of this class is to expose a common interface
|
|
35
|
+
# for all the available subclasses.
|
|
36
|
+
#
|
|
37
|
+
# * {PublicSuffix::Rule::Normal}
|
|
38
|
+
# * {PublicSuffix::Rule::Exception}
|
|
39
|
+
# * {PublicSuffix::Rule::Wildcard}
|
|
40
|
+
#
|
|
41
|
+
# ## Properties
|
|
42
|
+
#
|
|
43
|
+
# A rule is composed by 4 properties:
|
|
44
|
+
#
|
|
45
|
+
# value - A normalized version of the rule name.
|
|
46
|
+
# The normalization process depends on rule tpe.
|
|
47
|
+
#
|
|
48
|
+
# Here's an example
|
|
49
|
+
#
|
|
50
|
+
# PublicSuffix::Rule.factory("*.google.com")
|
|
51
|
+
# #<PublicSuffix::Rule::Wildcard:0x1015c14b0
|
|
52
|
+
# @value="google.com"
|
|
53
|
+
# >
|
|
54
|
+
#
|
|
55
|
+
# ## Rule Creation
|
|
56
|
+
#
|
|
57
|
+
# The best way to create a new rule is passing the rule name
|
|
58
|
+
# to the <tt>PublicSuffix::Rule.factory</tt> method.
|
|
59
|
+
#
|
|
60
|
+
# PublicSuffix::Rule.factory("com")
|
|
61
|
+
# # => PublicSuffix::Rule::Normal
|
|
62
|
+
#
|
|
63
|
+
# PublicSuffix::Rule.factory("*.com")
|
|
64
|
+
# # => PublicSuffix::Rule::Wildcard
|
|
65
|
+
#
|
|
66
|
+
# This method will detect the rule type and create an instance
|
|
67
|
+
# from the proper rule class.
|
|
68
|
+
#
|
|
69
|
+
# ## Rule Usage
|
|
70
|
+
#
|
|
71
|
+
# A rule describes the composition of a domain name and explains how to tokenize
|
|
72
|
+
# the name into tld, sld and trd.
|
|
73
|
+
#
|
|
74
|
+
# To use a rule, you first need to be sure the name you want to tokenize
|
|
75
|
+
# can be handled by the current rule.
|
|
76
|
+
# You can use the <tt>#match?</tt> method.
|
|
77
|
+
#
|
|
78
|
+
# rule = PublicSuffix::Rule.factory("com")
|
|
79
|
+
#
|
|
80
|
+
# rule.match?("google.com")
|
|
81
|
+
# # => true
|
|
82
|
+
#
|
|
83
|
+
# rule.match?("google.com")
|
|
84
|
+
# # => false
|
|
85
|
+
#
|
|
86
|
+
# Rule order is significant. A name can match more than one rule.
|
|
87
|
+
# See the {Public Suffix Documentation}[http://publicsuffix.org/format/]
|
|
88
|
+
# to learn more about rule priority.
|
|
89
|
+
#
|
|
90
|
+
# When you have the right rule, you can use it to tokenize the domain name.
|
|
91
|
+
#
|
|
92
|
+
# rule = PublicSuffix::Rule.factory("com")
|
|
93
|
+
#
|
|
94
|
+
# rule.decompose("google.com")
|
|
95
|
+
# # => ["google", "com"]
|
|
96
|
+
#
|
|
97
|
+
# rule.decompose("www.google.com")
|
|
98
|
+
# # => ["www.google", "com"]
|
|
99
|
+
#
|
|
100
|
+
# @abstract
|
|
101
|
+
#
|
|
102
|
+
class Base
|
|
103
|
+
|
|
104
|
+
# @return [String] the rule definition
|
|
105
|
+
attr_reader :value
|
|
106
|
+
|
|
107
|
+
# @return [String] the length of the rule
|
|
108
|
+
attr_reader :length
|
|
109
|
+
|
|
110
|
+
# @return [Boolean] true if the rule is a private domain
|
|
111
|
+
attr_reader :private
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
# Initializes a new rule from the content.
|
|
115
|
+
#
|
|
116
|
+
# @param content [String] the content of the rule
|
|
117
|
+
# @param private [Boolean]
|
|
118
|
+
def self.build(content, private: false)
|
|
119
|
+
new(value: content, private: private)
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
# Initializes a new rule.
|
|
123
|
+
#
|
|
124
|
+
# @param value [String]
|
|
125
|
+
# @param private [Boolean]
|
|
126
|
+
def initialize(value:, length: nil, private: false)
|
|
127
|
+
@value = value.to_s
|
|
128
|
+
@length = length || (@value.count(DOT) + 1)
|
|
129
|
+
@private = private
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
# Checks whether this rule is equal to <tt>other</tt>.
|
|
133
|
+
#
|
|
134
|
+
# @param other [PublicSuffix::Rule::*] The rule to compare
|
|
135
|
+
# @return [Boolean] true if this rule and other are instances of the same class
|
|
136
|
+
# and has the same value, false otherwise.
|
|
137
|
+
def ==(other)
|
|
138
|
+
equal?(other) || (self.class == other.class && value == other.value)
|
|
139
|
+
end
|
|
140
|
+
alias eql? ==
|
|
141
|
+
|
|
142
|
+
# Checks if this rule matches +name+.
|
|
143
|
+
#
|
|
144
|
+
# A domain name is said to match a rule if and only if
|
|
145
|
+
# all of the following conditions are met:
|
|
146
|
+
#
|
|
147
|
+
# - When the domain and rule are split into corresponding labels,
|
|
148
|
+
# that the domain contains as many or more labels than the rule.
|
|
149
|
+
# - Beginning with the right-most labels of both the domain and the rule,
|
|
150
|
+
# and continuing for all labels in the rule, one finds that for every pair,
|
|
151
|
+
# either they are identical, or that the label from the rule is "*".
|
|
152
|
+
#
|
|
153
|
+
# @see https://publicsuffix.org/list/
|
|
154
|
+
#
|
|
155
|
+
# @example
|
|
156
|
+
# PublicSuffix::Rule.factory("com").match?("example.com")
|
|
157
|
+
# # => true
|
|
158
|
+
# PublicSuffix::Rule.factory("com").match?("example.net")
|
|
159
|
+
# # => false
|
|
160
|
+
#
|
|
161
|
+
# @param name [String] the domain name to check
|
|
162
|
+
# @return [Boolean]
|
|
163
|
+
def match?(name)
|
|
164
|
+
# NOTE: it works because of the assumption there are no
|
|
165
|
+
# rules like foo.*.com. If the assumption is incorrect,
|
|
166
|
+
# we need to properly walk the input and skip parts according
|
|
167
|
+
# to wildcard component.
|
|
168
|
+
diff = name.chomp(value)
|
|
169
|
+
diff.empty? || diff.end_with?(DOT)
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
# @abstract
|
|
173
|
+
def parts
|
|
174
|
+
raise NotImplementedError
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
# @abstract
|
|
178
|
+
# @param domain [#to_s] The domain name to decompose
|
|
179
|
+
# @return [Array<String, nil>]
|
|
180
|
+
def decompose(*)
|
|
181
|
+
raise NotImplementedError
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
# Normal represents a standard rule (e.g. com).
|
|
187
|
+
class Normal < Base
|
|
188
|
+
|
|
189
|
+
# Gets the original rule definition.
|
|
190
|
+
#
|
|
191
|
+
# @return [String] The rule definition.
|
|
192
|
+
def rule
|
|
193
|
+
value
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
# Decomposes the domain name according to rule properties.
|
|
197
|
+
#
|
|
198
|
+
# @param domain [#to_s] The domain name to decompose
|
|
199
|
+
# @return [Array<String>] The array with [trd + sld, tld].
|
|
200
|
+
def decompose(domain)
|
|
201
|
+
suffix = parts.join('\.')
|
|
202
|
+
matches = domain.to_s.match(/^(.*)\.(#{suffix})$/)
|
|
203
|
+
matches ? matches[1..2] : [nil, nil]
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
# dot-split rule value and returns all rule parts
|
|
207
|
+
# in the order they appear in the value.
|
|
208
|
+
#
|
|
209
|
+
# @return [Array<String>]
|
|
210
|
+
def parts
|
|
211
|
+
@value.split(DOT)
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
# Wildcard represents a wildcard rule (e.g. *.co.uk).
|
|
217
|
+
class Wildcard < Base
|
|
218
|
+
|
|
219
|
+
# Initializes a new rule from the content.
|
|
220
|
+
#
|
|
221
|
+
# @param content [String] the content of the rule
|
|
222
|
+
# @param private [Boolean]
|
|
223
|
+
def self.build(content, private: false)
|
|
224
|
+
new(value: content.to_s[2..], private: private)
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
# Initializes a new rule.
|
|
228
|
+
#
|
|
229
|
+
# @param value [String]
|
|
230
|
+
# @param length [Integer]
|
|
231
|
+
# @param private [Boolean]
|
|
232
|
+
def initialize(value:, length: nil, private: false)
|
|
233
|
+
super
|
|
234
|
+
length or @length += 1 # * counts as 1
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
# Gets the original rule definition.
|
|
238
|
+
#
|
|
239
|
+
# @return [String] The rule definition.
|
|
240
|
+
def rule
|
|
241
|
+
value == "" ? STAR : STAR + DOT + value
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
# Decomposes the domain name according to rule properties.
|
|
245
|
+
#
|
|
246
|
+
# @param domain [#to_s] The domain name to decompose
|
|
247
|
+
# @return [Array<String>] The array with [trd + sld, tld].
|
|
248
|
+
def decompose(domain)
|
|
249
|
+
suffix = ([".*?"] + parts).join('\.')
|
|
250
|
+
matches = domain.to_s.match(/^(.*)\.(#{suffix})$/)
|
|
251
|
+
matches ? matches[1..2] : [nil, nil]
|
|
252
|
+
end
|
|
253
|
+
|
|
254
|
+
# dot-split rule value and returns all rule parts
|
|
255
|
+
# in the order they appear in the value.
|
|
256
|
+
#
|
|
257
|
+
# @return [Array<String>]
|
|
258
|
+
def parts
|
|
259
|
+
@value.split(DOT)
|
|
260
|
+
end
|
|
261
|
+
|
|
262
|
+
end
|
|
263
|
+
|
|
264
|
+
# Exception represents an exception rule (e.g. !parliament.uk).
|
|
265
|
+
class Exception < Base
|
|
266
|
+
|
|
267
|
+
# Initializes a new rule from the content.
|
|
268
|
+
#
|
|
269
|
+
# @param content [#to_s] the content of the rule
|
|
270
|
+
# @param private [Boolean]
|
|
271
|
+
def self.build(content, private: false)
|
|
272
|
+
new(value: content.to_s[1..], private: private)
|
|
273
|
+
end
|
|
274
|
+
|
|
275
|
+
# Gets the original rule definition.
|
|
276
|
+
#
|
|
277
|
+
# @return [String] The rule definition.
|
|
278
|
+
def rule
|
|
279
|
+
BANG + value
|
|
280
|
+
end
|
|
281
|
+
|
|
282
|
+
# Decomposes the domain name according to rule properties.
|
|
283
|
+
#
|
|
284
|
+
# @param domain [#to_s] The domain name to decompose
|
|
285
|
+
# @return [Array<String>] The array with [trd + sld, tld].
|
|
286
|
+
def decompose(domain)
|
|
287
|
+
suffix = parts.join('\.')
|
|
288
|
+
matches = domain.to_s.match(/^(.*)\.(#{suffix})$/)
|
|
289
|
+
matches ? matches[1..2] : [nil, nil]
|
|
290
|
+
end
|
|
291
|
+
|
|
292
|
+
# dot-split rule value and returns all rule parts
|
|
293
|
+
# in the order they appear in the value.
|
|
294
|
+
# The leftmost label is not considered a label.
|
|
295
|
+
#
|
|
296
|
+
# See http://publicsuffix.org/format/:
|
|
297
|
+
# If the prevailing rule is a exception rule,
|
|
298
|
+
# modify it by removing the leftmost label.
|
|
299
|
+
#
|
|
300
|
+
# @return [Array<String>]
|
|
301
|
+
def parts
|
|
302
|
+
@value.split(DOT)[1..]
|
|
303
|
+
end
|
|
304
|
+
|
|
305
|
+
end
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
# Takes the +name+ of the rule, detects the specific rule class
|
|
309
|
+
# and creates a new instance of that class.
|
|
310
|
+
# The +name+ becomes the rule +value+.
|
|
311
|
+
#
|
|
312
|
+
# @example Creates a Normal rule
|
|
313
|
+
# PublicSuffix::Rule.factory("ar")
|
|
314
|
+
# # => #<PublicSuffix::Rule::Normal>
|
|
315
|
+
#
|
|
316
|
+
# @example Creates a Wildcard rule
|
|
317
|
+
# PublicSuffix::Rule.factory("*.ar")
|
|
318
|
+
# # => #<PublicSuffix::Rule::Wildcard>
|
|
319
|
+
#
|
|
320
|
+
# @example Creates an Exception rule
|
|
321
|
+
# PublicSuffix::Rule.factory("!congresodelalengua3.ar")
|
|
322
|
+
# # => #<PublicSuffix::Rule::Exception>
|
|
323
|
+
#
|
|
324
|
+
# @param content [#to_s] the content of the rule
|
|
325
|
+
# @return [PublicSuffix::Rule::*] A rule instance.
|
|
326
|
+
def self.factory(content, private: false)
|
|
327
|
+
case content.to_s[0, 1]
|
|
328
|
+
when STAR
|
|
329
|
+
Wildcard
|
|
330
|
+
when BANG
|
|
331
|
+
Exception
|
|
332
|
+
else
|
|
333
|
+
Normal
|
|
334
|
+
end.build(content, private: private)
|
|
335
|
+
end
|
|
336
|
+
|
|
337
|
+
# The default rule to use if no rule match.
|
|
338
|
+
#
|
|
339
|
+
# The default rule is "*". From https://publicsuffix.org/list/:
|
|
340
|
+
#
|
|
341
|
+
# > If no rules match, the prevailing rule is "*".
|
|
342
|
+
#
|
|
343
|
+
# @return [PublicSuffix::Rule::Wildcard] The default rule.
|
|
344
|
+
def self.default
|
|
345
|
+
factory(STAR)
|
|
346
|
+
end
|
|
347
|
+
|
|
348
|
+
end
|
|
349
|
+
|
|
350
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# = Public Suffix
|
|
4
|
+
#
|
|
5
|
+
# Domain name parser based on the Public Suffix List.
|
|
6
|
+
#
|
|
7
|
+
# Copyright (c) 2009-2026 Simone Carletti <weppos@weppos.net>
|
|
8
|
+
|
|
9
|
+
module PublicSuffix
|
|
10
|
+
|
|
11
|
+
# @return [String] the current library version
|
|
12
|
+
VERSION = "7.0.5"
|
|
13
|
+
|
|
14
|
+
end
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# = Public Suffix
|
|
4
|
+
#
|
|
5
|
+
# Domain name parser based on the Public Suffix List.
|
|
6
|
+
#
|
|
7
|
+
# Copyright (c) 2009-2026 Simone Carletti <weppos@weppos.net>
|
|
8
|
+
|
|
9
|
+
require_relative "public_suffix/domain"
|
|
10
|
+
require_relative "public_suffix/version"
|
|
11
|
+
require_relative "public_suffix/errors"
|
|
12
|
+
require_relative "public_suffix/rule"
|
|
13
|
+
require_relative "public_suffix/list"
|
|
14
|
+
|
|
15
|
+
# PublicSuffix is a Ruby domain name parser based on the Public Suffix List.
|
|
16
|
+
#
|
|
17
|
+
# The [Public Suffix List](https://publicsuffix.org) is a cross-vendor initiative
|
|
18
|
+
# to provide an accurate list of domain name suffixes.
|
|
19
|
+
#
|
|
20
|
+
# The Public Suffix List is an initiative of the Mozilla Project,
|
|
21
|
+
# but is maintained as a community resource. It is available for use in any software,
|
|
22
|
+
# but was originally created to meet the needs of browser manufacturers.
|
|
23
|
+
module PublicSuffix
|
|
24
|
+
|
|
25
|
+
DOT = "."
|
|
26
|
+
BANG = "!"
|
|
27
|
+
STAR = "*"
|
|
28
|
+
|
|
29
|
+
# Parses +name+ and returns the {PublicSuffix::Domain} instance.
|
|
30
|
+
#
|
|
31
|
+
# @example Parse a valid domain
|
|
32
|
+
# PublicSuffix.parse("google.com")
|
|
33
|
+
# # => #<PublicSuffix::Domain:0x007fec2e51e588 @sld="google", @tld="com", @trd=nil>
|
|
34
|
+
#
|
|
35
|
+
# @example Parse a valid subdomain
|
|
36
|
+
# PublicSuffix.parse("www.google.com")
|
|
37
|
+
# # => #<PublicSuffix::Domain:0x007fec276d4cf8 @sld="google", @tld="com", @trd="www">
|
|
38
|
+
#
|
|
39
|
+
# @example Parse a fully qualified domain
|
|
40
|
+
# PublicSuffix.parse("google.com.")
|
|
41
|
+
# # => #<PublicSuffix::Domain:0x007fec257caf38 @sld="google", @tld="com", @trd=nil>
|
|
42
|
+
#
|
|
43
|
+
# @example Parse a fully qualified domain (subdomain)
|
|
44
|
+
# PublicSuffix.parse("www.google.com.")
|
|
45
|
+
# # => #<PublicSuffix::Domain:0x007fec27b6bca8 @sld="google", @tld="com", @trd="www">
|
|
46
|
+
#
|
|
47
|
+
# @example Parse an invalid (unlisted) domain
|
|
48
|
+
# PublicSuffix.parse("x.yz")
|
|
49
|
+
# # => #<PublicSuffix::Domain:0x007fec2f49bec0 @sld="x", @tld="yz", @trd=nil>
|
|
50
|
+
#
|
|
51
|
+
# @example Parse an invalid (unlisted) domain with strict checking (without applying the default * rule)
|
|
52
|
+
# PublicSuffix.parse("x.yz", default_rule: nil)
|
|
53
|
+
# # => PublicSuffix::DomainInvalid: `x.yz` is not a valid domain
|
|
54
|
+
#
|
|
55
|
+
# @example Parse an URL (not supported, only domains)
|
|
56
|
+
# PublicSuffix.parse("http://www.google.com")
|
|
57
|
+
# # => PublicSuffix::DomainInvalid: http://www.google.com is not expected to contain a scheme
|
|
58
|
+
#
|
|
59
|
+
#
|
|
60
|
+
# @param name [#to_s] The domain name or fully qualified domain name to parse.
|
|
61
|
+
# @param list [PublicSuffix::List] The rule list to search, defaults to the default {PublicSuffix::List}
|
|
62
|
+
# @param ignore_private [Boolean]
|
|
63
|
+
# @return [PublicSuffix::Domain]
|
|
64
|
+
#
|
|
65
|
+
# @raise [PublicSuffix::DomainInvalid] If domain is not a valid domain.
|
|
66
|
+
# @raise [PublicSuffix::DomainNotAllowed] If a rule for +domain+ is found, but the rule doesn't allow +domain+.
|
|
67
|
+
def self.parse(name, list: List.default, default_rule: list.default_rule, ignore_private: false)
|
|
68
|
+
what = normalize(name)
|
|
69
|
+
raise what if what.is_a?(DomainInvalid)
|
|
70
|
+
|
|
71
|
+
rule = list.find(what, default: default_rule, ignore_private: ignore_private)
|
|
72
|
+
|
|
73
|
+
# rubocop:disable Style/IfUnlessModifier
|
|
74
|
+
if rule.nil?
|
|
75
|
+
raise DomainInvalid, "`#{what}` is not a valid domain"
|
|
76
|
+
end
|
|
77
|
+
if rule.decompose(what).last.nil?
|
|
78
|
+
raise DomainNotAllowed, "`#{what}` is not allowed according to Registry policy"
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# rubocop:enable Style/IfUnlessModifier
|
|
82
|
+
|
|
83
|
+
decompose(what, rule)
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Checks whether +domain+ is assigned and allowed, without actually parsing it.
|
|
87
|
+
#
|
|
88
|
+
# This method doesn't care whether domain is a domain or subdomain.
|
|
89
|
+
# The validation is performed using the default {PublicSuffix::List}.
|
|
90
|
+
#
|
|
91
|
+
# @example Validate a valid domain
|
|
92
|
+
# PublicSuffix.valid?("example.com")
|
|
93
|
+
# # => true
|
|
94
|
+
#
|
|
95
|
+
# @example Validate a valid subdomain
|
|
96
|
+
# PublicSuffix.valid?("www.example.com")
|
|
97
|
+
# # => true
|
|
98
|
+
#
|
|
99
|
+
# @example Validate a not-listed domain
|
|
100
|
+
# PublicSuffix.valid?("example.tldnotlisted")
|
|
101
|
+
# # => true
|
|
102
|
+
#
|
|
103
|
+
# @example Validate a not-listed domain with strict checking (without applying the default * rule)
|
|
104
|
+
# PublicSuffix.valid?("example.tldnotlisted")
|
|
105
|
+
# # => true
|
|
106
|
+
# PublicSuffix.valid?("example.tldnotlisted", default_rule: nil)
|
|
107
|
+
# # => false
|
|
108
|
+
#
|
|
109
|
+
# @example Validate a fully qualified domain
|
|
110
|
+
# PublicSuffix.valid?("google.com.")
|
|
111
|
+
# # => true
|
|
112
|
+
# PublicSuffix.valid?("www.google.com.")
|
|
113
|
+
# # => true
|
|
114
|
+
#
|
|
115
|
+
# @example Check an URL (which is not a valid domain)
|
|
116
|
+
# PublicSuffix.valid?("http://www.example.com")
|
|
117
|
+
# # => false
|
|
118
|
+
#
|
|
119
|
+
#
|
|
120
|
+
# @param name [#to_s] The domain name or fully qualified domain name to validate.
|
|
121
|
+
# @param ignore_private [Boolean]
|
|
122
|
+
# @return [Boolean]
|
|
123
|
+
def self.valid?(name, list: List.default, default_rule: list.default_rule, ignore_private: false)
|
|
124
|
+
what = normalize(name)
|
|
125
|
+
return false if what.is_a?(DomainInvalid)
|
|
126
|
+
|
|
127
|
+
rule = list.find(what, default: default_rule, ignore_private: ignore_private)
|
|
128
|
+
|
|
129
|
+
!rule.nil? && !rule.decompose(what).last.nil?
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
# Attempt to parse the name and returns the domain, if valid.
|
|
133
|
+
#
|
|
134
|
+
# This method doesn't raise. Instead, it returns nil if the domain is not valid for whatever reason.
|
|
135
|
+
#
|
|
136
|
+
# @param name [#to_s] The domain name or fully qualified domain name to parse.
|
|
137
|
+
# @param list [PublicSuffix::List] The rule list to search, defaults to the default {PublicSuffix::List}
|
|
138
|
+
# @param ignore_private [Boolean]
|
|
139
|
+
# @return [String]
|
|
140
|
+
def self.domain(name, **options)
|
|
141
|
+
parse(name, **options).domain
|
|
142
|
+
rescue PublicSuffix::Error
|
|
143
|
+
nil
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
# private
|
|
148
|
+
|
|
149
|
+
def self.decompose(name, rule)
|
|
150
|
+
left, right = rule.decompose(name)
|
|
151
|
+
|
|
152
|
+
parts = left.split(DOT)
|
|
153
|
+
# If we have 0 parts left, there is just a tld and no domain or subdomain
|
|
154
|
+
# If we have 1 part left, there is just a tld, domain and not subdomain
|
|
155
|
+
# If we have 2 parts left, the last part is the domain, the other parts (combined) are the subdomain
|
|
156
|
+
tld = right
|
|
157
|
+
sld = parts.empty? ? nil : parts.pop
|
|
158
|
+
trd = parts.empty? ? nil : parts.join(DOT)
|
|
159
|
+
|
|
160
|
+
Domain.new(tld, sld, trd)
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
# Pretend we know how to deal with user input.
|
|
164
|
+
def self.normalize(name)
|
|
165
|
+
name = name.to_s.dup
|
|
166
|
+
name.strip!
|
|
167
|
+
name.chomp!(DOT)
|
|
168
|
+
name.downcase!
|
|
169
|
+
|
|
170
|
+
return DomainInvalid.new("Name is blank") if name.empty?
|
|
171
|
+
return DomainInvalid.new("Name starts with a dot") if name.start_with?(DOT)
|
|
172
|
+
return DomainInvalid.new(format("%s is not expected to contain a scheme", name)) if name.include?("://")
|
|
173
|
+
|
|
174
|
+
name
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
end
|
|
@@ -13,12 +13,12 @@ NULLCMD = :
|
|
|
13
13
|
#### Start of system configuration section. ####
|
|
14
14
|
|
|
15
15
|
srcdir = .
|
|
16
|
-
topdir = /opt/hostedtoolcache/Ruby/3.2.
|
|
16
|
+
topdir = /opt/hostedtoolcache/Ruby/3.2.11/x64/include/ruby-3.2.0
|
|
17
17
|
hdrdir = $(topdir)
|
|
18
|
-
arch_hdrdir = /opt/hostedtoolcache/Ruby/3.2.
|
|
18
|
+
arch_hdrdir = /opt/hostedtoolcache/Ruby/3.2.11/x64/include/ruby-3.2.0/x86_64-linux
|
|
19
19
|
PATH_SEPARATOR = :
|
|
20
20
|
VPATH = $(srcdir):$(arch_hdrdir)/ruby:$(hdrdir)/ruby
|
|
21
|
-
prefix = $(DESTDIR)/opt/hostedtoolcache/Ruby/3.2.
|
|
21
|
+
prefix = $(DESTDIR)/opt/hostedtoolcache/Ruby/3.2.11/x64
|
|
22
22
|
rubysitearchprefix = $(rubylibprefix)/$(sitearch)
|
|
23
23
|
rubyarchprefix = $(rubylibprefix)/$(arch)
|
|
24
24
|
rubylibprefix = $(libdir)/$(RUBY_BASE_NAME)
|
|
Binary file
|
|
@@ -13,12 +13,12 @@ NULLCMD = :
|
|
|
13
13
|
#### Start of system configuration section. ####
|
|
14
14
|
|
|
15
15
|
srcdir = .
|
|
16
|
-
topdir = /opt/hostedtoolcache/Ruby/3.2.
|
|
16
|
+
topdir = /opt/hostedtoolcache/Ruby/3.2.11/x64/include/ruby-3.2.0
|
|
17
17
|
hdrdir = $(topdir)
|
|
18
|
-
arch_hdrdir = /opt/hostedtoolcache/Ruby/3.2.
|
|
18
|
+
arch_hdrdir = /opt/hostedtoolcache/Ruby/3.2.11/x64/include/ruby-3.2.0/x86_64-linux
|
|
19
19
|
PATH_SEPARATOR = :
|
|
20
20
|
VPATH = $(srcdir):$(arch_hdrdir)/ruby:$(hdrdir)/ruby
|
|
21
|
-
prefix = $(DESTDIR)/opt/hostedtoolcache/Ruby/3.2.
|
|
21
|
+
prefix = $(DESTDIR)/opt/hostedtoolcache/Ruby/3.2.11/x64
|
|
22
22
|
rubysitearchprefix = $(rubylibprefix)/$(sitearch)
|
|
23
23
|
rubyarchprefix = $(rubylibprefix)/$(arch)
|
|
24
24
|
rubylibprefix = $(libdir)/$(RUBY_BASE_NAME)
|
|
Binary file
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
Copyright (C) 1993-2013 Yukihiro Matsumoto. All rights reserved.
|
|
2
|
+
|
|
3
|
+
Redistribution and use in source and binary forms, with or without
|
|
4
|
+
modification, are permitted provided that the following conditions
|
|
5
|
+
are met:
|
|
6
|
+
1. Redistributions of source code must retain the above copyright
|
|
7
|
+
notice, this list of conditions and the following disclaimer.
|
|
8
|
+
2. Redistributions in binary form must reproduce the above copyright
|
|
9
|
+
notice, this list of conditions and the following disclaimer in the
|
|
10
|
+
documentation and/or other materials provided with the distribution.
|
|
11
|
+
|
|
12
|
+
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
|
13
|
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
14
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
15
|
+
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
|
16
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
17
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
18
|
+
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
19
|
+
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
20
|
+
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
21
|
+
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
22
|
+
SUCH DAMAGE.
|