hot_docs 0.0.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 (143) hide show
  1. checksums.yaml +7 -0
  2. data/.rubocop.yml +8 -0
  3. data/CHANGELOG.md +5 -0
  4. data/LICENSE.txt +21 -0
  5. data/README.md +39 -0
  6. data/Rakefile +12 -0
  7. data/lib/hot_docs/version.rb +5 -0
  8. data/lib/hot_docs.rb +8 -0
  9. data/sig/hot_docs.rbs +4 -0
  10. data/website/.dockerignore +51 -0
  11. data/website/.gitattributes +9 -0
  12. data/website/.github/dependabot.yml +12 -0
  13. data/website/.github/images/hot_docs.svg +17 -0
  14. data/website/.github/workflows/ci.yml +90 -0
  15. data/website/.gitignore +37 -0
  16. data/website/.kamal/hooks/docker-setup.sample +3 -0
  17. data/website/.kamal/hooks/post-deploy.sample +14 -0
  18. data/website/.kamal/hooks/post-proxy-reboot.sample +3 -0
  19. data/website/.kamal/hooks/pre-build.sample +51 -0
  20. data/website/.kamal/hooks/pre-connect.sample +47 -0
  21. data/website/.kamal/hooks/pre-deploy.sample +109 -0
  22. data/website/.kamal/hooks/pre-proxy-reboot.sample +3 -0
  23. data/website/.kamal/secrets +17 -0
  24. data/website/.rubocop.yml +8 -0
  25. data/website/.ruby-version +1 -0
  26. data/website/Dockerfile +72 -0
  27. data/website/Gemfile +65 -0
  28. data/website/Gemfile.lock +394 -0
  29. data/website/LICENSE.txt +21 -0
  30. data/website/README.md +49 -0
  31. data/website/Rakefile +6 -0
  32. data/website/app/assets/images/.keep +0 -0
  33. data/website/app/assets/images/hot_docs_components_desktop.png +0 -0
  34. data/website/app/assets/images/hot_docs_components_mobile.png +0 -0
  35. data/website/app/assets/stylesheets/hot_docs.css +999 -0
  36. data/website/app/assets/stylesheets/website.css +245 -0
  37. data/website/app/controllers/application_controller.rb +4 -0
  38. data/website/app/controllers/concerns/.keep +0 -0
  39. data/website/app/controllers/hot_docs_controller.rb +3 -0
  40. data/website/app/helpers/application_helper.rb +25 -0
  41. data/website/app/helpers/hot_docs_helper.rb +99 -0
  42. data/website/app/javascript/application.js +3 -0
  43. data/website/app/javascript/controllers/accordion_controller.js +36 -0
  44. data/website/app/javascript/controllers/application.js +9 -0
  45. data/website/app/javascript/controllers/index.js +4 -0
  46. data/website/app/javascript/controllers/sidenav_controller.js +39 -0
  47. data/website/app/javascript/controllers/toc_controller.js +91 -0
  48. data/website/app/javascript/controllers/typewriter_controller.js +59 -0
  49. data/website/app/jobs/application_job.rb +7 -0
  50. data/website/app/mailers/application_mailer.rb +4 -0
  51. data/website/app/models/application_record.rb +3 -0
  52. data/website/app/models/concerns/.keep +0 -0
  53. data/website/app/views/hot_docs/_menu_row.html.erb +11 -0
  54. data/website/app/views/hot_docs/components.html.mderb +32 -0
  55. data/website/app/views/hot_docs/embedded.html.mderb +12 -0
  56. data/website/app/views/hot_docs/footer.html.mderb +13 -0
  57. data/website/app/views/hot_docs/helpers.html.mderb +33 -0
  58. data/website/app/views/hot_docs/index.html.erb +143 -0
  59. data/website/app/views/hot_docs/light_dark.html.mderb +29 -0
  60. data/website/app/views/hot_docs/markdown.html.mderb +27 -0
  61. data/website/app/views/hot_docs/nav.html.mderb +15 -0
  62. data/website/app/views/hot_docs/quickstart.html.mderb +11 -0
  63. data/website/app/views/hot_docs/search.html.mderb +7 -0
  64. data/website/app/views/hot_docs/standalone.html.mderb +11 -0
  65. data/website/app/views/hot_docs/static_export.html.mderb +7 -0
  66. data/website/app/views/hot_docs/toc.html.mderb +11 -0
  67. data/website/app/views/layouts/hot_docs.html.erb +175 -0
  68. data/website/app/views/layouts/mailer.html.erb +13 -0
  69. data/website/app/views/layouts/mailer.text.erb +1 -0
  70. data/website/app/views/layouts/website.html.erb +175 -0
  71. data/website/app/views/pwa/manifest.json.erb +22 -0
  72. data/website/app/views/pwa/service-worker.js +26 -0
  73. data/website/bin/brakeman +7 -0
  74. data/website/bin/bundle +109 -0
  75. data/website/bin/dev +2 -0
  76. data/website/bin/docker-entrypoint +14 -0
  77. data/website/bin/embed_hot_docs +33 -0
  78. data/website/bin/importmap +4 -0
  79. data/website/bin/jobs +6 -0
  80. data/website/bin/kamal +27 -0
  81. data/website/bin/rails +4 -0
  82. data/website/bin/rake +4 -0
  83. data/website/bin/rubocop +8 -0
  84. data/website/bin/setup +34 -0
  85. data/website/bin/thrust +5 -0
  86. data/website/config/application.rb +27 -0
  87. data/website/config/boot.rb +4 -0
  88. data/website/config/cable.yml +17 -0
  89. data/website/config/cache.yml +16 -0
  90. data/website/config/credentials.yml.enc +1 -0
  91. data/website/config/database.yml +41 -0
  92. data/website/config/deploy.yml +116 -0
  93. data/website/config/environment.rb +5 -0
  94. data/website/config/environments/development.rb +72 -0
  95. data/website/config/environments/production.rb +90 -0
  96. data/website/config/environments/test.rb +53 -0
  97. data/website/config/importmap.rb +7 -0
  98. data/website/config/initializers/assets.rb +7 -0
  99. data/website/config/initializers/content_security_policy.rb +25 -0
  100. data/website/config/initializers/filter_parameter_logging.rb +8 -0
  101. data/website/config/initializers/inflections.rb +16 -0
  102. data/website/config/initializers/markdown.mjs +26 -0
  103. data/website/config/initializers/markdown.rb +35 -0
  104. data/website/config/locales/en.yml +31 -0
  105. data/website/config/puma.rb +41 -0
  106. data/website/config/queue.yml +18 -0
  107. data/website/config/recurring.yml +10 -0
  108. data/website/config/routes.rb +28 -0
  109. data/website/config/storage.yml +34 -0
  110. data/website/config.ru +6 -0
  111. data/website/db/cable_schema.rb +11 -0
  112. data/website/db/cache_schema.rb +14 -0
  113. data/website/db/queue_schema.rb +129 -0
  114. data/website/db/seeds.rb +9 -0
  115. data/website/lib/tasks/.keep +0 -0
  116. data/website/log/.keep +0 -0
  117. data/website/public/400.html +114 -0
  118. data/website/public/404.html +114 -0
  119. data/website/public/406-unsupported-browser.html +114 -0
  120. data/website/public/422.html +114 -0
  121. data/website/public/500.html +114 -0
  122. data/website/public/apple-touch-icon.png +0 -0
  123. data/website/public/favicon.ico +0 -0
  124. data/website/public/hot_docs.svg +17 -0
  125. data/website/public/robots.txt +1 -0
  126. data/website/script/.keep +0 -0
  127. data/website/storage/.keep +0 -0
  128. data/website/test/application_system_test_case.rb +5 -0
  129. data/website/test/controllers/.keep +0 -0
  130. data/website/test/fixtures/files/.keep +0 -0
  131. data/website/test/helpers/.keep +0 -0
  132. data/website/test/helpers/hot_docs_helper_test.rb +94 -0
  133. data/website/test/integration/.keep +0 -0
  134. data/website/test/mailers/.keep +0 -0
  135. data/website/test/models/.keep +0 -0
  136. data/website/test/system/.keep +0 -0
  137. data/website/test/test_helper.rb +15 -0
  138. data/website/tmp/.keep +0 -0
  139. data/website/tmp/pids/.keep +0 -0
  140. data/website/tmp/storage/.keep +0 -0
  141. data/website/vendor/.keep +0 -0
  142. data/website/vendor/javascript/.keep +0 -0
  143. metadata +183 -0
@@ -0,0 +1,114 @@
1
+ <!doctype html>
2
+
3
+ <html lang="en">
4
+
5
+ <head>
6
+
7
+ <title>We’re sorry, but something went wrong (500 Internal Server Error)</title>
8
+
9
+ <meta charset="utf-8">
10
+ <meta name="viewport" content="initial-scale=1, width=device-width">
11
+ <meta name="robots" content="noindex, nofollow">
12
+
13
+ <style>
14
+
15
+ *, *::before, *::after {
16
+ box-sizing: border-box;
17
+ }
18
+
19
+ * {
20
+ margin: 0;
21
+ }
22
+
23
+ html {
24
+ font-size: 16px;
25
+ }
26
+
27
+ body {
28
+ background: #FFF;
29
+ color: #261B23;
30
+ display: grid;
31
+ font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Aptos, Roboto, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
32
+ font-size: clamp(1rem, 2.5vw, 2rem);
33
+ -webkit-font-smoothing: antialiased;
34
+ font-style: normal;
35
+ font-weight: 400;
36
+ letter-spacing: -0.0025em;
37
+ line-height: 1.4;
38
+ min-height: 100vh;
39
+ place-items: center;
40
+ text-rendering: optimizeLegibility;
41
+ -webkit-text-size-adjust: 100%;
42
+ }
43
+
44
+ a {
45
+ color: inherit;
46
+ font-weight: 700;
47
+ text-decoration: underline;
48
+ text-underline-offset: 0.0925em;
49
+ }
50
+
51
+ b, strong {
52
+ font-weight: 700;
53
+ }
54
+
55
+ i, em {
56
+ font-style: italic;
57
+ }
58
+
59
+ main {
60
+ display: grid;
61
+ gap: 1em;
62
+ padding: 2em;
63
+ place-items: center;
64
+ text-align: center;
65
+ }
66
+
67
+ main header {
68
+ width: min(100%, 12em);
69
+ }
70
+
71
+ main header svg {
72
+ height: auto;
73
+ max-width: 100%;
74
+ width: 100%;
75
+ }
76
+
77
+ main article {
78
+ width: min(100%, 30em);
79
+ }
80
+
81
+ main article p {
82
+ font-size: 75%;
83
+ }
84
+
85
+ main article br {
86
+
87
+ display: none;
88
+
89
+ @media(min-width: 48em) {
90
+ display: inline;
91
+ }
92
+
93
+ }
94
+
95
+ </style>
96
+
97
+ </head>
98
+
99
+ <body>
100
+
101
+ <!-- This file lives in public/500.html -->
102
+
103
+ <main>
104
+ <header>
105
+ <svg height="172" viewBox="0 0 480 172" width="480" xmlns="http://www.w3.org/2000/svg"><path d="m101.23 93.8427c-8.1103 0-15.4098 3.7849-19.7354 8.3813h-36.2269v-99.21891h103.8143v37.03791h-68.3984v24.8722c5.1366-2.7035 15.1396-5.9477 24.6014-5.9477 35.146 0 56.233 22.7094 56.233 55.4215 0 34.605-23.791 57.315-60.558 57.315-37.8492 0-61.64-22.169-63.8028-55.963h42.9857c1.0814 10.814 9.1919 19.195 21.6281 19.195 11.355 0 19.465-8.381 19.465-20.547 0-11.625-7.299-20.5463-20.006-20.5463zm138.833 77.8613c-40.822 0-64.884-35.146-64.884-85.7015 0-50.5554 24.062-85.700907 64.884-85.700907 40.823 0 64.884 35.145507 64.884 85.700907 0 50.5555-24.061 85.7015-64.884 85.7015zm0-133.2831c-17.572 0-22.709 21.8984-22.709 47.5816 0 25.6835 5.137 47.5815 22.709 47.5815 17.303 0 22.71-21.898 22.71-47.5815 0-25.6832-5.407-47.5816-22.71-47.5816zm140.456 133.2831c-40.823 0-64.884-35.146-64.884-85.7015 0-50.5554 24.061-85.700907 64.884-85.700907 40.822 0 64.884 35.145507 64.884 85.700907 0 50.5555-24.062 85.7015-64.884 85.7015zm0-133.2831c-17.573 0-22.71 21.8984-22.71 47.5816 0 25.6835 5.137 47.5815 22.71 47.5815 17.302 0 22.709-21.898 22.709-47.5815 0-25.6832-5.407-47.5816-22.709-47.5816z" fill="#f0eff0"/><path d="m23.1377 68.9967v34.0033h-8.9162v-34.0033zm4.3157 34.0033v-24.921h8.6947v2.1598c1.3845-1.5506 3.8212-2.7136 6.701-2.7136 5.538 0 8.8054 3.5997 8.8054 9.1377v16.3371h-8.6393v-14.2327c0-2.049-1.0522-3.5443-3.2674-3.5443-1.7168 0-3.1567.9969-3.5997 2.7136v15.0634zm29.9913-8.5839v-9.5807h-3.655v-6.7564h3.655v-6.8671h8.5839v6.8671h5.2058v6.7564h-5.2058v8.307c0 1.9383.9415 2.769 2.6583 2.769.9414 0 1.9937-.2216 2.769-.5538v7.3654c-.9969.443-2.8798.775-4.8181.775-5.8703 0-9.1931-2.769-9.1931-9.0819zm32.3666-.1108h8.0301c-.8861 5.7597-5.2057 9.2487-11.6852 9.2487-7.6424 0-12.682-5.2613-12.682-13.0145 0-7.6978 5.3165-13.0143 12.5159-13.0143 7.6424 0 11.9621 5.095 11.9621 12.5159v2.1598h-16.1156c.2769 2.9905 1.8275 4.5965 4.3196 4.5965 1.7722 0 3.1567-.7753 3.6551-2.4921zm-3.8212-10.0237c-2.0491 0-3.4336 1.2737-3.9874 3.5997h7.5317c-.1107-2.0491-1.3845-3.5997-3.5443-3.5997zm31.4299-6.3134v8.3624c-1.052-.5538-2.215-.7753-3.599-.7753-2.382 0-3.988 1.0522-4.431 2.8244v14.6203h-8.694v-24.921h8.694v2.2152c1.219-1.6614 3.157-2.769 5.649-2.769 1.108 0 1.994.2215 2.381.443zm2.949 25.0318v-24.921h8.694v2.1598c1.385-1.5506 3.821-2.7136 6.701-2.7136 5.538 0 8.806 3.5997 8.806 9.1377v16.3371h-8.64v-14.2327c0-2.049-1.052-3.5443-3.267-3.5443-1.717 0-3.157.9969-3.6 2.7136v15.0634zm50.371 0h-8.363v-1.274c-.83.831-3.323 1.717-5.981 1.717-4.929 0-9.082-2.769-9.082-8.0301 0-4.818 4.153-7.9193 9.581-7.9193 2.049 0 4.485.6646 5.482 1.3845v-1.606c0-1.606-.941-2.9905-3.046-2.9905-1.606 0-2.547.7199-2.935 1.8275h-8.196c.72-4.8181 4.984-8.6393 11.408-8.6393 7.089 0 11.132 3.7659 11.132 10.2453zm-8.363-6.9779v-1.4399c-.554-1.0522-2.049-1.7167-3.655-1.7167-1.717 0-3.433.7199-3.433 2.3813 0 1.7168 1.716 2.4367 3.433 2.4367 1.606 0 3.101-.6645 3.655-1.6614zm20.742-29.0191v35.997h-8.694v-35.997zm13.036 25.9178h9.248c.72 2.326 2.714 3.489 5.483 3.489 2.713 0 4.596-1.163 4.596-3.2674 0-1.6061-1.052-2.326-3.212-2.8244l-6.534-1.3845c-4.985-1.1076-8.751-3.7105-8.751-9.47 0-6.6456 5.538-11.0206 13.07-11.0206 8.307 0 13.014 4.5411 13.956 10.4114h-8.695c-.72-1.8829-2.27-3.3228-5.205-3.3228-2.548 0-4.265 1.1076-4.265 2.9905 0 1.4953 1.052 2.326 2.825 2.7137l6.645 1.5506c5.815 1.3845 9.027 4.5412 9.027 9.8023 0 6.9778-5.87 10.9654-13.291 10.9654-8.141 0-13.679-3.9322-14.897-10.6332zm46.509 1.3845h8.031c-.887 5.7597-5.206 9.2487-11.686 9.2487-7.642 0-12.682-5.2613-12.682-13.0145 0-7.6978 5.317-13.0143 12.516-13.0143 7.643 0 11.962 5.095 11.962 12.5159v2.1598h-16.115c.277 2.9905 1.827 4.5965 4.319 4.5965 1.773 0 3.157-.7753 3.655-2.4921zm-3.821-10.0237c-2.049 0-3.433 1.2737-3.987 3.5997h7.532c-.111-2.0491-1.385-3.5997-3.545-3.5997zm31.431-6.3134v8.3624c-1.053-.5538-2.216-.7753-3.6-.7753-2.381 0-3.988 1.0522-4.431 2.8244v14.6203h-8.694v-24.921h8.694v2.2152c1.219-1.6614 3.157-2.769 5.649-2.769 1.108 0 1.994.2215 2.382.443zm18.288 25.0318h-7.809l-9.47-24.921h8.861l4.763 14.288 4.652-14.288h8.528zm25.614-8.6947h8.03c-.886 5.7597-5.206 9.2487-11.685 9.2487-7.642 0-12.682-5.2613-12.682-13.0145 0-7.6978 5.316-13.0143 12.516-13.0143 7.642 0 11.962 5.095 11.962 12.5159v2.1598h-16.116c.277 2.9905 1.828 4.5965 4.32 4.5965 1.772 0 3.157-.7753 3.655-2.4921zm-3.821-10.0237c-2.049 0-3.434 1.2737-3.988 3.5997h7.532c-.111-2.0491-1.384-3.5997-3.544-3.5997zm31.43-6.3134v8.3624c-1.052-.5538-2.215-.7753-3.6-.7753-2.381 0-3.987 1.0522-4.43 2.8244v14.6203h-8.695v-24.921h8.695v2.2152c1.218-1.6614 3.157-2.769 5.649-2.769 1.107 0 1.993.2215 2.381.443zm13.703-8.9715h24.312v7.6424h-15.562v5.3165h14.232v7.4763h-14.232v5.8703h15.562v7.6978h-24.312zm44.667 8.9715v8.3624c-1.052-.5538-2.215-.7753-3.6-.7753-2.381 0-3.987 1.0522-4.43 2.8244v14.6203h-8.695v-24.921h8.695v2.2152c1.218-1.6614 3.156-2.769 5.648-2.769 1.108 0 1.994.2215 2.382.443zm19.673 0v8.3624c-1.053-.5538-2.216-.7753-3.6-.7753-2.381 0-3.987 1.0522-4.43 2.8244v14.6203h-8.695v-24.921h8.695v2.2152c1.218-1.6614 3.156-2.769 5.648-2.769 1.108 0 1.994.2215 2.382.443zm26.769 12.5713c0 7.6978-5.15 13.0145-12.737 13.0145-7.532 0-12.738-5.3167-12.738-13.0145s5.206-13.0143 12.738-13.0143c7.587 0 12.737 5.3165 12.737 13.0143zm-8.529 0c0-3.4336-1.495-5.8703-4.208-5.8703-2.659 0-4.154 2.4367-4.154 5.8703s1.495 5.8149 4.154 5.8149c2.713 0 4.208-2.3813 4.208-5.8149zm28.082-12.5713v8.3624c-1.052-.5538-2.215-.7753-3.6-.7753-2.381 0-3.987 1.0522-4.43 2.8244v14.6203h-8.695v-24.921h8.695v2.2152c1.218-1.6614 3.157-2.769 5.649-2.769 1.107 0 1.993.2215 2.381.443z" fill="#d30001"/></svg>
106
+ </header>
107
+ <article>
108
+ <p><strong>We’re sorry, but something went wrong.</strong><br> If you’re the application owner check the logs for more information.</p>
109
+ </article>
110
+ </main>
111
+
112
+ </body>
113
+
114
+ </html>
Binary file
Binary file
@@ -0,0 +1,17 @@
1
+ <svg viewBox="0 0 500 500" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M90 328C243.479 290.664 328.011 197.596 359 91" stroke="#F1B869" stroke-width="120" stroke-linecap="round"/>
3
+ <path d="M67 376C252.429 326.849 354.56 204.329 392 64" stroke="#E34752" stroke-width="120" stroke-linecap="round"/>
4
+ <path d="M147 415C300.479 377.664 385.011 284.596 416 178" stroke="#F1B869" stroke-width="160" stroke-linecap="round"/>
5
+ <circle cx="230" cy="316" r="45" fill="#0A0A0A"/>
6
+ <circle cx="218.5" cy="302.5" r="17.5" fill="#F1F1F1"/>
7
+ <circle cx="243.5" cy="320.5" r="7.5" fill="#F1F1F1"/>
8
+ <path d="M251.01 290L253.792 297.32L261.617 300.607L253.792 302.813L251.01 311.213L247.981 302.813L240.404 300.607L247.981 297.32L251.01 290Z" fill="#F1F1F1"/>
9
+ <path d="M224.657 328L226.14 331.904L230.314 333.657L226.14 334.833L224.657 339.314L223.041 334.833L219 333.657L223.041 331.904L224.657 328Z" fill="#F1F1F1"/>
10
+ <circle cx="332" cy="227" r="45" fill="#0A0A0A"/>
11
+ <circle cx="320.5" cy="213.5" r="17.5" fill="#F1F1F1"/>
12
+ <circle cx="345.5" cy="231.5" r="7.5" fill="#F1F1F1"/>
13
+ <path d="M353.01 201L355.792 208.32L363.617 211.607L355.792 213.813L353.01 222.213L349.981 213.813L342.404 211.607L349.981 208.32L353.01 201Z" fill="#F1F1F1"/>
14
+ <path d="M326.657 239L328.14 242.904L332.314 244.657L328.14 245.833L326.657 250.314L325.041 245.833L321 244.657L325.041 242.904L326.657 239Z" fill="#F1F1F1"/>
15
+ <path d="M422.301 297.436C438.008 323.094 421.058 362.066 384.442 384.481C347.825 406.897 305.409 404.268 289.702 378.61C273.994 352.952 303.683 334.79 340.3 312.374C376.916 289.959 406.594 271.778 422.301 297.436Z" fill="#0A0A0A"/>
16
+ <path d="M409.899 350.314C417.051 360.608 400.145 374.476 388.212 382.766C376.279 391.057 365.573 397.144 358.421 386.85C351.268 376.556 355.144 361.489 367.077 353.198C379.01 344.907 402.747 340.019 409.899 350.314Z" fill="#E5757D"/>
17
+ </svg>
@@ -0,0 +1 @@
1
+ # See https://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file
File without changes
File without changes
@@ -0,0 +1,5 @@
1
+ require "test_helper"
2
+
3
+ class ApplicationSystemTestCase < ActionDispatch::SystemTestCase
4
+ driven_by :selenium, using: :headless_chrome, screen_size: [ 1400, 1400 ]
5
+ end
File without changes
File without changes
File without changes
@@ -0,0 +1,94 @@
1
+ require "test_helper"
2
+
3
+ class HotDocsHelperTest < ActionView::TestCase
4
+ test "#active_link_to" do
5
+ assert_dom_equal %(<a href="/">label</a>), active_link_to("label", root_path)
6
+
7
+ controller.request.path = root_path
8
+ assert_dom_equal %(<a href="/" class="active">label</a>), active_link_to("label", root_path)
9
+ end
10
+
11
+ test "#compute_menu adds empty children" do
12
+ actual = compute_menu([ { expanded: true, label: "Page 1", url: "#" } ])
13
+ expected = [ { expanded: true, label: "Page 1", url: "#", children: [] } ]
14
+ assert_equal expected, actual
15
+ end
16
+
17
+ test "#compute_menu adds expanded (defaulting to false)" do
18
+ actual = compute_menu([ { label: "Page 1", url: "#" } ])
19
+ expected = [ { expanded: false, label: "Page 1", url: "#", children: [] } ]
20
+ assert_equal expected, actual
21
+ end
22
+
23
+ test "#compute_menu adds expanded: true when the url is active" do
24
+ controller.request.path = root_path
25
+ actual = compute_menu([ { label: "Page 1", url: root_path } ])
26
+ expected = [ { expanded: true, label: "Page 1", url: root_path, children: [] } ]
27
+ assert_equal expected, actual
28
+ end
29
+
30
+ test "#compute_menu works on children too" do
31
+ actual = compute_menu([
32
+ {
33
+ label: "Page 1", url: "#", children: [
34
+ { label: "Page 2", url: "#child" }
35
+ ]
36
+ }
37
+ ])
38
+
39
+ expected = [
40
+ {
41
+ expanded: false, label: "Page 1", url: "#", children: [
42
+ { expanded: false, label: "Page 2", url: "#child", children: [] }
43
+ ]
44
+ }
45
+ ]
46
+ assert_equal expected, actual
47
+ end
48
+
49
+ test "#compute_menu adds expanded: true from the active url to the root" do
50
+ controller.request.path = root_path
51
+
52
+ actual = compute_menu([
53
+ {
54
+ expanded: false, label: "Page 1", url: "#", children: [
55
+ { expanded: false, label: "Page 2", url: root_path }
56
+ ]
57
+ }
58
+ ])
59
+
60
+ expected = [
61
+ {
62
+ expanded: true, label: "Page 1", url: "#", children: [
63
+ { expanded: true, label: "Page 2", url: root_path, children: [] }
64
+ ]
65
+ }
66
+ ]
67
+ assert_equal expected, actual
68
+ end
69
+
70
+ test "#menu" do
71
+ actual = menu([
72
+ {
73
+ expanded: true, label: "Page 1", url: "#first", children: [
74
+ {
75
+ label: "Page 2", url: "#second"
76
+ }
77
+ ]
78
+ }
79
+ ])
80
+
81
+ expected = <<~HTML
82
+ <ul class="menu__section">
83
+ <li>
84
+ #{render partial: "hot_docs/menu_row", locals: { expanded: true, label: "Page 1", url: "#first" }}
85
+
86
+ <ul class="menu__section">
87
+ <li>#{render partial: "hot_docs/menu_row", locals: { label: "Page 2", url: "#second" }}</li>
88
+ </ul>
89
+ </li>
90
+ </ul>
91
+ HTML
92
+ assert_dom_equal expected, actual
93
+ end
94
+ end
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1,15 @@
1
+ ENV["RAILS_ENV"] ||= "test"
2
+ require_relative "../config/environment"
3
+ require "rails/test_help"
4
+
5
+ module ActiveSupport
6
+ class TestCase
7
+ # Run tests in parallel with specified workers
8
+ parallelize(workers: :number_of_processors)
9
+
10
+ # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
11
+ fixtures :all
12
+
13
+ # Add more helper methods to be used by all tests here...
14
+ end
15
+ end
data/website/tmp/.keep ADDED
File without changes
File without changes
File without changes
File without changes
File without changes
metadata ADDED
@@ -0,0 +1,183 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: hot_docs
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.0
5
+ platform: ruby
6
+ authors:
7
+ - 3v0k4
8
+ bindir: exe
9
+ cert_chain: []
10
+ date: 2025-02-25 00:00:00.000000000 Z
11
+ dependencies: []
12
+ email:
13
+ - riccardo.odone@gmail.com
14
+ executables: []
15
+ extensions: []
16
+ extra_rdoc_files: []
17
+ files:
18
+ - ".rubocop.yml"
19
+ - CHANGELOG.md
20
+ - LICENSE.txt
21
+ - README.md
22
+ - Rakefile
23
+ - lib/hot_docs.rb
24
+ - lib/hot_docs/version.rb
25
+ - sig/hot_docs.rbs
26
+ - website/.dockerignore
27
+ - website/.gitattributes
28
+ - website/.github/dependabot.yml
29
+ - website/.github/images/hot_docs.svg
30
+ - website/.github/workflows/ci.yml
31
+ - website/.gitignore
32
+ - website/.kamal/hooks/docker-setup.sample
33
+ - website/.kamal/hooks/post-deploy.sample
34
+ - website/.kamal/hooks/post-proxy-reboot.sample
35
+ - website/.kamal/hooks/pre-build.sample
36
+ - website/.kamal/hooks/pre-connect.sample
37
+ - website/.kamal/hooks/pre-deploy.sample
38
+ - website/.kamal/hooks/pre-proxy-reboot.sample
39
+ - website/.kamal/secrets
40
+ - website/.rubocop.yml
41
+ - website/.ruby-version
42
+ - website/Dockerfile
43
+ - website/Gemfile
44
+ - website/Gemfile.lock
45
+ - website/LICENSE.txt
46
+ - website/README.md
47
+ - website/Rakefile
48
+ - website/app/assets/images/.keep
49
+ - website/app/assets/images/hot_docs_components_desktop.png
50
+ - website/app/assets/images/hot_docs_components_mobile.png
51
+ - website/app/assets/stylesheets/hot_docs.css
52
+ - website/app/assets/stylesheets/website.css
53
+ - website/app/controllers/application_controller.rb
54
+ - website/app/controllers/concerns/.keep
55
+ - website/app/controllers/hot_docs_controller.rb
56
+ - website/app/helpers/application_helper.rb
57
+ - website/app/helpers/hot_docs_helper.rb
58
+ - website/app/javascript/application.js
59
+ - website/app/javascript/controllers/accordion_controller.js
60
+ - website/app/javascript/controllers/application.js
61
+ - website/app/javascript/controllers/index.js
62
+ - website/app/javascript/controllers/sidenav_controller.js
63
+ - website/app/javascript/controllers/toc_controller.js
64
+ - website/app/javascript/controllers/typewriter_controller.js
65
+ - website/app/jobs/application_job.rb
66
+ - website/app/mailers/application_mailer.rb
67
+ - website/app/models/application_record.rb
68
+ - website/app/models/concerns/.keep
69
+ - website/app/views/hot_docs/_menu_row.html.erb
70
+ - website/app/views/hot_docs/components.html.mderb
71
+ - website/app/views/hot_docs/embedded.html.mderb
72
+ - website/app/views/hot_docs/footer.html.mderb
73
+ - website/app/views/hot_docs/helpers.html.mderb
74
+ - website/app/views/hot_docs/index.html.erb
75
+ - website/app/views/hot_docs/light_dark.html.mderb
76
+ - website/app/views/hot_docs/markdown.html.mderb
77
+ - website/app/views/hot_docs/nav.html.mderb
78
+ - website/app/views/hot_docs/quickstart.html.mderb
79
+ - website/app/views/hot_docs/search.html.mderb
80
+ - website/app/views/hot_docs/standalone.html.mderb
81
+ - website/app/views/hot_docs/static_export.html.mderb
82
+ - website/app/views/hot_docs/toc.html.mderb
83
+ - website/app/views/layouts/hot_docs.html.erb
84
+ - website/app/views/layouts/mailer.html.erb
85
+ - website/app/views/layouts/mailer.text.erb
86
+ - website/app/views/layouts/website.html.erb
87
+ - website/app/views/pwa/manifest.json.erb
88
+ - website/app/views/pwa/service-worker.js
89
+ - website/bin/brakeman
90
+ - website/bin/bundle
91
+ - website/bin/dev
92
+ - website/bin/docker-entrypoint
93
+ - website/bin/embed_hot_docs
94
+ - website/bin/importmap
95
+ - website/bin/jobs
96
+ - website/bin/kamal
97
+ - website/bin/rails
98
+ - website/bin/rake
99
+ - website/bin/rubocop
100
+ - website/bin/setup
101
+ - website/bin/thrust
102
+ - website/config.ru
103
+ - website/config/application.rb
104
+ - website/config/boot.rb
105
+ - website/config/cable.yml
106
+ - website/config/cache.yml
107
+ - website/config/credentials.yml.enc
108
+ - website/config/database.yml
109
+ - website/config/deploy.yml
110
+ - website/config/environment.rb
111
+ - website/config/environments/development.rb
112
+ - website/config/environments/production.rb
113
+ - website/config/environments/test.rb
114
+ - website/config/importmap.rb
115
+ - website/config/initializers/assets.rb
116
+ - website/config/initializers/content_security_policy.rb
117
+ - website/config/initializers/filter_parameter_logging.rb
118
+ - website/config/initializers/inflections.rb
119
+ - website/config/initializers/markdown.mjs
120
+ - website/config/initializers/markdown.rb
121
+ - website/config/locales/en.yml
122
+ - website/config/puma.rb
123
+ - website/config/queue.yml
124
+ - website/config/recurring.yml
125
+ - website/config/routes.rb
126
+ - website/config/storage.yml
127
+ - website/db/cable_schema.rb
128
+ - website/db/cache_schema.rb
129
+ - website/db/queue_schema.rb
130
+ - website/db/seeds.rb
131
+ - website/lib/tasks/.keep
132
+ - website/log/.keep
133
+ - website/public/400.html
134
+ - website/public/404.html
135
+ - website/public/406-unsupported-browser.html
136
+ - website/public/422.html
137
+ - website/public/500.html
138
+ - website/public/apple-touch-icon.png
139
+ - website/public/favicon.ico
140
+ - website/public/hot_docs.svg
141
+ - website/public/robots.txt
142
+ - website/script/.keep
143
+ - website/storage/.keep
144
+ - website/test/application_system_test_case.rb
145
+ - website/test/controllers/.keep
146
+ - website/test/fixtures/files/.keep
147
+ - website/test/helpers/.keep
148
+ - website/test/helpers/hot_docs_helper_test.rb
149
+ - website/test/integration/.keep
150
+ - website/test/mailers/.keep
151
+ - website/test/models/.keep
152
+ - website/test/system/.keep
153
+ - website/test/test_helper.rb
154
+ - website/tmp/.keep
155
+ - website/tmp/pids/.keep
156
+ - website/tmp/storage/.keep
157
+ - website/vendor/.keep
158
+ - website/vendor/javascript/.keep
159
+ homepage: https://hotdocsrails.com
160
+ licenses:
161
+ - MIT
162
+ metadata:
163
+ homepage_uri: https://hotdocsrails.com
164
+ source_code_uri: https://github.com/3v0k4/hot_docs
165
+ changelog_uri: https://github.com/3v0k4/hot_docs/blob/main/CHANGELOG.md
166
+ rdoc_options: []
167
+ require_paths:
168
+ - lib
169
+ required_ruby_version: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - ">="
172
+ - !ruby/object:Gem::Version
173
+ version: 3.1.0
174
+ required_rubygems_version: !ruby/object:Gem::Requirement
175
+ requirements:
176
+ - - ">="
177
+ - !ruby/object:Gem::Version
178
+ version: '0'
179
+ requirements: []
180
+ rubygems_version: 3.6.2
181
+ specification_version: 4
182
+ summary: Write your docs with Ruby on Rails
183
+ test_files: []