brut 0.8.0 → 0.9.1
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/.gitignore +9 -0
- data/CHANGELOG.md +13 -0
- data/Dockerfile.dx +8 -1
- data/Gemfile.lock +101 -63
- data/bin/ci +9 -5
- data/bin/docs +1 -1
- data/bin/generate-and-run-rubocop +52 -0
- data/bin/rubocop +27 -0
- data/bin/setup +46 -0
- data/bin/test +18 -0
- data/brut-css/bin/publish +1 -1
- data/brut-css/package-lock.json +2 -2
- data/brut-css/package.json +1 -1
- data/brut-js/bin/publish +1 -1
- data/brut-js/package-lock.json +2 -2
- data/brut-js/package.json +1 -1
- data/brut-js/specs/ConfirmSubmit.spec.js +32 -1
- data/brut-js/src/ConfirmSubmit.js +28 -7
- data/brut.gemspec +32 -26
- data/brutrb.com/.vitepress/config.mjs +3 -0
- data/brutrb.com/database-schema.md +1 -1
- data/brutrb.com/images/tutorial/basic-form-with-violations.png +0 -0
- data/brutrb.com/images/tutorial/basic-form.png +0 -0
- data/brutrb.com/images/tutorial/initial-home-page.png +0 -0
- data/brutrb.com/images/tutorial/new-post-editor.png +0 -0
- data/brutrb.com/images/tutorial/new-post-home-page.png +0 -0
- data/brutrb.com/images/tutorial/styled-form-with-server-side-violations.png +0 -0
- data/brutrb.com/images/tutorial/styled-form-with-violations.png +0 -0
- data/brutrb.com/images/tutorial/styled-home-page-with-posts.png +0 -0
- data/brutrb.com/images/tutorial/styled-home-page.png +0 -0
- data/brutrb.com/images/tutorial/welcome-to-brut.png +0 -0
- data/brutrb.com/recipes/migrations.md +1 -1
- data/brutrb.com/tutorial.md +1728 -3
- data/docker-compose.dx.yml +3 -0
- data/docs/404.html +2 -2
- data/docs/adrs.html +3 -3
- data/docs/ai.html +3 -3
- data/docs/api/Brut/BackEnd/SeedData.html +2 -2
- data/docs/api/Brut/BackEnd/Sidekiq/Middlewares/Server/FlushSpans.html +2 -2
- data/docs/api/Brut/BackEnd/Sidekiq/Middlewares/Server.html +2 -2
- data/docs/api/Brut/BackEnd/Sidekiq/Middlewares.html +2 -2
- data/docs/api/Brut/BackEnd/Sidekiq.html +2 -2
- data/docs/api/Brut/BackEnd/Validators/FormValidator.html +2 -2
- data/docs/api/Brut/BackEnd/Validators.html +2 -2
- data/docs/api/Brut/BackEnd.html +2 -2
- data/docs/api/Brut/CLI/App.html +2 -2
- data/docs/api/Brut/CLI/AppRunner.html +2 -2
- data/docs/api/Brut/CLI/Apps/BuildAssets/All.html +2 -2
- data/docs/api/Brut/CLI/Apps/BuildAssets/CSS.html +2 -2
- data/docs/api/Brut/CLI/Apps/BuildAssets/Images.html +2 -2
- data/docs/api/Brut/CLI/Apps/BuildAssets/JS.html +2 -2
- data/docs/api/Brut/CLI/Apps/BuildAssets.html +2 -2
- data/docs/api/Brut/CLI/Apps/DB/Create.html +2 -2
- data/docs/api/Brut/CLI/Apps/DB/Drop.html +2 -2
- data/docs/api/Brut/CLI/Apps/DB/Migrate.html +2 -2
- data/docs/api/Brut/CLI/Apps/DB/NewMigration.html +2 -2
- data/docs/api/Brut/CLI/Apps/DB/Rebuild.html +2 -2
- data/docs/api/Brut/CLI/Apps/DB/Seed.html +2 -2
- data/docs/api/Brut/CLI/Apps/DB/Status.html +2 -2
- data/docs/api/Brut/CLI/Apps/DB.html +2 -2
- data/docs/api/Brut/CLI/Apps/DeployBase/GitChecks.html +2 -2
- data/docs/api/Brut/CLI/Apps/DeployBase.html +2 -2
- data/docs/api/Brut/CLI/Apps/HerokuContainerBasedDeploy/Deploy.html +3 -3
- data/docs/api/Brut/CLI/Apps/HerokuContainerBasedDeploy.html +2 -2
- data/docs/api/Brut/CLI/Apps/Scaffold/Action/Route.html +2 -2
- data/docs/api/Brut/CLI/Apps/Scaffold/Action.html +2 -2
- data/docs/api/Brut/CLI/Apps/Scaffold/Component.html +2 -2
- data/docs/api/Brut/CLI/Apps/Scaffold/CustomElementTest.html +2 -2
- data/docs/api/Brut/CLI/Apps/Scaffold/DbModel.html +2 -2
- data/docs/api/Brut/CLI/Apps/Scaffold/E2ETest.html +2 -2
- data/docs/api/Brut/CLI/Apps/Scaffold/Form.html +2 -2
- data/docs/api/Brut/CLI/Apps/Scaffold/Page/Route.html +2 -2
- data/docs/api/Brut/CLI/Apps/Scaffold/Page.html +2 -2
- data/docs/api/Brut/CLI/Apps/Scaffold/RoutesEditor.html +2 -2
- data/docs/api/Brut/CLI/Apps/Scaffold/Test.html +3 -3
- data/docs/api/Brut/CLI/Apps/Scaffold.html +2 -2
- data/docs/api/Brut/CLI/Apps/Test/Audit.html +2 -2
- data/docs/api/Brut/CLI/Apps/Test/E2e.html +2 -2
- data/docs/api/Brut/CLI/Apps/Test/JS.html +2 -2
- data/docs/api/Brut/CLI/Apps/Test/Run.html +2 -2
- data/docs/api/Brut/CLI/Apps/Test.html +2 -2
- data/docs/api/Brut/CLI/Apps.html +2 -2
- data/docs/api/Brut/CLI/Command.html +2 -2
- data/docs/api/Brut/CLI/Error.html +2 -2
- data/docs/api/Brut/CLI/ExecutionResults/Result.html +2 -2
- data/docs/api/Brut/CLI/ExecutionResults.html +2 -2
- data/docs/api/Brut/CLI/Executor.html +2 -2
- data/docs/api/Brut/CLI/InvalidOption.html +2 -2
- data/docs/api/Brut/CLI/Options.html +80 -2
- data/docs/api/Brut/CLI/Output.html +2 -2
- data/docs/api/Brut/CLI/SystemExecError.html +2 -2
- data/docs/api/Brut/CLI.html +2 -2
- data/docs/api/Brut/FactoryBot.html +3 -3
- data/docs/api/Brut/Framework/App.html +3 -3
- data/docs/api/Brut/Framework/Config.html +27 -15
- data/docs/api/Brut/Framework/Container.html +2 -2
- data/docs/api/Brut/Framework/Error.html +2 -2
- data/docs/api/Brut/Framework/Errors/AbstractMethod.html +2 -2
- data/docs/api/Brut/Framework/Errors/Bug.html +2 -2
- data/docs/api/Brut/Framework/Errors/MissingConfiguration.html +2 -2
- data/docs/api/Brut/Framework/Errors/MissingParameter.html +2 -2
- data/docs/api/Brut/Framework/Errors/NoClassForPath.html +2 -2
- data/docs/api/Brut/Framework/Errors/NotFound.html +2 -2
- data/docs/api/Brut/Framework/Errors/NotImplemented.html +2 -2
- data/docs/api/Brut/Framework/Errors.html +2 -2
- data/docs/api/Brut/Framework/FussyTypeEnforcement.html +2 -2
- data/docs/api/Brut/Framework/MCP.html +21 -11
- data/docs/api/Brut/Framework/ProjectEnvironment.html +2 -2
- data/docs/api/Brut/Framework.html +2 -2
- data/docs/api/Brut/FrontEnd/AssetPathResolver.html +2 -2
- data/docs/api/Brut/FrontEnd/Component/Helpers.html +2 -2
- data/docs/api/Brut/FrontEnd/Component.html +2 -2
- data/docs/api/Brut/FrontEnd/Components/ConstraintViolations.html +2 -2
- data/docs/api/Brut/FrontEnd/Components/FormTag.html +4 -4
- data/docs/api/Brut/FrontEnd/Components/I18nTranslations.html +2 -2
- data/docs/api/Brut/FrontEnd/Components/Input.html +2 -2
- data/docs/api/Brut/FrontEnd/Components/Inputs/CsrfToken.html +2 -2
- data/docs/api/Brut/FrontEnd/Components/Inputs/InputTag.html +2 -2
- data/docs/api/Brut/FrontEnd/Components/Inputs/RadioButton.html +2 -2
- data/docs/api/Brut/FrontEnd/Components/Inputs/SelectTagWithOptions.html +2 -2
- data/docs/api/Brut/FrontEnd/Components/Inputs/TextareaTag.html +2 -2
- data/docs/api/Brut/FrontEnd/Components/Inputs.html +2 -2
- data/docs/api/Brut/FrontEnd/Components/LocaleDetection.html +2 -2
- data/docs/api/Brut/FrontEnd/Components/PageIdentifier.html +2 -2
- data/docs/api/Brut/FrontEnd/Components/TimeTag.html +2 -2
- data/docs/api/Brut/FrontEnd/Components/Traceparent.html +2 -2
- data/docs/api/Brut/FrontEnd/Components.html +2 -2
- data/docs/api/Brut/FrontEnd/CsrfProtector.html +250 -0
- data/docs/api/Brut/FrontEnd/Download.html +2 -2
- data/docs/api/Brut/FrontEnd/Flash.html +2 -2
- data/docs/api/Brut/FrontEnd/Form.html +6 -6
- data/docs/api/Brut/FrontEnd/Forms/ConstraintViolation.html +2 -2
- data/docs/api/Brut/FrontEnd/Forms/Input/Color.html +2 -2
- data/docs/api/Brut/FrontEnd/Forms/Input/TimeOfDay.html +2 -2
- data/docs/api/Brut/FrontEnd/Forms/Input.html +2 -2
- data/docs/api/Brut/FrontEnd/Forms/InputDeclarations.html +2 -2
- data/docs/api/Brut/FrontEnd/Forms/InputDefinition.html +2 -2
- data/docs/api/Brut/FrontEnd/Forms/RadioButtonGroupInput.html +2 -2
- data/docs/api/Brut/FrontEnd/Forms/RadioButtonGroupInputDefinition.html +2 -2
- data/docs/api/Brut/FrontEnd/Forms/SelectInput.html +2 -2
- data/docs/api/Brut/FrontEnd/Forms/SelectInputDefinition.html +2 -2
- data/docs/api/Brut/FrontEnd/Forms/ValidityState.html +2 -2
- data/docs/api/Brut/FrontEnd/Forms.html +2 -2
- data/docs/api/Brut/FrontEnd/GenericResponse.html +2 -2
- data/docs/api/Brut/FrontEnd/Handler.html +2 -2
- data/docs/api/Brut/FrontEnd/Handlers/CspReportingHandler.html +2 -2
- data/docs/api/Brut/FrontEnd/Handlers/InstrumentationHandler/TraceParent.html +2 -2
- data/docs/api/Brut/FrontEnd/Handlers/InstrumentationHandler.html +2 -2
- data/docs/api/Brut/FrontEnd/Handlers/LocaleDetectionHandler.html +2 -2
- data/docs/api/Brut/FrontEnd/Handlers/MissingHandler/Form.html +2 -2
- data/docs/api/Brut/FrontEnd/Handlers/MissingHandler.html +2 -2
- data/docs/api/Brut/FrontEnd/Handlers.html +2 -2
- data/docs/api/Brut/FrontEnd/HandlingResults.html +2 -2
- data/docs/api/Brut/FrontEnd/HttpMethod.html +2 -2
- data/docs/api/Brut/FrontEnd/HttpStatus.html +2 -2
- data/docs/api/Brut/FrontEnd/InlineSvgLocator.html +2 -2
- data/docs/api/Brut/FrontEnd/Layout.html +2 -2
- data/docs/api/Brut/FrontEnd/Middleware.html +2 -2
- data/docs/api/Brut/FrontEnd/Middlewares/AnnotateBrutOwnedPaths.html +2 -2
- data/docs/api/Brut/FrontEnd/Middlewares/Favicon.html +2 -2
- data/docs/api/Brut/FrontEnd/Middlewares/OpenTelemetrySpan.html +2 -2
- data/docs/api/Brut/FrontEnd/Middlewares/ReloadApp.html +2 -2
- data/docs/api/Brut/FrontEnd/Middlewares.html +2 -2
- data/docs/api/Brut/FrontEnd/Page.html +2 -2
- data/docs/api/Brut/FrontEnd/Pages/MissingPage.html +2 -2
- data/docs/api/Brut/FrontEnd/Pages.html +2 -2
- data/docs/api/Brut/FrontEnd/RequestContext.html +2 -2
- data/docs/api/Brut/FrontEnd/RouteHook.html +2 -2
- data/docs/api/Brut/FrontEnd/RouteHooks/AgeFlash.html +2 -2
- data/docs/api/Brut/FrontEnd/RouteHooks/CSPNoInlineScripts.html +2 -2
- data/docs/api/Brut/FrontEnd/RouteHooks/CSPNoInlineStylesOrScripts/ReportOnly.html +2 -2
- data/docs/api/Brut/FrontEnd/RouteHooks/CSPNoInlineStylesOrScripts.html +2 -2
- data/docs/api/Brut/FrontEnd/RouteHooks/LocaleDetection.html +2 -2
- data/docs/api/Brut/FrontEnd/RouteHooks/SetupRequestContext.html +2 -2
- data/docs/api/Brut/FrontEnd/RouteHooks.html +2 -2
- data/docs/api/Brut/FrontEnd/Routing/FormHandlerRoute.html +2 -2
- data/docs/api/Brut/FrontEnd/Routing/FormRoute.html +2 -2
- data/docs/api/Brut/FrontEnd/Routing/MissingForm.html +2 -2
- data/docs/api/Brut/FrontEnd/Routing/MissingHandler.html +2 -2
- data/docs/api/Brut/FrontEnd/Routing/MissingPage.html +2 -2
- data/docs/api/Brut/FrontEnd/Routing/MissingPath.html +2 -2
- data/docs/api/Brut/FrontEnd/Routing/PageRoute.html +2 -2
- data/docs/api/Brut/FrontEnd/Routing/Route.html +2 -2
- data/docs/api/Brut/FrontEnd/Routing.html +2 -2
- data/docs/api/Brut/FrontEnd/Session.html +2 -2
- data/docs/api/Brut/FrontEnd.html +3 -3
- data/docs/api/Brut/I18n/BaseMethods.html +3 -3
- data/docs/api/Brut/I18n/ForBackEnd.html +2 -2
- data/docs/api/Brut/I18n/ForCLI.html +2 -2
- data/docs/api/Brut/I18n/ForHTML.html +2 -2
- data/docs/api/Brut/I18n/HTTPAcceptLanguage/AlwaysEnglish.html +2 -2
- data/docs/api/Brut/I18n/HTTPAcceptLanguage.html +2 -2
- data/docs/api/Brut/I18n.html +2 -2
- data/docs/api/Brut/Instrumentation/LoggerSpanExporter.html +2 -2
- data/docs/api/Brut/Instrumentation/OpenTelemetry/NormalizedAttributes.html +2 -2
- data/docs/api/Brut/Instrumentation/OpenTelemetry/Span.html +2 -2
- data/docs/api/Brut/Instrumentation/OpenTelemetry.html +2 -2
- data/docs/api/Brut/Instrumentation.html +2 -2
- data/docs/api/Brut/RubocopConfig.html +237 -0
- data/docs/api/Brut/SinatraHelpers/ClassMethods.html +2 -2
- data/docs/api/Brut/SinatraHelpers.html +2 -2
- data/docs/api/Brut/SpecSupport/ClockSupport.html +2 -2
- data/docs/api/Brut/SpecSupport/ComponentSupport.html +7 -13
- data/docs/api/Brut/SpecSupport/E2ETestServer.html +2 -2
- data/docs/api/Brut/SpecSupport/E2eSupport.html +2 -2
- data/docs/api/Brut/SpecSupport/EnhancedNode.html +2 -2
- data/docs/api/Brut/SpecSupport/FlashSupport.html +2 -2
- data/docs/api/Brut/SpecSupport/GeneralSupport/ClassMethods.html +2 -2
- data/docs/api/Brut/SpecSupport/GeneralSupport.html +2 -2
- data/docs/api/Brut/SpecSupport/HandlerSupport.html +2 -2
- data/docs/api/Brut/SpecSupport/Matchers/BeABug.html +2 -2
- data/docs/api/Brut/SpecSupport/Matchers/BePageFor.html +2 -2
- data/docs/api/Brut/SpecSupport/Matchers/BeRoutingFor.html +2 -2
- data/docs/api/Brut/SpecSupport/Matchers/HaveConstraintViolation.html +2 -2
- data/docs/api/Brut/SpecSupport/Matchers/HaveGenerated.html +2 -2
- data/docs/api/Brut/SpecSupport/Matchers/HaveHTMLAttribute.html +2 -2
- data/docs/api/Brut/SpecSupport/Matchers/HaveI18nString.html +2 -2
- data/docs/api/Brut/SpecSupport/Matchers/HaveLinkTo.html +2 -2
- data/docs/api/Brut/SpecSupport/Matchers/HaveRedirectedTo.html +2 -2
- data/docs/api/Brut/SpecSupport/Matchers/HaveReturnedHttpStatus.html +2 -2
- data/docs/api/Brut/SpecSupport/Matchers/HaveReturnedRackResponse.html +2 -2
- data/docs/api/Brut/SpecSupport/Matchers.html +2 -2
- data/docs/api/Brut/SpecSupport/RSpecSetup/OptionalSidekiqSupport.html +2 -2
- data/docs/api/Brut/SpecSupport/RSpecSetup.html +4 -4
- data/docs/api/Brut/SpecSupport/SessionSupport.html +2 -2
- data/docs/api/Brut/SpecSupport.html +2 -2
- data/docs/api/Brut.html +128 -12
- data/docs/api/Clock.html +2 -2
- data/docs/api/ModuleName.html +28 -28
- data/docs/api/RichString.html +22 -22
- data/docs/api/SemanticLogger/Appender/Async.html +2 -2
- data/docs/api/Sequel/Extensions/BrutInstrumentation.html +2 -2
- data/docs/api/Sequel/Extensions/BrutMigrations.html +2 -2
- data/docs/api/Sequel/Extensions.html +2 -2
- data/docs/api/Sequel/Plugins/CreatedAt/InstanceMethods.html +2 -2
- data/docs/api/Sequel/Plugins/CreatedAt.html +2 -2
- data/docs/api/Sequel/Plugins/ExternalId/ClassMethods.html +2 -2
- data/docs/api/Sequel/Plugins/ExternalId/InstanceMethods.html +2 -2
- data/docs/api/Sequel/Plugins/ExternalId.html +2 -2
- data/docs/api/Sequel/Plugins/FindBang/ClassMethods.html +2 -2
- data/docs/api/Sequel/Plugins/FindBang.html +2 -2
- data/docs/api/Sequel/Plugins.html +2 -2
- data/docs/api/Sequel.html +2 -2
- data/docs/api/_index.html +16 -2
- data/docs/api/class_list.html +1 -1
- data/docs/api/file.README.html +28 -2
- data/docs/api/index.html +28 -2
- data/docs/api/method_list.html +192 -168
- data/docs/api/top-level-namespace.html +2 -2
- data/docs/assets/{app.DyQLb4Ot.js → app.BuBdZoUg.js} +1 -1
- data/docs/assets/basic-form-with-violations.Cv6Y9-Q_.png +0 -0
- data/docs/assets/basic-form.DbHnu0oW.png +0 -0
- data/docs/assets/chunks/@localSearchIndexroot.BZ_a3X0T.js +1 -0
- data/docs/assets/chunks/{VPLocalSearchBox.T1iA-eJx.js → VPLocalSearchBox.UtnyvkX-.js} +1 -1
- data/docs/assets/chunks/{theme.ChwsbWjK.js → theme.DqwvuBEK.js} +2 -2
- data/docs/assets/{components.md.DHh-NwKs.js → components.md.Bu80E2Nr.js} +3 -3
- data/docs/assets/{configuration.md.D8Wz3oJU.js → configuration.md.CuIxVsSf.js} +1 -1
- data/docs/assets/{database-schema.md.C5gXexJi.js → database-schema.md.LpmBPVEU.js} +1 -1
- data/docs/assets/{forms.md.BRE85eju.js → forms.md.DnLbzVDa.js} +1 -1
- data/docs/assets/{getting-started.md.2ioiTe-B.js → getting-started.md.DdQLmU3C.js} +2 -2
- data/docs/assets/initial-home-page.DNIaYmgP.png +0 -0
- data/docs/assets/new-post-editor.DrHr-5oh.png +0 -0
- data/docs/assets/new-post-home-page.Bm34lyMg.png +0 -0
- data/docs/assets/{recipes_migrations.md.DPN3gQE3.js → recipes_migrations.md.CTcnWDJF.js} +1 -1
- data/docs/assets/styled-form-with-server-side-violations.Bjxd8Dpv.png +0 -0
- data/docs/assets/styled-form-with-violations.Bv_sa9tg.png +0 -0
- data/docs/assets/styled-home-page-with-posts.Dd4kG89D.png +0 -0
- data/docs/assets/styled-home-page.BzdI7dWz.png +0 -0
- data/docs/assets/tutorial.md.C4zR5XPG.js +728 -0
- data/docs/assets/tutorial.md.C4zR5XPG.lean.js +1 -0
- data/docs/assets/welcome-to-brut.VSWzl17-.png +0 -0
- data/docs/assets.html +3 -3
- data/docs/brut-js/api/AjaxSubmit.html +1 -1
- data/docs/brut-js/api/AjaxSubmit.js.html +1 -1
- data/docs/brut-js/api/Autosubmit.html +1 -1
- data/docs/brut-js/api/Autosubmit.js.html +1 -1
- data/docs/brut-js/api/BaseCustomElement.html +1 -1
- data/docs/brut-js/api/BaseCustomElement.js.html +1 -1
- data/docs/brut-js/api/BrutCustomElements.html +1 -1
- data/docs/brut-js/api/BufferedLogger.html +1 -1
- data/docs/brut-js/api/ConfirmSubmit.html +18 -10
- data/docs/brut-js/api/ConfirmSubmit.js.html +29 -8
- data/docs/brut-js/api/ConfirmationDialog.html +1 -1
- data/docs/brut-js/api/ConfirmationDialog.js.html +1 -1
- data/docs/brut-js/api/ConstraintViolationMessage.html +1 -1
- data/docs/brut-js/api/ConstraintViolationMessage.js.html +1 -1
- data/docs/brut-js/api/ConstraintViolationMessages.html +1 -1
- data/docs/brut-js/api/ConstraintViolationMessages.js.html +1 -1
- data/docs/brut-js/api/CopyToClipboard.html +1 -1
- data/docs/brut-js/api/CopyToClipboard.js.html +1 -1
- data/docs/brut-js/api/Form.html +1 -1
- data/docs/brut-js/api/Form.js.html +1 -1
- data/docs/brut-js/api/I18nTranslation.html +1 -1
- data/docs/brut-js/api/I18nTranslation.js.html +1 -1
- data/docs/brut-js/api/LocaleDetection.html +1 -1
- data/docs/brut-js/api/LocaleDetection.js.html +1 -1
- data/docs/brut-js/api/Logger.html +1 -1
- data/docs/brut-js/api/Logger.js.html +1 -1
- data/docs/brut-js/api/Message.html +1 -1
- data/docs/brut-js/api/Message.js.html +1 -1
- data/docs/brut-js/api/PrefixedLogger.html +1 -1
- data/docs/brut-js/api/RichString.html +1 -1
- data/docs/brut-js/api/RichString.js.html +1 -1
- data/docs/brut-js/api/Tabs.html +1 -1
- data/docs/brut-js/api/Tabs.js.html +1 -1
- data/docs/brut-js/api/Tracing.html +1 -1
- data/docs/brut-js/api/Tracing.js.html +1 -1
- data/docs/brut-js/api/external-CustomElementRegistry.html +1 -1
- data/docs/brut-js/api/external-Performance.html +1 -1
- data/docs/brut-js/api/external-Promise.html +1 -1
- data/docs/brut-js/api/external-ValidityState.html +1 -1
- data/docs/brut-js/api/external-Window.html +1 -1
- data/docs/brut-js/api/external-fetch.html +1 -1
- data/docs/brut-js/api/global.html +1 -1
- data/docs/brut-js/api/index.html +1 -1
- data/docs/brut-js/api/index.js.html +1 -1
- data/docs/brut-js/api/module-testing.html +1 -1
- data/docs/brut-js/api/testing.AssetMetadata.html +1 -1
- data/docs/brut-js/api/testing.AssetMetadataLoader.html +1 -1
- data/docs/brut-js/api/testing.CustomElementTest.html +1 -1
- data/docs/brut-js/api/testing.DOMCreator.html +1 -1
- data/docs/brut-js/api/testing_AssetMetadata.js.html +1 -1
- data/docs/brut-js/api/testing_AssetMetadataLoader.js.html +1 -1
- data/docs/brut-js/api/testing_CustomElementTest.js.html +1 -1
- data/docs/brut-js/api/testing_DOMCreator.js.html +1 -1
- data/docs/brut-js/api/testing_index.js.html +1 -1
- data/docs/brut-js.html +3 -3
- data/docs/business-logic.html +3 -3
- data/docs/cli.html +3 -3
- data/docs/components.html +7 -7
- data/docs/configuration.html +5 -5
- data/docs/css.html +3 -3
- data/docs/custom-element-tests.html +3 -3
- data/docs/database-access.html +3 -3
- data/docs/database-schema.html +5 -5
- data/docs/deployment.html +3 -3
- data/docs/dev-environment.html +3 -3
- data/docs/dir-structure.html +3 -3
- data/docs/doc-conventions.html +3 -3
- data/docs/end-to-end-tests.html +3 -3
- data/docs/features.html +3 -3
- data/docs/flash-and-session.html +3 -3
- data/docs/form-constraints.html +3 -3
- data/docs/forms.html +5 -5
- data/docs/getting-started.html +6 -6
- data/docs/handlers.html +3 -3
- data/docs/hashmap.json +1 -1
- data/docs/hooks.html +3 -3
- data/docs/i18n.html +3 -3
- data/docs/index.html +3 -3
- data/docs/instrumentation.html +3 -3
- data/docs/javascript.html +3 -3
- data/docs/jobs.html +3 -3
- data/docs/keyword-injection.html +3 -3
- data/docs/layouts.html +3 -3
- data/docs/lsp.html +3 -3
- data/docs/markdown-examples.html +3 -3
- data/docs/middleware.html +3 -3
- data/docs/overview.html +3 -3
- data/docs/pages.html +3 -3
- data/docs/recipes/alternate-layouts.html +3 -3
- data/docs/recipes/authentication.html +3 -3
- data/docs/recipes/blank-layouts.html +3 -3
- data/docs/recipes/custom-flash.html +3 -3
- data/docs/recipes/indexed-forms.html +3 -3
- data/docs/recipes/migrations.html +5 -5
- data/docs/recipes/text-field-component.html +3 -3
- data/docs/roadmap.html +3 -3
- data/docs/routes.html +3 -3
- data/docs/security.html +3 -3
- data/docs/seed-data.html +3 -3
- data/docs/space-time-continuum.html +3 -3
- data/docs/tutorial.html +732 -5
- data/docs/unit-tests.html +3 -3
- data/docs/why.html +3 -3
- data/dx/build +45 -9
- data/lib/brut/cli/app.rb +1 -1
- data/lib/brut/cli/apps/heroku_container_based_deploy.rb +1 -1
- data/lib/brut/cli/apps/scaffold.rb +1 -1
- data/lib/brut/cli/options.rb +4 -0
- data/lib/brut/factory_bot.rb +1 -1
- data/lib/brut/framework/app.rb +1 -1
- data/lib/brut/framework/config.rb +18 -12
- data/lib/brut/framework/mcp.rb +12 -7
- data/lib/brut/front_end/csrf_protector.rb +30 -0
- data/lib/brut/front_end/form.rb +4 -4
- data/lib/brut/front_end/page.rb +1 -1
- data/lib/brut/front_end/routing.rb +1 -1
- data/lib/brut/front_end.rb +1 -0
- data/lib/brut/i18n/base_methods.rb +1 -1
- data/lib/brut/instrumentation/logger_span_exporter.rb +1 -1
- data/lib/brut/junk_drawer.rb +3 -1
- data/lib/brut/rubocop_config.rb +123 -0
- data/lib/brut/spec_support/component_support.rb +0 -3
- data/lib/brut/spec_support/rspec_setup.rb +2 -2
- data/lib/brut/version.rb +1 -1
- data/mkbrut/Gemfile.lock +1 -1
- data/mkbrut/dx +1 -0
- data/mkbrut/lib/mkbrut/app.rb +1 -1
- data/mkbrut/lib/mkbrut/cli.rb +1 -1
- data/mkbrut/lib/mkbrut/segments/heroku.rb +1 -1
- data/mkbrut/lib/mkbrut/version.rb +1 -1
- data/mkbrut/mkbrut.gemspec +3 -1
- data/mkbrut/templates/Base/app/config/i18n/en/1_defaults.rb +2 -2
- data/mkbrut/templates/Base/app/config/i18n/en/2_app.rb +1 -1
- data/mkbrut/templates/Base/bin/setup +1 -1
- data/mkbrut/templates/segments/Demo/app/src/front_end/components/flash_component.rb +1 -1
- data/specs/brut/junk_drawer.spec.rb +4 -0
- metadata +92 -35
- data/.rspec +0 -3
- data/docs/assets/chunks/@localSearchIndexroot.CmtZyrFA.js +0 -1
- data/docs/assets/tutorial.md.BIb7XT6j.js +0 -1
- data/docs/assets/tutorial.md.BIb7XT6j.lean.js +0 -1
- /data/docs/assets/{components.md.DHh-NwKs.lean.js → components.md.Bu80E2Nr.lean.js} +0 -0
- /data/docs/assets/{configuration.md.D8Wz3oJU.lean.js → configuration.md.CuIxVsSf.lean.js} +0 -0
- /data/docs/assets/{database-schema.md.C5gXexJi.lean.js → database-schema.md.LpmBPVEU.lean.js} +0 -0
- /data/docs/assets/{forms.md.BRE85eju.lean.js → forms.md.DnLbzVDa.lean.js} +0 -0
- /data/docs/assets/{getting-started.md.2ioiTe-B.lean.js → getting-started.md.DdQLmU3C.lean.js} +0 -0
- /data/docs/assets/{recipes_migrations.md.DPN3gQE3.lean.js → recipes_migrations.md.CTcnWDJF.lean.js} +0 -0
@@ -2,14 +2,21 @@ import BaseCustomElement from "./BaseCustomElement"
|
|
2
2
|
import RichString from "./RichString"
|
3
3
|
import ConfirmationDialog from "./ConfirmationDialog"
|
4
4
|
|
5
|
-
/** Confirms form submissions with the user before allowing the form to be submitted. This
|
6
|
-
*
|
7
|
-
* has been put onto those buttons. Note that this does not affect links (`a` elements).
|
5
|
+
/** Confirms form submissions with the user before allowing the form to be submitted. This is applied
|
6
|
+
* to buttons, not forms, to allow for finer control over the behavior.
|
8
7
|
*
|
9
|
-
* This
|
10
|
-
*
|
11
|
-
*
|
12
|
-
*
|
8
|
+
* * This only works for `button` or `input type=submit`
|
9
|
+
* * The elements must have a form, either by being inside a form or having
|
10
|
+
* a `form` attribute.
|
11
|
+
* * If the form is not valid, it will not show the confirmation dialog.
|
12
|
+
*
|
13
|
+
*
|
14
|
+
* By default, this will use {@link external:Window#confirm}. if "OK" is pressed,
|
15
|
+
* the button click goes through and the form would be submitted. If "Cancel" is pressed,
|
16
|
+
* the event is prevented.
|
17
|
+
*
|
18
|
+
* If there is a `brut-confirmation-dialog` on the page, this component can use that, possibly
|
19
|
+
* with help from the `dialog` attribute as followed:
|
13
20
|
*
|
14
21
|
* * If `dialog` is set:
|
15
22
|
* - If that id is on a `<brut-confirmation-dialog>` that is used.
|
@@ -18,6 +25,9 @@ import ConfirmationDialog from "./ConfirmationDialog"
|
|
18
25
|
* - If there is exactly one `<brut-confirmation-dialog>` on the page, this is used.
|
19
26
|
* - If there is more than one, or no `<brut-confirmation-dialog>`s, `window.confirm` is used.
|
20
27
|
*
|
28
|
+
* If the wrong dialog or notification method is happening, set `show-warnings` on the element, and it will
|
29
|
+
* print out why it's doing what it's doing.
|
30
|
+
*
|
21
31
|
* @see ConfirmationDialog
|
22
32
|
*
|
23
33
|
* @property {string} message - the message to show that asks for confirmation. It should be written such that
|
@@ -60,6 +70,17 @@ class ConfirmSubmit extends BaseCustomElement {
|
|
60
70
|
this.logger.warn("No message provided, so cannot confirm")
|
61
71
|
return
|
62
72
|
}
|
73
|
+
const form = event.currentTarget.form
|
74
|
+
|
75
|
+
if (!form) {
|
76
|
+
this.logger.warn("Element was not part of a form, so cannot confirm submission")
|
77
|
+
return
|
78
|
+
}
|
79
|
+
|
80
|
+
if (!form.checkValidity()) {
|
81
|
+
return
|
82
|
+
}
|
83
|
+
|
63
84
|
const dialog = this.#findDialog()
|
64
85
|
if (dialog) {
|
65
86
|
event.preventDefault()
|
data/brut.gemspec
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
lib = File.expand_path("../lib", __FILE__)
|
2
|
-
|
2
|
+
if !$LOAD_PATH.include?(lib)
|
3
|
+
$LOAD_PATH.unshift(lib)
|
4
|
+
end
|
3
5
|
require "brut/version"
|
4
6
|
|
5
7
|
Gem::Specification.new do |spec|
|
@@ -10,7 +12,7 @@ Gem::Specification.new do |spec|
|
|
10
12
|
|
11
13
|
spec.summary = %q{Web Framework Built around Ruby, Web Standards, Simplicity, and Object-Orientation}
|
12
14
|
spec.description = %q{An opinionated web framework build on web standards}
|
13
|
-
spec.homepage = "https://
|
15
|
+
spec.homepage = "https://brutrb.com"
|
14
16
|
|
15
17
|
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
16
18
|
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
@@ -18,8 +20,10 @@ Gem::Specification.new do |spec|
|
|
18
20
|
spec.metadata["allowed_push_host"] = "https://rubygems.org"
|
19
21
|
|
20
22
|
spec.metadata["homepage_uri"] = spec.homepage
|
21
|
-
spec.metadata["source_code_uri"] = "https://
|
22
|
-
spec.metadata["changelog_uri"] = "https://
|
23
|
+
spec.metadata["source_code_uri"] = "https://github.com/thirdtank/brut"
|
24
|
+
spec.metadata["changelog_uri"] = "https://github.com/thirdtank/brut/blob/main/CHANGELOG.md"
|
25
|
+
spec.metadata["documentation_uri"] = "https://brutrb.com/"
|
26
|
+
spec.metadata["rubygems_mfa_required"] = "true"
|
23
27
|
else
|
24
28
|
raise "RubyGems 2.0 or newer is required to protect against " \
|
25
29
|
"public gem pushes."
|
@@ -34,32 +38,34 @@ Gem::Specification.new do |spec|
|
|
34
38
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
35
39
|
spec.require_paths = ["lib"]
|
36
40
|
|
37
|
-
spec.
|
38
|
-
spec.
|
39
|
-
spec.
|
40
|
-
spec.
|
41
|
-
spec.
|
42
|
-
spec.
|
43
|
-
spec.
|
44
|
-
spec.
|
45
|
-
spec.
|
46
|
-
spec.
|
47
|
-
spec.
|
48
|
-
spec.
|
49
|
-
spec.
|
50
|
-
spec.
|
51
|
-
spec.
|
52
|
-
spec.
|
53
|
-
spec.
|
41
|
+
spec.add_dependency "irb"
|
42
|
+
spec.add_dependency "ostruct" # squelch some warning - this is not used
|
43
|
+
spec.add_dependency "concurrent-ruby"
|
44
|
+
spec.add_dependency "i18n"
|
45
|
+
spec.add_dependency "nokogiri"
|
46
|
+
spec.add_dependency "phlex"
|
47
|
+
spec.add_dependency "prism"
|
48
|
+
spec.add_dependency "rack-protection"
|
49
|
+
spec.add_dependency "rackup"
|
50
|
+
spec.add_dependency "semantic_logger"
|
51
|
+
spec.add_dependency "sequel"
|
52
|
+
spec.add_dependency "sinatra"
|
53
|
+
spec.add_dependency "tzinfo"
|
54
|
+
spec.add_dependency "tzinfo-data"
|
55
|
+
spec.add_dependency "zeitwerk"
|
56
|
+
spec.add_dependency "opentelemetry-sdk"
|
57
|
+
spec.add_dependency "opentelemetry-exporter-otlp"
|
54
58
|
|
55
59
|
spec.add_development_dependency "activesupport"
|
56
|
-
spec.add_development_dependency "rspec", "~> 3.0"
|
57
60
|
spec.add_development_dependency "bundler"
|
58
|
-
spec.add_development_dependency "rake"
|
59
|
-
spec.add_development_dependency "yard"
|
60
|
-
spec.add_development_dependency "rdiscount"
|
61
|
-
spec.add_development_dependency "rdoc"
|
62
61
|
spec.add_development_dependency "dotenv"
|
63
62
|
spec.add_development_dependency "factory_bot"
|
64
63
|
spec.add_development_dependency "faker"
|
64
|
+
spec.add_development_dependency "rake"
|
65
|
+
spec.add_development_dependency "rdiscount"
|
66
|
+
spec.add_development_dependency "rdoc"
|
67
|
+
spec.add_development_dependency "rubocop"
|
68
|
+
spec.add_development_dependency "rubocop-disable_syntax"
|
69
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
70
|
+
spec.add_development_dependency "yard"
|
65
71
|
end
|
@@ -6,6 +6,9 @@ import jsdocLinker from './plugins/jsdocLinker'
|
|
6
6
|
export default defineConfig({
|
7
7
|
title: "Brut RB",
|
8
8
|
description: "Documentation for the Brut.RB web framework.",
|
9
|
+
ignoreDeadLinks: [
|
10
|
+
/^https?:\/\/localhost/,
|
11
|
+
],
|
9
12
|
head: [
|
10
13
|
["link", { rel: "icon", href: "/favicon.ico" }],
|
11
14
|
[
|
@@ -142,7 +142,7 @@ unique keys is trivial, so Brut provides a way to do that.
|
|
142
142
|
> A **key** simply uniquely identifies a row or is a unique constraint on a table.
|
143
143
|
> Tables have only one primary key, but potentially many keys. Brut uses
|
144
144
|
> *synthetic* (sometimes called *surrogate*) keys as primary keys. This means
|
145
|
-
> they have no business meaning and can be safely used for
|
145
|
+
> they have no business meaning and can be safely used for foreign keys
|
146
146
|
> and other cases without conflating them with domain concepts.
|
147
147
|
|
148
148
|
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -66,7 +66,7 @@ bin/db migrate
|
|
66
66
|
> [!IMPORTANT]
|
67
67
|
> This only applied migrations to the dev database. `bin/ci` and `bin/test e2e`
|
68
68
|
> will apply them to the test database, but you may need to do it yourself via
|
69
|
-
> `bin/db
|
69
|
+
> `bin/db migrate -e test`
|
70
70
|
|
71
71
|
> [!NOTE]
|
72
72
|
> There is no down migration. If you need to change and re-apply this before
|