iron_admin 0.5.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/assets/config/iron_admin_manifest.js +12 -0
- data/app/components/iron_admin/dashboards/metric_card_component.html.haml +8 -3
- data/app/components/iron_admin/dashboards/metric_card_component.rb +21 -1
- data/app/components/iron_admin/form/belongs_to_component.rb +60 -6
- data/app/components/iron_admin/form/nested_form_component.html.haml +28 -0
- data/app/components/iron_admin/form/nested_form_component.rb +81 -0
- data/app/components/iron_admin/resources/data_table_component.html.haml +1 -1
- data/app/components/iron_admin/resources/data_table_component.rb +6 -0
- data/app/components/iron_admin/resources/show_field_component.rb +2 -0
- data/app/controllers/iron_admin/application_controller.rb +32 -1
- data/app/controllers/iron_admin/concerns/action_executable.rb +44 -0
- data/app/controllers/iron_admin/concerns/filterable.rb +84 -0
- data/app/controllers/iron_admin/concerns/json_params_coercion.rb +67 -0
- data/app/controllers/iron_admin/concerns/nested_permittable.rb +36 -0
- data/app/controllers/iron_admin/concerns/scopeable.rb +84 -0
- data/app/controllers/iron_admin/concerns/searchable.rb +13 -16
- data/app/controllers/iron_admin/exports_controller.rb +15 -11
- data/app/controllers/iron_admin/imports_controller.rb +83 -0
- data/app/controllers/iron_admin/live_controller.rb +12 -0
- data/app/controllers/iron_admin/resources_controller.rb +118 -117
- data/app/controllers/iron_admin/search_controller.rb +5 -5
- data/app/controllers/iron_admin/tools_controller.rb +63 -4
- data/app/helpers/iron_admin/application_helper.rb +33 -14
- data/app/helpers/iron_admin/field_display_helper.rb +160 -1
- data/app/javascript/iron_admin/controllers/cp_nested_form_controller.js +113 -0
- data/app/javascript/iron_admin/controllers/filter_operator_controller.js +10 -0
- data/app/javascript/iron_admin/index.js +4 -0
- data/app/views/iron_admin/dashboard/index.html.haml +7 -2
- data/app/views/iron_admin/form/_nested_row.html.haml +70 -0
- data/app/views/iron_admin/imports/new.html.haml +27 -0
- data/app/views/iron_admin/imports/preview.html.haml +31 -0
- data/app/views/iron_admin/resources/_form.html.haml +81 -5
- data/app/views/iron_admin/resources/action_form.html.haml +62 -0
- data/app/views/iron_admin/resources/bulk_action_form.html.haml +62 -0
- data/app/views/iron_admin/resources/index.html.haml +60 -18
- data/app/views/iron_admin/tools/action_form.html.haml +57 -0
- data/app/views/iron_admin/tools/show.html.haml +20 -1
- data/config/importmap.rb +2 -0
- data/config/locales/en.yml +36 -0
- data/config/routes.rb +7 -0
- data/docs/components/filter-components.md +60 -0
- data/docs/getting-started/quick-start.md +17 -1
- data/docs/guides/authentication.md +7 -6
- data/docs/guides/custom-adapters.md +628 -0
- data/docs/guides/extending.md +132 -3
- data/docs/guides/fields.md +1 -1
- data/docs/guides/resources.md +78 -2
- data/docs/guides/troubleshooting.md +29 -0
- data/docs/reference/routes.md +10 -0
- data/lib/generators/iron_admin/install/install_generator.rb +28 -4
- data/lib/generators/iron_admin/install_audit/install_audit_generator.rb +26 -10
- data/lib/iron_admin/action_field.rb +56 -0
- data/lib/iron_admin/adapters/active_record.rb +237 -0
- data/lib/iron_admin/adapters/base.rb +340 -0
- data/lib/iron_admin/adapters/http/column_descriptor.rb +10 -0
- data/lib/iron_admin/adapters/http/configuration.rb +27 -0
- data/lib/iron_admin/adapters/http/connection.rb +117 -0
- data/lib/iron_admin/adapters/http/model_proxy.rb +75 -0
- data/lib/iron_admin/adapters/http/query.rb +111 -0
- data/lib/iron_admin/adapters/http/record.rb +83 -0
- data/lib/iron_admin/adapters/http/type_inferrer.rb +51 -0
- data/lib/iron_admin/adapters/http.rb +241 -0
- data/lib/iron_admin/adapters/mongoid/association_wrapper.rb +74 -0
- data/lib/iron_admin/adapters/mongoid/column_descriptor.rb +10 -0
- data/lib/iron_admin/adapters/mongoid.rb +284 -0
- data/lib/iron_admin/adapters/registry.rb +44 -0
- data/lib/iron_admin/concerns/importable.rb +81 -0
- data/lib/iron_admin/concerns/live_updatable.rb +38 -0
- data/lib/iron_admin/concerns/nestable.rb +69 -0
- data/lib/iron_admin/concerns/soft_deletable.rb +61 -0
- data/lib/iron_admin/configuration.rb +20 -0
- data/lib/iron_admin/dashboard.rb +15 -20
- data/lib/iron_admin/engine.rb +28 -1
- data/lib/iron_admin/errors.rb +29 -0
- data/lib/iron_admin/field_inferrer.rb +61 -22
- data/lib/iron_admin/filters/active_record_query_builder.rb +63 -0
- data/lib/iron_admin/filters/base_query_builder.rb +55 -0
- data/lib/iron_admin/filters/http_query_builder.rb +39 -0
- data/lib/iron_admin/filters/mongoid_query_builder.rb +58 -0
- data/lib/iron_admin/filters/query_builder.rb +12 -0
- data/lib/iron_admin/import/column_mapper.rb +42 -0
- data/lib/iron_admin/import/import_preview.rb +10 -0
- data/lib/iron_admin/import/import_result.rb +10 -0
- data/lib/iron_admin/import/importer.rb +231 -0
- data/lib/iron_admin/import/parser/csv.rb +34 -0
- data/lib/iron_admin/import/parser/json.rb +36 -0
- data/lib/iron_admin/import/type_caster.rb +47 -0
- data/lib/iron_admin/live/broadcaster.rb +43 -0
- data/lib/iron_admin/live/poll_cache.rb +28 -0
- data/lib/iron_admin/live.rb +29 -0
- data/lib/iron_admin/nested_association.rb +15 -0
- data/lib/iron_admin/nested_attributes_validator.rb +25 -0
- data/lib/iron_admin/policy.rb +72 -13
- data/lib/iron_admin/resource.rb +148 -90
- data/lib/iron_admin/resource_registry.rb +77 -4
- data/lib/iron_admin/tool.rb +50 -0
- data/lib/iron_admin/tool_action.rb +73 -0
- data/lib/iron_admin/tool_context.rb +49 -0
- data/lib/iron_admin/version.rb +1 -1
- data/lib/iron_admin.rb +28 -0
- data/vendor/bundle/ruby/3.2.0/cache/addressable-2.9.0.gem +0 -0
- data/vendor/bundle/ruby/3.2.0/cache/crack-1.0.1.gem +0 -0
- data/vendor/bundle/ruby/3.2.0/cache/faraday-2.14.1.gem +0 -0
- data/vendor/bundle/ruby/3.2.0/cache/faraday-net_http-3.4.2.gem +0 -0
- data/vendor/bundle/ruby/3.2.0/cache/hashdiff-1.2.1.gem +0 -0
- data/vendor/bundle/ruby/3.2.0/cache/net-http-0.9.1.gem +0 -0
- data/vendor/bundle/ruby/3.2.0/cache/public_suffix-7.0.5.gem +0 -0
- data/vendor/bundle/ruby/3.2.0/cache/rexml-3.4.4.gem +0 -0
- data/vendor/bundle/ruby/3.2.0/cache/webmock-3.26.2.gem +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/bigdecimal-4.0.1/bigdecimal.so +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/bigdecimal-4.0.1/gem_make.out +6 -6
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/bigdecimal-4.0.1/mkmf.log +25 -25
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/date-3.5.1/date_core.so +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/date-3.5.1/gem_make.out +6 -6
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/date-3.5.1/mkmf.log +4 -4
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/erb-6.0.1/erb/escape.so +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/erb-6.0.1/gem_make.out +6 -6
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/erb-6.0.1/mkmf.log +2 -2
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/io-console-0.8.2/gem_make.out +6 -6
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/io-console-0.8.2/io/console.so +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/io-console-0.8.2/mkmf.log +22 -22
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/json-2.18.1/gem_make.out +6 -6
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/json-2.18.1/json/ext/generator.so +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/json-2.18.1/json/ext/parser.so +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/json-2.18.1/mkmf.log +9 -9
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/nio4r-2.7.5/gem_make.out +6 -6
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/nio4r-2.7.5/mkmf.log +12 -12
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/nio4r-2.7.5/nio4r_ext.so +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/prism-1.9.0/gem_make.out +6 -6
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/prism-1.9.0/mkmf.log +6 -6
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/prism-1.9.0/prism/prism.so +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-5.3.1/gem_make.out +6 -6
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-5.3.1/mkmf.log +7 -7
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-5.3.1/psych.so +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/racc-1.8.1/gem_make.out +6 -6
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/racc-1.8.1/racc/cparse.so +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/redcarpet-3.6.1/gem_make.out +6 -6
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/redcarpet-3.6.1/redcarpet.so +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/stringio-3.2.0/gem_make.out +6 -6
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/stringio-3.2.0/mkmf.log +2 -2
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/stringio-3.2.0/stringio.so +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/websocket-driver-0.8.0/gem_make.out +6 -6
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/websocket-driver-0.8.0/websocket_mask.so +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/addressable-2.9.0/CHANGELOG.md +326 -0
- data/vendor/bundle/ruby/3.2.0/gems/addressable-2.9.0/LICENSE.txt +202 -0
- data/vendor/bundle/ruby/3.2.0/gems/addressable-2.9.0/README.md +121 -0
- data/vendor/bundle/ruby/3.2.0/gems/addressable-2.9.0/lib/addressable/idna/native.rb +66 -0
- data/vendor/bundle/ruby/3.2.0/gems/addressable-2.9.0/lib/addressable/idna/pure.rb +4710 -0
- data/vendor/bundle/ruby/3.2.0/gems/addressable-2.9.0/lib/addressable/idna.rb +26 -0
- data/vendor/bundle/ruby/3.2.0/gems/addressable-2.9.0/lib/addressable/template.rb +1040 -0
- data/vendor/bundle/ruby/3.2.0/gems/addressable-2.9.0/lib/addressable/uri.rb +2602 -0
- data/vendor/bundle/ruby/3.2.0/gems/addressable-2.9.0/lib/addressable/version.rb +31 -0
- data/vendor/bundle/ruby/3.2.0/gems/addressable-2.9.0/lib/addressable.rb +4 -0
- data/vendor/bundle/ruby/3.2.0/gems/bigdecimal-4.0.1/ext/bigdecimal/Makefile +3 -3
- data/vendor/bundle/ruby/3.2.0/gems/bigdecimal-4.0.1/lib/bigdecimal.so +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/crack-1.0.1/History +58 -0
- data/vendor/bundle/ruby/3.2.0/gems/crack-1.0.1/LICENSE +20 -0
- data/vendor/bundle/ruby/3.2.0/gems/crack-1.0.1/README.md +43 -0
- data/vendor/bundle/ruby/3.2.0/gems/crack-1.0.1/lib/crack/json.rb +113 -0
- data/vendor/bundle/ruby/3.2.0/gems/crack-1.0.1/lib/crack/util.rb +17 -0
- data/vendor/bundle/ruby/3.2.0/gems/crack-1.0.1/lib/crack/version.rb +3 -0
- data/vendor/bundle/ruby/3.2.0/gems/crack-1.0.1/lib/crack/xml.rb +240 -0
- data/vendor/bundle/ruby/3.2.0/gems/crack-1.0.1/lib/crack.rb +8 -0
- data/vendor/bundle/ruby/3.2.0/gems/date-3.5.1/ext/date/Makefile +3 -3
- data/vendor/bundle/ruby/3.2.0/gems/date-3.5.1/lib/date_core.so +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/erb-6.0.1/ext/erb/escape/Makefile +3 -3
- data/vendor/bundle/ruby/3.2.0/gems/erb-6.0.1/lib/erb/escape.so +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/CHANGELOG.md +574 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/LICENSE.md +20 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/README.md +67 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/Rakefile +12 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/examples/client_spec.rb +119 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/examples/client_test.rb +144 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/adapter/test.rb +311 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/adapter.rb +101 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/adapter_registry.rb +30 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/connection.rb +565 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/encoders/flat_params_encoder.rb +105 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/encoders/nested_params_encoder.rb +183 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/error.rb +202 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/logging/formatter.rb +118 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/methods.rb +6 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/middleware.rb +72 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/middleware_registry.rb +83 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/options/connection_options.rb +23 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/options/env.rb +204 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/options/proxy_options.rb +38 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/options/request_options.rb +23 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/options/ssl_options.rb +76 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/options.rb +219 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/parameters.rb +5 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/rack_builder.rb +248 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/request/authorization.rb +54 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/request/instrumentation.rb +58 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/request/json.rb +70 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/request/url_encoded.rb +60 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/request.rb +139 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/response/json.rb +74 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/response/logger.rb +39 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/response/raise_error.rb +83 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/response.rb +95 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/utils/headers.rb +150 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/utils/params_hash.rb +61 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/utils.rb +121 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/version.rb +5 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday.rb +158 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/external_adapters/faraday_specs_setup.rb +14 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/adapter/test_spec.rb +442 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/adapter_registry_spec.rb +28 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/adapter_spec.rb +55 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/connection_spec.rb +841 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/error_spec.rb +175 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/middleware_registry_spec.rb +31 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/middleware_spec.rb +213 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/options/env_spec.rb +76 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/options/options_spec.rb +297 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/options/proxy_options_spec.rb +79 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/options/request_options_spec.rb +19 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/params_encoders/flat_spec.rb +42 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/params_encoders/nested_spec.rb +151 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/rack_builder_spec.rb +317 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/request/authorization_spec.rb +118 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/request/instrumentation_spec.rb +74 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/request/json_spec.rb +199 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/request/url_encoded_spec.rb +93 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/request_spec.rb +110 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/response/json_spec.rb +206 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/response/logger_spec.rb +299 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/response/raise_error_spec.rb +286 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/response_spec.rb +84 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/utils/headers_spec.rb +109 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/utils_spec.rb +120 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday_spec.rb +43 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/spec_helper.rb +133 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/support/disabling_stub.rb +14 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/support/fake_safe_buffer.rb +15 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/support/faraday_middleware_subclasses.rb +18 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/support/helper_methods.rb +96 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/support/shared_examples/adapter.rb +105 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/support/shared_examples/params_encoder.rb +18 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/support/shared_examples/request_method.rb +263 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/support/streaming_response_checker.rb +35 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-net_http-3.4.2/LICENSE.md +21 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-net_http-3.4.2/README.md +57 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-net_http-3.4.2/lib/faraday/adapter/net_http.rb +206 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-net_http-3.4.2/lib/faraday/net_http/version.rb +7 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-net_http-3.4.2/lib/faraday/net_http.rb +10 -0
- data/vendor/bundle/ruby/3.2.0/gems/hashdiff-1.2.1/Gemfile +8 -0
- data/vendor/bundle/ruby/3.2.0/gems/hashdiff-1.2.1/LICENSE +19 -0
- data/vendor/bundle/ruby/3.2.0/gems/hashdiff-1.2.1/README.md +323 -0
- data/vendor/bundle/ruby/3.2.0/gems/hashdiff-1.2.1/Rakefile +18 -0
- data/vendor/bundle/ruby/3.2.0/gems/hashdiff-1.2.1/changelog.md +127 -0
- data/vendor/bundle/ruby/3.2.0/gems/hashdiff-1.2.1/hashdiff.gemspec +39 -0
- data/vendor/bundle/ruby/3.2.0/gems/hashdiff-1.2.1/lib/hashdiff/compare_hashes.rb +101 -0
- data/vendor/bundle/ruby/3.2.0/gems/hashdiff-1.2.1/lib/hashdiff/diff.rb +185 -0
- data/vendor/bundle/ruby/3.2.0/gems/hashdiff-1.2.1/lib/hashdiff/lcs.rb +66 -0
- data/vendor/bundle/ruby/3.2.0/gems/hashdiff-1.2.1/lib/hashdiff/lcs_compare_arrays.rb +32 -0
- data/vendor/bundle/ruby/3.2.0/gems/hashdiff-1.2.1/lib/hashdiff/linear_compare_array.rb +159 -0
- data/vendor/bundle/ruby/3.2.0/gems/hashdiff-1.2.1/lib/hashdiff/patch.rb +88 -0
- data/vendor/bundle/ruby/3.2.0/gems/hashdiff-1.2.1/lib/hashdiff/util.rb +155 -0
- data/vendor/bundle/ruby/3.2.0/gems/hashdiff-1.2.1/lib/hashdiff/version.rb +5 -0
- data/vendor/bundle/ruby/3.2.0/gems/hashdiff-1.2.1/lib/hashdiff.rb +10 -0
- data/vendor/bundle/ruby/3.2.0/gems/io-console-0.8.2/ext/io/console/Makefile +3 -3
- data/vendor/bundle/ruby/3.2.0/gems/io-console-0.8.2/lib/io/console.so +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/json-2.18.1/ext/json/ext/generator/Makefile +3 -3
- data/vendor/bundle/ruby/3.2.0/gems/json-2.18.1/ext/json/ext/parser/Makefile +3 -3
- data/vendor/bundle/ruby/3.2.0/gems/json-2.18.1/lib/json/ext/generator.so +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/json-2.18.1/lib/json/ext/parser.so +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/net-http-0.9.1/BSDL +22 -0
- data/vendor/bundle/ruby/3.2.0/gems/net-http-0.9.1/COPYING +56 -0
- data/vendor/bundle/ruby/3.2.0/gems/net-http-0.9.1/README.md +93 -0
- data/vendor/bundle/ruby/3.2.0/gems/net-http-0.9.1/doc/net-http/examples.rdoc +31 -0
- data/vendor/bundle/ruby/3.2.0/gems/net-http-0.9.1/doc/net-http/included_getters.rdoc +3 -0
- data/vendor/bundle/ruby/3.2.0/gems/net-http-0.9.1/lib/net/http/exceptions.rb +35 -0
- data/vendor/bundle/ruby/3.2.0/gems/net-http-0.9.1/lib/net/http/generic_request.rb +429 -0
- data/vendor/bundle/ruby/3.2.0/gems/net-http-0.9.1/lib/net/http/header.rb +985 -0
- data/vendor/bundle/ruby/3.2.0/gems/net-http-0.9.1/lib/net/http/proxy_delta.rb +17 -0
- data/vendor/bundle/ruby/3.2.0/gems/net-http-0.9.1/lib/net/http/request.rb +88 -0
- data/vendor/bundle/ruby/3.2.0/gems/net-http-0.9.1/lib/net/http/requests.rb +444 -0
- data/vendor/bundle/ruby/3.2.0/gems/net-http-0.9.1/lib/net/http/response.rb +739 -0
- data/vendor/bundle/ruby/3.2.0/gems/net-http-0.9.1/lib/net/http/responses.rb +1242 -0
- data/vendor/bundle/ruby/3.2.0/gems/net-http-0.9.1/lib/net/http/status.rb +84 -0
- data/vendor/bundle/ruby/3.2.0/gems/net-http-0.9.1/lib/net/http.rb +2608 -0
- data/vendor/bundle/ruby/3.2.0/gems/net-http-0.9.1/lib/net/https.rb +23 -0
- data/vendor/bundle/ruby/3.2.0/gems/nio4r-2.7.5/ext/nio4r/Makefile +3 -3
- data/vendor/bundle/ruby/3.2.0/gems/nio4r-2.7.5/lib/nio4r_ext.so +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/prism-1.9.0/ext/prism/Makefile +3 -3
- data/vendor/bundle/ruby/3.2.0/gems/prism-1.9.0/lib/prism/prism.so +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/psych-5.3.1/ext/psych/Makefile +3 -3
- data/vendor/bundle/ruby/3.2.0/gems/psych-5.3.1/lib/psych.so +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/public_suffix-7.0.5/CHANGELOG.md +649 -0
- data/vendor/bundle/ruby/3.2.0/gems/public_suffix-7.0.5/Gemfile +16 -0
- data/vendor/bundle/ruby/3.2.0/gems/public_suffix-7.0.5/LICENSE.txt +22 -0
- data/vendor/bundle/ruby/3.2.0/gems/public_suffix-7.0.5/README.md +231 -0
- data/vendor/bundle/ruby/3.2.0/gems/public_suffix-7.0.5/SECURITY.md +24 -0
- data/vendor/bundle/ruby/3.2.0/gems/public_suffix-7.0.5/data/list.txt +16298 -0
- data/vendor/bundle/ruby/3.2.0/gems/public_suffix-7.0.5/lib/public_suffix/domain.rb +235 -0
- data/vendor/bundle/ruby/3.2.0/gems/public_suffix-7.0.5/lib/public_suffix/errors.rb +41 -0
- data/vendor/bundle/ruby/3.2.0/gems/public_suffix-7.0.5/lib/public_suffix/list.rb +247 -0
- data/vendor/bundle/ruby/3.2.0/gems/public_suffix-7.0.5/lib/public_suffix/rule.rb +350 -0
- data/vendor/bundle/ruby/3.2.0/gems/public_suffix-7.0.5/lib/public_suffix/version.rb +14 -0
- data/vendor/bundle/ruby/3.2.0/gems/public_suffix-7.0.5/lib/public_suffix.rb +177 -0
- data/vendor/bundle/ruby/3.2.0/gems/racc-1.8.1/ext/racc/cparse/Makefile +3 -3
- data/vendor/bundle/ruby/3.2.0/gems/racc-1.8.1/lib/racc/cparse.so +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/redcarpet-3.6.1/ext/redcarpet/Makefile +3 -3
- data/vendor/bundle/ruby/3.2.0/gems/redcarpet-3.6.1/lib/redcarpet.so +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/LICENSE.txt +22 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/NEWS.md +843 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/README.md +57 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/doc/rexml/context.rdoc +143 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/doc/rexml/tasks/rdoc/child.rdoc +87 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/doc/rexml/tasks/rdoc/document.rdoc +276 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/doc/rexml/tasks/rdoc/element.rdoc +602 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/doc/rexml/tasks/rdoc/node.rdoc +97 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/doc/rexml/tasks/rdoc/parent.rdoc +267 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/doc/rexml/tasks/tocs/child_toc.rdoc +12 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/doc/rexml/tasks/tocs/document_toc.rdoc +30 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/doc/rexml/tasks/tocs/element_toc.rdoc +55 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/doc/rexml/tasks/tocs/master_toc.rdoc +135 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/doc/rexml/tasks/tocs/node_toc.rdoc +16 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/doc/rexml/tasks/tocs/parent_toc.rdoc +25 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/doc/rexml/tutorial.rdoc +1358 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/attlistdecl.rb +63 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/attribute.rb +210 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/cdata.rb +68 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/child.rb +96 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/comment.rb +80 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/doctype.rb +306 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/document.rb +471 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/dtd/attlistdecl.rb +11 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/dtd/dtd.rb +47 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/dtd/elementdecl.rb +18 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/dtd/entitydecl.rb +57 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/dtd/notationdecl.rb +40 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/element.rb +2578 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/encoding.rb +48 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/entity.rb +142 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/formatters/default.rb +116 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/formatters/pretty.rb +142 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/formatters/transitive.rb +58 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/functions.rb +446 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/instruction.rb +79 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/light/node.rb +188 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/namespace.rb +63 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/node.rb +80 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/output.rb +30 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/parent.rb +166 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/parseexception.rb +53 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/parsers/baseparser.rb +949 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/parsers/lightparser.rb +59 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/parsers/pullparser.rb +213 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/parsers/sax2parser.rb +270 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/parsers/streamparser.rb +67 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/parsers/treeparser.rb +89 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/parsers/ultralightparser.rb +57 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/parsers/xpathparser.rb +739 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/quickpath.rb +267 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/rexml.rb +39 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/sax2listener.rb +98 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/security.rb +28 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/source.rb +388 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/streamlistener.rb +93 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/text.rb +420 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/undefinednamespaceexception.rb +9 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/validation/relaxng.rb +540 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/validation/validation.rb +144 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/validation/validationexception.rb +10 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/xmldecl.rb +130 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/xmltokens.rb +85 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/xpath.rb +70 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/xpath_parser.rb +980 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml.rb +3 -0
- data/vendor/bundle/ruby/3.2.0/gems/stringio-3.2.0/ext/stringio/Makefile +3 -3
- data/vendor/bundle/ruby/3.2.0/gems/stringio-3.2.0/lib/stringio.so +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/CHANGELOG.md +2148 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/LICENSE +20 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/README.md +1229 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/api.rb +111 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/assertion_failure.rb +13 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/callback_registry.rb +37 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/config.rb +20 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/cucumber.rb +12 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/deprecation.rb +11 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/errors.rb +19 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/http_lib_adapters/async_http_client_adapter.rb +228 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/http_lib_adapters/curb_adapter.rb +354 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/http_lib_adapters/em_http_request_adapter.rb +239 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/http_lib_adapters/excon_adapter.rb +167 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/http_lib_adapters/http_lib_adapter.rb +9 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/http_lib_adapters/http_lib_adapter_registry.rb +21 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/http_lib_adapters/http_rb/client.rb +17 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/http_lib_adapters/http_rb/request.rb +28 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/http_lib_adapters/http_rb/response.rb +95 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/http_lib_adapters/http_rb/streamer.rb +44 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/http_lib_adapters/http_rb/webmock.rb +77 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/http_lib_adapters/http_rb_adapter.rb +39 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/http_lib_adapters/httpclient_adapter.rb +260 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/http_lib_adapters/manticore_adapter.rb +147 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/http_lib_adapters/net_http.rb +310 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/http_lib_adapters/net_http_response.rb +36 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/http_lib_adapters/patron_adapter.rb +132 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/http_lib_adapters/typhoeus_hydra_adapter.rb +190 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/matchers/any_arg_matcher.rb +15 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/matchers/hash_argument_matcher.rb +23 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/matchers/hash_excluding_matcher.rb +17 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/matchers/hash_including_matcher.rb +19 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/minitest.rb +43 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/rack_response.rb +73 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/request_body_diff.rb +66 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/request_execution_verifier.rb +79 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/request_pattern.rb +428 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/request_registry.rb +37 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/request_signature.rb +56 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/request_signature_snippet.rb +63 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/request_stub.rb +134 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/response.rb +161 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/responses_sequence.rb +42 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/rspec/matchers/request_pattern_matcher.rb +80 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/rspec/matchers/webmock_matcher.rb +69 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/rspec/matchers.rb +29 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/rspec.rb +44 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/stub_registry.rb +84 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/stub_request_snippet.rb +40 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/test_unit.rb +22 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/util/hash_counter.rb +45 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/util/hash_keys_stringifier.rb +27 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/util/hash_validator.rb +19 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/util/headers.rb +77 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/util/parsers/json.rb +72 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/util/parsers/parse_error.rb +7 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/util/parsers/xml.rb +16 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/util/query_mapper.rb +283 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/util/uri.rb +113 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/util/values_stringifier.rb +22 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/util/version_checker.rb +113 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/version.rb +5 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/webmock.rb +175 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock.rb +61 -0
- data/vendor/bundle/ruby/3.2.0/gems/websocket-driver-0.8.0/ext/websocket-driver/Makefile +3 -3
- data/vendor/bundle/ruby/3.2.0/gems/websocket-driver-0.8.0/lib/websocket_mask.so +0 -0
- data/vendor/bundle/ruby/3.2.0/specifications/addressable-2.9.0.gemspec +29 -0
- data/vendor/bundle/ruby/3.2.0/specifications/crack-1.0.1.gemspec +27 -0
- data/vendor/bundle/ruby/3.2.0/specifications/faraday-2.14.1.gemspec +0 -0
- data/vendor/bundle/ruby/3.2.0/specifications/faraday-net_http-3.4.2.gemspec +26 -0
- data/vendor/bundle/ruby/3.2.0/specifications/hashdiff-1.2.1.gemspec +30 -0
- data/vendor/bundle/ruby/3.2.0/specifications/net-http-0.9.1.gemspec +27 -0
- data/vendor/bundle/ruby/3.2.0/specifications/public_suffix-7.0.5.gemspec +24 -0
- data/vendor/bundle/ruby/3.2.0/specifications/rexml-3.4.4.gemspec +25 -0
- data/vendor/bundle/ruby/3.2.0/specifications/webmock-3.26.2.gemspec +44 -0
- metadata +377 -2
data/docs/guides/extending.md
CHANGED
|
@@ -12,6 +12,69 @@ IronAdmin is designed to be extended at every level.
|
|
|
12
12
|
6. **Theme system** - 40+ CSS class properties
|
|
13
13
|
7. **Route mounting** - Mount at any path
|
|
14
14
|
|
|
15
|
+
## MongoDB / Mongoid Support
|
|
16
|
+
|
|
17
|
+
IronAdmin supports MongoDB via the built-in Mongoid adapter. Add `mongoid` to your Gemfile and configure resources:
|
|
18
|
+
|
|
19
|
+
```ruby
|
|
20
|
+
# Gemfile
|
|
21
|
+
gem "mongoid"
|
|
22
|
+
|
|
23
|
+
# app/iron_admin/resources/article_resource.rb
|
|
24
|
+
module IronAdmin
|
|
25
|
+
module Resources
|
|
26
|
+
class ArticleResource < IronAdmin::Resource
|
|
27
|
+
self.adapter_class = :mongoid
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
The Mongoid adapter:
|
|
34
|
+
- Maps Mongoid field types to IronAdmin field types automatically
|
|
35
|
+
- Supports `embeds_many`/`embeds_one` associations (mapped to `:has_many`/`:has_one`)
|
|
36
|
+
- Uses `$regex` for case-insensitive search
|
|
37
|
+
- Provides a `MongoidQueryBuilder` for operator-based string/number filters
|
|
38
|
+
- Falls back gracefully for MongoDB standalone (transactions require replica set)
|
|
39
|
+
|
|
40
|
+
You can mix adapters in the same app — some resources using ActiveRecord, others using Mongoid.
|
|
41
|
+
|
|
42
|
+
## HTTP REST API Support
|
|
43
|
+
|
|
44
|
+
IronAdmin can manage resources from external REST APIs. Add `faraday` to your Gemfile:
|
|
45
|
+
|
|
46
|
+
```ruby
|
|
47
|
+
# Gemfile
|
|
48
|
+
gem "faraday"
|
|
49
|
+
|
|
50
|
+
# config/initializers/iron_admin.rb
|
|
51
|
+
IronAdmin.configure do |config|
|
|
52
|
+
config.http_base_url = "https://api.example.com/v1"
|
|
53
|
+
config.http_headers = { "Authorization" => "Bearer #{ENV['API_TOKEN']}" }
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# app/iron_admin/resources/product_resource.rb
|
|
57
|
+
module IronAdmin
|
|
58
|
+
module Resources
|
|
59
|
+
class ProductResource < IronAdmin::Resource
|
|
60
|
+
self.adapter_class = :http
|
|
61
|
+
|
|
62
|
+
# Fields auto-discovered from API response. Just customize:
|
|
63
|
+
field :status, type: :badge
|
|
64
|
+
searchable :name
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
The HTTP adapter:
|
|
71
|
+
- Auto-discovers fields from the first API response (convention-over-configuration)
|
|
72
|
+
- Infers resource path from name (`ProductResource` → `GET /products`)
|
|
73
|
+
- Full CRUD via standard REST verbs
|
|
74
|
+
- Lazy query execution (no HTTP requests until records are accessed)
|
|
75
|
+
- Populates `record.errors` from API 422 responses for form validation
|
|
76
|
+
- **Does not require a Ruby model class.** When `adapter_class = :http`, `Resource.model` returns `IronAdmin::Adapters::Http::ModelProxy` — a thin wrapper exposing `model_name.plural` / `model_name.human` for routing and labels, and an empty `column_names` (HTTP resources have no static schema). Fields are discovered from the API response at request time.
|
|
77
|
+
|
|
15
78
|
## Custom Resources with Business Logic
|
|
16
79
|
|
|
17
80
|
```ruby
|
|
@@ -154,8 +217,12 @@ Create a tool class that inherits from `IronAdmin::Tool`:
|
|
|
154
217
|
|
|
155
218
|
```ruby
|
|
156
219
|
# app/iron_admin/tools/report_tool.rb
|
|
157
|
-
|
|
158
|
-
|
|
220
|
+
module IronAdmin
|
|
221
|
+
module Tools
|
|
222
|
+
class ReportTool < IronAdmin::Tool
|
|
223
|
+
menu label: "Reports", icon: "chart-bar", priority: 1, group: "Analytics"
|
|
224
|
+
end
|
|
225
|
+
end
|
|
159
226
|
end
|
|
160
227
|
```
|
|
161
228
|
|
|
@@ -169,7 +236,7 @@ Create a view template for your tool at:
|
|
|
169
236
|
app/views/iron_admin/tools/<tool_name>/show.html.erb
|
|
170
237
|
```
|
|
171
238
|
|
|
172
|
-
For example, `ReportTool` (which has `tool_name` of `"report"`) would use:
|
|
239
|
+
For example, `IronAdmin::Tools::ReportTool` (which has `tool_name` of `"report"`) would use:
|
|
173
240
|
|
|
174
241
|
```
|
|
175
242
|
app/views/iron_admin/tools/report/show.html.erb
|
|
@@ -184,6 +251,54 @@ Tools are automatically routed at `/admin/tools/:tool_name`:
|
|
|
184
251
|
| `GET /admin/tools/:tool_name` | `tools#show` | Render the tool's show view |
|
|
185
252
|
| `POST /admin/tools/:tool_name/:action_name` | `tools#execute` | Execute a tool action |
|
|
186
253
|
|
|
254
|
+
### Declarative Tool Actions
|
|
255
|
+
|
|
256
|
+
Use `tool_action` to declare actions with metadata, form fields, and authorization:
|
|
257
|
+
|
|
258
|
+
```ruby
|
|
259
|
+
# app/iron_admin/tools/cache_manager_tool.rb
|
|
260
|
+
module IronAdmin
|
|
261
|
+
module Tools
|
|
262
|
+
class CacheManagerTool < IronAdmin::Tool
|
|
263
|
+
menu label: "Cache Manager", icon: "server", group: "System"
|
|
264
|
+
|
|
265
|
+
tool_action :flush_all,
|
|
266
|
+
label: "Flush All Caches",
|
|
267
|
+
icon: "trash",
|
|
268
|
+
confirm: true,
|
|
269
|
+
condition: ->(user) { user&.admin? }
|
|
270
|
+
|
|
271
|
+
tool_action :flush_key,
|
|
272
|
+
label: "Flush Specific Key",
|
|
273
|
+
form_fields: [
|
|
274
|
+
{ name: :cache_key, type: :text, required: true, placeholder: "e.g. users/123" }
|
|
275
|
+
]
|
|
276
|
+
|
|
277
|
+
def flush_all(ctx)
|
|
278
|
+
Rails.cache.clear
|
|
279
|
+
ctx.flash[:notice] = "All caches flushed"
|
|
280
|
+
end
|
|
281
|
+
|
|
282
|
+
def flush_key(ctx)
|
|
283
|
+
key = ctx.action_params(:cache_key)[:cache_key]
|
|
284
|
+
Rails.cache.delete(key)
|
|
285
|
+
ctx.flash[:notice] = "Key '#{key}' flushed"
|
|
286
|
+
end
|
|
287
|
+
end
|
|
288
|
+
end
|
|
289
|
+
end
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
**ToolContext** is injected into 1-arg methods and provides:
|
|
293
|
+
- `ctx.params` — raw request params
|
|
294
|
+
- `ctx.current_user` — the current admin user
|
|
295
|
+
- `ctx.flash` — flash messages
|
|
296
|
+
- `ctx.action_params(:key1, :key2)` — safe param extraction (strong params)
|
|
297
|
+
|
|
298
|
+
**Authorization:** The `condition:` proc receives the current user. If it returns false, the action returns 403 and is hidden from the UI.
|
|
299
|
+
|
|
300
|
+
**Form fields:** Actions with `form_fields:` render a form page before execution. Supported types: `:text`, `:textarea`, `:number`, `:boolean`, `:date`, `:datetime`, `:select`.
|
|
301
|
+
|
|
187
302
|
### Menu Options
|
|
188
303
|
|
|
189
304
|
| Option | Type | Description |
|
|
@@ -193,6 +308,14 @@ Tools are automatically routed at `/admin/tools/:tool_name`:
|
|
|
193
308
|
| `priority` | Integer | Sort order (lower = higher in sidebar) |
|
|
194
309
|
| `group` | String | Sidebar group heading (defaults to "Tools") |
|
|
195
310
|
|
|
311
|
+
### Tool Routes
|
|
312
|
+
|
|
313
|
+
| Route | Controller Action | Description |
|
|
314
|
+
|-------|-------------------|-------------|
|
|
315
|
+
| `GET /admin/tools/:tool_name` | `tools#show` | Render the tool's show view |
|
|
316
|
+
| `GET /admin/tools/:tool_name/:action_name/form` | `tools#action_form` | Render action form |
|
|
317
|
+
| `POST /admin/tools/:tool_name/:action_name` | `tools#execute` | Execute a tool action |
|
|
318
|
+
|
|
196
319
|
### ToolRegistry API
|
|
197
320
|
|
|
198
321
|
| Method | Description |
|
|
@@ -283,6 +406,12 @@ IronAdmin.configure do |config|
|
|
|
283
406
|
end
|
|
284
407
|
```
|
|
285
408
|
|
|
409
|
+
## Custom Adapters
|
|
410
|
+
|
|
411
|
+
IronAdmin uses an adapter pattern to decouple from any specific ORM. It ships with `ActiveRecord` and `Mongoid` adapters, but you can create adapters for any data source (Sequel, HTTP APIs, DynamoDB, etc.).
|
|
412
|
+
|
|
413
|
+
See the [Building a Custom Adapter](custom-adapters.md) guide for the complete reference, including all 35 methods, duck type contracts, QueryBuilder integration, and testing patterns.
|
|
414
|
+
|
|
286
415
|
## Testing Resources
|
|
287
416
|
|
|
288
417
|
```ruby
|
data/docs/guides/fields.md
CHANGED
data/docs/guides/resources.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Resources
|
|
2
2
|
|
|
3
|
-
Resources are the core building block of IronAdmin. Each resource maps to
|
|
3
|
+
Resources are the core building block of IronAdmin. Each resource maps to a model (ActiveRecord or Mongoid) and defines how it appears in the admin panel.
|
|
4
4
|
|
|
5
5
|
## Generating a Resource
|
|
6
6
|
|
|
@@ -112,6 +112,21 @@ remove_filter :some_column
|
|
|
112
112
|
| `:select` | Dropdown with choices |
|
|
113
113
|
| `:date_range` | Date range picker |
|
|
114
114
|
| `:boolean` | True/false toggle |
|
|
115
|
+
| `:string` | Text input with operator dropdown (contains, equals, starts_with, ends_with) |
|
|
116
|
+
| `:number` | Number input with operator dropdown (equals, greater_than, less_than, between) |
|
|
117
|
+
|
|
118
|
+
### String and Number Filters
|
|
119
|
+
|
|
120
|
+
String and number filters provide an operator dropdown alongside the input:
|
|
121
|
+
|
|
122
|
+
```ruby
|
|
123
|
+
class ProductResource < IronAdmin::Resource
|
|
124
|
+
filter :name, type: :string # contains, equals, starts_with, ends_with
|
|
125
|
+
filter :price, type: :number # equals, greater_than, less_than, between
|
|
126
|
+
end
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
**Auto-inference:** String and text columns automatically infer as `:string` filters. Integer, float, and decimal columns automatically infer as `:number` filters. You only need explicit declarations to override defaults or add filters for columns that aren't auto-detected.
|
|
115
130
|
|
|
116
131
|
### Auto-Generated Enum Filters
|
|
117
132
|
|
|
@@ -186,6 +201,36 @@ action :process do |record|
|
|
|
186
201
|
end
|
|
187
202
|
```
|
|
188
203
|
|
|
204
|
+
### Action Forms
|
|
205
|
+
|
|
206
|
+
Actions can collect user input before executing by specifying `form_fields:`. The form is displayed in a modal when the action is triggered.
|
|
207
|
+
|
|
208
|
+
```ruby
|
|
209
|
+
class OrderResource < IronAdmin::Resource
|
|
210
|
+
action :reject,
|
|
211
|
+
form_fields: [
|
|
212
|
+
action_field(:reason, type: :textarea, required: true),
|
|
213
|
+
action_field(:notify_customer, type: :boolean, default: true)
|
|
214
|
+
] do |record, params|
|
|
215
|
+
record.reject!(reason: params[:reason])
|
|
216
|
+
Mailer.rejection(record).deliver_later if params[:notify_customer]
|
|
217
|
+
end
|
|
218
|
+
end
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
**ActionField types:** `text`, `textarea`, `number`, `boolean`, `date`, `datetime`, `select`.
|
|
222
|
+
|
|
223
|
+
ActionField options:
|
|
224
|
+
|
|
225
|
+
| Option | Type | Description |
|
|
226
|
+
|--------|------|-------------|
|
|
227
|
+
| `type` | Symbol | Input type (see list above) |
|
|
228
|
+
| `required` | Boolean | Whether the field must be filled |
|
|
229
|
+
| `default` | Object | Default value for the input |
|
|
230
|
+
| `choices` | Array | Options for `:select` type |
|
|
231
|
+
|
|
232
|
+
Action forms work with both record actions and bulk actions.
|
|
233
|
+
|
|
189
234
|
### Bulk Actions
|
|
190
235
|
|
|
191
236
|
```ruby
|
|
@@ -272,6 +317,37 @@ class OrderResource < IronAdmin::Resource
|
|
|
272
317
|
end
|
|
273
318
|
```
|
|
274
319
|
|
|
320
|
+
## Nested Forms
|
|
321
|
+
|
|
322
|
+
For `has_many` and `has_one` associations, you can enable inline nested editing directly on the parent form. The model must declare `accepts_nested_attributes_for` for the association.
|
|
323
|
+
|
|
324
|
+
```ruby
|
|
325
|
+
class OrderResource < IronAdmin::Resource
|
|
326
|
+
# has_many with nested editing
|
|
327
|
+
has_many :line_items, nested: true, allow_destroy: true
|
|
328
|
+
|
|
329
|
+
# Explicit field selection
|
|
330
|
+
has_many :addresses, nested: true, fields: [:street, :city, :zip]
|
|
331
|
+
|
|
332
|
+
# With drag-and-drop ordering (via Stimulus)
|
|
333
|
+
has_many :sections, nested: true, position_field: :position
|
|
334
|
+
|
|
335
|
+
# has_one nested
|
|
336
|
+
has_one :profile, nested: true
|
|
337
|
+
end
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
### Options
|
|
341
|
+
|
|
342
|
+
| Option | Default | Description |
|
|
343
|
+
|--------|---------|-------------|
|
|
344
|
+
| `nested` | `false` | Enable inline nested form for the association |
|
|
345
|
+
| `allow_destroy` | `true` | Allow removing child records from the form |
|
|
346
|
+
| `fields` | auto-inferred | Explicit list of child fields to display (excludes `id`, timestamps, and FK by default) |
|
|
347
|
+
| `position_field` | `nil` | Column name for drag-and-drop reordering |
|
|
348
|
+
|
|
349
|
+
Nested forms use the existing `create` and `update` endpoints -- no additional routes are required. Child attributes are submitted as standard Rails nested attributes (`*_attributes` params).
|
|
350
|
+
|
|
275
351
|
## Menu Configuration
|
|
276
352
|
|
|
277
353
|
```ruby
|
|
@@ -300,7 +376,7 @@ Exports respect:
|
|
|
300
376
|
class UserResource < IronAdmin::Resource
|
|
301
377
|
policy do
|
|
302
378
|
allow :read, :update
|
|
303
|
-
deny :
|
|
379
|
+
deny :destroy, if: ->(user) { !user.superadmin? }
|
|
304
380
|
end
|
|
305
381
|
end
|
|
306
382
|
```
|
|
@@ -96,6 +96,35 @@ closed. This is the recommended workaround until the issue is resolved upstream.
|
|
|
96
96
|
1. Ensure resource file exists in `app/iron_admin/resources/`
|
|
97
97
|
2. Check resource inherits from `IronAdmin::Resource`
|
|
98
98
|
3. Verify filename matches class name (`user_resource.rb` → `UserResource`)
|
|
99
|
+
4. For non-AR adapters (`:mongoid`, `:http`, custom): registration runs in
|
|
100
|
+
two phases — `Resource.inherited` adds the class to the registry, and
|
|
101
|
+
the engine's `to_prepare` block calls `ResourceRegistry.finalize!`
|
|
102
|
+
after every class body has fully evaluated. If you call
|
|
103
|
+
`IronAdmin::ResourceRegistry.register` manually outside the engine's
|
|
104
|
+
boot path (e.g. in custom initializer), call
|
|
105
|
+
`IronAdmin::ResourceRegistry.finalize!` afterwards so soft-delete
|
|
106
|
+
features pick up the right adapter.
|
|
107
|
+
|
|
108
|
+
### Resources silently missing on Mongoid / HTTP / custom adapters
|
|
109
|
+
|
|
110
|
+
**Cause:** Eager registration tried to introspect the model before
|
|
111
|
+
`self.adapter_class = :mongoid` (or similar) had taken effect. The eager
|
|
112
|
+
failure is **silent by design** (no log line) — `finalize!` retries with
|
|
113
|
+
the correct adapter once the class body has fully evaluated. Logs only
|
|
114
|
+
appear if the deferred retry *also* fails.
|
|
115
|
+
|
|
116
|
+
**Solutions:**
|
|
117
|
+
1. Look for `[IronAdmin] Could not finalize <Resource>: <Error>` in
|
|
118
|
+
`Rails.logger`. If you see one, the deferred retry failed too —
|
|
119
|
+
common causes: model class doesn't exist (HTTP adapter), DB
|
|
120
|
+
unreachable (transient outage at boot), or schema introspection bug
|
|
121
|
+
in the adapter.
|
|
122
|
+
2. Confirm the registry has the resource:
|
|
123
|
+
`bin/rails runner 'puts IronAdmin::ResourceRegistry.find("things")'`
|
|
124
|
+
3. If `find` returns `nil` and there's no `Could not finalize` log,
|
|
125
|
+
`finalize!` may not have run yet (e.g. the engine's `to_prepare`
|
|
126
|
+
wasn't triggered in your boot path). Run
|
|
127
|
+
`IronAdmin::ResourceRegistry.finalize!` manually and re-check.
|
|
99
128
|
|
|
100
129
|
### Custom actions not appearing
|
|
101
130
|
|
data/docs/reference/routes.md
CHANGED
|
@@ -16,9 +16,19 @@ Mount: `mount IronAdmin::Engine => "/admin"`
|
|
|
16
16
|
| POST | `/admin/:resource` | `resources#create` | Create |
|
|
17
17
|
| PATCH | `/admin/:resource/:id` | `resources#update` | Update |
|
|
18
18
|
| DELETE | `/admin/:resource/:id` | `resources#destroy` | Delete |
|
|
19
|
+
| GET | `/admin/:resource/:id/actions/:name/form` | `resources#action_form` | Action form |
|
|
19
20
|
| POST | `/admin/:resource/:id/actions/:name` | `resources#execute_action` | Custom action |
|
|
21
|
+
| GET | `/admin/:resource/bulk_actions/:name/form` | `resources#bulk_action_form` | Bulk action form |
|
|
20
22
|
| POST | `/admin/:resource/bulk_actions/:name` | `resources#execute_bulk_action` | Bulk action |
|
|
21
23
|
|
|
24
|
+
### Tool Routes
|
|
25
|
+
|
|
26
|
+
| Method | Path | Action | Description |
|
|
27
|
+
|--------|------|--------|-------------|
|
|
28
|
+
| GET | `/admin/tools/:tool_name` | `tools#show` | Tool page |
|
|
29
|
+
| GET | `/admin/tools/:tool_name/:action_name/form` | `tools#action_form` | Tool action form |
|
|
30
|
+
| POST | `/admin/tools/:tool_name/:action_name` | `tools#execute` | Execute tool action |
|
|
31
|
+
|
|
22
32
|
## Query Parameters (Index)
|
|
23
33
|
|
|
24
34
|
| Param | Example |
|
|
@@ -44,20 +44,44 @@ module IronAdmin
|
|
|
44
44
|
route 'mount IronAdmin::Engine => "/admin"'
|
|
45
45
|
end
|
|
46
46
|
|
|
47
|
+
# Candidate Tailwind entry points, in priority order. Covers
|
|
48
|
+
# tailwindcss-rails 4.x layout (`app/assets/tailwind/application.css`)
|
|
49
|
+
# and the tailwindcss-rails 3.x / cssbundling-rails layout
|
|
50
|
+
# (`app/assets/stylesheets/application.tailwind.css`).
|
|
51
|
+
TAILWIND_CSS_CANDIDATES = %w[
|
|
52
|
+
app/assets/tailwind/application.css
|
|
53
|
+
app/assets/stylesheets/application.tailwind.css
|
|
54
|
+
].freeze
|
|
55
|
+
|
|
47
56
|
# Adds the IronAdmin CSS import to the Tailwind application stylesheet.
|
|
48
57
|
#
|
|
49
58
|
# This import is required so the Tailwind compiler scans the engine's
|
|
50
59
|
# views and components for CSS utility classes. Without it, the admin
|
|
51
60
|
# panel renders unstyled.
|
|
52
61
|
#
|
|
62
|
+
# If no known Tailwind entry point is detected (e.g. the host added
|
|
63
|
+
# `gem "iron_admin"` after `rails new --skip-bundle`, before the
|
|
64
|
+
# tailwindcss installer ran), the generator emits a yellow `skip`
|
|
65
|
+
# status line with the exact `@import` directive the user needs to
|
|
66
|
+
# add manually — instead of returning silently and leaving the admin
|
|
67
|
+
# panel unstyled with no breadcrumb to the cause.
|
|
68
|
+
#
|
|
53
69
|
# @return [void]
|
|
54
70
|
def add_tailwind_import
|
|
55
|
-
css_path = "app/assets/tailwind/application.css"
|
|
56
|
-
return unless File.exist?(File.join(destination_root, css_path))
|
|
57
|
-
|
|
58
71
|
import_line = '@import "../builds/tailwind/iron_admin";'
|
|
59
|
-
content = File.read(File.join(destination_root, css_path))
|
|
60
72
|
|
|
73
|
+
css_path = TAILWIND_CSS_CANDIDATES.find { |p| File.exist?(File.join(destination_root, p)) }
|
|
74
|
+
|
|
75
|
+
unless css_path
|
|
76
|
+
say_status :skip,
|
|
77
|
+
"no Tailwind entry point found; add #{import_line} to your Tailwind " \
|
|
78
|
+
"application file once it's created (typically " \
|
|
79
|
+
"#{TAILWIND_CSS_CANDIDATES.first})",
|
|
80
|
+
:yellow
|
|
81
|
+
return
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
content = File.read(File.join(destination_root, css_path))
|
|
61
85
|
return if content.include?(import_line)
|
|
62
86
|
|
|
63
87
|
append_to_file css_path, "#{import_line}\n"
|
|
@@ -20,22 +20,38 @@ module IronAdmin
|
|
|
20
20
|
# @see IronAdmin::AuditLog
|
|
21
21
|
# @see IronAdmin::Configuration#audit_storage
|
|
22
22
|
class InstallAuditGenerator < Rails::Generators::Base
|
|
23
|
-
include Rails::Generators::Migration
|
|
24
|
-
|
|
25
23
|
source_root File.expand_path("templates", __dir__)
|
|
26
24
|
|
|
27
|
-
#
|
|
25
|
+
# Writes the audit entries migration into `db/migrate/`.
|
|
26
|
+
#
|
|
27
|
+
# We deliberately avoid `Rails::Generators::Migration#migration_template`
|
|
28
|
+
# here: that helper goes through `ActiveRecord::Migration.current_version`
|
|
29
|
+
# which opens a DB connection to read the schema cache. On a clean
|
|
30
|
+
# machine (DB doesn't exist yet) or during a deploy where the DB
|
|
31
|
+
# is briefly unreachable, that crashes the generator with
|
|
32
|
+
# `ActiveRecord::ConnectionNotEstablished` and the migration file
|
|
33
|
+
# never gets written. Using plain `template` plus a timestamp-based
|
|
34
|
+
# filename keeps the generator DB-free, so `bin/rails db:create
|
|
35
|
+
# db:migrate` (the natural bootstrap order) Just Works.
|
|
36
|
+
#
|
|
28
37
|
# @return [void]
|
|
29
38
|
def create_migration
|
|
30
|
-
|
|
31
|
-
|
|
39
|
+
timestamp = Time.now.utc.strftime("%Y%m%d%H%M%S")
|
|
40
|
+
target = "db/migrate/#{timestamp}_create_iron_admin_audit_entries.rb"
|
|
41
|
+
if existing_audit_migration?
|
|
42
|
+
say_status :skip, "create_iron_admin_audit_entries migration already exists", :yellow
|
|
43
|
+
return
|
|
44
|
+
end
|
|
45
|
+
template "create_iron_admin_audit_entries.rb.tt", target
|
|
32
46
|
end
|
|
33
47
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
# @return [
|
|
37
|
-
|
|
38
|
-
|
|
48
|
+
private
|
|
49
|
+
|
|
50
|
+
# @return [Boolean] True if a migration whose name ends with
|
|
51
|
+
# `_create_iron_admin_audit_entries.rb` is already present in
|
|
52
|
+
# `db/migrate/`. Avoids creating duplicate migrations on rerun.
|
|
53
|
+
def existing_audit_migration?
|
|
54
|
+
Dir.glob(File.join(destination_root, "db/migrate", "*_create_iron_admin_audit_entries.rb")).any?
|
|
39
55
|
end
|
|
40
56
|
end
|
|
41
57
|
end
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module IronAdmin
|
|
4
|
+
# Value object representing a single field in an action form.
|
|
5
|
+
#
|
|
6
|
+
# ActionFields define what inputs are shown to the user when an action
|
|
7
|
+
# requires parameters before execution (e.g., a reason, a date, a choice).
|
|
8
|
+
#
|
|
9
|
+
# @example Creating an action field
|
|
10
|
+
# ActionField.new(name: :reason, type: :textarea, required: true)
|
|
11
|
+
#
|
|
12
|
+
# @example Creating a select field with options
|
|
13
|
+
# ActionField.new(name: :priority, type: :select, options: %w[low medium high])
|
|
14
|
+
class ActionField
|
|
15
|
+
# Supported field types for action forms.
|
|
16
|
+
TYPES = %i[text textarea number boolean date datetime select].freeze
|
|
17
|
+
|
|
18
|
+
# @return [Symbol] The field name (used as the param key)
|
|
19
|
+
attr_reader :name
|
|
20
|
+
|
|
21
|
+
# @return [Symbol] The field type
|
|
22
|
+
attr_reader :type
|
|
23
|
+
|
|
24
|
+
# @return [String] Human-readable label for the field
|
|
25
|
+
attr_reader :label
|
|
26
|
+
|
|
27
|
+
# @return [Boolean] Whether the field is required
|
|
28
|
+
attr_reader :required
|
|
29
|
+
|
|
30
|
+
# @return [Object, nil] Default value for the field
|
|
31
|
+
attr_reader :default
|
|
32
|
+
|
|
33
|
+
# @return [String, nil] Placeholder text for the input
|
|
34
|
+
attr_reader :placeholder
|
|
35
|
+
|
|
36
|
+
# @return [Array, nil] Options for select fields
|
|
37
|
+
attr_reader :options
|
|
38
|
+
|
|
39
|
+
# @param name [Symbol, String] The field name (converted to Symbol)
|
|
40
|
+
# @param type [Symbol, String] The field type (defaults to :text)
|
|
41
|
+
# @param label [String, nil] Custom label (inferred from name if nil)
|
|
42
|
+
# @param required [Boolean] Whether the field is required (default: false)
|
|
43
|
+
# @param default [Object, nil] Default value for the field
|
|
44
|
+
# @param placeholder [String, nil] Placeholder text
|
|
45
|
+
# @param options [Array, nil] Options for select fields
|
|
46
|
+
def initialize(name:, type: :text, label: nil, required: false, default: nil, placeholder: nil, options: nil)
|
|
47
|
+
@name = name.to_sym
|
|
48
|
+
@type = TYPES.include?(type.to_sym) ? type.to_sym : :text
|
|
49
|
+
@label = label || name.to_s.humanize
|
|
50
|
+
@required = required
|
|
51
|
+
@default = default
|
|
52
|
+
@placeholder = placeholder
|
|
53
|
+
@options = options
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|