hanamismith 1.3.0 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/README.adoc +1 -1
- data/hanamismith.gemspec +3 -3
- data/lib/hanamismith/builders/bundler.rb +2 -2
- data/lib/hanamismith/builders/caliber.rb +1 -1
- data/lib/hanamismith/builders/docker/file.rb +2 -5
- data/lib/hanamismith/builders/javascript.rb +1 -1
- data/lib/hanamismith/builders/layout.rb +45 -0
- data/lib/hanamismith/builders/slices/health.rb +0 -16
- data/lib/hanamismith/builders/slices/home.rb +0 -28
- data/lib/hanamismith/builders/stylesheet.rb +1 -1
- data/lib/hanamismith/cli/commands/build.rb +3 -1
- data/lib/hanamismith/extensions/asset.rb +4 -19
- data/lib/hanamismith/templates/%project_name%/Dockerfile.erb +76 -0
- data/lib/hanamismith/templates/%project_name%/{slices/home → app}/assets/css/app.css.erb +27 -17
- data/lib/hanamismith/templates/%project_name%/{slices/home → app}/templates/layouts/app.html.erb.erb +5 -3
- data/lib/hanamismith/templates/%project_name%/config/app.rb.erb +7 -1
- data/lib/hanamismith/templates/%project_name%/slices/health/view.rb.erb +1 -0
- data/lib/hanamismith/templates/%project_name%/slices/home/templates/show.html.erb.erb +2 -13
- data/lib/hanamismith/templates/%project_name%/slices/home/view.rb.erb +1 -0
- data/lib/hanamismith/templates/%project_name%/spec/hanami_helper.rb.erb +5 -2
- data/lib/hanamismith/templates/%project_name%/spec/support/shared_contexts/application.rb.erb +1 -1
- data.tar.gz.sig +0 -0
- metadata +25 -25
- metadata.gz.sig +0 -0
- data/lib/hanamismith/templates/%project_name%/slices/health/templates/layouts/app.html.erb.erb +0 -29
- /data/lib/hanamismith/templates/%project_name%/{slices/home → app}/assets/js/app.js.erb +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5a498eb523292f2179b6c7fc4e29bd0f92670893bc5eeb80bad2eb964594d47b
|
4
|
+
data.tar.gz: 0eda5f7e5af5210003b92339f097b2cf07a688ede20612112e2731787448fd3a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c146e1cbe4a7f033f2b6d2fa104f52b9dfdab9162d4d867b75d1a04808fb8be8819aef92cb05703d125f96fe18ec1bdc83fccfea8c047ca777cbb19cc3214b99
|
7
|
+
data.tar.gz: 3aebc1620be325b6bd6b828279a5c132b76a4d0d46d3d9557dbd80751c6f6399835303af8384cd0a5765ccd3d567a2ebaf7e204c6c2d7e0a60229b3c8ed85b13
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/README.adoc
CHANGED
@@ -37,7 +37,7 @@ toc::[]
|
|
37
37
|
|
38
38
|
== Screenshots/Screencasts
|
39
39
|
|
40
|
-
image:https://alchemists.io/images/projects/hanamismith/screenshots/home.png[Home,width=
|
40
|
+
image:https://alchemists.io/images/projects/hanamismith/screenshots/home.png[Home,width=1060,height=725,role=focal_point]
|
41
41
|
|
42
42
|
The above is a screenshot of a _Demo_ project that was generated locally. For a fully working demonstration application -- as built by this gem -- check out the link:https://github.com/bkuhlmann/hemo[Hemo] project as shown in this screencast:
|
43
43
|
|
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 = "1.
|
5
|
+
spec.version = "1.5.0"
|
6
6
|
spec.authors = ["Brooke Kuhlmann"]
|
7
7
|
spec.email = ["brooke@alchemists.io"]
|
8
8
|
spec.homepage = "https://alchemists.io/projects/hanamismith"
|
@@ -25,13 +25,13 @@ Gem::Specification.new do |spec|
|
|
25
25
|
spec.required_ruby_version = "~> 3.4"
|
26
26
|
spec.add_dependency "cogger", "~> 1.0"
|
27
27
|
spec.add_dependency "containable", "~> 1.1"
|
28
|
-
spec.add_dependency "dry-monads", "~> 1.
|
28
|
+
spec.add_dependency "dry-monads", "~> 1.8"
|
29
29
|
spec.add_dependency "dry-schema", "~> 1.13"
|
30
30
|
spec.add_dependency "etcher", "~> 3.0"
|
31
31
|
spec.add_dependency "htmx", "~> 2.0"
|
32
32
|
spec.add_dependency "infusible", "~> 4.0"
|
33
33
|
spec.add_dependency "refinements", "~> 13.0"
|
34
|
-
spec.add_dependency "rubysmith", "~> 8.
|
34
|
+
spec.add_dependency "rubysmith", "~> 8.3"
|
35
35
|
spec.add_dependency "runcom", "~> 12.0"
|
36
36
|
spec.add_dependency "sod", "~> 1.0"
|
37
37
|
spec.add_dependency "spek", "~> 4.0"
|
@@ -47,11 +47,11 @@ module Hanamismith
|
|
47
47
|
|
48
48
|
def insert_main
|
49
49
|
with_template.insert_after "source", <<~CONTENT
|
50
|
-
gem "dry-monads", "~> 1.6"
|
51
50
|
gem "dry-schema", "~> 1.13"
|
52
51
|
gem "dry-types", "~> 1.7"
|
53
52
|
gem "dry-validation", "~> 1.10"
|
54
53
|
gem "htmx", "~> 2.1"
|
54
|
+
gem "overmind", "~> 2.5"
|
55
55
|
gem "puma", "~> 6.6"
|
56
56
|
gem "rack-attack", "~> 6.7"
|
57
57
|
CONTENT
|
@@ -68,7 +68,7 @@ module Hanamismith
|
|
68
68
|
end
|
69
69
|
|
70
70
|
def insert_quality
|
71
|
-
with_template.insert_after(/group :quality/, %( gem "rubocop-sequel", "~> 0.
|
71
|
+
with_template.insert_after(/group :quality/, %( gem "rubocop-sequel", "~> 0.4"\n))
|
72
72
|
end
|
73
73
|
|
74
74
|
def insert_devtest
|
@@ -6,16 +6,13 @@ module Hanamismith
|
|
6
6
|
module Builders
|
7
7
|
module Docker
|
8
8
|
# Builds Dockerfile configuration.
|
9
|
-
class File < Rubysmith::Builders::
|
9
|
+
class File < Rubysmith::Builders::Abstract
|
10
10
|
using Refinements::Struct
|
11
11
|
|
12
12
|
def call
|
13
13
|
return false unless settings.build_docker
|
14
14
|
|
15
|
-
|
16
|
-
builder.call(settings.merge(template_path: "%project_name%/Dockerfile.erb"))
|
17
|
-
.render
|
18
|
-
.insert_after(/RACK_ENV/, "ENV HANAMI_ENV=production\n")
|
15
|
+
builder.call(settings.merge(template_path: "%project_name%/Dockerfile.erb")).render
|
19
16
|
true
|
20
17
|
end
|
21
18
|
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "refinements/struct"
|
4
|
+
|
5
|
+
module Hanamismith
|
6
|
+
module Builders
|
7
|
+
# Builds app layout.
|
8
|
+
class Layout < Rubysmith::Builders::Abstract
|
9
|
+
using Refinements::Struct
|
10
|
+
|
11
|
+
def call
|
12
|
+
path = "%project_name%/app/templates/layouts/app.html.erb.erb"
|
13
|
+
builder.call(settings.merge(template_path: path))
|
14
|
+
.render
|
15
|
+
.replace("<!-- title -->", "<%= content_for :title %>")
|
16
|
+
.replace("<!-- icon -->", icon)
|
17
|
+
.replace("<!-- manifest -->", manifest)
|
18
|
+
.replace("<!-- stylesheet -->", stylesheet)
|
19
|
+
.replace("<!-- yield -->", "<%= yield %>")
|
20
|
+
|
21
|
+
true
|
22
|
+
end
|
23
|
+
|
24
|
+
private
|
25
|
+
|
26
|
+
def icon
|
27
|
+
%(<%= tag.link title: "#{settings.project_label}: Icon",\n) +
|
28
|
+
%( rel: :icon,\n) +
|
29
|
+
%( href: app_assets["icon.svg"],\n) +
|
30
|
+
%( type: "image/svg+xml" %>)
|
31
|
+
end
|
32
|
+
|
33
|
+
def manifest
|
34
|
+
%(<%= tag.link title: "#{settings.project_label}: Manifest",\n) +
|
35
|
+
%( rel: :manifest,\n) +
|
36
|
+
%( href: app_assets["manifest.webmanifest"] %>)
|
37
|
+
end
|
38
|
+
|
39
|
+
def stylesheet
|
40
|
+
%(<%= tag.link title: "#{settings.project_label}: Stylesheet", rel: :stylesheet, ) +
|
41
|
+
%(href: app_assets["app.css"] %>)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
@@ -31,22 +31,6 @@ module Hanamismith
|
|
31
31
|
builder.call(settings.merge(template_path: path)).render
|
32
32
|
end
|
33
33
|
|
34
|
-
def add_layout
|
35
|
-
path = "%project_name%/slices/health/templates/layouts/app.html.erb.erb"
|
36
|
-
builder.call(settings.merge(template_path: path))
|
37
|
-
.render
|
38
|
-
.replace("<!-- title -->", "<%= content_for :title %>")
|
39
|
-
.replace("<!-- favicon -->", favicon)
|
40
|
-
.replace("<!-- yield -->", "<%= yield %>")
|
41
|
-
end
|
42
|
-
|
43
|
-
def favicon
|
44
|
-
%(<%= favicon_tag app_assets["icon.svg"],\n) +
|
45
|
-
%( title: "#{settings.project_label}: Icon",\n) +
|
46
|
-
%( rel: :icon,\n) +
|
47
|
-
%( type: "image/svg+xml" %>)
|
48
|
-
end
|
49
|
-
|
50
34
|
def add_show_template
|
51
35
|
path = "%project_name%/slices/health/templates/show.html.erb.erb"
|
52
36
|
|
@@ -36,34 +36,6 @@ module Hanamismith
|
|
36
36
|
builder.call(settings.merge(template_path: path)).render
|
37
37
|
end
|
38
38
|
|
39
|
-
def add_layout_template
|
40
|
-
path = "%project_name%/slices/home/templates/layouts/app.html.erb.erb"
|
41
|
-
builder.call(settings.merge(template_path: path))
|
42
|
-
.render
|
43
|
-
.replace("<!-- title -->", "<%= content_for :title %>")
|
44
|
-
.replace("<!-- favicon -->", favicon)
|
45
|
-
.replace("<!-- manifest -->", manifest)
|
46
|
-
.replace("<!-- stylesheet -->", stylesheet)
|
47
|
-
.replace("<!-- yield -->", "<%= yield %>")
|
48
|
-
end
|
49
|
-
|
50
|
-
def favicon
|
51
|
-
%(<%= favicon_tag app_assets["icon.svg"],\n) +
|
52
|
-
%( title: "#{settings.project_label}: Icon",\n) +
|
53
|
-
%( rel: :icon,\n) +
|
54
|
-
%( type: "image/svg+xml" %>)
|
55
|
-
end
|
56
|
-
|
57
|
-
def manifest
|
58
|
-
%(<%= tag.link title: "#{settings.project_label}: Manifest",\n) +
|
59
|
-
%( rel: :manifest,\n) +
|
60
|
-
%( href: app_assets["manifest.webmanifest"] %>)
|
61
|
-
end
|
62
|
-
|
63
|
-
def stylesheet
|
64
|
-
%(<%= stylesheet_tag "app", title: "#{settings.project_label}: Stylesheet" %>)
|
65
|
-
end
|
66
|
-
|
67
39
|
def add_context
|
68
40
|
path = "%project_name%/slices/home/views/context.rb.erb"
|
69
41
|
builder.call(settings.merge(template_path: path)).render
|
@@ -18,6 +18,7 @@ module Hanamismith
|
|
18
18
|
Builders::Stylesheet,
|
19
19
|
Builders::Javascript,
|
20
20
|
Builders::PWA,
|
21
|
+
Builders::Layout,
|
21
22
|
Builders::Slices::Home,
|
22
23
|
Builders::Slices::Health,
|
23
24
|
Rubysmith::Builders::Version,
|
@@ -58,7 +59,7 @@ module Hanamismith
|
|
58
59
|
Rubysmith::Builders::Docker::Build,
|
59
60
|
Rubysmith::Builders::Docker::Console,
|
60
61
|
Rubysmith::Builders::Docker::Entrypoint,
|
61
|
-
|
62
|
+
Builders::Docker::File,
|
62
63
|
Rubysmith::Builders::Docker::Ignore,
|
63
64
|
Rubysmith::Extensions::Bundler,
|
64
65
|
Rubysmith::Extensions::Pragmater,
|
@@ -98,6 +99,7 @@ module Hanamismith
|
|
98
99
|
on Rubysmith::CLI::Actions::License, settings: Container[:settings]
|
99
100
|
on Rubysmith::CLI::Actions::Maximum, settings: Container[:settings]
|
100
101
|
on Rubysmith::CLI::Actions::Minimum, settings: Container[:settings]
|
102
|
+
on Rubysmith::CLI::Actions::Monads, settings: Container[:settings]
|
101
103
|
on Rubysmith::CLI::Actions::Rake, settings: Container[:settings]
|
102
104
|
on Rubysmith::CLI::Actions::Readme, settings: Container[:settings]
|
103
105
|
on Rubysmith::CLI::Actions::Reek, settings: Container[:settings]
|
@@ -1,36 +1,21 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require "refinements/pathname"
|
4
|
-
|
5
3
|
module Hanamismith
|
6
4
|
module Extensions
|
7
5
|
# Ensures assets are compiled.
|
8
6
|
class Asset
|
9
7
|
include Dependencies[:settings, :kernel, :logger]
|
10
8
|
|
11
|
-
using Refinements::Pathname
|
12
|
-
|
13
9
|
def call
|
14
|
-
logger.error { "Unable to compile assets. Try: `hanami assets compile`." } unless
|
10
|
+
logger.error { "Unable to compile assets. Try: `hanami assets compile`." } unless compile
|
15
11
|
true
|
16
12
|
end
|
17
13
|
|
18
14
|
private
|
19
15
|
|
20
|
-
def
|
21
|
-
|
22
|
-
|
23
|
-
success
|
24
|
-
end
|
25
|
-
|
26
|
-
def compile_app
|
27
|
-
kernel.system "node config/assets.js -- --path=app --dest=public/assets > /dev/null 2>&1"
|
28
|
-
end
|
29
|
-
|
30
|
-
def compile_home
|
31
|
-
kernel.system(
|
32
|
-
"node config/assets.js -- --path=slices/home --dest=public/assets/_home > /dev/null 2>&1"
|
33
|
-
)
|
16
|
+
def compile
|
17
|
+
kernel.system "node config/assets.js -- --path=app --dest=public/assets > /dev/null 2>&1",
|
18
|
+
chdir: settings.project_root
|
34
19
|
end
|
35
20
|
end
|
36
21
|
end
|
@@ -0,0 +1,76 @@
|
|
1
|
+
# syntax = docker/dockerfile:1.4
|
2
|
+
|
3
|
+
ARG RUBY_VERSION=<%= RUBY_VERSION %>
|
4
|
+
|
5
|
+
FROM docker.io/library/ruby:$RUBY_VERSION-slim AS base
|
6
|
+
|
7
|
+
LABEL description="<%= [settings.organization_label, "Application"].compact.join " " %>"
|
8
|
+
LABEL maintainer="<%= settings.author_name %> <<%= settings.author_email %>>"
|
9
|
+
|
10
|
+
ENV RACK_ENV=production
|
11
|
+
ENV HANAMI_ENV=production
|
12
|
+
ENV HANAMI_SERVE_ASSETS=true
|
13
|
+
ENV BUNDLE_DEPLOYMENT=1
|
14
|
+
ENV BUNDLE_PATH=/usr/local/bundle
|
15
|
+
ENV BUNDLE_WITHOUT="development:quality:test:tools"
|
16
|
+
|
17
|
+
WORKDIR /app
|
18
|
+
|
19
|
+
RUN <<STEPS
|
20
|
+
apt-get update -qq \
|
21
|
+
&& apt-get install --no-install-recommends -y \
|
22
|
+
curl \
|
23
|
+
libjemalloc2 \
|
24
|
+
nodejs \
|
25
|
+
npm \
|
26
|
+
postgresql-client \
|
27
|
+
tmux \
|
28
|
+
&& rm -rf /var/lib/apt/lists /var/cache/apt/archives
|
29
|
+
STEPS
|
30
|
+
|
31
|
+
FROM base AS build
|
32
|
+
|
33
|
+
RUN <<STEPS
|
34
|
+
apt-get update -qq \
|
35
|
+
&& apt-get install --no-install-recommends -y build-essential \
|
36
|
+
libpq-dev \
|
37
|
+
libyaml-dev \
|
38
|
+
pkg-config \
|
39
|
+
&& rm -rf /var/lib/apt/lists /var/cache/apt/archives
|
40
|
+
STEPS
|
41
|
+
|
42
|
+
COPY .ruby-version Gemfile Gemfile.lock .node-version package.json package-lock.json ./
|
43
|
+
|
44
|
+
RUN <<STEPS
|
45
|
+
bundle install
|
46
|
+
npm install
|
47
|
+
rm -rf "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git
|
48
|
+
<% if settings.build_bootsnap %>
|
49
|
+
bundle exec bootsnap precompile --gemfile
|
50
|
+
<% end %>
|
51
|
+
STEPS
|
52
|
+
|
53
|
+
COPY . .
|
54
|
+
<% if settings.build_bootsnap %>
|
55
|
+
RUN bundle exec bootsnap precompile app/ lib/ slices/
|
56
|
+
<% end %>
|
57
|
+
FROM base
|
58
|
+
COPY --from=build "${BUNDLE_PATH}" "${BUNDLE_PATH}"
|
59
|
+
COPY --from=build /app /app
|
60
|
+
|
61
|
+
RUN <<STEPS
|
62
|
+
mkdir -p /app/log
|
63
|
+
mkdir -p /app/tmp
|
64
|
+
STEPS
|
65
|
+
|
66
|
+
RUN groupadd --system --gid 1000 app && \
|
67
|
+
useradd app --uid 1000 --gid 1000 --create-home --shell /bin/bash && \
|
68
|
+
chown -R app:app . public log tmp
|
69
|
+
|
70
|
+
USER 1000:1000
|
71
|
+
|
72
|
+
ENTRYPOINT ["/app/bin/docker/entrypoint"]
|
73
|
+
|
74
|
+
EXPOSE 2300
|
75
|
+
|
76
|
+
CMD ["bundle", "exec", "overmind", "start", "--port-step", "10", "--can-die", "migrate,assets"]
|
@@ -1,39 +1,49 @@
|
|
1
|
+
@media (prefers-reduced-motion: no-preference) {
|
2
|
+
@view-transition {
|
3
|
+
navigation: auto;
|
4
|
+
}
|
5
|
+
}
|
6
|
+
|
1
7
|
html {
|
2
8
|
height: 100%;
|
3
9
|
}
|
4
10
|
|
5
|
-
.
|
11
|
+
.site-page {
|
6
12
|
--color-pink: hsl(306, 81%, 77%);
|
7
13
|
--color-red: hsl(11, 86%, 46%);
|
8
14
|
--color-rose: hsl(338, 27%, 88%);
|
9
15
|
--color-white: hsl(0, 0%, 100%);
|
16
|
+
--color-black: hsl(0, 0%, 0%);
|
10
17
|
--font-family: Verdana;
|
11
18
|
|
12
|
-
background-color: var(--color-
|
19
|
+
background-color: var(--color-black);
|
13
20
|
background-image: linear-gradient(
|
14
21
|
0deg,
|
15
|
-
hsl(
|
16
|
-
hsl(
|
17
|
-
hsl(
|
18
|
-
hsl(
|
19
|
-
hsl(
|
20
|
-
hsl(
|
21
|
-
hsl(
|
22
|
-
hsl(
|
23
|
-
hsl(
|
24
|
-
hsl(
|
25
|
-
hsl(
|
26
|
-
hsl(
|
27
|
-
hsl(
|
28
|
-
hsl(300deg 100% 100%) 84%,
|
29
|
-
hsl(0deg 0% 100%) 100%
|
22
|
+
hsl(0deg 0% 0%) 0%,
|
23
|
+
hsl(262deg 82% 7%) 8%,
|
24
|
+
hsl(255deg 51% 10%) 17%,
|
25
|
+
hsl(250deg 39% 13%) 25%,
|
26
|
+
hsl(251deg 35% 15%) 33%,
|
27
|
+
hsl(252deg 31% 17%) 42%,
|
28
|
+
hsl(252deg 28% 19%) 50%,
|
29
|
+
hsl(253deg 25% 21%) 58%,
|
30
|
+
hsl(253deg 23% 24%) 67%,
|
31
|
+
hsl(253deg 22% 26%) 75%,
|
32
|
+
hsl(254deg 20% 28%) 83%,
|
33
|
+
hsl(254deg 19% 31%) 92%,
|
34
|
+
hsl(254deg 18% 33%) 100%
|
30
35
|
);
|
36
|
+
color: var(--color-white);
|
31
37
|
display: flex;
|
32
38
|
flex-direction: column;
|
33
39
|
font-family: var(--font-family);
|
34
40
|
justify-content: space-between;
|
35
41
|
min-height: 97vh;
|
36
42
|
|
43
|
+
.link {
|
44
|
+
color: var(--color-white);
|
45
|
+
}
|
46
|
+
|
37
47
|
.navigation {
|
38
48
|
align-items: center;
|
39
49
|
display: flex;
|
data/lib/hanamismith/templates/%project_name%/{slices/home → app}/templates/layouts/app.html.erb.erb
RENAMED
@@ -11,21 +11,23 @@
|
|
11
11
|
<meta name="author" content="Hanamismith">
|
12
12
|
<meta name="mobile-web-app-capable" content="yes">
|
13
13
|
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
14
|
+
<meta name="view-transition" content="same-origin">
|
14
15
|
|
15
|
-
<link title="<%= settings.project_label %>:
|
16
|
+
<link title="<%= settings.project_label %>: Favicon"
|
16
17
|
rel="icon"
|
17
18
|
href="https://alchemists.io/images/projects/hanamismith/icons/favicon.ico"
|
18
19
|
sizes="32x32">
|
19
|
-
<!--
|
20
|
+
<!-- icon -->
|
20
21
|
<link title="<%= settings.project_label %>: Apple Icon"
|
21
22
|
rel="apple-touch-icon"
|
22
23
|
href="https://alchemists.io/images/projects/hanamismith/icons/apple.png"
|
23
24
|
type="image/png">
|
24
25
|
<!-- manifest -->
|
26
|
+
|
25
27
|
<!-- stylesheet -->
|
26
28
|
</head>
|
27
29
|
|
28
|
-
<body class="
|
30
|
+
<body class="site-page">
|
29
31
|
<!-- yield -->
|
30
32
|
</body>
|
31
33
|
</html>
|
@@ -7,6 +7,12 @@ require "hanami"
|
|
7
7
|
Dry::Schema.load_extensions :monads
|
8
8
|
Dry::Validation.load_extensions :monads
|
9
9
|
|
10
|
+
prepare_container do |container|
|
11
|
+
container.config.component_dirs.dir "app" do |dir|
|
12
|
+
dir.memoize = -> component { component.key.start_with? "repositories." }
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
10
16
|
config.actions.content_security_policy.then do |csp|
|
11
17
|
csp[:manifest_src] = "'self'"
|
12
18
|
csp[:script_src] += " 'unsafe-eval' 'unsafe-inline' https://unpkg.com/"
|
@@ -18,7 +24,7 @@ require "hanami"
|
|
18
24
|
|
19
25
|
config.logger = config.logger.instance.add_backend(
|
20
26
|
colorize: false,
|
21
|
-
stream:
|
27
|
+
stream: root.join("log/development.log")
|
22
28
|
)
|
23
29
|
end
|
24
30
|
end
|
@@ -20,26 +20,15 @@
|
|
20
20
|
|
21
21
|
<footer class="footer">
|
22
22
|
<ul class="group">
|
23
|
+
<li><a href="https://alchemists.io/projects/hanamismith" class="link">Hanamismith</a></li>
|
23
24
|
<li><a href="https://hanamirb.org" class="link">Hanami</a></li>
|
24
|
-
|
25
|
-
<li>
|
26
|
-
<a href="https://guides.hanamirb.org/v2.0/introduction/getting-started" class="link">
|
27
|
-
Guides
|
28
|
-
</a>
|
29
|
-
</li>
|
30
|
-
|
25
|
+
<li><a href="https://guides.hanamirb.org" class="link">Guides</a></li>
|
31
26
|
<li><a href="https://discourse.hanamirb.org" class="link">Forum</a></li>
|
32
27
|
<li><a href="https://github.com/hanami/hanami/issues" class="link">Issues</a></li>
|
33
28
|
<li><a href="https://hanamirb.org/status/" class="link">Status</a></li>
|
34
29
|
<li><a href="https://github.com/hanami/hanami" class="link">Source</a></li>
|
35
30
|
</ul>
|
36
31
|
|
37
|
-
<ul class="group">
|
38
|
-
<li><a href="https://alchemists.io/projects/hanamismith" class="link">Hanamismith</a></li>
|
39
|
-
<li><a href="https://github.com/bkuhlmann/hanamismith/issues" class="link">Issues</a></li>
|
40
|
-
<li><a href="https://github.com/bkuhlmann/hanamismith" class="link">Source</a></li>
|
41
|
-
</ul>
|
42
|
-
|
43
32
|
<ul class="group">
|
44
33
|
<li>Ruby <!-- ruby_version --></li>
|
45
34
|
<li>Hanami <!-- hanami_version --></li>
|
@@ -26,10 +26,13 @@ Pathname.require_tree SPEC_ROOT.join("support/factories")
|
|
26
26
|
|
27
27
|
RSpec.configure do |config|
|
28
28
|
config.include Capybara::DSL, Capybara::RSpecMatchers, :web
|
29
|
-
config.include Dry::Monads[:result]
|
30
29
|
config.include Rack::Test::Methods, type: :request
|
31
30
|
|
32
|
-
config.
|
31
|
+
config.define_derived_metadata(file_path: %r(/spec/features/)) { it[:type] = :feature }
|
32
|
+
config.define_derived_metadata(file_path: %r(/spec/requests/)) { it[:type] = :request }
|
33
|
+
|
34
|
+
config.include_context "with application", type: :request
|
35
|
+
config.include_context "with application", type: :feature
|
33
36
|
|
34
37
|
databases = proc do
|
35
38
|
Hanami.app.slices.with_nested.prepend(Hanami.app).each.with_object Set.new do |slice, dbs|
|
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: 1.
|
4
|
+
version: 1.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brooke Kuhlmann
|
@@ -9,9 +9,9 @@ bindir: exe
|
|
9
9
|
cert_chain:
|
10
10
|
- |
|
11
11
|
-----BEGIN CERTIFICATE-----
|
12
|
-
|
12
|
+
MIIENjCCAp6gAwIBAgIBAjANBgkqhkiG9w0BAQsFADBBMQ8wDQYDVQQDDAZicm9v
|
13
13
|
a2UxGjAYBgoJkiaJk/IsZAEZFgphbGNoZW1pc3RzMRIwEAYKCZImiZPyLGQBGRYC
|
14
|
-
|
14
|
+
aW8wHhcNMjUwMzIyMTQ1NDE3WhcNMjYwMzIyMTQ1NDE3WjBBMQ8wDQYDVQQDDAZi
|
15
15
|
cm9va2UxGjAYBgoJkiaJk/IsZAEZFgphbGNoZW1pc3RzMRIwEAYKCZImiZPyLGQB
|
16
16
|
GRYCaW8wggGiMA0GCSqGSIb3DQEBAQUAA4IBjwAwggGKAoIBgQCro8tj5/E1Hg88
|
17
17
|
f4qfiwPVd2zJQHvdYt4GHVvuHRRgx4HGhJuNp+4BId08RBn7V6V1MW6MY3kezRBs
|
@@ -21,20 +21,19 @@ cert_chain:
|
|
21
21
|
QzzPxZBiRB1sgtbt1gUbVI262ZDq1gR+HxPFmp+Cgt7ZLIJZAtesQvtcMzseXpfn
|
22
22
|
hpmm0Sw22KGhRAy/mqHBRhDl5HqS1SJp2Ko3lcnpXeFResp0HNlt8NSu13vhC08j
|
23
23
|
GUHU9MyIXbFOsnp3K3ADrAVjPWop8EZkmUR3MV/CUm00w2cZHCSGiXl1KMpiVKvk
|
24
|
-
Ywr1gd2ZME4QLSo+EXUtLxDUa/
|
24
|
+
Ywr1gd2ZME4QLSo+EXUtLxDUa/W3xnBS8dBOuMMz02FPWYr3PN8CAwEAAaM5MDcw
|
25
25
|
CQYDVR0TBAIwADALBgNVHQ8EBAMCBLAwHQYDVR0OBBYEFAFgmv0tYMZnItuPycSM
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
gZGm4JqtuSg8pYjPeIJxS960owq+SfuC+jxqmRA54BisFCv/0VOJi7tiJVY=
|
26
|
+
F5wykJEVMA0GCSqGSIb3DQEBCwUAA4IBgQBlzRfyAYx/fCFjizS0Npxw4+4T3aYL
|
27
|
+
hbXoDqQRWjxuhFZcXUymhz3r8/Ltyri9lSof8grzB+8/+mrMVms7Gwt5qolk6zdn
|
28
|
+
FkySGy/jmpN12ldOHFbBEnyVBZNBvOBVb8zkkw8PhiHdBdXOUm4Jy39yJvBLfjcC
|
29
|
+
iM1aeWPmgPy1GbvZU+leRGZLt6dRIR9oCDXcWLRjha8xLMoz6Yn9fJBYexBA3iEz
|
30
|
+
h5S7pn4AX/JhVRiSyl8pAy4jEKydpyQrliH3gHkpNmUS/XDczP+9xX1bAB4BvqL2
|
31
|
+
NCxMcQ+hiJNqCKpPgHxaOOHZfIxV33logIuPEQ8NryHAwZ9ZWnwtYDE8kQGGKskI
|
32
|
+
Kkm6QT474hZl7MpwiJjWgW313CR7jUEekQahX1QxCxHPI7LSrKpno0plH3uWIOQp
|
33
|
+
KUlkb9uyACBgyRO52ZHiDVI8YvtU5O/j9pSes9/3XgvBeC1onx4qWp+uRX7eVsYS
|
34
|
+
GiijocTc3enZVrXERetaXj8/9XWs3fB3HWY=
|
36
35
|
-----END CERTIFICATE-----
|
37
|
-
date:
|
36
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
38
37
|
dependencies:
|
39
38
|
- !ruby/object:Gem::Dependency
|
40
39
|
name: cogger
|
@@ -70,14 +69,14 @@ dependencies:
|
|
70
69
|
requirements:
|
71
70
|
- - "~>"
|
72
71
|
- !ruby/object:Gem::Version
|
73
|
-
version: '1.
|
72
|
+
version: '1.8'
|
74
73
|
type: :runtime
|
75
74
|
prerelease: false
|
76
75
|
version_requirements: !ruby/object:Gem::Requirement
|
77
76
|
requirements:
|
78
77
|
- - "~>"
|
79
78
|
- !ruby/object:Gem::Version
|
80
|
-
version: '1.
|
79
|
+
version: '1.8'
|
81
80
|
- !ruby/object:Gem::Dependency
|
82
81
|
name: dry-schema
|
83
82
|
requirement: !ruby/object:Gem::Requirement
|
@@ -154,14 +153,14 @@ dependencies:
|
|
154
153
|
requirements:
|
155
154
|
- - "~>"
|
156
155
|
- !ruby/object:Gem::Version
|
157
|
-
version: '8.
|
156
|
+
version: '8.3'
|
158
157
|
type: :runtime
|
159
158
|
prerelease: false
|
160
159
|
version_requirements: !ruby/object:Gem::Requirement
|
161
160
|
requirements:
|
162
161
|
- - "~>"
|
163
162
|
- !ruby/object:Gem::Version
|
164
|
-
version: '8.
|
163
|
+
version: '8.3'
|
165
164
|
- !ruby/object:Gem::Dependency
|
166
165
|
name: runcom
|
167
166
|
requirement: !ruby/object:Gem::Requirement
|
@@ -224,8 +223,8 @@ executables:
|
|
224
223
|
- hanamismith
|
225
224
|
extensions: []
|
226
225
|
extra_rdoc_files:
|
227
|
-
- README.adoc
|
228
226
|
- LICENSE.adoc
|
227
|
+
- README.adoc
|
229
228
|
files:
|
230
229
|
- LICENSE.adoc
|
231
230
|
- README.adoc
|
@@ -248,6 +247,7 @@ files:
|
|
248
247
|
- lib/hanamismith/builders/git_hub/ci.rb
|
249
248
|
- lib/hanamismith/builders/icon.rb
|
250
249
|
- lib/hanamismith/builders/javascript.rb
|
250
|
+
- lib/hanamismith/builders/layout.rb
|
251
251
|
- lib/hanamismith/builders/node.rb
|
252
252
|
- lib/hanamismith/builders/puma/configuration.rb
|
253
253
|
- lib/hanamismith/builders/puma/procfile.rb
|
@@ -272,15 +272,19 @@ files:
|
|
272
272
|
- lib/hanamismith/extensions/npm.rb
|
273
273
|
- lib/hanamismith/templates/%project_name%/.circleci/config.yml.erb
|
274
274
|
- lib/hanamismith/templates/%project_name%/.github/workflows/ci.yml.erb
|
275
|
+
- lib/hanamismith/templates/%project_name%/Dockerfile.erb
|
275
276
|
- lib/hanamismith/templates/%project_name%/Guardfile.erb
|
276
277
|
- lib/hanamismith/templates/%project_name%/Procfile.dev.erb
|
277
278
|
- lib/hanamismith/templates/%project_name%/Procfile.erb
|
278
279
|
- lib/hanamismith/templates/%project_name%/app/action.rb.erb
|
280
|
+
- lib/hanamismith/templates/%project_name%/app/assets/css/app.css.erb
|
279
281
|
- lib/hanamismith/templates/%project_name%/app/assets/images/icon.svg.erb
|
282
|
+
- lib/hanamismith/templates/%project_name%/app/assets/js/app.js.erb
|
280
283
|
- lib/hanamismith/templates/%project_name%/app/assets/pwa/manifest.webmanifest.erb
|
281
284
|
- lib/hanamismith/templates/%project_name%/app/db/relation.rb.erb
|
282
285
|
- lib/hanamismith/templates/%project_name%/app/db/repository.rb.erb
|
283
286
|
- lib/hanamismith/templates/%project_name%/app/db/struct.rb.erb
|
287
|
+
- lib/hanamismith/templates/%project_name%/app/templates/layouts/app.html.erb.erb
|
284
288
|
- lib/hanamismith/templates/%project_name%/app/view.rb.erb
|
285
289
|
- lib/hanamismith/templates/%project_name%/bin/hanami.erb
|
286
290
|
- lib/hanamismith/templates/%project_name%/config.ru.erb
|
@@ -304,17 +308,13 @@ files:
|
|
304
308
|
- lib/hanamismith/templates/%project_name%/public/500.html.erb
|
305
309
|
- lib/hanamismith/templates/%project_name%/slices/health/action.rb.erb
|
306
310
|
- lib/hanamismith/templates/%project_name%/slices/health/actions/show.rb.erb
|
307
|
-
- lib/hanamismith/templates/%project_name%/slices/health/templates/layouts/app.html.erb.erb
|
308
311
|
- lib/hanamismith/templates/%project_name%/slices/health/templates/show.html.erb.erb
|
309
312
|
- lib/hanamismith/templates/%project_name%/slices/health/view.rb.erb
|
310
313
|
- lib/hanamismith/templates/%project_name%/slices/health/views/context.rb.erb
|
311
314
|
- lib/hanamismith/templates/%project_name%/slices/health/views/show.rb.erb
|
312
315
|
- lib/hanamismith/templates/%project_name%/slices/home/action.rb.erb
|
313
316
|
- lib/hanamismith/templates/%project_name%/slices/home/actions/show.rb.erb
|
314
|
-
- lib/hanamismith/templates/%project_name%/slices/home/assets/css/app.css.erb
|
315
|
-
- lib/hanamismith/templates/%project_name%/slices/home/assets/js/app.js.erb
|
316
317
|
- lib/hanamismith/templates/%project_name%/slices/home/repository.rb.erb
|
317
|
-
- lib/hanamismith/templates/%project_name%/slices/home/templates/layouts/app.html.erb.erb
|
318
318
|
- lib/hanamismith/templates/%project_name%/slices/home/templates/show.html.erb.erb
|
319
319
|
- lib/hanamismith/templates/%project_name%/slices/home/view.rb.erb
|
320
320
|
- lib/hanamismith/templates/%project_name%/slices/home/views/context.rb.erb
|
@@ -349,7 +349,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
349
349
|
- !ruby/object:Gem::Version
|
350
350
|
version: '0'
|
351
351
|
requirements: []
|
352
|
-
rubygems_version: 3.6.
|
352
|
+
rubygems_version: 3.6.7
|
353
353
|
specification_version: 4
|
354
354
|
summary: A command line interface for smithing Hanami projects.
|
355
355
|
test_files: []
|
metadata.gz.sig
CHANGED
Binary file
|
data/lib/hanamismith/templates/%project_name%/slices/health/templates/layouts/app.html.erb.erb
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
|
3
|
-
<html lang="en">
|
4
|
-
<head>
|
5
|
-
<meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no">
|
6
|
-
|
7
|
-
<title><!-- title --></title>
|
8
|
-
|
9
|
-
<meta charset="utf-8">
|
10
|
-
<meta name="description" content="A Hanamismith skeleton application.">
|
11
|
-
<meta name="author" content="Hanamismith">
|
12
|
-
<meta name="mobile-web-app-capable" content="yes">
|
13
|
-
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
14
|
-
|
15
|
-
<link title="<%= settings.project_label %>: Favorite Icon"
|
16
|
-
rel="icon"
|
17
|
-
href="https://alchemists.io/images/projects/hanamismith/icons/favicon.ico"
|
18
|
-
sizes="32x32">
|
19
|
-
<!-- favicon -->
|
20
|
-
<link title="<%= settings.project_label %>: Apple Icon"
|
21
|
-
rel="apple-touch-icon"
|
22
|
-
href="https://alchemists.io/images/projects/hanamismith/icons/apple.png"
|
23
|
-
type="image/png">
|
24
|
-
</head>
|
25
|
-
|
26
|
-
<body>
|
27
|
-
<!-- yield -->
|
28
|
-
</body>
|
29
|
-
</html>
|
File without changes
|