hanamismith 0.16.0 → 0.17.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (29) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data/README.adoc +13 -13
  4. data/hanamismith.gemspec +1 -1
  5. data/lib/hanamismith/builders/bundler.rb +1 -1
  6. data/lib/hanamismith/builders/documentation/readme.rb +52 -0
  7. data/lib/hanamismith/builders/rspec/helper.rb +26 -3
  8. data/lib/hanamismith/builders/slices/health.rb +1 -1
  9. data/lib/hanamismith/builders/slices/{main.rb → home.rb} +19 -10
  10. data/lib/hanamismith/builders/stylesheet.rb +1 -1
  11. data/lib/hanamismith/cli/commands/build.rb +1 -1
  12. data/lib/hanamismith/templates/%project_name%/config/app.rb.erb +1 -0
  13. data/lib/hanamismith/templates/%project_name%/config/providers/persistence.rb.erb +1 -0
  14. data/lib/hanamismith/templates/%project_name%/config/routes.rb.erb +1 -1
  15. data/lib/hanamismith/templates/%project_name%/public/stylesheets/home.css.erb +85 -0
  16. data/lib/hanamismith/templates/%project_name%/slices/{main → home}/action.rb.erb +2 -2
  17. data/lib/hanamismith/templates/%project_name%/slices/home/actions/show.rb.erb +8 -0
  18. data/lib/hanamismith/templates/%project_name%/slices/{main → home}/repository.rb.erb +2 -2
  19. data/lib/hanamismith/templates/%project_name%/slices/{main → home}/templates/layouts/app.html.erb.erb +3 -5
  20. data/lib/hanamismith/templates/%project_name%/slices/home/templates/show.html.erb.erb +41 -0
  21. data/lib/hanamismith/templates/%project_name%/slices/{main → home}/view.rb.erb +2 -3
  22. data/lib/hanamismith/templates/%project_name%/slices/home/views/show.rb.erb +9 -0
  23. data.tar.gz.sig +0 -0
  24. metadata +11 -11
  25. metadata.gz.sig +0 -0
  26. data/lib/hanamismith/templates/%project_name%/public/stylesheets/site.css.erb +0 -9
  27. data/lib/hanamismith/templates/%project_name%/slices/main/actions/home/show.rb.erb +0 -10
  28. data/lib/hanamismith/templates/%project_name%/slices/main/templates/home/show.html.erb.erb +0 -3
  29. data/lib/hanamismith/templates/%project_name%/slices/main/views/home/show.rb.erb +0 -9
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b9f18ea3a2750d2452225cbb602db94787af77ae953a6283c496bdd1b977c255
4
- data.tar.gz: 969edd95ec4318d7f2b9d5eb0a882b8fb8284302de965bd9d860a82c126b87f1
3
+ metadata.gz: 7a2f9fdfaa67a10936995d911ad76db83f51fe1b37ef28fec90d0ddb806efa77
4
+ data.tar.gz: 03e473810747a25f2ef846c8f1f00aa93fe0c443065e34e037f529f57816381b
5
5
  SHA512:
6
- metadata.gz: 436606c6e9ffc77cb47d5fb83a7097151ec02ac727ca3d95efa0f5497ae5b31d3fdb1ed4677488bb2e6914cb2e7bb62418711a3c3694fff542d3fa665e24ad6f
7
- data.tar.gz: 820584b45f86afd8d93b72f6b49fdae9f77bbffc389b29549f1283a6f30fb205a2e39a2e1eb6e42b727a87f48e44813cd3807732e2dbf640825cc6bc95126646
6
+ metadata.gz: fe4fb1bd2e08990b590163c4b711d2c5fc3da26b9194e987d8a4811ef471e1e82c1ac5de5c42d11b1fecb01a29c45f83f50d860bc90f48330f6847dcae023f6b
7
+ data.tar.gz: ac0e4e0f38801660aee10cd52e022b1fb935903ea098ac43ba2762675a733e9462ed5c5981df93099d9f35031b145e5e41beef1661ef4c64ccfaed3f4717978e
checksums.yaml.gz.sig CHANGED
Binary file
data/README.adoc CHANGED
@@ -17,11 +17,9 @@
17
17
 
18
18
  = Hanamismith
19
19
 
20
- Hanamismith is a Command Line Interface (CLI) for smithing Hanami projects. Perfect for when you need a professional and robust tool for building new project skeletons. To quote from the {dry_link} and {hanami_link} teams:
20
+ Hanamismith is a Command Line Interface (CLI) for smithing Hanami projects. Perfect when you need a professional and robust tool for building new project skeletons. To quote from the {dry_link} and {hanami_link} teams:
21
21
  ____
22
22
  If you're looking for new ways to build maintainable, secure, faster and testable Ruby applications, you're in for a treat. *Hanami is built for people like you*.
23
-
24
- Whether you're a total beginner or an experienced developer, *this learning process may still be hard*. Over time, we become used to certain things, and it can be painful to change. *But without change, there is no challenge* and without challenge, there is no growth.
25
23
  ____
26
24
 
27
25
  Welcome to the modern age of web development. This gem will help you get up and running as quickly as possible. 🚀
@@ -33,7 +31,7 @@ toc::[]
33
31
  * Built atop {rubysmith_link} for building project skeleton.
34
32
  * Uses {dry_link} for functional programming.
35
33
  * Uses {hanami_link} for web application development.
36
- * Uses {htmx_link} for proper Hypermedia REST APIs (i.e. HTML over the wire) so you can write less code and avoid bloated JavaScript stacks.
34
+ * Uses {htmx_link} for Hypermedia REST APIs (i.e. HTML over the wire) so you can write less code and avoid bloated JavaScript stacks.
37
35
  * Uses {pg_link} coupled with {rom_link} for database management.
38
36
  * Uses {rack_link}, specifically: `Rack::Deflater`, `Rack::Static`, and link:https://github.com/rack/rack-attack[Rack::Attack].
39
37
  * Uses {puma_link} as the default web server and fully configured for local and production environments.
@@ -43,6 +41,14 @@ toc::[]
43
41
  * Provides the `/up` health check endpoint via the `Health` slice.
44
42
  * Disables link:https://github.com/ruby/irb[IRB] console autocomplete when used in production-like environments. You can re-enable IRB autocomplete by setting `IRB_USE_AUTOCOMPLETE=true` before launching your console in non development or test environments.
45
43
 
44
+ == Screenshots/Screencasts
45
+
46
+ image:https://alchemists.io/images/projects/hanamismith/screenshots/home.png[Home,width=802,height=813,role=focal_point]
47
+
48
+ The above is a screenshot of a _Demo_ project that was generated and run locally. For a fully working demonstration application -- as built by this gem -- check out the link:https://github.com/bkuhlmann/hemo[Hemo] project. Here's a quick screencast overview of this demonstration application in action:
49
+
50
+ video::https://alchemists.io/videos/projects/hemo/demo.mp4[poster=https://alchemists.io/images/projects/hemo/demo.png,width=800,height=450,role=focal_point]
51
+
46
52
  == Requirements
47
53
 
48
54
  . link:https://www.ruby-lang.org[Ruby].
@@ -93,7 +99,7 @@ link:https://alchemists.io/projects/rubysmith/#_configuration[Rubysmith]. It is
93
99
  ----
94
100
  :project:
95
101
  :url:
96
- # Add sub-key values here.
102
+ # Add key/value pairs here.
97
103
  ----
98
104
 
99
105
  When these values exist, you'll benefit from having this information added to your generated project documentation. Otherwise -- if these values are empty -- they are removed from new project generation entirely.
@@ -133,12 +139,12 @@ bin/hanami --help
133
139
 
134
140
  Once the server is running you can visit (or ping) the following endpoints:
135
141
 
136
- * `/`: The default welcome page.
142
+ * `/`: The home page.
137
143
  * `/up`: The health status of the application. This will be _green_ (200 OK) when the server is up or _red_ (503 Service Unavailable) when the server is down.
138
144
 
139
145
  === Aliases
140
146
 
141
- For link:https://www.gnu.org/software/bash[Bash] users -- or other shell users -- you might find the following aliases helpful in reducing terminal keystrokes when using this gem:
147
+ For link:https://www.gnu.org/software/bash[Bash] users -- or other shell users -- you might find these suggested aliases helpful in reducing keystrokes when using this gem:
142
148
 
143
149
  [source,bash]
144
150
  ----
@@ -149,12 +155,6 @@ alias hsh="hanamismith --help"
149
155
 
150
156
  The above is what I use via my {dotfiles_link} project.
151
157
 
152
- === Demonstrations
153
-
154
- For a fully working demonstration application -- as built by this gem -- check out the link:https://github.com/bkuhlmann/hemo[Hemo] project. Here's a quick screencast overview of this demonstration application in action:
155
-
156
- video::https://alchemists.io/videos/projects/hemo/demo.mp4[poster=https://alchemists.io/images/projects/hemo/demo.png,width=800,height=450,role=focal_point]
157
-
158
158
  == Development
159
159
 
160
160
  To contribute, run:
data/hanamismith.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = "hanamismith"
5
- spec.version = "0.16.0"
5
+ spec.version = "0.17.0"
6
6
  spec.authors = ["Brooke Kuhlmann"]
7
7
  spec.email = ["brooke@alchemists.io"]
8
8
  spec.homepage = "https://alchemists.io/projects/hanamismith"
@@ -56,7 +56,7 @@ module Hanamismith
56
56
  "source",
57
57
  %(gem "hanami-view", github: "hanami/view", branch: "main"\n)
58
58
  )
59
- .insert_after("source", %(gem "htmx", "~> 0.1"\n))
59
+ .insert_after("source", %(gem "htmx", "~> 0.3"\n))
60
60
  .insert_after("source", %(gem "puma", "~> 6.3"\n))
61
61
  .insert_after("source", %(gem "rack-attack", "~> 6.6"\n))
62
62
  end
@@ -14,6 +14,7 @@ module Hanamismith
14
14
 
15
15
  super
16
16
  builder.call(configuration.merge(template_path: "%project_name%/README.#{kind}.erb"))
17
+ .replace(/Setup.+Usage/m, setup)
17
18
  .replace("Rubysmith", "Hanamismith")
18
19
  .replace("rubysmith", "hanamismith")
19
20
 
@@ -25,6 +26,57 @@ module Hanamismith
25
26
  attr_reader :configuration, :builder
26
27
 
27
28
  def kind = configuration.documentation_format
29
+
30
+ def setup = kind == "adoc" ? ascii_setup : markdown_setup
31
+
32
+ # rubocop:disable Metrics/MethodLength
33
+ def ascii_setup
34
+ <<~CONTENT.strip
35
+ Setup
36
+
37
+ To set up the project, run:
38
+
39
+ [source,bash]
40
+ ----
41
+ git clone #{configuration.computed_project_url_source}
42
+ cd #{configuration.project_name}
43
+ bin/setup
44
+
45
+ bin/hanami db create
46
+ bin/hanami db migrate
47
+ bin/hanami db seed
48
+
49
+ HANAMI_ENV=test bin/hanami db create
50
+ HANAMI_ENV=test bin/hanami db migrate
51
+ ----
52
+
53
+ == Usage
54
+ CONTENT
55
+ end
56
+
57
+ def markdown_setup
58
+ <<~CONTENT.strip
59
+ Setup
60
+
61
+ To set up the project, run:
62
+
63
+ ``` bash
64
+ git clone #{configuration.computed_project_url_source}
65
+ cd #{configuration.project_name}
66
+ bin/setup
67
+
68
+ bin/hanami db create
69
+ bin/hanami db migrate
70
+ bin/hanami db seed
71
+
72
+ HANAMI_ENV=test bin/hanami db create
73
+ HANAMI_ENV=test bin/hanami db migrate
74
+ ```
75
+
76
+ ## Usage
77
+ CONTENT
78
+ end
79
+ # rubocop:enable Metrics/MethodLength
28
80
  end
29
81
  end
30
82
  end
@@ -9,15 +9,38 @@ module Hanamismith
9
9
  class Helper < Rubysmith::Builders::RSpec::Helper
10
10
  using Refinements::Structs
11
11
 
12
+ def initialize(...)
13
+ super
14
+ @instance = builder.call configuration.merge(
15
+ template_path: "%project_name%/spec/spec_helper.rb.erb"
16
+ )
17
+ end
18
+
12
19
  def call
13
20
  return configuration unless configuration.build_rspec
14
21
 
15
22
  super
16
- path = "%project_name%/spec/spec_helper.rb.erb"
17
- builder.call(configuration.merge(template_path: path))
18
- .replace(/require.+#{configuration.project_name}.+\n/, "")
23
+ remove_project_requirement
24
+ disable_simple_cov_eval
19
25
  configuration
20
26
  end
27
+
28
+ private
29
+
30
+ attr_reader :instance
31
+
32
+ def remove_project_requirement
33
+ instance.replace(/require.+#{configuration.project_name}.+\n/, "")
34
+ end
35
+
36
+ def disable_simple_cov_eval
37
+ instance.replace(
38
+ /enable_coverage_for_eval\n/,
39
+ "# TODO: Enable once this issue is fixed: " \
40
+ "https://bugs.ruby-lang.org/issues/19363.\n " \
41
+ "# enable_coverage_for_eval\n"
42
+ )
43
+ end
21
44
  end
22
45
  end
23
46
  end
@@ -5,7 +5,7 @@ require "refinements/structs"
5
5
  module Hanamismith
6
6
  module Builders
7
7
  module Slices
8
- # Builds project health slice skeleton.
8
+ # Builds health slice skeleton.
9
9
  class Health
10
10
  using Refinements::Structs
11
11
 
@@ -5,8 +5,8 @@ require "refinements/structs"
5
5
  module Hanamismith
6
6
  module Builders
7
7
  module Slices
8
- # Builds project skeleton foundation.
9
- class Main
8
+ # Builds home slice skeleton.
9
+ class Home
10
10
  using Refinements::Structs
11
11
 
12
12
  def self.call(...) = new(...).call
@@ -26,39 +26,48 @@ module Hanamismith
26
26
  attr_reader :configuration, :builder
27
27
 
28
28
  def add_action
29
- path = "%project_name%/slices/main/action.rb.erb"
29
+ path = "%project_name%/slices/home/action.rb.erb"
30
30
  builder.call(configuration.merge(template_path: path)).render
31
31
  end
32
32
 
33
33
  def add_repository
34
- path = "%project_name%/slices/main/repository.rb.erb"
34
+ path = "%project_name%/slices/home/repository.rb.erb"
35
35
  builder.call(configuration.merge(template_path: path)).render
36
36
  end
37
37
 
38
38
  def add_view
39
- path = "%project_name%/slices/main/view.rb.erb"
39
+ path = "%project_name%/slices/home/view.rb.erb"
40
40
  builder.call(configuration.merge(template_path: path)).render
41
41
  end
42
42
 
43
43
  def add_layout_template
44
- path = "%project_name%/slices/main/templates/layouts/app.html.erb.erb"
44
+ path = "%project_name%/slices/home/templates/layouts/app.html.erb.erb"
45
45
  builder.call(configuration.merge(template_path: path))
46
46
  .render
47
+ .replace("<!-- title -->", "<%= content_for :title %>")
47
48
  .replace("<!-- yield -->", "<%= yield %>")
48
49
  end
49
50
 
50
51
  def add_show_template
51
- path = "%project_name%/slices/main/templates/home/show.html.erb.erb"
52
- builder.call(configuration.merge(template_path: path)).render
52
+ path = "%project_name%/slices/home/templates/show.html.erb.erb"
53
+
54
+ builder.call(configuration.merge(template_path: path))
55
+ .render
56
+ .replace(
57
+ "<!-- title -->",
58
+ %(<% content_for :title, "#{configuration.project_label}" %>)
59
+ )
60
+ .replace("<!-- ruby_version -->", "<%= ruby_version %>")
61
+ .replace("<!-- hanami_version -->", "<%= hanami_version %>")
53
62
  end
54
63
 
55
64
  def add_show_view
56
- path = "%project_name%/slices/main/views/home/show.rb.erb"
65
+ path = "%project_name%/slices/home/views/show.rb.erb"
57
66
  builder.call(configuration.merge(template_path: path)).render
58
67
  end
59
68
 
60
69
  def add_show_action
61
- path = "%project_name%/slices/main/actions/home/show.rb.erb"
70
+ path = "%project_name%/slices/home/actions/show.rb.erb"
62
71
  builder.call(configuration.merge(template_path: path)).render
63
72
  end
64
73
  end
@@ -16,7 +16,7 @@ module Hanamismith
16
16
  end
17
17
 
18
18
  def call
19
- path = "%project_name%/public/stylesheets/site.css.erb"
19
+ path = "%project_name%/public/stylesheets/home.css.erb"
20
20
  builder.call(configuration.merge(template_path: path)).render
21
21
  configuration
22
22
  end
@@ -19,7 +19,7 @@ module Hanamismith
19
19
  Builders::Stylesheet,
20
20
  Builders::HTMX,
21
21
  Builders::PWA,
22
- Builders::Slices::Main,
22
+ Builders::Slices::Home,
23
23
  Builders::Slices::Health,
24
24
  Rubysmith::Builders::Version,
25
25
  Builders::Documentation::Readme,
@@ -24,6 +24,7 @@ require "rack/attack"
24
24
  }
25
25
 
26
26
  environment :development do
27
+ # :nocov:
27
28
  config.logger.options[:colorize] = true
28
29
 
29
30
  config.logger = config.logger.instance.add_backend(
@@ -26,6 +26,7 @@ Hanami.app.register_provider :persistence, namespace: true do
26
26
  Sequel::Migrator.is_current? database, Hanami.app.root.join("db/migrate")
27
27
  rescue NoMethodError, Sequel::Migrator::Error => error
28
28
  message = error.message
29
+ # :nocov:
29
30
  Hanami.logger.error message unless error.is_a?(NoMethodError) && message.include?("migration")
30
31
  end
31
32
 
@@ -2,6 +2,6 @@
2
2
  # Defines application routes.
3
3
  class Routes < Hanami::Routes
4
4
  slice(:health, at: "/up") { root to: "show" }
5
- slice(:main, at: "/") { root to: "home.show" }
5
+ slice(:home, at: "/") { root to: "show" }
6
6
  end
7
7
  <% end %>
@@ -0,0 +1,85 @@
1
+ html {
2
+ height: 100%;
3
+ }
4
+
5
+ .home-page {
6
+ --font-family: Verdana;
7
+ --color-white: hsl(0, 0%, 100%);
8
+
9
+ background-color: var(--color-white);
10
+ background-image:
11
+ radial-gradient(at 17% 25%, hsla(337,26%,88%,1) 0px, transparent 50%),
12
+ radial-gradient(at 17% 68%, hsla(337,26%,88%,1) 0px, transparent 50%),
13
+ radial-gradient(at 50% 45%, hsla(306,81%,77%,1) 0px, transparent 50%),
14
+ radial-gradient(at 81% 25%, hsla(337,26%,88%,1) 0px, transparent 50%),
15
+ radial-gradient(at 81% 68%, hsla(337,26%,88%,1) 0px, transparent 50%),
16
+ radial-gradient(at 9% 7%, hsla(11,86%,46%,1) 0px, transparent 50%),
17
+ radial-gradient(at 9% 93%, hsla(11,86%,46%,1) 0px, transparent 50%),
18
+ radial-gradient(at 91% 7%, hsla(11,86%,46%,1) 0px, transparent 50%),
19
+ radial-gradient(at 91% 93%, hsla(11,86%,46%,1) 0px, transparent 50%);
20
+ background-repeat: no-repeat;
21
+ display: flex;
22
+ flex-direction: column;
23
+ font-family: var(--font-family);
24
+ justify-content: space-between;
25
+ min-height: 97vh;
26
+
27
+ .navigation {
28
+ display: flex;
29
+ flex-wrap: wrap;
30
+ align-items: center;
31
+ justify-content: center;
32
+ flex-direction: column;
33
+ gap: 1rem;
34
+ list-style: none;
35
+ padding: 0;
36
+ }
37
+
38
+ @media only screen and (min-width: 350px) {
39
+ .navigation {
40
+ flex-direction: row;
41
+ justify-content: normal;
42
+ margin: 1rem 2rem;
43
+ }
44
+ }
45
+
46
+ .label {
47
+ font-size: clamp(1.5rem, 2vw + 1rem, 2.25rem);
48
+ }
49
+
50
+ .link {
51
+ color: var(--color-white);
52
+ font-weight: 600;
53
+ font-size: 1.5rem;
54
+ }
55
+
56
+ .body {
57
+ align-items: center;
58
+ display: flex;
59
+ flex-direction: column;
60
+ }
61
+
62
+ .logo {
63
+ max-width: 100%;
64
+ height: auto;
65
+ object-fit: cover;
66
+ }
67
+
68
+ .footer {
69
+ display: flex;
70
+ flex-direction: column;
71
+ gap: 1rem;
72
+ align-items: center;
73
+ }
74
+
75
+ .group {
76
+ display: flex;
77
+ flex-wrap: wrap;
78
+ gap: 1rem;
79
+ justify-content: center;
80
+ list-style: none;
81
+ margin: 0;
82
+ padding: 0;
83
+ text-align: center;
84
+ }
85
+ }
@@ -1,7 +1,7 @@
1
1
  # auto_register: false
2
2
 
3
- module Main
4
- # The main action.
3
+ module Home
4
+ # The home action.
5
5
  class Action < <%= configuration.project_namespaced_class %>::Action
6
6
  end
7
7
  end
@@ -0,0 +1,8 @@
1
+ module Home
2
+ module Actions
3
+ # Processes show action.
4
+ class Show < Home::Action
5
+ def handle(*, response) = response.render view
6
+ end
7
+ end
8
+ end
@@ -1,7 +1,7 @@
1
1
  # auto_register: false
2
2
 
3
- module Main
4
- # The main repository.
3
+ module Home
4
+ # The home repository.
5
5
  class Repository < <%= configuration.project_namespaced_class %>::Repository
6
6
  end
7
7
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  <html lang="en">
4
4
  <head>
5
- <title><%= configuration.project_label %></title>
5
+ <title><!-- title --></title>
6
6
 
7
7
  <meta charset="utf-8">
8
8
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
@@ -19,12 +19,10 @@
19
19
  href="https://alchemists.io/images/projects/hanamismith/icons/apple.png"
20
20
  type="image/png">
21
21
  <link title="<%= configuration.project_label %>: Manifest" rel="manifest" href="/manifest.webmanifest">
22
- <link title="<%= configuration.project_label %>: Stylesheet" rel="stylesheet" href="/stylesheets/site.css" type="text/css">
23
-
24
- <script src="/javascripts/htmx.js"></script>
22
+ <link title="<%= configuration.project_label %>: Stylesheet" rel="stylesheet" href="/stylesheets/home.css" type="text/css">
25
23
  </head>
26
24
 
27
- <body class="site">
25
+ <body class="home-page">
28
26
  <!-- yield -->
29
27
  </body>
30
28
  </html>
@@ -0,0 +1,41 @@
1
+ <!-- title -->
2
+
3
+ <header class="header">
4
+ <nav>
5
+ <ul class="navigation">
6
+ <li><a href="/" class="link">Home</a></li>
7
+ </ul>
8
+ </nav>
9
+ </header>
10
+
11
+ <main class="body">
12
+ <img src="https://alchemists.io/images/projects/hanamismith/icons/small.png"
13
+ alt="Icon"
14
+ class="logo"
15
+ width="192"
16
+ height="192">
17
+
18
+ <h1 class="label"><%= configuration.project_label %></h1>
19
+ </main>
20
+
21
+ <footer class="footer">
22
+ <ul class="group">
23
+ <li><a href="https://hanamirb.org">Hanami</a></li>
24
+ <li><a href="https://guides.hanamirb.org/v2.0/introduction/getting-started">Guides</a></li>
25
+ <li><a href="https://discourse.hanamirb.org">Forum</a></li>
26
+ <li><a href="https://github.com/hanami/hanami/issues">Issues</a></li>
27
+ <li><a href="https://hanamirb.org/status/">Status</a></li>
28
+ <li><a href="https://github.com/hanami/hanami">Source</a></li>
29
+ </ul>
30
+
31
+ <ul class="group">
32
+ <li><a href="https://alchemists.io/projects/hanamismith">Hanamismith</a></li>
33
+ <li><a href="https://github.com/bkuhlmann/hanamismith/issues">Issues</a></li>
34
+ <li><a href="https://github.com/bkuhlmann/hanamismith">Source</a></li>
35
+ </ul>
36
+
37
+ <ul class="group">
38
+ <li>Ruby <!-- ruby_version --></li>
39
+ <li>Hanami <!-- hanami_version --></li>
40
+ </ul>
41
+ </footer>
@@ -1,8 +1,7 @@
1
1
  # auto_register: false
2
2
 
3
- module Main
4
- # The main view.
3
+ module Home
4
+ # The home view.
5
5
  class View < <%= configuration.project_namespaced_class %>::View
6
- config.paths = [Pathname(__dir__).join("templates").expand_path]
7
6
  end
8
7
  end
@@ -0,0 +1,9 @@
1
+ module Home
2
+ module Views
3
+ # Renders show view.
4
+ class Show < Home::View
5
+ expose :ruby_version, default: RUBY_VERSION
6
+ expose :hanami_version, default: Hanami::VERSION
7
+ end
8
+ end
9
+ end
data.tar.gz.sig CHANGED
Binary file
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: 0.16.0
4
+ version: 0.17.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brooke Kuhlmann
@@ -35,7 +35,7 @@ cert_chain:
35
35
  3n5C8/6Zh9DYTkpcwPSuIfAga6wf4nXc9m6JAw8AuMLaiWN/r/2s4zJsUHYERJEu
36
36
  gZGm4JqtuSg8pYjPeIJxS960owq+SfuC+jxqmRA54BisFCv/0VOJi7tiJVY=
37
37
  -----END CERTIFICATE-----
38
- date: 2023-08-11 00:00:00.000000000 Z
38
+ date: 2023-08-13 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: cogger
@@ -275,7 +275,7 @@ files:
275
275
  - lib/hanamismith/builders/rspec/hanami.rb
276
276
  - lib/hanamismith/builders/rspec/helper.rb
277
277
  - lib/hanamismith/builders/slices/health.rb
278
- - lib/hanamismith/builders/slices/main.rb
278
+ - lib/hanamismith/builders/slices/home.rb
279
279
  - lib/hanamismith/builders/stylesheet.rb
280
280
  - lib/hanamismith/cli/commands/build.rb
281
281
  - lib/hanamismith/cli/shell.rb
@@ -303,15 +303,15 @@ files:
303
303
  - lib/hanamismith/templates/%project_name%/public/icon.svg.erb
304
304
  - lib/hanamismith/templates/%project_name%/public/javascripts/htmx.js.erb
305
305
  - lib/hanamismith/templates/%project_name%/public/manifest.webmanifest.erb
306
- - lib/hanamismith/templates/%project_name%/public/stylesheets/site.css.erb
306
+ - lib/hanamismith/templates/%project_name%/public/stylesheets/home.css.erb
307
307
  - lib/hanamismith/templates/%project_name%/slices/health/actions/show.rb.erb
308
- - lib/hanamismith/templates/%project_name%/slices/main/action.rb.erb
309
- - lib/hanamismith/templates/%project_name%/slices/main/actions/home/show.rb.erb
310
- - lib/hanamismith/templates/%project_name%/slices/main/repository.rb.erb
311
- - lib/hanamismith/templates/%project_name%/slices/main/templates/home/show.html.erb.erb
312
- - lib/hanamismith/templates/%project_name%/slices/main/templates/layouts/app.html.erb.erb
313
- - lib/hanamismith/templates/%project_name%/slices/main/view.rb.erb
314
- - lib/hanamismith/templates/%project_name%/slices/main/views/home/show.rb.erb
308
+ - lib/hanamismith/templates/%project_name%/slices/home/action.rb.erb
309
+ - lib/hanamismith/templates/%project_name%/slices/home/actions/show.rb.erb
310
+ - lib/hanamismith/templates/%project_name%/slices/home/repository.rb.erb
311
+ - lib/hanamismith/templates/%project_name%/slices/home/templates/layouts/app.html.erb.erb
312
+ - lib/hanamismith/templates/%project_name%/slices/home/templates/show.html.erb.erb
313
+ - lib/hanamismith/templates/%project_name%/slices/home/view.rb.erb
314
+ - lib/hanamismith/templates/%project_name%/slices/home/views/show.rb.erb
315
315
  - lib/hanamismith/templates/%project_name%/spec/hanami_helper.rb.erb
316
316
  - lib/hanamismith/templates/%project_name%/spec/lib/%project_path%/refines/actions/response_spec.rb.erb
317
317
  - lib/hanamismith/templates/%project_name%/spec/slices/health/actions/show_spec.rb.erb
metadata.gz.sig CHANGED
Binary file
@@ -1,9 +0,0 @@
1
- .site {
2
- --site-font-family: Verdana;
3
-
4
- align-items: center;
5
- display: flex;
6
- flex-direction: column;
7
- font-family: var(--site-font-family);
8
- margin: 1rem 5rem;
9
- }
@@ -1,10 +0,0 @@
1
- module Main
2
- module Actions
3
- module Home
4
- # Processes show action.
5
- class Show < Main::Action
6
- def handle(*, response) = response.render view
7
- end
8
- end
9
- end
10
- end
@@ -1,3 +0,0 @@
1
- <h1>Home</h1>
2
-
3
- <p>Welcome!</p>
@@ -1,9 +0,0 @@
1
- module Main
2
- module Views
3
- module Home
4
- # Renders show view.
5
- class Show < Main::View
6
- end
7
- end
8
- end
9
- end