hanamismith 1.9.0 → 1.11.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 (60) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data/README.adoc +8 -6
  4. data/hanamismith.gemspec +3 -3
  5. data/lib/hanamismith/builders/asset.rb +1 -1
  6. data/lib/hanamismith/builders/binstub.rb +1 -1
  7. data/lib/hanamismith/builders/bundler.rb +2 -2
  8. data/lib/hanamismith/builders/caliber.rb +1 -1
  9. data/lib/hanamismith/builders/circle_ci.rb +16 -1
  10. data/lib/hanamismith/builders/console.rb +2 -2
  11. data/lib/hanamismith/builders/core.rb +13 -14
  12. data/lib/hanamismith/builders/docker/compose.rb +1 -1
  13. data/lib/hanamismith/builders/docker/file.rb +1 -1
  14. data/lib/hanamismith/builders/documentation/readme.rb +1 -1
  15. data/lib/hanamismith/builders/environments/all.rb +3 -2
  16. data/lib/hanamismith/builders/environments/development.rb +1 -1
  17. data/lib/hanamismith/builders/environments/test.rb +1 -1
  18. data/lib/hanamismith/builders/git/ignore.rb +1 -1
  19. data/lib/hanamismith/builders/git_hub/ci.rb +1 -1
  20. data/lib/hanamismith/builders/icon.rb +1 -1
  21. data/lib/hanamismith/builders/javascript.rb +1 -1
  22. data/lib/hanamismith/builders/layout.rb +35 -1
  23. data/lib/hanamismith/builders/node.rb +1 -1
  24. data/lib/hanamismith/builders/providers/htmx.rb +20 -0
  25. data/lib/hanamismith/builders/puma/configuration.rb +1 -1
  26. data/lib/hanamismith/builders/puma/procfile.rb +2 -2
  27. data/lib/hanamismith/builders/pwa.rb +1 -1
  28. data/lib/hanamismith/builders/rack/attack.rb +2 -2
  29. data/lib/hanamismith/builders/rack/configuration.rb +1 -1
  30. data/lib/hanamismith/builders/rack/deflater.rb +1 -1
  31. data/lib/hanamismith/builders/rake/configuration.rb +1 -1
  32. data/lib/hanamismith/builders/refinement.rb +1 -1
  33. data/lib/hanamismith/builders/rspec/application_shared_context.rb +1 -1
  34. data/lib/hanamismith/builders/rspec/hanami.rb +1 -1
  35. data/lib/hanamismith/builders/rspec/helper.rb +1 -1
  36. data/lib/hanamismith/builders/setup.rb +1 -1
  37. data/lib/hanamismith/builders/slices/health.rb +8 -8
  38. data/lib/hanamismith/builders/slices/home.rb +9 -9
  39. data/lib/hanamismith/builders/stylesheet.rb +10 -2
  40. data/lib/hanamismith/cli/commands/build.rb +1 -0
  41. data/lib/hanamismith/templates/%project_name%/.circleci/config.yml.erb +1 -0
  42. data/lib/hanamismith/templates/%project_name%/app/assets/css/colors.css.erb +4 -0
  43. data/lib/hanamismith/templates/%project_name%/app/assets/css/defaults.css.erb +120 -0
  44. data/lib/hanamismith/templates/%project_name%/app/assets/css/{app.css.erb → layout.css.erb} +16 -17
  45. data/lib/hanamismith/templates/%project_name%/app/assets/css/settings.css.erb +7 -0
  46. data/lib/hanamismith/templates/%project_name%/app/assets/css/view_transitions.css.erb +5 -0
  47. data/lib/hanamismith/templates/%project_name%/app/assets/js/app.js.erb +8 -1
  48. data/lib/hanamismith/templates/%project_name%/app/templates/layouts/app.html.erb.erb +9 -8
  49. data/lib/hanamismith/templates/%project_name%/config/app.rb.erb +13 -1
  50. data/lib/hanamismith/templates/%project_name%/config/providers/htmx.rb.erb +5 -0
  51. data/lib/hanamismith/templates/%project_name%/config/settings.rb.erb +1 -0
  52. data/lib/hanamismith/templates/%project_name%/env.erb +4 -1
  53. data/lib/hanamismith/templates/%project_name%/lib/%project_path%/refines/actions/response.rb.erb +3 -1
  54. data/lib/hanamismith/templates/%project_name%/package.json.erb +3 -2
  55. data/lib/hanamismith/templates/%project_name%/spec/lib/%project_path%/refines/actions/response_spec.rb.erb +15 -3
  56. data.tar.gz.sig +1 -1
  57. metadata +13 -9
  58. metadata.gz.sig +0 -0
  59. data/lib/hanamismith/templates/%project_name%/config/providers/persistence.rb.erb +0 -44
  60. data/lib/hanamismith/templates/%project_name%/config/providers/yjit.rb.erb +0 -3
@@ -18,23 +18,23 @@ module Hanamismith
18
18
 
19
19
  def add_configuration
20
20
  path = "%project_name%/config/slices/health.rb.erb"
21
- builder.call(settings.merge(template_path: path)).render
21
+ builder.call(settings.with(template_path: path)).render
22
22
  end
23
23
 
24
24
  def add_action
25
25
  path = "%project_name%/slices/health/action.rb.erb"
26
- builder.call(settings.merge(template_path: path)).render
26
+ builder.call(settings.with(template_path: path)).render
27
27
  end
28
28
 
29
29
  def add_view
30
30
  path = "%project_name%/slices/health/view.rb.erb"
31
- builder.call(settings.merge(template_path: path)).render
31
+ builder.call(settings.with(template_path: path)).render
32
32
  end
33
33
 
34
34
  def add_show_template
35
35
  path = "%project_name%/slices/health/templates/show.html.erb.erb"
36
36
 
37
- builder.call(settings.merge(template_path: path))
37
+ builder.call(settings.with(template_path: path))
38
38
  .render
39
39
  .replace(
40
40
  "<!-- title -->",
@@ -45,22 +45,22 @@ module Hanamismith
45
45
 
46
46
  def add_context
47
47
  path = "%project_name%/slices/health/views/context.rb.erb"
48
- builder.call(settings.merge(template_path: path)).render
48
+ builder.call(settings.with(template_path: path)).render
49
49
  end
50
50
 
51
51
  def add_show_view
52
52
  path = "%project_name%/slices/health/views/show.rb.erb"
53
- builder.call(settings.merge(template_path: path)).render
53
+ builder.call(settings.with(template_path: path)).render
54
54
  end
55
55
 
56
56
  def add_show_action
57
57
  path = "%project_name%/slices/health/actions/show.rb.erb"
58
- builder.call(settings.merge(template_path: path)).render
58
+ builder.call(settings.with(template_path: path)).render
59
59
  end
60
60
 
61
61
  def add_show_action_spec
62
62
  path = "%project_name%/spec/slices/health/actions/show_spec.rb.erb"
63
- builder.call(settings.merge(template_path: path)).render
63
+ builder.call(settings.with(template_path: path)).render
64
64
  end
65
65
  end
66
66
  end
@@ -18,33 +18,33 @@ module Hanamismith
18
18
 
19
19
  def add_configuration
20
20
  path = "%project_name%/config/slices/home.rb.erb"
21
- builder.call(settings.merge(template_path: path)).render
21
+ builder.call(settings.with(template_path: path)).render
22
22
  end
23
23
 
24
24
  def add_action
25
25
  path = "%project_name%/slices/home/action.rb.erb"
26
- builder.call(settings.merge(template_path: path)).render
26
+ builder.call(settings.with(template_path: path)).render
27
27
  end
28
28
 
29
29
  def add_repository
30
30
  path = "%project_name%/slices/home/repository.rb.erb"
31
- builder.call(settings.merge(template_path: path)).render
31
+ builder.call(settings.with(template_path: path)).render
32
32
  end
33
33
 
34
34
  def add_view
35
35
  path = "%project_name%/slices/home/view.rb.erb"
36
- builder.call(settings.merge(template_path: path)).render
36
+ builder.call(settings.with(template_path: path)).render
37
37
  end
38
38
 
39
39
  def add_context
40
40
  path = "%project_name%/slices/home/views/context.rb.erb"
41
- builder.call(settings.merge(template_path: path)).render
41
+ builder.call(settings.with(template_path: path)).render
42
42
  end
43
43
 
44
44
  def add_show_template
45
45
  path = "%project_name%/slices/home/templates/show.html.erb.erb"
46
46
 
47
- builder.call(settings.merge(template_path: path))
47
+ builder.call(settings.with(template_path: path))
48
48
  .render
49
49
  .replace(
50
50
  "<!-- title -->",
@@ -56,17 +56,17 @@ module Hanamismith
56
56
 
57
57
  def add_show_view
58
58
  path = "%project_name%/slices/home/views/show.rb.erb"
59
- builder.call(settings.merge(template_path: path)).render
59
+ builder.call(settings.with(template_path: path)).render
60
60
  end
61
61
 
62
62
  def add_show_action
63
63
  path = "%project_name%/slices/home/actions/show.rb.erb"
64
- builder.call(settings.merge(template_path: path)).render
64
+ builder.call(settings.with(template_path: path)).render
65
65
  end
66
66
 
67
67
  def add_request_spec
68
68
  path = "%project_name%/spec/features/home_spec.rb.erb"
69
- builder.call(settings.merge(template_path: path)).render
69
+ builder.call(settings.with(template_path: path)).render
70
70
  end
71
71
  end
72
72
  end
@@ -9,8 +9,16 @@ module Hanamismith
9
9
  using Refinements::Struct
10
10
 
11
11
  def call
12
- path = "%project_name%/app/assets/css/app.css.erb"
13
- builder.call(settings.merge(template_path: path)).render
12
+ %w[
13
+ %project_name%/app/assets/css/settings.css.erb
14
+ %project_name%/app/assets/css/colors.css.erb
15
+ %project_name%/app/assets/css/view_transitions.css.erb
16
+ %project_name%/app/assets/css/defaults.css.erb
17
+ %project_name%/app/assets/css/layout.css.erb
18
+ ].each do |path|
19
+ builder.call(settings.with(template_path: path)).render
20
+ end
21
+
14
22
  true
15
23
  end
16
24
  end
@@ -13,6 +13,7 @@ module Hanamismith
13
13
  BUILDERS = [
14
14
  Rubysmith::Builders::Init,
15
15
  Builders::Core,
16
+ Builders::Providers::HTMX,
16
17
  Builders::Refinement,
17
18
  Builders::Icon,
18
19
  Builders::Stylesheet,
@@ -5,6 +5,7 @@ jobs:
5
5
  docker:
6
6
  - image: bkuhlmann/alpine-ruby:latest
7
7
  environment:
8
+ APP_SECRET: <app_secret>
8
9
  HANAMI_ENV: test
9
10
  DATABASE_URL: postgres://postgres:postgres@localhost:5432/postgres
10
11
  - image: postgres:latest
@@ -0,0 +1,4 @@
1
+ :root {
2
+ --color-black: hsl(0, 0%, 0%);
3
+ --color-white: hsl(0, 0%, 100%);
4
+ }
@@ -0,0 +1,120 @@
1
+ *, *::after, *::before {
2
+ box-sizing: border-box;
3
+ }
4
+
5
+ @media (prefers-reduced-motion: no-preference) {
6
+ :where(html) {
7
+ interpolate-size: allow-keywords;
8
+ }
9
+ }
10
+
11
+ :where(html) {
12
+ accent-color: var(--color-white);
13
+ background-color: var(--color-black);
14
+ font-family: var(--site-font-family);
15
+ height: 100%;
16
+ line-height: 1.5;
17
+ overscroll-behavior: none;
18
+ scrollbar-color: var(--color-white) var(--site-red);
19
+ scrollbar-gutter: stable;
20
+ text-size-adjust: none;
21
+ -moz-text-size-adjust: none;
22
+ -webkit-font-smoothing: antialiased;
23
+ -webkit-text-size-adjust: none;
24
+
25
+ ::selection {
26
+ background-color: var(--color-white);
27
+ color: var(--color-black);
28
+ }
29
+ }
30
+
31
+ :where(audio, iframe, img, svg, video) {
32
+ max-block-size: 100%;
33
+ max-inline-size: 100%;
34
+ }
35
+
36
+ :where(button, input, select, textarea) {
37
+ font: inherit;
38
+ }
39
+
40
+ :where(a) {
41
+ color: var(--color-white);
42
+ text-decoration: none;
43
+
44
+ &:hover {
45
+ text-decoration: underline;
46
+ text-underline-position: under;
47
+ }
48
+ }
49
+
50
+ :where(abbr[title]) {
51
+ cursor: help;
52
+ text-decoration-line: underline;
53
+ text-decoration-style: dotted;
54
+ }
55
+
56
+ :where(code) {
57
+ background-color: var(--color-black);
58
+ border-radius: 0.3rem;
59
+ color: var(--color-white);
60
+ font-size: 0.95rem;
61
+ padding: 0.1rem 0.3rem;
62
+ }
63
+
64
+ :where(h1, h2, h3, h4, h5, h6, p) {
65
+ overflow-wrap: break-word;
66
+ }
67
+
68
+ :where(h1, h2, h3, h4, h5, h6) {
69
+ text-wrap: balance;
70
+ }
71
+
72
+ :where(h1, h2) {
73
+ font-weight: 400;
74
+ font-size: 2.75em;
75
+ }
76
+
77
+ :where(img) {
78
+ display: block;
79
+ height: auto;
80
+ max-width: 100%;
81
+ object-fit: cover;
82
+ }
83
+
84
+ :where(kbd) {
85
+ background-color: var(--color-white);
86
+ border-radius: 0.2rem;
87
+ border: 0.1rem solid var(--color-white);
88
+ color: var(--color-black);
89
+ font-size: 0.85em;
90
+ font-weight: 600;
91
+ line-height: 1rem;
92
+ padding: 0.1rem 0.3rem;
93
+ white-space: nowrap;
94
+ }
95
+
96
+ :where(label):has(+:where(textarea, input, select)) {
97
+ display: block;
98
+ }
99
+
100
+ :where(p) {
101
+ text-wrap: pretty;
102
+ }
103
+
104
+ :where(pre:not([class^=language])) {
105
+ background-color: var(--color-black);
106
+ color: var(--color-white);
107
+ padding: 0.5rem 1rem;
108
+ font-size: 0.9rem;
109
+ white-space: pre-wrap;
110
+ }
111
+
112
+ :where(pre) {
113
+ border-radius: 0.5rem;
114
+ font-weight: 400;
115
+ padding: 0.5rem;
116
+ }
117
+
118
+ :where(textarea:not([rows])) {
119
+ min-block-size: 6em;
120
+ }
@@ -1,21 +1,4 @@
1
- @media (prefers-reduced-motion: no-preference) {
2
- @view-transition {
3
- navigation: auto;
4
- }
5
- }
6
-
7
- html {
8
- height: 100%;
9
- }
10
-
11
1
  .site-page {
12
- --color-pink: hsl(306, 81%, 77%);
13
- --color-red: hsl(11, 86%, 46%);
14
- --color-rose: hsl(338, 27%, 88%);
15
- --color-white: hsl(0, 0%, 100%);
16
- --color-black: hsl(0, 0%, 0%);
17
- --font-family: Verdana;
18
-
19
2
  background-color: var(--color-black);
20
3
  background-image: linear-gradient(
21
4
  0deg,
@@ -99,3 +82,19 @@ html {
99
82
  }
100
83
  }
101
84
  }
85
+
86
+ .site-alert, .site-notice {
87
+ border-radius: 0.5rem;
88
+ font-weight: 600;
89
+ padding: 0 1rem;
90
+ }
91
+
92
+ .site-alert {
93
+ background-color: var(--site-red);
94
+ color: var(--site-white);
95
+ }
96
+
97
+ .site-notice {
98
+ background-color: var(--site-blue);
99
+ color: var(--site-white);
100
+ }
@@ -0,0 +1,7 @@
1
+ :root {
2
+ --site-font-family: Verdana, system-ui, sans-serif;
3
+ --site-z-index-hidden: -10;
4
+ --site-z-index-tooltip: 10;
5
+ --site-z-index-navigation: 20;
6
+ --site-z-index-modal: 100;
7
+ }
@@ -0,0 +1,5 @@
1
+ @media (prefers-reduced-motion: no-preference) {
2
+ @view-transition {
3
+ navigation: auto;
4
+ }
5
+ }
@@ -1 +1,8 @@
1
- import "../css/app.css";
1
+ import "../css/settings.css";
2
+ import "../css/colors.css";
3
+ import "../css/view_transitions.css";
4
+ import "../css/defaults.css";
5
+ import "../css/layout.css";
6
+
7
+ import htmx from "htmx.org";
8
+ window.htmx = htmx;
@@ -13,21 +13,22 @@
13
13
  <meta name="apple-mobile-web-app-status-bar-style" content="black">
14
14
  <meta name="view-transition" content="same-origin">
15
15
 
16
- <link title="<%= settings.project_label %>: Favicon"
17
- rel="icon"
18
- href="https://alchemists.io/images/projects/hanamismith/icons/favicon.ico"
19
- sizes="32x32">
16
+ <!-- favicon -->
17
+
20
18
  <!-- icon -->
21
- <link title="<%= settings.project_label %>: Apple Icon"
22
- rel="apple-touch-icon"
23
- href="https://alchemists.io/images/projects/hanamismith/icons/apple.png"
24
- type="image/png">
19
+
20
+ <!-- apple_icon -->
21
+
25
22
  <!-- manifest -->
26
23
 
27
24
  <!-- stylesheet -->
25
+
26
+ <!-- javascript -->
28
27
  </head>
29
28
 
30
29
  <body class="site-page">
30
+ <!-- flash:alert -->
31
+ <!-- flash:notice -->
31
32
  <!-- yield -->
32
33
  </body>
33
34
  </html>
@@ -3,7 +3,10 @@ require "hanami"
3
3
  <% namespace do %>
4
4
  # The application base configuration.
5
5
  class App < Hanami::App
6
+ # :nocov:
6
7
  RubyVM::YJIT.enable
8
+ # :nocov:
9
+
7
10
  Dry::Schema.load_extensions :monads
8
11
  Dry::Validation.load_extensions :monads
9
12
 
@@ -15,9 +18,18 @@ require "hanami"
15
18
 
16
19
  config.actions.content_security_policy.then do |csp|
17
20
  csp[:manifest_src] = "'self'"
18
- csp[:script_src] += " 'unsafe-eval' 'unsafe-inline' https://unpkg.com/"
21
+ csp[:script_src] += " 'unsafe-eval' 'unsafe-inline'"
19
22
  end
20
23
 
24
+ # rubocop:todo Layout/FirstArrayElementLineBreak
25
+ config.actions.sessions = :cookie,
26
+ {
27
+ key: "<%= settings.project_name %>.session",
28
+ secret: settings.app_secret,
29
+ expire_after: 3_600 # 1 hour.
30
+ }
31
+ # rubocop:enable Layout/FirstArrayElementLineBreak
32
+
21
33
  environment :development do
22
34
  # :nocov:
23
35
  config.logger.options[:colorize] = true
@@ -0,0 +1,5 @@
1
+ Hanami.app.register_provider :htmx do
2
+ prepare { require "htmx" }
3
+
4
+ start { register :htmx, HTMX }
5
+ end
@@ -1,5 +1,6 @@
1
1
  <% namespace do %>
2
2
  # The application base settings.
3
3
  class Settings < Hanami::Settings
4
+ setting :app_secret, constructor: Types::String.constrained(filled: true)
4
5
  end
5
6
  <% end %>
@@ -1,3 +1,6 @@
1
+ APP_SECRET=<app_secret>
2
+
1
3
  PG_DATABASE=<%= settings.project_name %>
2
- PG_PASSWORD=<password>
4
+ PG_PASSWORD=<pg_password>
5
+ PG_PORT=5432
3
6
  PG_USER=<%= settings.project_name %>
@@ -4,9 +4,11 @@
4
4
  # Modifies and enhances default Hanami action response behavior.
5
5
  module Response
6
6
  refine Hanami::Action::Response do
7
- def with body:, status:
7
+ def with body:, format: nil, status: 200
8
8
  @body = [body]
9
9
  @status = status
10
+
11
+ self.format = format if format
10
12
  self
11
13
  end
12
14
  end
@@ -6,8 +6,9 @@
6
6
  "license": "<%= settings.license_label_version %>",
7
7
  "private": true,
8
8
  "type": "module",
9
- "keywords": ["ruby", "hanami"],
9
+ "keywords": ["hanami", "htmx", "ruby"],
10
10
  "dependencies": {
11
- "hanami-assets": "^2.2.0"
11
+ "hanami-assets": "^2.2.0",
12
+ "htmx.org": "^2.0.7"
12
13
  }
13
14
  }
@@ -3,16 +3,28 @@ require "hanami_helper"
3
3
  RSpec.describe <%= settings.project_namespaced_class %>::Refines::Actions::Response do
4
4
  using described_class
5
5
 
6
- subject(:response) { Hanami::Action::Response.new request:, config: {} }
6
+ subject :response do
7
+ config = Class.new(Hanami::Action).config.tap { it.format :json }
8
+ Hanami::Action::Response.new request:, config:
9
+ end
7
10
 
8
11
  let :request do
9
12
  Rack::MockRequest.env_for("/").then { |env| Hanami::Action::Request.new env:, params: {} }
10
13
  end
11
14
 
12
15
  describe "#with" do
13
- it "answers response with given body and status" do
14
- expect(response.with(body: "Danger!", status: 400)).to have_attributes(
16
+ it "answers response with required body and status" do
17
+ expect(response.with(body: "A test.")).to have_attributes(
18
+ body: ["A test."],
19
+ format: nil,
20
+ status: 200
21
+ )
22
+ end
23
+
24
+ it "answers response with body, format, and status" do
25
+ expect(response.with(body: "Danger!", format: :json, status: 400)).to have_attributes(
15
26
  body: ["Danger!"],
27
+ format: :json,
16
28
  status: 400
17
29
  )
18
30
  end
data.tar.gz.sig CHANGED
@@ -1 +1 @@
1
- G�b �ʒ�j��`��𧓜���ҺZϻ6��r� V����� 35'��O�*�*͉8� /;b=��"*e��{�9���/�؎����Ҹr��wKK��b�G�h5I�V�ʭ�z�{�p�4�����'��� s�#��Ũ�Q_^⃠w^������y8ΑMiŚq2%�ߏ�ou}�r��'�u���]�S�K�ġ�)�g�k����!�R^܇!K[�"���0F�pR��V���%�.Pr���d����n8�ՙ�!+�d<K>�<axȹ=��SG���+��lS�灵_�����r;���Β����"�A�/��玹^��sVm:�����@��o��Ǟo�7�G=�5��/F<�
1
+ O�<e���$Mf
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hanamismith
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.0
4
+ version: 1.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brooke Kuhlmann
@@ -139,28 +139,28 @@ dependencies:
139
139
  requirements:
140
140
  - - "~>"
141
141
  - !ruby/object:Gem::Version
142
- version: '13.3'
142
+ version: '13.5'
143
143
  type: :runtime
144
144
  prerelease: false
145
145
  version_requirements: !ruby/object:Gem::Requirement
146
146
  requirements:
147
147
  - - "~>"
148
148
  - !ruby/object:Gem::Version
149
- version: '13.3'
149
+ version: '13.5'
150
150
  - !ruby/object:Gem::Dependency
151
151
  name: rubysmith
152
152
  requirement: !ruby/object:Gem::Requirement
153
153
  requirements:
154
154
  - - "~>"
155
155
  - !ruby/object:Gem::Version
156
- version: '8.6'
156
+ version: '8.7'
157
157
  type: :runtime
158
158
  prerelease: false
159
159
  version_requirements: !ruby/object:Gem::Requirement
160
160
  requirements:
161
161
  - - "~>"
162
162
  - !ruby/object:Gem::Version
163
- version: '8.6'
163
+ version: '8.7'
164
164
  - !ruby/object:Gem::Dependency
165
165
  name: runcom
166
166
  requirement: !ruby/object:Gem::Requirement
@@ -251,6 +251,7 @@ files:
251
251
  - lib/hanamismith/builders/javascript.rb
252
252
  - lib/hanamismith/builders/layout.rb
253
253
  - lib/hanamismith/builders/node.rb
254
+ - lib/hanamismith/builders/providers/htmx.rb
254
255
  - lib/hanamismith/builders/puma/configuration.rb
255
256
  - lib/hanamismith/builders/puma/procfile.rb
256
257
  - lib/hanamismith/builders/pwa.rb
@@ -279,7 +280,11 @@ files:
279
280
  - lib/hanamismith/templates/%project_name%/Procfile.dev.erb
280
281
  - lib/hanamismith/templates/%project_name%/Procfile.erb
281
282
  - lib/hanamismith/templates/%project_name%/app/action.rb.erb
282
- - lib/hanamismith/templates/%project_name%/app/assets/css/app.css.erb
283
+ - lib/hanamismith/templates/%project_name%/app/assets/css/colors.css.erb
284
+ - lib/hanamismith/templates/%project_name%/app/assets/css/defaults.css.erb
285
+ - lib/hanamismith/templates/%project_name%/app/assets/css/layout.css.erb
286
+ - lib/hanamismith/templates/%project_name%/app/assets/css/settings.css.erb
287
+ - lib/hanamismith/templates/%project_name%/app/assets/css/view_transitions.css.erb
283
288
  - lib/hanamismith/templates/%project_name%/app/assets/images/icon.svg.erb
284
289
  - lib/hanamismith/templates/%project_name%/app/assets/js/app.js.erb
285
290
  - lib/hanamismith/templates/%project_name%/app/assets/pwa/manifest.webmanifest.erb
@@ -294,8 +299,7 @@ files:
294
299
  - lib/hanamismith/templates/%project_name%/config/app.rb.erb
295
300
  - lib/hanamismith/templates/%project_name%/config/assets.js.erb
296
301
  - lib/hanamismith/templates/%project_name%/config/initializers/rack_attack.rb.erb
297
- - lib/hanamismith/templates/%project_name%/config/providers/persistence.rb.erb
298
- - lib/hanamismith/templates/%project_name%/config/providers/yjit.rb.erb
302
+ - lib/hanamismith/templates/%project_name%/config/providers/htmx.rb.erb
299
303
  - lib/hanamismith/templates/%project_name%/config/puma.rb.erb
300
304
  - lib/hanamismith/templates/%project_name%/config/routes.rb.erb
301
305
  - lib/hanamismith/templates/%project_name%/config/settings.rb.erb
@@ -353,7 +357,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
353
357
  - !ruby/object:Gem::Version
354
358
  version: '0'
355
359
  requirements: []
356
- rubygems_version: 3.7.1
360
+ rubygems_version: 3.7.2
357
361
  specification_version: 4
358
362
  summary: A command line interface for smithing Hanami projects.
359
363
  test_files: []
metadata.gz.sig CHANGED
Binary file
@@ -1,44 +0,0 @@
1
- # :nocov:
2
- # rubocop:todo Metrics/BlockLength
3
- Hanami.app.register_provider :persistence, namespace: true do
4
- prepare do
5
- require "rom-changeset"
6
- require "rom/core"
7
- require "rom/sql"
8
-
9
- Sequel::Database.extension :constant_sql_override, :pg_enum
10
- Sequel.database_timezone = :utc
11
- Sequel.application_timezone = :local
12
-
13
- configuration = ROM::Configuration.new :sql, target["settings"].database_url
14
-
15
- configuration.plugin :sql, relations: :instrumentation do |plugin_config|
16
- plugin_config.notifications = target["notifications"]
17
- end
18
-
19
- configuration.plugin :sql, relations: :auto_restrictions
20
-
21
- database = configuration.gateways[:default].connection
22
- database.set_constant_sql Sequel::CURRENT_TIMESTAMP, "(CURRENT_TIMESTAMP AT TIME ZONE 'UTC')"
23
-
24
- register "config", configuration
25
- register "db", database
26
-
27
- Sequel::Migrator.is_current? database, Hanami.app.root.join("db/migrate")
28
- rescue NoMethodError, Sequel::Migrator::Error => error
29
- message = error.message
30
- Hanami.logger.error message unless error.is_a?(NoMethodError) && message.include?("migration")
31
- end
32
-
33
- start do
34
- configuration = target["persistence.config"]
35
-
36
- configuration.auto_registration(
37
- target.root.join("lib/<%= settings.project_path %>/persistence"),
38
- namespace: "<%= settings.project_namespaced_class %>::Persistence"
39
- )
40
-
41
- register "rom", ROM.container(configuration)
42
- end
43
- end
44
- # rubocop:enable Metrics/BlockLength
@@ -1,3 +0,0 @@
1
- Hanami.app.register_provider :yjit do
2
- start { RubyVM::YJIT.enable }
3
- end