brut 0.5.0 → 0.8.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/.gitignore +4 -0
- data/CHANGELOG.md +7 -0
- data/Dockerfile.dx +19 -0
- data/Gemfile.lock +1 -1
- data/README.md +19 -0
- data/assets/YouTubeThumb.pxd +0 -0
- data/bin/build +86 -0
- data/bin/ci +36 -0
- data/bin/docs +39 -9
- data/bin/publish +61 -0
- data/bin/setup +6 -0
- data/brut-css/bin/build +19 -0
- data/brut-css/bin/ci +19 -0
- data/brut-css/bin/docs +19 -0
- data/brut-css/bin/publish +21 -0
- data/brut-css/bin/setup +1 -0
- data/brut-css/package-lock.json +2 -2
- data/brut-css/package.json +1 -1
- data/brut-js/bin/build +15 -6
- data/brut-js/bin/docs +25 -0
- data/brut-js/bin/publish +21 -0
- data/brut-js/bin/setup +1 -0
- data/brut-js/dx +1 -0
- data/brut-js/package-lock.json +2 -2
- data/brut-js/package.json +1 -1
- data/brut.gemspec +2 -2
- data/brutrb.com/bin/setup +1 -0
- data/brutrb.com/getting-started.md +3 -0
- data/brutrb.com/overview.md +6 -0
- data/brutrb.com/tutorial.md +7 -3
- data/docs/404.html +2 -2
- data/docs/adrs.html +3 -3
- data/docs/ai.html +3 -3
- data/docs/assets/{app.D6BuVHo9.js → app.DyQLb4Ot.js} +1 -1
- data/docs/assets/chunks/@localSearchIndexroot.CmtZyrFA.js +1 -0
- data/docs/assets/chunks/{VPLocalSearchBox.BpvHMbx6.js → VPLocalSearchBox.T1iA-eJx.js} +1 -1
- data/docs/assets/chunks/{theme.wlAOvi2f.js → theme.ChwsbWjK.js} +2 -2
- data/docs/assets/{components.md.iLiv2E9X.js → components.md.DHh-NwKs.js} +3 -3
- data/docs/assets/{configuration.md.DmuAdsli.js → configuration.md.D8Wz3oJU.js} +1 -1
- data/docs/assets/{forms.md.D8aa_qI-.js → forms.md.BRE85eju.js} +1 -1
- data/docs/assets/{getting-started.md.DLplsDUd.js → getting-started.md.2ioiTe-B.js} +6 -3
- data/docs/assets/{getting-started.md.DLplsDUd.lean.js → getting-started.md.2ioiTe-B.lean.js} +1 -1
- data/docs/assets/overview.md.DlKiRRG_.js +1 -0
- data/docs/assets/overview.md.DlKiRRG_.lean.js +1 -0
- data/docs/assets/tutorial.md.BIb7XT6j.js +1 -0
- data/docs/assets/tutorial.md.BIb7XT6j.lean.js +1 -0
- data/docs/assets.html +3 -3
- 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 +3 -3
- 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 +9 -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 +5 -5
- 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 +3 -3
- 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 +5 -5
- data/docs/unit-tests.html +3 -3
- data/docs/why.html +3 -3
- data/lib/brut/framework/mcp.rb +1 -1
- data/lib/brut/front_end/components/form_tag.rb +2 -2
- data/lib/brut/version.rb +1 -1
- data/mkbrut/.gitignore +16 -0
- data/mkbrut/CODE_OF_CONDUCT.txt +100 -0
- data/mkbrut/Gemfile +3 -0
- data/mkbrut/Gemfile.lock +19 -0
- data/mkbrut/LICENSE.txt +370 -0
- data/mkbrut/README.md +145 -0
- data/mkbrut/Rakefile +2 -0
- data/mkbrut/bin/build +36 -0
- data/mkbrut/bin/ci +19 -0
- data/mkbrut/bin/docs +19 -0
- data/mkbrut/bin/publish +129 -0
- data/mkbrut/bin/rake +16 -0
- data/mkbrut/bin/setup +30 -0
- data/mkbrut/brut-welcome.png +0 -0
- data/mkbrut/deploy/.dockerignore +2 -0
- data/mkbrut/deploy/Dockerfile +25 -0
- data/mkbrut/exe/mkbrut +5 -0
- data/mkbrut/lib/mkbrut/app.rb +79 -0
- data/mkbrut/lib/mkbrut/app_id.rb +8 -0
- data/mkbrut/lib/mkbrut/app_name.rb +29 -0
- data/mkbrut/lib/mkbrut/app_options.rb +36 -0
- data/mkbrut/lib/mkbrut/base.rb +57 -0
- data/mkbrut/lib/mkbrut/cli.rb +107 -0
- data/mkbrut/lib/mkbrut/erb_binding_delegate.rb +20 -0
- data/mkbrut/lib/mkbrut/internet_identifier.rb +32 -0
- data/mkbrut/lib/mkbrut/invalid_identifier.rb +4 -0
- data/mkbrut/lib/mkbrut/ops/add_css_import.rb +42 -0
- data/mkbrut/lib/mkbrut/ops/add_i18n_message.rb +74 -0
- data/mkbrut/lib/mkbrut/ops/add_method.rb +48 -0
- data/mkbrut/lib/mkbrut/ops/append_to_file.rb +20 -0
- data/mkbrut/lib/mkbrut/ops/base_op.rb +21 -0
- data/mkbrut/lib/mkbrut/ops/copy_file.rb +12 -0
- data/mkbrut/lib/mkbrut/ops/insert_code_in_method.rb +58 -0
- data/mkbrut/lib/mkbrut/ops/insert_route.rb +52 -0
- data/mkbrut/lib/mkbrut/ops/mkdir.rb +13 -0
- data/mkbrut/lib/mkbrut/ops/prism_parsing_op.rb +70 -0
- data/mkbrut/lib/mkbrut/ops/render_template.rb +26 -0
- data/mkbrut/lib/mkbrut/ops/skip_file.rb +10 -0
- data/mkbrut/lib/mkbrut/ops.rb +16 -0
- data/mkbrut/lib/mkbrut/organization.rb +5 -0
- data/mkbrut/lib/mkbrut/prefix.rb +26 -0
- data/mkbrut/lib/mkbrut/prefixed_io.rb +16 -0
- data/mkbrut/lib/mkbrut/segments/bare_bones.rb +185 -0
- data/mkbrut/lib/mkbrut/segments/demo.rb +121 -0
- data/mkbrut/lib/mkbrut/segments/heroku.rb +30 -0
- data/mkbrut/lib/mkbrut/segments/sidekiq.rb +3 -0
- data/mkbrut/lib/mkbrut/segments.rb +8 -0
- data/mkbrut/lib/mkbrut/version.rb +3 -0
- data/mkbrut/lib/mkbrut/versions.rb +13 -0
- data/mkbrut/lib/mkbrut.rb +18 -0
- data/mkbrut/mkbrut.gemspec +32 -0
- data/mkbrut/templates/Base/.dockerignore +25 -0
- data/mkbrut/templates/Base/.env.development.erb +60 -0
- data/mkbrut/templates/Base/.env.test.erb +8 -0
- data/mkbrut/templates/Base/.gitignore +31 -0
- data/mkbrut/templates/Base/.projections.json +59 -0
- data/mkbrut/templates/Base/Dockerfile.dx +205 -0
- data/mkbrut/templates/Base/Gemfile.erb +53 -0
- data/mkbrut/templates/Base/Procfile.development +5 -0
- data/mkbrut/templates/Base/Procfile.test +1 -0
- data/mkbrut/templates/Base/README.md +4 -0
- data/mkbrut/templates/Base/README.md.erb +40 -0
- data/mkbrut/templates/Base/app/bootstrap.rb +61 -0
- data/mkbrut/templates/Base/app/config/i18n/en/1_defaults.rb +128 -0
- data/mkbrut/templates/Base/app/config/i18n/en/2_app.rb +24 -0
- data/mkbrut/templates/Base/app/public/static/manifest.json.erb +33 -0
- data/mkbrut/templates/Base/app/src/app.rb.erb +37 -0
- data/mkbrut/templates/Base/app/src/back_end/data_models/app_data_model.rb +5 -0
- data/mkbrut/templates/Base/app/src/back_end/data_models/db.rb +19 -0
- data/mkbrut/templates/Base/app/src/back_end/data_models/migrations/20240101130000_citext.rb +6 -0
- data/mkbrut/templates/Base/app/src/back_end/data_models/seed/seed_data.rb +9 -0
- data/mkbrut/templates/Base/app/src/front_end/components/app_component.rb +8 -0
- data/mkbrut/templates/Base/app/src/front_end/components/custom_element_registration.rb.erb +7 -0
- data/mkbrut/templates/Base/app/src/front_end/css/index.css +2 -0
- data/mkbrut/templates/Base/app/src/front_end/css/svgs.css +12 -0
- data/mkbrut/templates/Base/app/src/front_end/forms/app_form.rb +4 -0
- data/mkbrut/templates/Base/app/src/front_end/handlers/app_handler.rb +4 -0
- data/mkbrut/templates/Base/app/src/front_end/images/LogoPylon.png +0 -0
- data/mkbrut/templates/Base/app/src/front_end/images/LogoTransit.png +0 -0
- data/mkbrut/templates/Base/app/src/front_end/images/apple-touch-icon-120x120.png +0 -0
- data/mkbrut/templates/Base/app/src/front_end/images/apple-touch-icon-152x152.png +0 -0
- data/mkbrut/templates/Base/app/src/front_end/images/apple-touch-icon-167x167.png +0 -0
- data/mkbrut/templates/Base/app/src/front_end/images/apple-touch-icon-180x180.png +0 -0
- data/mkbrut/templates/Base/app/src/front_end/images/favicon.ico +0 -0
- data/mkbrut/templates/Base/app/src/front_end/images/icon.png +0 -0
- data/mkbrut/templates/Base/app/src/front_end/images/mkicons.sh +6 -0
- data/mkbrut/templates/Base/app/src/front_end/js/index.js +6 -0
- data/mkbrut/templates/Base/app/src/front_end/layouts/default_layout.rb.erb +73 -0
- data/mkbrut/templates/Base/app/src/front_end/pages/app_page.rb +11 -0
- data/mkbrut/templates/Base/app/src/front_end/pages/home_page.rb +62 -0
- data/mkbrut/templates/Base/app/src/front_end/support/app_session.rb +6 -0
- data/mkbrut/templates/Base/app/src/front_end/svgs/README.md +5 -0
- data/mkbrut/templates/Base/app/src/front_end/svgs/comment-button.svg +59 -0
- data/mkbrut/templates/Base/bin/README.md.erb +5 -0
- data/mkbrut/templates/Base/bin/build-assets +7 -0
- data/mkbrut/templates/Base/bin/ci +39 -0
- data/mkbrut/templates/Base/bin/console +31 -0
- data/mkbrut/templates/Base/bin/db +9 -0
- data/mkbrut/templates/Base/bin/dbconsole +51 -0
- data/mkbrut/templates/Base/bin/dev +25 -0
- data/mkbrut/templates/Base/bin/release +26 -0
- data/mkbrut/templates/Base/bin/run +86 -0
- data/mkbrut/templates/Base/bin/scaffold +9 -0
- data/mkbrut/templates/Base/bin/setup +256 -0
- data/mkbrut/templates/Base/bin/startup-message +65 -0
- data/mkbrut/templates/Base/bin/test +9 -0
- data/mkbrut/templates/Base/bin/test-server +29 -0
- data/mkbrut/templates/Base/bin/watch-and-build-assets +37 -0
- data/mkbrut/templates/Base/config.ru +16 -0
- data/mkbrut/templates/Base/docker-compose.dx.yml +92 -0
- data/mkbrut/templates/Base/dx/README.md +28 -0
- data/mkbrut/templates/Base/dx/bash_customizations +12 -0
- data/mkbrut/templates/Base/dx/bash_customizations.local +8 -0
- data/mkbrut/templates/Base/dx/build +107 -0
- data/mkbrut/templates/Base/dx/docker-compose.env.erb +25 -0
- data/mkbrut/templates/Base/dx/dx.sh.lib +137 -0
- data/mkbrut/templates/Base/dx/exec +68 -0
- data/mkbrut/templates/Base/dx/prune +19 -0
- data/mkbrut/templates/Base/dx/show-help-in-app-container-then-wait.sh +38 -0
- data/mkbrut/templates/Base/dx/start +30 -0
- data/mkbrut/templates/Base/dx/stop +23 -0
- data/mkbrut/templates/Base/package.json.erb +37 -0
- data/mkbrut/templates/Base/puma.config.rb +53 -0
- data/mkbrut/templates/Base/specs/e2e/home_page.spec.rb.erb +23 -0
- data/mkbrut/templates/Base/specs/front_end/js/SpecHelper.js +24 -0
- data/mkbrut/templates/Base/specs/front_end/pages/home_page.spec.rb +22 -0
- data/mkbrut/templates/Base/specs/lint_factories.spec.rb +7 -0
- data/mkbrut/templates/Base/specs/spec_helper.rb +78 -0
- data/mkbrut/templates/Base/specs/support.rb +2 -0
- data/mkbrut/templates/segments/BareBones/app/src/front_end/handlers/trigger_exception_handler.rb +24 -0
- data/mkbrut/templates/segments/BareBones/app/src/front_end/js/Example.js.erb +49 -0
- data/mkbrut/templates/segments/BareBones/specs/front_end/handlers/trigger_exception_handler.spec.rb +41 -0
- data/mkbrut/templates/segments/BareBones/specs/front_end/js/Example.spec.js.erb +38 -0
- data/mkbrut/templates/segments/Demo/app/src/back_end/data_models/db/guestbook_message.rb +3 -0
- data/mkbrut/templates/segments/Demo/app/src/back_end/data_models/migrations/20250628194124_guestbook.rb +14 -0
- data/mkbrut/templates/segments/Demo/app/src/front_end/components/flash_component.rb +36 -0
- data/mkbrut/templates/segments/Demo/app/src/front_end/css/constraint-violations.css +18 -0
- data/mkbrut/templates/segments/Demo/app/src/front_end/css/fonts.css +19 -0
- data/mkbrut/templates/segments/Demo/app/src/front_end/fonts/monaspace-xenon.ttf +0 -0
- data/mkbrut/templates/segments/Demo/app/src/front_end/forms/guestbook_message_form.rb +4 -0
- data/mkbrut/templates/segments/Demo/app/src/front_end/handlers/guestbook_message_handler.rb +64 -0
- data/mkbrut/templates/segments/Demo/app/src/front_end/pages/guestbook_page/message_component.rb +41 -0
- data/mkbrut/templates/segments/Demo/app/src/front_end/pages/guestbook_page.rb +43 -0
- data/mkbrut/templates/segments/Demo/app/src/front_end/pages/new_guestbook_message_page.rb +64 -0
- data/mkbrut/templates/segments/Demo/specs/back_end/data_models/db/guestbook_message.spec.rb +5 -0
- data/mkbrut/templates/segments/Demo/specs/e2e/guest_message.spec.rb +54 -0
- data/mkbrut/templates/segments/Demo/specs/factories/db/guestbook_message.factory.rb +7 -0
- data/mkbrut/templates/segments/Demo/specs/front_end/components/flash_component.spec.rb +5 -0
- data/mkbrut/templates/segments/Demo/specs/front_end/handlers/guestbook_message_handler.spec.rb +122 -0
- data/mkbrut/templates/segments/Demo/specs/front_end/pages/guestbook_page/message_component.spec.rb +5 -0
- data/mkbrut/templates/segments/Demo/specs/front_end/pages/guestbook_page.spec.rb +52 -0
- data/mkbrut/templates/segments/Demo/specs/front_end/pages/new_guestbook_message_page.spec.rb +5 -0
- data/mkbrut/templates/segments/Heroku/bin/deploy +11 -0
- data/mkbrut/templates/segments/Heroku/deploy/Dockerfile +125 -0
- data/mkbrut/templates/segments/Heroku/deploy/docker-entrypoint +15 -0
- data/mkbrut/templates/segments/Heroku/deploy/heroku_config.rb +26 -0
- metadata +185 -21
- data/docs/assets/chunks/@localSearchIndexroot.COP2Bcmp.js +0 -1
- data/docs/assets/overview.md.iMnwLO4x.js +0 -1
- data/docs/assets/overview.md.iMnwLO4x.lean.js +0 -1
- data/docs/assets/tutorial.md.BYXj4cOu.js +0 -1
- data/docs/assets/tutorial.md.BYXj4cOu.lean.js +0 -1
- /data/docs/assets/{components.md.iLiv2E9X.lean.js → components.md.DHh-NwKs.lean.js} +0 -0
- /data/docs/assets/{configuration.md.DmuAdsli.lean.js → configuration.md.D8Wz3oJU.lean.js} +0 -0
- /data/docs/assets/{forms.md.D8aa_qI-.lean.js → forms.md.BRE85eju.lean.js} +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: add23c2780a2ba1fe444b067c50d3451d9b28cd1bacbed9e1ab1693963bcbd03
|
4
|
+
data.tar.gz: 4f44397c6688843f6d4c9f61121879fd711dfcec5b1b024f6a8be038cc84be54
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 787f519b6c620c4586af3f53932fdbc6ded220766d36295ae9220d51d795a7c3498438cb6ad89051061731be95ab8c448d4d6c7519d97490e14ff433e954d747
|
7
|
+
data.tar.gz: b76f693147690b5370f8db06747e6d73f3b9cffae625edaabdb0f3469806bbc2b2966d55aacc101c70e3e7c767690c4f1f8052a61677d90a26ec59753392fea8
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
# Brut CHANGELOG
|
2
2
|
|
3
|
+
## v0.8.0 - July 23, 2025
|
4
|
+
|
5
|
+
* Moved `mkbrut` into this repo
|
6
|
+
* Unify versioning for Brut, `mkbrut`, BrutJS, and BrutCSS
|
7
|
+
* Unify all workspace workflow scripts (see README.md)
|
8
|
+
* Minor doc updates to remove references to non-existent `form_tag`
|
9
|
+
|
3
10
|
## v0.5.0 - July 21, 2025
|
4
11
|
|
5
12
|
* **New helper** `entity` for creating HTML entities without needing `raw(safe(...))`
|
data/Dockerfile.dx
CHANGED
@@ -4,6 +4,25 @@ SHELL [ "/bin/bash", "-o", "pipefail", "-c" ]
|
|
4
4
|
|
5
5
|
ENV DEBIAN_FRONTEND=noninteractive
|
6
6
|
|
7
|
+
# Install Docker itself. Note that this is installed only what is needed to run
|
8
|
+
# the Docker CLI - the docker-compose.dx.yml will connect this docker's socket
|
9
|
+
# to the one on the host. This is only to run stuff like docker build and docker push.
|
10
|
+
# It's NOT intended to run docker containers inside this one.
|
11
|
+
RUN install -m 0755 -d /etc/apt/keyrings && \
|
12
|
+
curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg && \
|
13
|
+
chmod a+r /etc/apt/keyrings/docker.gpg && \
|
14
|
+
echo \
|
15
|
+
"deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \
|
16
|
+
"$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
|
17
|
+
tee /etc/apt/sources.list.d/docker.list > /dev/null && \
|
18
|
+
apt-get update --quiet --yes && \
|
19
|
+
apt-get install --quiet --yes docker-ce \
|
20
|
+
docker-ce-cli \
|
21
|
+
containerd.io \
|
22
|
+
docker-buildx-plugin \
|
23
|
+
docker-compose-plugin
|
24
|
+
|
25
|
+
|
7
26
|
# These packages are needed to set up other repos to install other
|
8
27
|
# packages and/or are useful in installing other software
|
9
28
|
RUN apt-get -y clean && \
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -69,3 +69,22 @@ with your editor, but all commands are run inside Docker, which should be more c
|
|
69
69
|
|
70
70
|
The `--no-credentials` means that you will not be able to push to GitHub or RubyGems from within the Docker container. This ability is only needed by maintainers to push new versions of the gem. You can push to GitHub from your computer.
|
71
71
|
|
72
|
+
### Conventions in MonoRepo
|
73
|
+
|
74
|
+
This repo contains all five main parts of Brut:
|
75
|
+
|
76
|
+
* BrutRB, the Ruby web framework (in this directory, code in `lib`)
|
77
|
+
* BrutJS, the JS library with custom elements (in `brut-js/`)
|
78
|
+
* BrutCSS, the CSS library (in `brut-css/`)
|
79
|
+
* `mkbrut`, the CLI to create new Brut apps (in `mkbrut/`)
|
80
|
+
* `brutrb.com`, the website, powered by VitePress (in `brutrb.com`)
|
81
|
+
|
82
|
+
Each repo must conform to the *Workspace Protocol*, which are scripts in `bin/` that perform certain tasks:
|
83
|
+
|
84
|
+
* `bin/setup` - performs any setup
|
85
|
+
* `bin/docs` - builds all documentation, placing it where `brutrb.com` can find it.
|
86
|
+
* `bin/build` - builds deployable artifacts, if needed
|
87
|
+
* `bin/ci` - runs all tests, if applicable
|
88
|
+
|
89
|
+
The primary `bin` scripts at the root work for both BrutRB, the web framework, and recurse into the other directories to perform their
|
90
|
+
actions as well.
|
Binary file
|
data/bin/build
ADDED
@@ -0,0 +1,86 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "optparse"
|
4
|
+
require "pathname"
|
5
|
+
require "fileutils"
|
6
|
+
require "json"
|
7
|
+
require_relative "bin_kit"
|
8
|
+
|
9
|
+
def main
|
10
|
+
|
11
|
+
brutjs_dir = (Pathname(__FILE__).dirname / ".." / "brut-js" ).expand_path.to_s
|
12
|
+
brutcss_dir = (Pathname(__FILE__).dirname / ".." / "brut-css" ).expand_path.to_s
|
13
|
+
mkbrut_dir = (Pathname(__FILE__).dirname / ".." / "mkbrut" ).expand_path.to_s
|
14
|
+
|
15
|
+
require_relative "../lib/brut/version"
|
16
|
+
require_relative "#{mkbrut_dir}/lib/mkbrut/version"
|
17
|
+
|
18
|
+
brut_js_package_json = JSON.parse(File.read("#{brutjs_dir}/package.json"))
|
19
|
+
brut_css_package_json = JSON.parse(File.read("#{brutcss_dir}/package.json"))
|
20
|
+
|
21
|
+
brut_version = Brut::VERSION.strip
|
22
|
+
brut_js_version = brut_js_package_json["version"].strip
|
23
|
+
brut_css_version = brut_css_package_json["version"].strip
|
24
|
+
mkbrut_version = MKBrut::VERSION.strip
|
25
|
+
|
26
|
+
if [ brut_version, brut_js_version, brut_css_version, mkbrut_version ].uniq.size != 1
|
27
|
+
log "Some versions are mismatched! All versions should be the same to build and release"
|
28
|
+
puts
|
29
|
+
log sprintf("BrutRb: %10s from lib/brut/version.rb", brut_version)
|
30
|
+
log sprintf("BrutJS: %10s from brut-js/package.json", brut_js_version)
|
31
|
+
log sprintf("BrutCSS: %10s from brut-css/package.json", brut_css_version)
|
32
|
+
log sprintf("mkbrut: %10s from mkbrut/lib/mkbrut/version.rb", mkbrut_version)
|
33
|
+
exit 1
|
34
|
+
else
|
35
|
+
log "Building v#{brut_version} of all artifacts"
|
36
|
+
end
|
37
|
+
|
38
|
+
log "Building brut gem"
|
39
|
+
system!("bin/rake build")
|
40
|
+
|
41
|
+
log "Building brut-js"
|
42
|
+
FileUtils.chdir brutjs_dir do
|
43
|
+
system!("bin/build")
|
44
|
+
end
|
45
|
+
|
46
|
+
log "Building brut-css"
|
47
|
+
FileUtils.chdir brutcss_dir do
|
48
|
+
system!("bin/build")
|
49
|
+
end
|
50
|
+
|
51
|
+
log "Building mkbrut"
|
52
|
+
FileUtils.chdir mkbrut_dir do
|
53
|
+
system!("bin/build")
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
options = {
|
58
|
+
repo_check: true,
|
59
|
+
}
|
60
|
+
OptionParser.new do |opts|
|
61
|
+
opts.banner = "Usage: build [options]\n\n Builds deployable artifacts\n\nOPTIONS"
|
62
|
+
|
63
|
+
opts.on("-h", "--help", "Display this help message") do
|
64
|
+
puts opts
|
65
|
+
exit
|
66
|
+
end
|
67
|
+
opts.on("--skip-repo-check", "If set, allows you to proceed without a clean Git repo. Note that this may cause gems not to build properly") do
|
68
|
+
options[:repo_check] = false
|
69
|
+
end
|
70
|
+
end.parse!
|
71
|
+
|
72
|
+
def require_clean_repo!
|
73
|
+
out, err = capture!("git status --porcelain")
|
74
|
+
if out.to_s.strip != ""
|
75
|
+
log out
|
76
|
+
log err
|
77
|
+
log "Your git repository is not clean. Please commit or stash your changes before running this script."
|
78
|
+
exit 1
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
if options[:repo_check]
|
83
|
+
require_clean_repo!
|
84
|
+
end
|
85
|
+
main
|
86
|
+
|
data/bin/ci
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "optparse"
|
4
|
+
require "pathname"
|
5
|
+
require "fileutils"
|
6
|
+
require_relative "bin_kit"
|
7
|
+
|
8
|
+
OptionParser.new do |opts|
|
9
|
+
opts.banner = "Usage: ci [options]\n\n Runs all tests/QA in all repos\n\nOPTIONS\n\n"
|
10
|
+
|
11
|
+
opts.on("-h", "--help", "Display this help message") do
|
12
|
+
puts opts
|
13
|
+
puts
|
14
|
+
exit
|
15
|
+
end
|
16
|
+
end.parse!
|
17
|
+
|
18
|
+
brutjs_dir = (Pathname(__FILE__).dirname / ".." / "brut-js" ).expand_path.to_s
|
19
|
+
brutcss_dir = (Pathname(__FILE__).dirname / ".." / "brut-css" ).expand_path.to_s
|
20
|
+
mkbrut_dir = (Pathname(__FILE__).dirname / ".." / "mkbrut" ).expand_path.to_s
|
21
|
+
|
22
|
+
log "Running BrutRB tests"
|
23
|
+
system!("bin/rspec")
|
24
|
+
|
25
|
+
log "Running brut-js tests"
|
26
|
+
FileUtils.chdir brutjs_dir do
|
27
|
+
system!("bin/ci")
|
28
|
+
end
|
29
|
+
log "Running brut-css tests"
|
30
|
+
FileUtils.chdir brutcss_dir do
|
31
|
+
system!("bin/ci")
|
32
|
+
end
|
33
|
+
log "Running mkbrut tests"
|
34
|
+
FileUtils.chdir mkbrut_dir do
|
35
|
+
system!("bin/ci")
|
36
|
+
end
|
data/bin/docs
CHANGED
@@ -3,26 +3,38 @@
|
|
3
3
|
require "optparse"
|
4
4
|
require "pathname"
|
5
5
|
require "fileutils"
|
6
|
+
require_relative "bin_kit"
|
7
|
+
|
8
|
+
options = {
|
9
|
+
dotcom: true,
|
10
|
+
}
|
6
11
|
|
7
|
-
options = {}
|
8
12
|
OptionParser.new do |opts|
|
9
|
-
opts.banner = "Usage: docs [options]"
|
13
|
+
opts.banner = "Usage: docs [options]\n\n Generates all documentation for the project\n\nOPTIONS\n\n"
|
10
14
|
|
11
15
|
opts.on("-h", "--help", "Display this help message") do
|
12
16
|
puts opts
|
17
|
+
puts
|
13
18
|
exit
|
14
19
|
end
|
20
|
+
opts.on("--[no-]dotcom", "Deploy (or not), brutrb.com to the docs/ directory (default #{options[:dotcom]})") do |value|
|
21
|
+
options[:dotcom] = value
|
22
|
+
end
|
15
23
|
end.parse!
|
16
24
|
|
17
|
-
|
18
|
-
|
19
|
-
|
25
|
+
dotcom_dir = (Pathname(__FILE__).dirname / ".." / "brutrb.com" ).expand_path
|
26
|
+
public_dir = (dotcom_dir / "public" ).expand_path
|
27
|
+
docs_dir = public_dir / "api"
|
28
|
+
brutjs_dir = (Pathname(__FILE__).dirname / ".." / "brut-js" ).expand_path.to_s
|
29
|
+
brutcss_dir = (Pathname(__FILE__).dirname / ".." / "brut-css" ).expand_path.to_s
|
30
|
+
mkbrut_dir = (Pathname(__FILE__).dirname / ".." / "mkbrut" ).expand_path.to_s
|
20
31
|
|
21
|
-
system(
|
22
|
-
"bundle exec yard doc -o '#{docs_dir}' -m markdown -M rdiscount --backtrace"
|
32
|
+
system!(
|
33
|
+
"bundle exec yard doc -o '#{docs_dir}' --no-progress -m markdown -M rdiscount --backtrace",
|
23
34
|
)
|
24
35
|
|
25
|
-
|
36
|
+
log "Hacking CSS"
|
37
|
+
|
26
38
|
[
|
27
39
|
docs_dir / "css" / "style.css",
|
28
40
|
docs_dir / "css" / "full_list.css"
|
@@ -44,6 +56,24 @@ puts "Hacking CSS"
|
|
44
56
|
end
|
45
57
|
end
|
46
58
|
|
59
|
+
log "Generating brut-js docs"
|
47
60
|
FileUtils.chdir brutjs_dir do
|
48
|
-
system("bin/
|
61
|
+
system!("bin/docs")
|
62
|
+
end
|
63
|
+
log "Generating brut-css docs"
|
64
|
+
FileUtils.chdir brutcss_dir do
|
65
|
+
system!("bin/docs")
|
66
|
+
end
|
67
|
+
log "Generating mkbrut docs"
|
68
|
+
FileUtils.chdir mkbrut_dir do
|
69
|
+
system!("bin/docs")
|
70
|
+
end
|
71
|
+
|
72
|
+
if options[:dotcom]
|
73
|
+
log "Deploying brutrb.com to docs/"
|
74
|
+
FileUtils.chdir dotcom_dir do
|
75
|
+
system!("bin/deploy")
|
76
|
+
end
|
77
|
+
else
|
78
|
+
log "Skipping brutrb.com deployment"
|
49
79
|
end
|
data/bin/publish
ADDED
@@ -0,0 +1,61 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "optparse"
|
4
|
+
require "pathname"
|
5
|
+
require "fileutils"
|
6
|
+
require "json"
|
7
|
+
require_relative "bin_kit"
|
8
|
+
|
9
|
+
def main
|
10
|
+
|
11
|
+
log "Building artifacts"
|
12
|
+
system!("bin/build")
|
13
|
+
|
14
|
+
brutjs_dir = (Pathname(__FILE__).dirname / ".." / "brut-js" ).expand_path.to_s
|
15
|
+
brutcss_dir = (Pathname(__FILE__).dirname / ".." / "brut-css" ).expand_path.to_s
|
16
|
+
mkbrut_dir = (Pathname(__FILE__).dirname / ".." / "mkbrut" ).expand_path.to_s
|
17
|
+
|
18
|
+
log "Pushing brut"
|
19
|
+
system!("bin/rake release")
|
20
|
+
|
21
|
+
log "Pushing brujt-js"
|
22
|
+
FileUtils.chdir brutjs_dir do
|
23
|
+
system!("bin/publish")
|
24
|
+
end
|
25
|
+
|
26
|
+
log "Pushing brut-css"
|
27
|
+
FileUtils.chdir brutcss_dir do
|
28
|
+
system!("bin/publish")
|
29
|
+
end
|
30
|
+
|
31
|
+
log "Building mkbrut"
|
32
|
+
FileUtils.chdir mkbrut_dir do
|
33
|
+
system!("bin/publish")
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
options = {
|
38
|
+
repo_check: true,
|
39
|
+
}
|
40
|
+
OptionParser.new do |opts|
|
41
|
+
opts.banner = "Usage: publish [options]\n\n Builds and publishes all artifacts\n\nOPTIONS"
|
42
|
+
|
43
|
+
opts.on("-h", "--help", "Display this help message") do
|
44
|
+
puts opts
|
45
|
+
exit
|
46
|
+
end
|
47
|
+
end.parse!
|
48
|
+
|
49
|
+
def require_clean_repo!
|
50
|
+
out, err = capture!("git status --porcelain")
|
51
|
+
if out.to_s.strip != ""
|
52
|
+
log out
|
53
|
+
log err
|
54
|
+
log "Your git repository is not clean. Please commit or stash your changes before running this script."
|
55
|
+
exit 1
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
require_clean_repo!
|
60
|
+
main
|
61
|
+
|
data/bin/setup
CHANGED
@@ -174,10 +174,16 @@ def setup(update_gems:,setup_credentials:)
|
|
174
174
|
system! "bin/setup"
|
175
175
|
end
|
176
176
|
|
177
|
+
log "Setting up mkbrut"
|
178
|
+
FileUtils.chdir project_root / "mkbrut" do
|
179
|
+
system! "bin/setup"
|
180
|
+
end
|
181
|
+
|
177
182
|
log "Setting up brutrb.com"
|
178
183
|
FileUtils.chdir project_root / "brutrb.com" do
|
179
184
|
system! "bin/setup"
|
180
185
|
end
|
186
|
+
|
181
187
|
else
|
182
188
|
log "Not setting up GitHub or RubyGems credentials. You won't be able to push the gem"
|
183
189
|
end
|
data/brut-css/bin/build
CHANGED
@@ -1,5 +1,23 @@
|
|
1
|
+
#!/usr/bin/env bash
|
1
2
|
set -e
|
2
3
|
|
4
|
+
SCRIPT_DIR=$( cd -- "$( dirname -- "${0}" )" > /dev/null 2>&1 && pwd )
|
5
|
+
ROOT_DIR=$(realpath "$SCRIPT_DIR/..")
|
6
|
+
|
7
|
+
usage() {
|
8
|
+
echo "Usage: $0"
|
9
|
+
echo
|
10
|
+
echo " Build CSS for distribution"
|
11
|
+
echo
|
12
|
+
}
|
13
|
+
|
14
|
+
for arg in "$@"; do
|
15
|
+
if [ "${arg}" = "-h" ] || [ "${arg}" = "--help" ] || [ "${arg}" = "help" ]; then
|
16
|
+
usage
|
17
|
+
exit 0
|
18
|
+
fi
|
19
|
+
done
|
20
|
+
|
3
21
|
echo "[ bin/docs ] Building brut.css"
|
4
22
|
node src/js/build.js \
|
5
23
|
-m config/media-queries-all.css \
|
@@ -17,6 +35,7 @@ node src/js/build.js \
|
|
17
35
|
-p config/pseudo-classes-all.css \
|
18
36
|
-i src/css/index.css \
|
19
37
|
-o dist/brut-ns-only.max.css
|
38
|
+
|
20
39
|
echo "[ bin/docs ] Removing comments and minifying brut-ns-only.css"
|
21
40
|
npx postcss --config config dist/brut-ns-only.max.css -o dist/brut-ns-only.css
|
22
41
|
rm dist/brut-ns-only.max.css
|
data/brut-css/bin/ci
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
#!/usr/bin/env bash
|
2
|
+
|
3
|
+
set -e
|
4
|
+
SCRIPT_DIR=$( cd -- "$( dirname -- "${0}" )" > /dev/null 2>&1 && pwd )
|
5
|
+
ROOT_DIR=$(realpath "$SCRIPT_DIR/..")
|
6
|
+
|
7
|
+
usage() {
|
8
|
+
echo "Usage: $0"
|
9
|
+
echo
|
10
|
+
echo " No-op to comply with workspace protocol"
|
11
|
+
echo
|
12
|
+
}
|
13
|
+
|
14
|
+
for arg in "$@"; do
|
15
|
+
if [ "${arg}" = "-h" ] || [ "${arg}" = "--help" ] || [ "${arg}" = "help" ]; then
|
16
|
+
usage
|
17
|
+
exit 0
|
18
|
+
fi
|
19
|
+
done
|
data/brut-css/bin/docs
CHANGED
@@ -1,5 +1,24 @@
|
|
1
|
+
#!/usr/bin/env bash
|
2
|
+
|
1
3
|
set -e
|
2
4
|
|
5
|
+
SCRIPT_DIR=$( cd -- "$( dirname -- "${0}" )" > /dev/null 2>&1 && pwd )
|
6
|
+
ROOT_DIR=$(realpath "$SCRIPT_DIR/..")
|
7
|
+
|
8
|
+
usage() {
|
9
|
+
echo "Usage: $0"
|
10
|
+
echo
|
11
|
+
echo " Build CSS docs into the brutrb.com location"
|
12
|
+
echo
|
13
|
+
}
|
14
|
+
|
15
|
+
for arg in "$@"; do
|
16
|
+
if [ "${arg}" = "-h" ] || [ "${arg}" = "--help" ] || [ "${arg}" = "help" ]; then
|
17
|
+
usage
|
18
|
+
exit 0
|
19
|
+
fi
|
20
|
+
done
|
21
|
+
|
3
22
|
echo "[ bin/docs ] Building brut.css and docs"
|
4
23
|
node src/js/build.js \
|
5
24
|
--media-query-config config/media-queries-all.css \
|
@@ -0,0 +1,21 @@
|
|
1
|
+
#!/usr/bin/env bash
|
2
|
+
|
3
|
+
set -e
|
4
|
+
SCRIPT_DIR=$( cd -- "$( dirname -- "${0}" )" > /dev/null 2>&1 && pwd )
|
5
|
+
ROOT_DIR=$(realpath "$SCRIPT_DIR/..")
|
6
|
+
|
7
|
+
usage() {
|
8
|
+
echo "Usage: $0"
|
9
|
+
echo
|
10
|
+
echo " Publish node module"
|
11
|
+
echo
|
12
|
+
}
|
13
|
+
|
14
|
+
for arg in "$@"; do
|
15
|
+
if [ "${arg}" = "-h" ] || [ "${arg}" = "--help" ] || [ "${arg}" = "help" ]; then
|
16
|
+
usage
|
17
|
+
exit 0
|
18
|
+
fi
|
19
|
+
done
|
20
|
+
|
21
|
+
npm publish brut-css
|
data/brut-css/bin/setup
CHANGED
data/brut-css/package-lock.json
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "brut-css",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.8.0",
|
4
4
|
"lockfileVersion": 3,
|
5
5
|
"requires": true,
|
6
6
|
"packages": {
|
7
7
|
"": {
|
8
8
|
"name": "brut-css",
|
9
|
-
"version": "0.
|
9
|
+
"version": "0.8.0",
|
10
10
|
"license": "Hippocratic-2.1",
|
11
11
|
"devDependencies": {
|
12
12
|
"comment-parser": "^1.4.1",
|
data/brut-css/package.json
CHANGED
data/brut-js/bin/build
CHANGED
@@ -1,10 +1,19 @@
|
|
1
1
|
#!/usr/bin/env bash
|
2
2
|
|
3
3
|
set -e
|
4
|
-
SCRIPT_DIR=$(dirname "$0")
|
4
|
+
SCRIPT_DIR=$( cd -- "$( dirname -- "${0}" )" > /dev/null 2>&1 && pwd )
|
5
5
|
ROOT_DIR=$(realpath "$SCRIPT_DIR/..")
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
6
|
+
|
7
|
+
usage() {
|
8
|
+
echo "Usage: $0"
|
9
|
+
echo
|
10
|
+
echo " No-op to comply with workspace protocol"
|
11
|
+
echo
|
12
|
+
}
|
13
|
+
|
14
|
+
for arg in "$@"; do
|
15
|
+
if [ "${arg}" = "-h" ] || [ "${arg}" = "--help" ] || [ "${arg}" = "help" ]; then
|
16
|
+
usage
|
17
|
+
exit 0
|
18
|
+
fi
|
19
|
+
done
|
data/brut-js/bin/docs
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
#!/usr/bin/env bash
|
2
|
+
|
3
|
+
set -e
|
4
|
+
SCRIPT_DIR=$( cd -- "$( dirname -- "${0}" )" > /dev/null 2>&1 && pwd )
|
5
|
+
ROOT_DIR=$(realpath "$SCRIPT_DIR/..")
|
6
|
+
|
7
|
+
usage() {
|
8
|
+
echo "Usage: $0"
|
9
|
+
echo
|
10
|
+
echo " Build JSDoc into the brutrb.com location"
|
11
|
+
echo
|
12
|
+
}
|
13
|
+
|
14
|
+
for arg in "$@"; do
|
15
|
+
if [ "${arg}" = "-h" ] || [ "${arg}" = "--help" ] || [ "${arg}" = "help" ]; then
|
16
|
+
usage
|
17
|
+
exit 0
|
18
|
+
fi
|
19
|
+
done
|
20
|
+
|
21
|
+
cd ${ROOT_DIR}/docs
|
22
|
+
npx jsdoc --configure ${ROOT_DIR}/docs/jsdoc.config.json \
|
23
|
+
--readme ${ROOT_DIR}/README.md \
|
24
|
+
--destination ${ROOT_DIR}/../brutrb.com/public/brut-js/api \
|
25
|
+
--recurse ${ROOT_DIR}/src/
|
data/brut-js/bin/publish
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
#!/usr/bin/env bash
|
2
|
+
|
3
|
+
set -e
|
4
|
+
SCRIPT_DIR=$( cd -- "$( dirname -- "${0}" )" > /dev/null 2>&1 && pwd )
|
5
|
+
ROOT_DIR=$(realpath "$SCRIPT_DIR/..")
|
6
|
+
|
7
|
+
usage() {
|
8
|
+
echo "Usage: $0"
|
9
|
+
echo
|
10
|
+
echo " Publish node module"
|
11
|
+
echo
|
12
|
+
}
|
13
|
+
|
14
|
+
for arg in "$@"; do
|
15
|
+
if [ "${arg}" = "-h" ] || [ "${arg}" = "--help" ] || [ "${arg}" = "help" ]; then
|
16
|
+
usage
|
17
|
+
exit 0
|
18
|
+
fi
|
19
|
+
done
|
20
|
+
|
21
|
+
npm publish brut-js
|
data/brut-js/bin/setup
CHANGED
data/brut-js/dx
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
../dx
|
data/brut-js/package-lock.json
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "brut-js",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.8.0",
|
4
4
|
"lockfileVersion": 3,
|
5
5
|
"requires": true,
|
6
6
|
"packages": {
|
7
7
|
"": {
|
8
8
|
"name": "brut-js",
|
9
|
-
"version": "0.
|
9
|
+
"version": "0.8.0",
|
10
10
|
"license": "Hippocratic-2.1",
|
11
11
|
"devDependencies": {
|
12
12
|
"esbuild": "^0.24.0",
|
data/brut-js/package.json
CHANGED
data/brut.gemspec
CHANGED
@@ -8,8 +8,8 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.authors = ["David Bryant Copeland"]
|
9
9
|
spec.email = ["davec@thirdtank.com"]
|
10
10
|
|
11
|
-
spec.summary = %q{
|
12
|
-
spec.description = %q{
|
11
|
+
spec.summary = %q{Web Framework Built around Ruby, Web Standards, Simplicity, and Object-Orientation}
|
12
|
+
spec.description = %q{An opinionated web framework build on web standards}
|
13
13
|
spec.homepage = "https://naildrivin5.com"
|
14
14
|
|
15
15
|
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
data/brutrb.com/bin/setup
CHANGED
@@ -11,6 +11,7 @@ The simplest way to use `mkbrut` is to use an existing [Docker image](https://hu
|
|
11
11
|
docker run \
|
12
12
|
-v "$PWD":"$PWD" \
|
13
13
|
-w "$PWD" \
|
14
|
+
-u $(id -u):$(id -g) \
|
14
15
|
-it \
|
15
16
|
thirdtank/mkbrut \
|
16
17
|
mkbrut my-new-app
|
@@ -34,6 +35,7 @@ For now:
|
|
34
35
|
docker run \
|
35
36
|
-v "$PWD":"$PWD" \
|
36
37
|
-w "$PWD" \
|
38
|
+
-u $(id -u):$(id -g) \
|
37
39
|
-it \
|
38
40
|
thirdtank/mkbrut \
|
39
41
|
mkbrut my-new-app
|
@@ -55,6 +57,7 @@ To create your app without the demo components:
|
|
55
57
|
docker run \
|
56
58
|
-v "$PWD":"$PWD" \
|
57
59
|
-w "$PWD" \
|
60
|
+
-u $(id -u):$(id -g) \
|
58
61
|
-it \
|
59
62
|
thirdtank/mkbrut \
|
60
63
|
mkbrut my-new-app --no-demo
|