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.
Files changed (265) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +4 -0
  3. data/CHANGELOG.md +7 -0
  4. data/Dockerfile.dx +19 -0
  5. data/Gemfile.lock +1 -1
  6. data/README.md +19 -0
  7. data/assets/YouTubeThumb.pxd +0 -0
  8. data/bin/build +86 -0
  9. data/bin/ci +36 -0
  10. data/bin/docs +39 -9
  11. data/bin/publish +61 -0
  12. data/bin/setup +6 -0
  13. data/brut-css/bin/build +19 -0
  14. data/brut-css/bin/ci +19 -0
  15. data/brut-css/bin/docs +19 -0
  16. data/brut-css/bin/publish +21 -0
  17. data/brut-css/bin/setup +1 -0
  18. data/brut-css/package-lock.json +2 -2
  19. data/brut-css/package.json +1 -1
  20. data/brut-js/bin/build +15 -6
  21. data/brut-js/bin/docs +25 -0
  22. data/brut-js/bin/publish +21 -0
  23. data/brut-js/bin/setup +1 -0
  24. data/brut-js/dx +1 -0
  25. data/brut-js/package-lock.json +2 -2
  26. data/brut-js/package.json +1 -1
  27. data/brut.gemspec +2 -2
  28. data/brutrb.com/bin/setup +1 -0
  29. data/brutrb.com/getting-started.md +3 -0
  30. data/brutrb.com/overview.md +6 -0
  31. data/brutrb.com/tutorial.md +7 -3
  32. data/docs/404.html +2 -2
  33. data/docs/adrs.html +3 -3
  34. data/docs/ai.html +3 -3
  35. data/docs/assets/{app.D6BuVHo9.js → app.DyQLb4Ot.js} +1 -1
  36. data/docs/assets/chunks/@localSearchIndexroot.CmtZyrFA.js +1 -0
  37. data/docs/assets/chunks/{VPLocalSearchBox.BpvHMbx6.js → VPLocalSearchBox.T1iA-eJx.js} +1 -1
  38. data/docs/assets/chunks/{theme.wlAOvi2f.js → theme.ChwsbWjK.js} +2 -2
  39. data/docs/assets/{components.md.iLiv2E9X.js → components.md.DHh-NwKs.js} +3 -3
  40. data/docs/assets/{configuration.md.DmuAdsli.js → configuration.md.D8Wz3oJU.js} +1 -1
  41. data/docs/assets/{forms.md.D8aa_qI-.js → forms.md.BRE85eju.js} +1 -1
  42. data/docs/assets/{getting-started.md.DLplsDUd.js → getting-started.md.2ioiTe-B.js} +6 -3
  43. data/docs/assets/{getting-started.md.DLplsDUd.lean.js → getting-started.md.2ioiTe-B.lean.js} +1 -1
  44. data/docs/assets/overview.md.DlKiRRG_.js +1 -0
  45. data/docs/assets/overview.md.DlKiRRG_.lean.js +1 -0
  46. data/docs/assets/tutorial.md.BIb7XT6j.js +1 -0
  47. data/docs/assets/tutorial.md.BIb7XT6j.lean.js +1 -0
  48. data/docs/assets.html +3 -3
  49. data/docs/brut-js.html +3 -3
  50. data/docs/business-logic.html +3 -3
  51. data/docs/cli.html +3 -3
  52. data/docs/components.html +7 -7
  53. data/docs/configuration.html +5 -5
  54. data/docs/css.html +3 -3
  55. data/docs/custom-element-tests.html +3 -3
  56. data/docs/database-access.html +3 -3
  57. data/docs/database-schema.html +3 -3
  58. data/docs/deployment.html +3 -3
  59. data/docs/dev-environment.html +3 -3
  60. data/docs/dir-structure.html +3 -3
  61. data/docs/doc-conventions.html +3 -3
  62. data/docs/end-to-end-tests.html +3 -3
  63. data/docs/features.html +3 -3
  64. data/docs/flash-and-session.html +3 -3
  65. data/docs/form-constraints.html +3 -3
  66. data/docs/forms.html +5 -5
  67. data/docs/getting-started.html +9 -6
  68. data/docs/handlers.html +3 -3
  69. data/docs/hashmap.json +1 -1
  70. data/docs/hooks.html +3 -3
  71. data/docs/i18n.html +3 -3
  72. data/docs/index.html +3 -3
  73. data/docs/instrumentation.html +3 -3
  74. data/docs/javascript.html +3 -3
  75. data/docs/jobs.html +3 -3
  76. data/docs/keyword-injection.html +3 -3
  77. data/docs/layouts.html +3 -3
  78. data/docs/lsp.html +3 -3
  79. data/docs/markdown-examples.html +3 -3
  80. data/docs/middleware.html +3 -3
  81. data/docs/overview.html +5 -5
  82. data/docs/pages.html +3 -3
  83. data/docs/recipes/alternate-layouts.html +3 -3
  84. data/docs/recipes/authentication.html +3 -3
  85. data/docs/recipes/blank-layouts.html +3 -3
  86. data/docs/recipes/custom-flash.html +3 -3
  87. data/docs/recipes/indexed-forms.html +3 -3
  88. data/docs/recipes/migrations.html +3 -3
  89. data/docs/recipes/text-field-component.html +3 -3
  90. data/docs/roadmap.html +3 -3
  91. data/docs/routes.html +3 -3
  92. data/docs/security.html +3 -3
  93. data/docs/seed-data.html +3 -3
  94. data/docs/space-time-continuum.html +3 -3
  95. data/docs/tutorial.html +5 -5
  96. data/docs/unit-tests.html +3 -3
  97. data/docs/why.html +3 -3
  98. data/lib/brut/framework/mcp.rb +1 -1
  99. data/lib/brut/front_end/components/form_tag.rb +2 -2
  100. data/lib/brut/version.rb +1 -1
  101. data/mkbrut/.gitignore +16 -0
  102. data/mkbrut/CODE_OF_CONDUCT.txt +100 -0
  103. data/mkbrut/Gemfile +3 -0
  104. data/mkbrut/Gemfile.lock +19 -0
  105. data/mkbrut/LICENSE.txt +370 -0
  106. data/mkbrut/README.md +145 -0
  107. data/mkbrut/Rakefile +2 -0
  108. data/mkbrut/bin/build +36 -0
  109. data/mkbrut/bin/ci +19 -0
  110. data/mkbrut/bin/docs +19 -0
  111. data/mkbrut/bin/publish +129 -0
  112. data/mkbrut/bin/rake +16 -0
  113. data/mkbrut/bin/setup +30 -0
  114. data/mkbrut/brut-welcome.png +0 -0
  115. data/mkbrut/deploy/.dockerignore +2 -0
  116. data/mkbrut/deploy/Dockerfile +25 -0
  117. data/mkbrut/exe/mkbrut +5 -0
  118. data/mkbrut/lib/mkbrut/app.rb +79 -0
  119. data/mkbrut/lib/mkbrut/app_id.rb +8 -0
  120. data/mkbrut/lib/mkbrut/app_name.rb +29 -0
  121. data/mkbrut/lib/mkbrut/app_options.rb +36 -0
  122. data/mkbrut/lib/mkbrut/base.rb +57 -0
  123. data/mkbrut/lib/mkbrut/cli.rb +107 -0
  124. data/mkbrut/lib/mkbrut/erb_binding_delegate.rb +20 -0
  125. data/mkbrut/lib/mkbrut/internet_identifier.rb +32 -0
  126. data/mkbrut/lib/mkbrut/invalid_identifier.rb +4 -0
  127. data/mkbrut/lib/mkbrut/ops/add_css_import.rb +42 -0
  128. data/mkbrut/lib/mkbrut/ops/add_i18n_message.rb +74 -0
  129. data/mkbrut/lib/mkbrut/ops/add_method.rb +48 -0
  130. data/mkbrut/lib/mkbrut/ops/append_to_file.rb +20 -0
  131. data/mkbrut/lib/mkbrut/ops/base_op.rb +21 -0
  132. data/mkbrut/lib/mkbrut/ops/copy_file.rb +12 -0
  133. data/mkbrut/lib/mkbrut/ops/insert_code_in_method.rb +58 -0
  134. data/mkbrut/lib/mkbrut/ops/insert_route.rb +52 -0
  135. data/mkbrut/lib/mkbrut/ops/mkdir.rb +13 -0
  136. data/mkbrut/lib/mkbrut/ops/prism_parsing_op.rb +70 -0
  137. data/mkbrut/lib/mkbrut/ops/render_template.rb +26 -0
  138. data/mkbrut/lib/mkbrut/ops/skip_file.rb +10 -0
  139. data/mkbrut/lib/mkbrut/ops.rb +16 -0
  140. data/mkbrut/lib/mkbrut/organization.rb +5 -0
  141. data/mkbrut/lib/mkbrut/prefix.rb +26 -0
  142. data/mkbrut/lib/mkbrut/prefixed_io.rb +16 -0
  143. data/mkbrut/lib/mkbrut/segments/bare_bones.rb +185 -0
  144. data/mkbrut/lib/mkbrut/segments/demo.rb +121 -0
  145. data/mkbrut/lib/mkbrut/segments/heroku.rb +30 -0
  146. data/mkbrut/lib/mkbrut/segments/sidekiq.rb +3 -0
  147. data/mkbrut/lib/mkbrut/segments.rb +8 -0
  148. data/mkbrut/lib/mkbrut/version.rb +3 -0
  149. data/mkbrut/lib/mkbrut/versions.rb +13 -0
  150. data/mkbrut/lib/mkbrut.rb +18 -0
  151. data/mkbrut/mkbrut.gemspec +32 -0
  152. data/mkbrut/templates/Base/.dockerignore +25 -0
  153. data/mkbrut/templates/Base/.env.development.erb +60 -0
  154. data/mkbrut/templates/Base/.env.test.erb +8 -0
  155. data/mkbrut/templates/Base/.gitignore +31 -0
  156. data/mkbrut/templates/Base/.projections.json +59 -0
  157. data/mkbrut/templates/Base/Dockerfile.dx +205 -0
  158. data/mkbrut/templates/Base/Gemfile.erb +53 -0
  159. data/mkbrut/templates/Base/Procfile.development +5 -0
  160. data/mkbrut/templates/Base/Procfile.test +1 -0
  161. data/mkbrut/templates/Base/README.md +4 -0
  162. data/mkbrut/templates/Base/README.md.erb +40 -0
  163. data/mkbrut/templates/Base/app/bootstrap.rb +61 -0
  164. data/mkbrut/templates/Base/app/config/i18n/en/1_defaults.rb +128 -0
  165. data/mkbrut/templates/Base/app/config/i18n/en/2_app.rb +24 -0
  166. data/mkbrut/templates/Base/app/public/static/manifest.json.erb +33 -0
  167. data/mkbrut/templates/Base/app/src/app.rb.erb +37 -0
  168. data/mkbrut/templates/Base/app/src/back_end/data_models/app_data_model.rb +5 -0
  169. data/mkbrut/templates/Base/app/src/back_end/data_models/db.rb +19 -0
  170. data/mkbrut/templates/Base/app/src/back_end/data_models/migrations/20240101130000_citext.rb +6 -0
  171. data/mkbrut/templates/Base/app/src/back_end/data_models/seed/seed_data.rb +9 -0
  172. data/mkbrut/templates/Base/app/src/front_end/components/app_component.rb +8 -0
  173. data/mkbrut/templates/Base/app/src/front_end/components/custom_element_registration.rb.erb +7 -0
  174. data/mkbrut/templates/Base/app/src/front_end/css/index.css +2 -0
  175. data/mkbrut/templates/Base/app/src/front_end/css/svgs.css +12 -0
  176. data/mkbrut/templates/Base/app/src/front_end/forms/app_form.rb +4 -0
  177. data/mkbrut/templates/Base/app/src/front_end/handlers/app_handler.rb +4 -0
  178. data/mkbrut/templates/Base/app/src/front_end/images/LogoPylon.png +0 -0
  179. data/mkbrut/templates/Base/app/src/front_end/images/LogoTransit.png +0 -0
  180. data/mkbrut/templates/Base/app/src/front_end/images/apple-touch-icon-120x120.png +0 -0
  181. data/mkbrut/templates/Base/app/src/front_end/images/apple-touch-icon-152x152.png +0 -0
  182. data/mkbrut/templates/Base/app/src/front_end/images/apple-touch-icon-167x167.png +0 -0
  183. data/mkbrut/templates/Base/app/src/front_end/images/apple-touch-icon-180x180.png +0 -0
  184. data/mkbrut/templates/Base/app/src/front_end/images/favicon.ico +0 -0
  185. data/mkbrut/templates/Base/app/src/front_end/images/icon.png +0 -0
  186. data/mkbrut/templates/Base/app/src/front_end/images/mkicons.sh +6 -0
  187. data/mkbrut/templates/Base/app/src/front_end/js/index.js +6 -0
  188. data/mkbrut/templates/Base/app/src/front_end/layouts/default_layout.rb.erb +73 -0
  189. data/mkbrut/templates/Base/app/src/front_end/pages/app_page.rb +11 -0
  190. data/mkbrut/templates/Base/app/src/front_end/pages/home_page.rb +62 -0
  191. data/mkbrut/templates/Base/app/src/front_end/support/app_session.rb +6 -0
  192. data/mkbrut/templates/Base/app/src/front_end/svgs/README.md +5 -0
  193. data/mkbrut/templates/Base/app/src/front_end/svgs/comment-button.svg +59 -0
  194. data/mkbrut/templates/Base/bin/README.md.erb +5 -0
  195. data/mkbrut/templates/Base/bin/build-assets +7 -0
  196. data/mkbrut/templates/Base/bin/ci +39 -0
  197. data/mkbrut/templates/Base/bin/console +31 -0
  198. data/mkbrut/templates/Base/bin/db +9 -0
  199. data/mkbrut/templates/Base/bin/dbconsole +51 -0
  200. data/mkbrut/templates/Base/bin/dev +25 -0
  201. data/mkbrut/templates/Base/bin/release +26 -0
  202. data/mkbrut/templates/Base/bin/run +86 -0
  203. data/mkbrut/templates/Base/bin/scaffold +9 -0
  204. data/mkbrut/templates/Base/bin/setup +256 -0
  205. data/mkbrut/templates/Base/bin/startup-message +65 -0
  206. data/mkbrut/templates/Base/bin/test +9 -0
  207. data/mkbrut/templates/Base/bin/test-server +29 -0
  208. data/mkbrut/templates/Base/bin/watch-and-build-assets +37 -0
  209. data/mkbrut/templates/Base/config.ru +16 -0
  210. data/mkbrut/templates/Base/docker-compose.dx.yml +92 -0
  211. data/mkbrut/templates/Base/dx/README.md +28 -0
  212. data/mkbrut/templates/Base/dx/bash_customizations +12 -0
  213. data/mkbrut/templates/Base/dx/bash_customizations.local +8 -0
  214. data/mkbrut/templates/Base/dx/build +107 -0
  215. data/mkbrut/templates/Base/dx/docker-compose.env.erb +25 -0
  216. data/mkbrut/templates/Base/dx/dx.sh.lib +137 -0
  217. data/mkbrut/templates/Base/dx/exec +68 -0
  218. data/mkbrut/templates/Base/dx/prune +19 -0
  219. data/mkbrut/templates/Base/dx/show-help-in-app-container-then-wait.sh +38 -0
  220. data/mkbrut/templates/Base/dx/start +30 -0
  221. data/mkbrut/templates/Base/dx/stop +23 -0
  222. data/mkbrut/templates/Base/package.json.erb +37 -0
  223. data/mkbrut/templates/Base/puma.config.rb +53 -0
  224. data/mkbrut/templates/Base/specs/e2e/home_page.spec.rb.erb +23 -0
  225. data/mkbrut/templates/Base/specs/front_end/js/SpecHelper.js +24 -0
  226. data/mkbrut/templates/Base/specs/front_end/pages/home_page.spec.rb +22 -0
  227. data/mkbrut/templates/Base/specs/lint_factories.spec.rb +7 -0
  228. data/mkbrut/templates/Base/specs/spec_helper.rb +78 -0
  229. data/mkbrut/templates/Base/specs/support.rb +2 -0
  230. data/mkbrut/templates/segments/BareBones/app/src/front_end/handlers/trigger_exception_handler.rb +24 -0
  231. data/mkbrut/templates/segments/BareBones/app/src/front_end/js/Example.js.erb +49 -0
  232. data/mkbrut/templates/segments/BareBones/specs/front_end/handlers/trigger_exception_handler.spec.rb +41 -0
  233. data/mkbrut/templates/segments/BareBones/specs/front_end/js/Example.spec.js.erb +38 -0
  234. data/mkbrut/templates/segments/Demo/app/src/back_end/data_models/db/guestbook_message.rb +3 -0
  235. data/mkbrut/templates/segments/Demo/app/src/back_end/data_models/migrations/20250628194124_guestbook.rb +14 -0
  236. data/mkbrut/templates/segments/Demo/app/src/front_end/components/flash_component.rb +36 -0
  237. data/mkbrut/templates/segments/Demo/app/src/front_end/css/constraint-violations.css +18 -0
  238. data/mkbrut/templates/segments/Demo/app/src/front_end/css/fonts.css +19 -0
  239. data/mkbrut/templates/segments/Demo/app/src/front_end/fonts/monaspace-xenon.ttf +0 -0
  240. data/mkbrut/templates/segments/Demo/app/src/front_end/forms/guestbook_message_form.rb +4 -0
  241. data/mkbrut/templates/segments/Demo/app/src/front_end/handlers/guestbook_message_handler.rb +64 -0
  242. data/mkbrut/templates/segments/Demo/app/src/front_end/pages/guestbook_page/message_component.rb +41 -0
  243. data/mkbrut/templates/segments/Demo/app/src/front_end/pages/guestbook_page.rb +43 -0
  244. data/mkbrut/templates/segments/Demo/app/src/front_end/pages/new_guestbook_message_page.rb +64 -0
  245. data/mkbrut/templates/segments/Demo/specs/back_end/data_models/db/guestbook_message.spec.rb +5 -0
  246. data/mkbrut/templates/segments/Demo/specs/e2e/guest_message.spec.rb +54 -0
  247. data/mkbrut/templates/segments/Demo/specs/factories/db/guestbook_message.factory.rb +7 -0
  248. data/mkbrut/templates/segments/Demo/specs/front_end/components/flash_component.spec.rb +5 -0
  249. data/mkbrut/templates/segments/Demo/specs/front_end/handlers/guestbook_message_handler.spec.rb +122 -0
  250. data/mkbrut/templates/segments/Demo/specs/front_end/pages/guestbook_page/message_component.spec.rb +5 -0
  251. data/mkbrut/templates/segments/Demo/specs/front_end/pages/guestbook_page.spec.rb +52 -0
  252. data/mkbrut/templates/segments/Demo/specs/front_end/pages/new_guestbook_message_page.spec.rb +5 -0
  253. data/mkbrut/templates/segments/Heroku/bin/deploy +11 -0
  254. data/mkbrut/templates/segments/Heroku/deploy/Dockerfile +125 -0
  255. data/mkbrut/templates/segments/Heroku/deploy/docker-entrypoint +15 -0
  256. data/mkbrut/templates/segments/Heroku/deploy/heroku_config.rb +26 -0
  257. metadata +185 -21
  258. data/docs/assets/chunks/@localSearchIndexroot.COP2Bcmp.js +0 -1
  259. data/docs/assets/overview.md.iMnwLO4x.js +0 -1
  260. data/docs/assets/overview.md.iMnwLO4x.lean.js +0 -1
  261. data/docs/assets/tutorial.md.BYXj4cOu.js +0 -1
  262. data/docs/assets/tutorial.md.BYXj4cOu.lean.js +0 -1
  263. /data/docs/assets/{components.md.iLiv2E9X.lean.js → components.md.DHh-NwKs.lean.js} +0 -0
  264. /data/docs/assets/{configuration.md.DmuAdsli.lean.js → configuration.md.D8Wz3oJU.lean.js} +0 -0
  265. /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: 6ddbdd2db5bb6ea9013486bc8ad279affec3d3a824d05ebbd8c4b4933a1c5468
4
- data.tar.gz: 823232c021e8c3d5477bc5655fefe6b51c54efcfcc73ca2ad0cab535964a23f1
3
+ metadata.gz: add23c2780a2ba1fe444b067c50d3451d9b28cd1bacbed9e1ab1693963bcbd03
4
+ data.tar.gz: 4f44397c6688843f6d4c9f61121879fd711dfcec5b1b024f6a8be038cc84be54
5
5
  SHA512:
6
- metadata.gz: 152283ed984e5c7c8cd8faebdc5efbb24867efbe9a18a02a6896ab28654cc9b2b5fa39fe1ac9a13a6d477bd34ec3cb42a96034492d317f5355eb9e4434825395
7
- data.tar.gz: 52b69e78ad33ceb908bb6617960a33022f36df621b5d9f3da327a167600cd0c9dbc1902d90d86ec0bdfbef400fa3fded9261b4980feb2dd4264d5c87afb7535f
6
+ metadata.gz: 787f519b6c620c4586af3f53932fdbc6ded220766d36295ae9220d51d795a7c3498438cb6ad89051061731be95ab8c448d4d6c7519d97490e14ff433e954d747
7
+ data.tar.gz: b76f693147690b5370f8db06747e6d73f3b9cffae625edaabdb0f3469806bbc2b2966d55aacc101c70e3e7c767690c4f1f8052a61677d90a26ec59753392fea8
data/.gitignore CHANGED
@@ -38,3 +38,7 @@
38
38
 
39
39
  # Gems are installed here for LSP convienience
40
40
  /local-gems
41
+
42
+ # All I want in life is for every single instance of this file
43
+ # to be placed in hell, and waiting for Alan Dye when he arrives.
44
+ .DS_Store
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
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- brut (0.5.0)
4
+ brut (0.8.0)
5
5
  concurrent-ruby
6
6
  i18n
7
7
  irb
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
- public_dir = (Pathname(__FILE__).dirname / ".." / "brutrb.com" / "public" ).expand_path
18
- docs_dir = public_dir / "api"
19
- brutjs_dir = (Pathname(__FILE__).dirname / ".." / "brut-js" ).expand_path.to_s
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
- puts "Hacking CSS"
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/build")
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
@@ -2,4 +2,5 @@
2
2
 
3
3
  set -e
4
4
 
5
+ echo "[ brut-css/bin/setup ] Setting up BrutCSS"
5
6
  npm install
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "brut-css",
3
- "version": "0.5.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.5.0",
9
+ "version": "0.8.0",
10
10
  "license": "Hippocratic-2.1",
11
11
  "devDependencies": {
12
12
  "comment-parser": "^1.4.1",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "brut-css",
3
- "version": "0.5.0",
3
+ "version": "0.8.0",
4
4
  "description": "Utility CSS Library for Full Stack Developers",
5
5
  "keywords": [
6
6
  "css"
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
- cd ${ROOT_DIR}/docs
7
- npx jsdoc --configure ${ROOT_DIR}/docs/jsdoc.config.json \
8
- --readme ${ROOT_DIR}/README.md \
9
- --destination ${ROOT_DIR}/../brutrb.com/public/brut-js/api \
10
- --recurse ${ROOT_DIR}/src/
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/
@@ -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
@@ -2,4 +2,5 @@
2
2
 
3
3
  set -e
4
4
 
5
+ echo "[ brut-js/bin/setup ] Setting up BrutJS"
5
6
  npm install
data/brut-js/dx ADDED
@@ -0,0 +1 @@
1
+ ../dx
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "brut-js",
3
- "version": "0.5.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.5.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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "brut-js",
3
- "version": "0.5.0",
3
+ "version": "0.8.0",
4
4
  "type": "module",
5
5
  "keywords": [ "WebComponents", "Custom Elements" ],
6
6
  "bugs": {
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{NOT YET RELEASED - Web Framework Built around Ruby, Web Standards, Simplicity, and Object-Orientation}
12
- spec.description = %q{NOT YET RELEASED - An opinionated web framework build on web standards}
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
@@ -2,4 +2,5 @@
2
2
 
3
3
  set -e
4
4
 
5
+ echo "[ brutrb.com/bin/setup ] Setting up BrutJS"
5
6
  npm install
@@ -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