hanamismith 0.35.0 → 0.36.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/hanamismith.gemspec +3 -3
- data/lib/hanamismith/builders/asset.rb +1 -12
- data/lib/hanamismith/builders/binstub.rb +1 -12
- data/lib/hanamismith/builders/bundler.rb +63 -74
- data/lib/hanamismith/builders/caliber.rb +0 -4
- data/lib/hanamismith/builders/ci/circle.rb +1 -12
- data/lib/hanamismith/builders/ci/git_hub.rb +1 -12
- data/lib/hanamismith/builders/console.rb +7 -8
- data/lib/hanamismith/builders/core.rb +1 -10
- data/lib/hanamismith/builders/documentation/readme.rb +0 -44
- data/lib/hanamismith/builders/environments/development.rb +1 -12
- data/lib/hanamismith/builders/environments/test.rb +1 -12
- data/lib/hanamismith/builders/git/ignore.rb +5 -7
- data/lib/hanamismith/builders/icon.rb +1 -12
- data/lib/hanamismith/builders/javascript.rb +1 -12
- data/lib/hanamismith/builders/node.rb +1 -12
- data/lib/hanamismith/builders/providers/persistence.rb +1 -12
- data/lib/hanamismith/builders/providers/yjit.rb +1 -12
- data/lib/hanamismith/builders/puma/configuration.rb +1 -12
- data/lib/hanamismith/builders/puma/procfile.rb +1 -12
- data/lib/hanamismith/builders/pwa.rb +1 -12
- data/lib/hanamismith/builders/rack/attack.rb +1 -10
- data/lib/hanamismith/builders/rack/configuration.rb +1 -12
- data/lib/hanamismith/builders/rack/deflater.rb +1 -12
- data/lib/hanamismith/builders/rake.rb +0 -4
- data/lib/hanamismith/builders/refinement.rb +1 -12
- data/lib/hanamismith/builders/rspec/application_shared_context.rb +1 -12
- data/lib/hanamismith/builders/rspec/database.rb +1 -12
- data/lib/hanamismith/builders/rspec/factory.rb +1 -12
- data/lib/hanamismith/builders/rspec/hanami.rb +1 -12
- data/lib/hanamismith/builders/rspec/helper.rb +4 -4
- data/lib/hanamismith/builders/slices/health.rb +1 -10
- data/lib/hanamismith/builders/slices/home.rb +1 -10
- data/lib/hanamismith/builders/stylesheet.rb +1 -12
- data/lib/hanamismith/container.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +6 -6
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 22dafc23b98dbf53dd854dbabf9484c287c8609fdfec2028581563031eb81390
|
|
4
|
+
data.tar.gz: 77505a55424a853048c810b2a242f8517b1241cde761f70871a94b8463b5c766
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6c91d592f7a2341f9f4e075a1e5826197746ff1c37f86e81303c1d3ea1bf7ee1ab390ec4550fed5266a5e871a8f45ce8feaa713f43b04df6faaff4d739032c83
|
|
7
|
+
data.tar.gz: 29f677820904338bbc4cdb3368d1e17ee1b70e9cbbd9e3e256b416efc3af76af2d9e1a96903d249d7d788ac006f3c1b3a2e534264289ae7d5a0516f1f72f3d60
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
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.
|
|
5
|
+
spec.version = "0.36.0"
|
|
6
6
|
spec.authors = ["Brooke Kuhlmann"]
|
|
7
7
|
spec.email = ["brooke@alchemists.io"]
|
|
8
8
|
spec.homepage = "https://alchemists.io/projects/hanamismith"
|
|
@@ -27,11 +27,11 @@ Gem::Specification.new do |spec|
|
|
|
27
27
|
spec.add_dependency "containable", "~> 0.0"
|
|
28
28
|
spec.add_dependency "dry-monads", "~> 1.6"
|
|
29
29
|
spec.add_dependency "dry-schema", "~> 1.13"
|
|
30
|
-
spec.add_dependency "etcher", "~> 1.
|
|
30
|
+
spec.add_dependency "etcher", "~> 1.5"
|
|
31
31
|
spec.add_dependency "htmx", "~> 1.0"
|
|
32
32
|
spec.add_dependency "infusible", "~> 3.5"
|
|
33
33
|
spec.add_dependency "refinements", "~> 12.1"
|
|
34
|
-
spec.add_dependency "rubysmith", "~> 6.
|
|
34
|
+
spec.add_dependency "rubysmith", "~> 6.8"
|
|
35
35
|
spec.add_dependency "runcom", "~> 11.0"
|
|
36
36
|
spec.add_dependency "sod", "~> 0.8"
|
|
37
37
|
spec.add_dependency "spek", "~> 3.0"
|
|
@@ -5,25 +5,14 @@ require "refinements/struct"
|
|
|
5
5
|
module Hanamismith
|
|
6
6
|
module Builders
|
|
7
7
|
# Builds project skeleton for assets.
|
|
8
|
-
class Asset
|
|
8
|
+
class Asset < Rubysmith::Builders::Abstract
|
|
9
9
|
using Refinements::Struct
|
|
10
10
|
|
|
11
|
-
def self.call(...) = new(...).call
|
|
12
|
-
|
|
13
|
-
def initialize configuration, builder: Rubysmith::Builder
|
|
14
|
-
@configuration = configuration
|
|
15
|
-
@builder = builder
|
|
16
|
-
end
|
|
17
|
-
|
|
18
11
|
def call
|
|
19
12
|
path = "%project_name%/config/assets.js.erb"
|
|
20
13
|
builder.call(configuration.merge(template_path: path)).render
|
|
21
14
|
configuration
|
|
22
15
|
end
|
|
23
|
-
|
|
24
|
-
private
|
|
25
|
-
|
|
26
|
-
attr_reader :configuration, :builder
|
|
27
16
|
end
|
|
28
17
|
end
|
|
29
18
|
end
|
|
@@ -5,16 +5,9 @@ require "refinements/struct"
|
|
|
5
5
|
module Hanamismith
|
|
6
6
|
module Builders
|
|
7
7
|
# Builds project skeleton binstub.
|
|
8
|
-
class Binstub
|
|
8
|
+
class Binstub < Rubysmith::Builders::Abstract
|
|
9
9
|
using Refinements::Struct
|
|
10
10
|
|
|
11
|
-
def self.call(...) = new(...).call
|
|
12
|
-
|
|
13
|
-
def initialize configuration, builder: Rubysmith::Builder
|
|
14
|
-
@configuration = configuration
|
|
15
|
-
@builder = builder
|
|
16
|
-
end
|
|
17
|
-
|
|
18
11
|
def call
|
|
19
12
|
builder.call(configuration.merge(template_path: "%project_name%/bin/hanami.erb"))
|
|
20
13
|
.render
|
|
@@ -22,10 +15,6 @@ module Hanamismith
|
|
|
22
15
|
|
|
23
16
|
configuration
|
|
24
17
|
end
|
|
25
|
-
|
|
26
|
-
private
|
|
27
|
-
|
|
28
|
-
attr_reader :configuration, :builder
|
|
29
18
|
end
|
|
30
19
|
end
|
|
31
20
|
end
|
|
@@ -8,100 +8,70 @@ module Hanamismith
|
|
|
8
8
|
class Bundler < Rubysmith::Builders::Bundler
|
|
9
9
|
using Refinements::Struct
|
|
10
10
|
|
|
11
|
-
# :reek:TooManyStatements
|
|
12
11
|
def call
|
|
13
12
|
super
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
insert_development_and_test_group
|
|
13
|
+
|
|
14
|
+
%i[groups hanami main persistence quality devtest development test].each do |name|
|
|
15
|
+
__send__ :"insert_#{name}"
|
|
16
|
+
end
|
|
17
|
+
|
|
20
18
|
remove_zeitwerk
|
|
21
19
|
configuration
|
|
22
20
|
end
|
|
23
21
|
|
|
24
22
|
private
|
|
25
23
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
# rubocop:todo Metrics/MethodLength
|
|
29
|
-
def insert_main_dependencies
|
|
30
|
-
with_template.insert_after("source", %(gem "dry-monads", "~> 1.6"))
|
|
31
|
-
.insert_after("source", %(gem "dry-schema", "~> 1.13"\n))
|
|
32
|
-
.insert_after("source", %(gem "dry-types", "~> 1.7"\n))
|
|
33
|
-
.insert_after("source", %(gem "dry-validation", "~> 1.10"\n))
|
|
34
|
-
.insert_after("source", %(gem "hanami", "~> 2.1"\n))
|
|
35
|
-
.insert_after("source", %(gem "hanami-assets", "~> 2.1"\n))
|
|
36
|
-
.insert_after("source", %(gem "hanami-cli", "~> 2.1"\n))
|
|
37
|
-
.insert_after("source", %(gem "hanami-controller", "~> 2.1"\n))
|
|
38
|
-
.insert_after("source", %(gem "hanami-router", "~> 2.1"\n))
|
|
39
|
-
.insert_after("source", %(gem "hanami-validations", "~> 2.1"\n))
|
|
40
|
-
.insert_after("source", %(gem "hanami-view", "~> 2.1"\n))
|
|
41
|
-
.insert_after("source", %(gem "htmx", "~> 1.0"\n))
|
|
42
|
-
.insert_after("source", %(gem "puma", "~> 6.4"\n))
|
|
43
|
-
.insert_after("source", %(gem "rack-attack", "~> 6.7"\n))
|
|
44
|
-
end
|
|
45
|
-
# rubocop:enable Metrics/MethodLength
|
|
46
|
-
|
|
47
|
-
def insert_persistence_dependencies
|
|
48
|
-
with_template.insert_after("source", %(gem "pg", "~> 1.5"\n))
|
|
49
|
-
.insert_after("source", %(gem "rom", "~> 5.3"\n))
|
|
50
|
-
.insert_after("source", %(gem "rom-sql", "~> 3.6"\n))
|
|
51
|
-
.insert_after("source", %(\ngem "sequel", "~> 5.77"\n))
|
|
52
|
-
end
|
|
53
|
-
|
|
54
|
-
# rubocop:todo Metrics/MethodLength
|
|
55
|
-
def alter_groups
|
|
56
|
-
with_template.insert_after(/group :quality/, %( gem "rubocop-sequel", "~> 0.3"\n))
|
|
57
|
-
.insert_after(
|
|
58
|
-
/group :development do/,
|
|
59
|
-
%( gem "hanami-webconsole", "~> 2.1"\n)
|
|
60
|
-
)
|
|
61
|
-
.insert_after(/group :development do/, %( gem "localhost", "~> 1.2"\n))
|
|
62
|
-
.insert_after(/group :development do/, %( gem "rerun", "~> 0.14"\n))
|
|
63
|
-
.insert_after(/group :test/, %( gem "capybara", "~> 3.40"\n))
|
|
64
|
-
.insert_after(/group :test/, %( gem "cuprite", "~> 0.15"\n))
|
|
65
|
-
.insert_after(/group :test/, %( gem "database_cleaner-sequel", "~> 2.0"\n))
|
|
66
|
-
.insert_after(/group :test/, %( gem "launchy", "~> 3.0"\n))
|
|
67
|
-
.insert_after(/group :test/, %( gem "rack-test", "~> 2.1"\n))
|
|
68
|
-
.insert_after(/group :test/, %( gem "rom-factory", "~> 0.12"\n))
|
|
69
|
-
end
|
|
70
|
-
# rubocop:enable Metrics/MethodLength
|
|
71
|
-
|
|
72
|
-
def insert_development_group
|
|
73
|
-
return if configuration.markdown? || configuration.build_rake
|
|
24
|
+
def insert_groups
|
|
25
|
+
return unless configuration.build_minimum
|
|
74
26
|
|
|
75
|
-
with_template.
|
|
27
|
+
with_template.append <<~CONTENT
|
|
76
28
|
group :development do
|
|
77
|
-
gem "hanami-webconsole", "~> 2.1"
|
|
78
|
-
gem "localhost", "~> 1.2"
|
|
79
|
-
gem "rerun", "~> 0.14"
|
|
80
29
|
end
|
|
81
30
|
|
|
31
|
+
group :test do
|
|
32
|
+
end
|
|
82
33
|
CONTENT
|
|
83
34
|
end
|
|
84
35
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
36
|
+
def insert_hanami
|
|
37
|
+
with_template.insert_after "source", <<~CONTENT.strip
|
|
38
|
+
gem "hanami", "~> 2.1"
|
|
39
|
+
gem "hanami-assets", "~> 2.1"
|
|
40
|
+
gem "hanami-cli", "~> 2.1"
|
|
41
|
+
gem "hanami-controller", "~> 2.1"
|
|
42
|
+
gem "hanami-router", "~> 2.1"
|
|
43
|
+
gem "hanami-validations", "~> 2.1"
|
|
44
|
+
gem "hanami-view", "~> 2.1"
|
|
45
|
+
CONTENT
|
|
46
|
+
end
|
|
88
47
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
48
|
+
def insert_main
|
|
49
|
+
with_template.insert_after "source", <<~CONTENT
|
|
50
|
+
gem "dry-monads", "~> 1.6"
|
|
51
|
+
gem "dry-schema", "~> 1.13"
|
|
52
|
+
gem "dry-types", "~> 1.7"
|
|
53
|
+
gem "dry-validation", "~> 1.10"
|
|
54
|
+
gem "htmx", "~> 1.0"
|
|
55
|
+
gem "puma", "~> 6.4"
|
|
56
|
+
gem "rack-attack", "~> 6.7"
|
|
57
|
+
CONTENT
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
def insert_persistence
|
|
61
|
+
with_template.insert_after "source", <<~CONTENT
|
|
99
62
|
|
|
63
|
+
gem "pg", "~> 1.5"
|
|
64
|
+
gem "rom", "~> 5.3"
|
|
65
|
+
gem "rom-sql", "~> 3.6"
|
|
66
|
+
gem "sequel", "~> 5.77"
|
|
100
67
|
CONTENT
|
|
101
68
|
end
|
|
102
|
-
# rubocop:enable Metrics/MethodLength
|
|
103
69
|
|
|
104
|
-
def
|
|
70
|
+
def insert_quality
|
|
71
|
+
with_template.insert_after(/group :quality/, %( gem "rubocop-sequel", "~> 0.3"\n))
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
def insert_devtest
|
|
105
75
|
with_template.insert_before(/group :development/, <<~CONTENT)
|
|
106
76
|
|
|
107
77
|
group :development, :test do
|
|
@@ -111,6 +81,25 @@ module Hanamismith
|
|
|
111
81
|
CONTENT
|
|
112
82
|
end
|
|
113
83
|
|
|
84
|
+
def insert_development
|
|
85
|
+
with_template.insert_after(/group :development do/, <<~CONTENT.gsub("gem", " gem"))
|
|
86
|
+
gem "hanami-webconsole", "~> 2.1"
|
|
87
|
+
gem "localhost", "~> 1.2"
|
|
88
|
+
gem "rerun", "~> 0.14"
|
|
89
|
+
CONTENT
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
def insert_test
|
|
93
|
+
with_template.insert_after(/group :test/, <<~CONTENT.gsub("gem", " gem"))
|
|
94
|
+
gem "capybara", "~> 3.40"
|
|
95
|
+
gem "cuprite", "~> 0.15"
|
|
96
|
+
gem "database_cleaner-sequel", "~> 2.0"
|
|
97
|
+
gem "launchy", "~> 3.0"
|
|
98
|
+
gem "rack-test", "~> 2.1"
|
|
99
|
+
gem "rom-factory", "~> 0.12"
|
|
100
|
+
CONTENT
|
|
101
|
+
end
|
|
102
|
+
|
|
114
103
|
def remove_zeitwerk = with_template.replace(/.+zeitwerk.+\n\n/, "\n")
|
|
115
104
|
|
|
116
105
|
def with_template
|
|
@@ -6,16 +6,9 @@ module Hanamismith
|
|
|
6
6
|
module Builders
|
|
7
7
|
module CI
|
|
8
8
|
# Builds project skeleton Circle CI configuration.
|
|
9
|
-
class Circle
|
|
9
|
+
class Circle < Rubysmith::Builders::Abstract
|
|
10
10
|
using Refinements::Struct
|
|
11
11
|
|
|
12
|
-
def self.call(...) = new(...).call
|
|
13
|
-
|
|
14
|
-
def initialize configuration, builder: Rubysmith::Builder
|
|
15
|
-
@configuration = configuration
|
|
16
|
-
@builder = builder
|
|
17
|
-
end
|
|
18
|
-
|
|
19
12
|
def call
|
|
20
13
|
return configuration unless configuration.build_circle_ci
|
|
21
14
|
|
|
@@ -23,10 +16,6 @@ module Hanamismith
|
|
|
23
16
|
builder.call(configuration.merge(template_path: path)).render.replace(/\n\n\Z/, "\n")
|
|
24
17
|
configuration
|
|
25
18
|
end
|
|
26
|
-
|
|
27
|
-
private
|
|
28
|
-
|
|
29
|
-
attr_reader :configuration, :builder
|
|
30
19
|
end
|
|
31
20
|
end
|
|
32
21
|
end
|
|
@@ -6,16 +6,9 @@ module Hanamismith
|
|
|
6
6
|
module Builders
|
|
7
7
|
module CI
|
|
8
8
|
# Builds project skeleton GitHub CI configuration.
|
|
9
|
-
class GitHub
|
|
9
|
+
class GitHub < Rubysmith::Builders::Abstract
|
|
10
10
|
using Refinements::Struct
|
|
11
11
|
|
|
12
|
-
def self.call(...) = new(...).call
|
|
13
|
-
|
|
14
|
-
def initialize configuration, builder: Rubysmith::Builder
|
|
15
|
-
@configuration = configuration
|
|
16
|
-
@builder = builder
|
|
17
|
-
end
|
|
18
|
-
|
|
19
12
|
def call
|
|
20
13
|
return configuration unless configuration.build_git_hub_ci
|
|
21
14
|
|
|
@@ -23,10 +16,6 @@ module Hanamismith
|
|
|
23
16
|
builder.call(configuration.merge(template_path: path)).render.replace(/\n\n\Z/, "\n")
|
|
24
17
|
configuration
|
|
25
18
|
end
|
|
26
|
-
|
|
27
|
-
private
|
|
28
|
-
|
|
29
|
-
attr_reader :configuration, :builder
|
|
30
19
|
end
|
|
31
20
|
end
|
|
32
21
|
end
|
|
@@ -23,14 +23,13 @@ module Hanamismith
|
|
|
23
23
|
private
|
|
24
24
|
|
|
25
25
|
def add_irb_autocomplete
|
|
26
|
-
with_template.insert_before "IRB.start",
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
CODE
|
|
26
|
+
with_template.insert_before "IRB.start", <<~CODE
|
|
27
|
+
unless Hanami.env? :development, :test
|
|
28
|
+
ENV["IRB_USE_AUTOCOMPLETE"] ||= "false"
|
|
29
|
+
puts "IRB autocomplete disabled."
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
CODE
|
|
34
33
|
end
|
|
35
34
|
|
|
36
35
|
def with_template
|
|
@@ -5,16 +5,9 @@ require "refinements/struct"
|
|
|
5
5
|
module Hanamismith
|
|
6
6
|
module Builders
|
|
7
7
|
# Builds project skeleton foundation.
|
|
8
|
-
class Core
|
|
8
|
+
class Core < Rubysmith::Builders::Abstract
|
|
9
9
|
using Refinements::Struct
|
|
10
10
|
|
|
11
|
-
def self.call(...) = new(...).call
|
|
12
|
-
|
|
13
|
-
def initialize configuration, builder: Rubysmith::Builder
|
|
14
|
-
@configuration = configuration
|
|
15
|
-
@builder = builder
|
|
16
|
-
end
|
|
17
|
-
|
|
18
11
|
def call
|
|
19
12
|
private_methods.grep(/\Aadd_/).sort.each { |method| __send__ method }
|
|
20
13
|
configuration
|
|
@@ -22,8 +15,6 @@ module Hanamismith
|
|
|
22
15
|
|
|
23
16
|
private
|
|
24
17
|
|
|
25
|
-
attr_reader :configuration, :builder
|
|
26
|
-
|
|
27
18
|
def add_action
|
|
28
19
|
builder.call(configuration.merge(template_path: "%project_name%/app/action.rb.erb")).render
|
|
29
20
|
end
|
|
@@ -14,55 +14,11 @@ 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)
|
|
18
17
|
.replace("Rubysmith", "Hanamismith")
|
|
19
18
|
.replace("rubysmith", "hanamismith")
|
|
20
19
|
|
|
21
20
|
configuration
|
|
22
21
|
end
|
|
23
|
-
|
|
24
|
-
private
|
|
25
|
-
|
|
26
|
-
attr_reader :configuration, :builder
|
|
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
|
-
|
|
46
|
-
== Usage
|
|
47
|
-
CONTENT
|
|
48
|
-
end
|
|
49
|
-
|
|
50
|
-
def markdown_setup
|
|
51
|
-
<<~CONTENT.strip
|
|
52
|
-
Setup
|
|
53
|
-
|
|
54
|
-
To set up the project, run:
|
|
55
|
-
|
|
56
|
-
``` bash
|
|
57
|
-
git clone #{configuration.computed_project_url_source}
|
|
58
|
-
cd #{configuration.project_name}
|
|
59
|
-
bin/setup
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
## Usage
|
|
63
|
-
CONTENT
|
|
64
|
-
end
|
|
65
|
-
# rubocop:enable Metrics/MethodLength
|
|
66
22
|
end
|
|
67
23
|
end
|
|
68
24
|
end
|
|
@@ -6,16 +6,9 @@ module Hanamismith
|
|
|
6
6
|
module Builders
|
|
7
7
|
module Environments
|
|
8
8
|
# Builds development environment skeleton.
|
|
9
|
-
class Development
|
|
9
|
+
class Development < Rubysmith::Builders::Abstract
|
|
10
10
|
using Refinements::Struct
|
|
11
11
|
|
|
12
|
-
def self.call(...) = new(...).call
|
|
13
|
-
|
|
14
|
-
def initialize configuration, builder: Rubysmith::Builder
|
|
15
|
-
@configuration = configuration
|
|
16
|
-
@builder = builder
|
|
17
|
-
end
|
|
18
|
-
|
|
19
12
|
def call
|
|
20
13
|
builder.call(configuration.merge(template_path: "%project_name%/env.development.erb"))
|
|
21
14
|
.render
|
|
@@ -23,10 +16,6 @@ module Hanamismith
|
|
|
23
16
|
|
|
24
17
|
configuration
|
|
25
18
|
end
|
|
26
|
-
|
|
27
|
-
private
|
|
28
|
-
|
|
29
|
-
attr_reader :configuration, :builder
|
|
30
19
|
end
|
|
31
20
|
end
|
|
32
21
|
end
|
|
@@ -6,16 +6,9 @@ module Hanamismith
|
|
|
6
6
|
module Builders
|
|
7
7
|
module Environments
|
|
8
8
|
# Builds test environment skeleton.
|
|
9
|
-
class Test
|
|
9
|
+
class Test < Rubysmith::Builders::Abstract
|
|
10
10
|
using Refinements::Struct
|
|
11
11
|
|
|
12
|
-
def self.call(...) = new(...).call
|
|
13
|
-
|
|
14
|
-
def initialize configuration, builder: Rubysmith::Builder
|
|
15
|
-
@configuration = configuration
|
|
16
|
-
@builder = builder
|
|
17
|
-
end
|
|
18
|
-
|
|
19
12
|
def call
|
|
20
13
|
builder.call(configuration.merge(template_path: "%project_name%/env.test.erb"))
|
|
21
14
|
.render
|
|
@@ -23,10 +16,6 @@ module Hanamismith
|
|
|
23
16
|
|
|
24
17
|
configuration
|
|
25
18
|
end
|
|
26
|
-
|
|
27
|
-
private
|
|
28
|
-
|
|
29
|
-
attr_reader :configuration, :builder
|
|
30
19
|
end
|
|
31
20
|
end
|
|
32
21
|
end
|
|
@@ -14,16 +14,14 @@ module Hanamismith
|
|
|
14
14
|
|
|
15
15
|
super
|
|
16
16
|
builder.call(configuration.merge(template_path: "%project_name%/.gitignore.erb"))
|
|
17
|
-
.insert_before
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
.insert_before "tmp\n", <<~CONTENT
|
|
18
|
+
node_modules
|
|
19
|
+
public/assets
|
|
20
|
+
public/assets.json
|
|
21
|
+
CONTENT
|
|
20
22
|
|
|
21
23
|
configuration
|
|
22
24
|
end
|
|
23
|
-
|
|
24
|
-
private
|
|
25
|
-
|
|
26
|
-
attr_reader :configuration, :builder
|
|
27
25
|
end
|
|
28
26
|
end
|
|
29
27
|
end
|
|
@@ -5,25 +5,14 @@ require "refinements/struct"
|
|
|
5
5
|
module Hanamismith
|
|
6
6
|
module Builders
|
|
7
7
|
# Builds project skeleton SVG icon.
|
|
8
|
-
class Icon
|
|
8
|
+
class Icon < Rubysmith::Builders::Abstract
|
|
9
9
|
using Refinements::Struct
|
|
10
10
|
|
|
11
|
-
def self.call(...) = new(...).call
|
|
12
|
-
|
|
13
|
-
def initialize configuration, builder: Rubysmith::Builder
|
|
14
|
-
@configuration = configuration
|
|
15
|
-
@builder = builder
|
|
16
|
-
end
|
|
17
|
-
|
|
18
11
|
def call
|
|
19
12
|
path = "%project_name%/app/assets/images/icon.svg.erb"
|
|
20
13
|
builder.call(configuration.merge(template_path: path)).render
|
|
21
14
|
configuration
|
|
22
15
|
end
|
|
23
|
-
|
|
24
|
-
private
|
|
25
|
-
|
|
26
|
-
attr_reader :configuration, :builder
|
|
27
16
|
end
|
|
28
17
|
end
|
|
29
18
|
end
|
|
@@ -5,25 +5,14 @@ require "refinements/struct"
|
|
|
5
5
|
module Hanamismith
|
|
6
6
|
module Builders
|
|
7
7
|
# Builds project skeleton javascript.
|
|
8
|
-
class Javascript
|
|
8
|
+
class Javascript < Rubysmith::Builders::Abstract
|
|
9
9
|
using Refinements::Struct
|
|
10
10
|
|
|
11
|
-
def self.call(...) = new(...).call
|
|
12
|
-
|
|
13
|
-
def initialize configuration, builder: Rubysmith::Builder
|
|
14
|
-
@configuration = configuration
|
|
15
|
-
@builder = builder
|
|
16
|
-
end
|
|
17
|
-
|
|
18
11
|
def call
|
|
19
12
|
path = "%project_name%/slices/home/assets/js/app.js.erb"
|
|
20
13
|
builder.call(configuration.merge(template_path: path)).render
|
|
21
14
|
configuration
|
|
22
15
|
end
|
|
23
|
-
|
|
24
|
-
private
|
|
25
|
-
|
|
26
|
-
attr_reader :configuration, :builder
|
|
27
16
|
end
|
|
28
17
|
end
|
|
29
18
|
end
|
|
@@ -5,25 +5,14 @@ require "refinements/struct"
|
|
|
5
5
|
module Hanamismith
|
|
6
6
|
module Builders
|
|
7
7
|
# Builds project skeleton for Node.
|
|
8
|
-
class Node
|
|
8
|
+
class Node < Rubysmith::Builders::Abstract
|
|
9
9
|
using Refinements::Struct
|
|
10
10
|
|
|
11
|
-
def self.call(...) = new(...).call
|
|
12
|
-
|
|
13
|
-
def initialize configuration, builder: Rubysmith::Builder
|
|
14
|
-
@configuration = configuration
|
|
15
|
-
@builder = builder
|
|
16
|
-
end
|
|
17
|
-
|
|
18
11
|
def call
|
|
19
12
|
builder.call(configuration.merge(template_path: "%project_name%/package.json.erb")).render
|
|
20
13
|
builder.call(configuration.merge(template_path: "%project_name%/.node-version.erb")).render
|
|
21
14
|
configuration
|
|
22
15
|
end
|
|
23
|
-
|
|
24
|
-
private
|
|
25
|
-
|
|
26
|
-
attr_reader :configuration, :builder
|
|
27
16
|
end
|
|
28
17
|
end
|
|
29
18
|
end
|
|
@@ -6,25 +6,14 @@ module Hanamismith
|
|
|
6
6
|
module Builders
|
|
7
7
|
module Providers
|
|
8
8
|
# Builds project skeleton for persistence provider.
|
|
9
|
-
class Persistence
|
|
9
|
+
class Persistence < Rubysmith::Builders::Abstract
|
|
10
10
|
using Refinements::Struct
|
|
11
11
|
|
|
12
|
-
def self.call(...) = new(...).call
|
|
13
|
-
|
|
14
|
-
def initialize configuration, builder: Rubysmith::Builder
|
|
15
|
-
@configuration = configuration
|
|
16
|
-
@builder = builder
|
|
17
|
-
end
|
|
18
|
-
|
|
19
12
|
def call
|
|
20
13
|
path = "%project_name%/config/providers/persistence.rb.erb"
|
|
21
14
|
builder.call(configuration.merge(template_path: path)).render
|
|
22
15
|
configuration
|
|
23
16
|
end
|
|
24
|
-
|
|
25
|
-
private
|
|
26
|
-
|
|
27
|
-
attr_reader :configuration, :builder
|
|
28
17
|
end
|
|
29
18
|
end
|
|
30
19
|
end
|
|
@@ -6,25 +6,14 @@ module Hanamismith
|
|
|
6
6
|
module Builders
|
|
7
7
|
module Providers
|
|
8
8
|
# Builds project skeleton for YJIT provider.
|
|
9
|
-
class YJIT
|
|
9
|
+
class YJIT < Rubysmith::Builders::Abstract
|
|
10
10
|
using Refinements::Struct
|
|
11
11
|
|
|
12
|
-
def self.call(...) = new(...).call
|
|
13
|
-
|
|
14
|
-
def initialize configuration, builder: Rubysmith::Builder
|
|
15
|
-
@configuration = configuration
|
|
16
|
-
@builder = builder
|
|
17
|
-
end
|
|
18
|
-
|
|
19
12
|
def call
|
|
20
13
|
path = "%project_name%/config/providers/yjit.rb.erb"
|
|
21
14
|
builder.call(configuration.merge(template_path: path)).render
|
|
22
15
|
configuration
|
|
23
16
|
end
|
|
24
|
-
|
|
25
|
-
private
|
|
26
|
-
|
|
27
|
-
attr_reader :configuration, :builder
|
|
28
17
|
end
|
|
29
18
|
end
|
|
30
19
|
end
|
|
@@ -6,26 +6,15 @@ module Hanamismith
|
|
|
6
6
|
module Builders
|
|
7
7
|
module Puma
|
|
8
8
|
# Builds project skeleton Puma configuration.
|
|
9
|
-
class Configuration
|
|
9
|
+
class Configuration < Rubysmith::Builders::Abstract
|
|
10
10
|
using Refinements::Struct
|
|
11
11
|
|
|
12
|
-
def self.call(...) = new(...).call
|
|
13
|
-
|
|
14
|
-
def initialize configuration, builder: Rubysmith::Builder
|
|
15
|
-
@configuration = configuration
|
|
16
|
-
@builder = builder
|
|
17
|
-
end
|
|
18
|
-
|
|
19
12
|
def call
|
|
20
13
|
builder.call(configuration.merge(template_path: "%project_name%/config/puma.rb.erb"))
|
|
21
14
|
.render
|
|
22
15
|
|
|
23
16
|
configuration
|
|
24
17
|
end
|
|
25
|
-
|
|
26
|
-
private
|
|
27
|
-
|
|
28
|
-
attr_reader :configuration, :builder
|
|
29
18
|
end
|
|
30
19
|
end
|
|
31
20
|
end
|
|
@@ -6,25 +6,14 @@ module Hanamismith
|
|
|
6
6
|
module Builders
|
|
7
7
|
module Puma
|
|
8
8
|
# Builds project skeleton Puma Procfile for production and development environments.
|
|
9
|
-
class Procfile
|
|
9
|
+
class Procfile < Rubysmith::Builders::Abstract
|
|
10
10
|
using Refinements::Struct
|
|
11
11
|
|
|
12
|
-
def self.call(...) = new(...).call
|
|
13
|
-
|
|
14
|
-
def initialize configuration, builder: Rubysmith::Builder
|
|
15
|
-
@configuration = configuration
|
|
16
|
-
@builder = builder
|
|
17
|
-
end
|
|
18
|
-
|
|
19
12
|
def call
|
|
20
13
|
builder.call(configuration.merge(template_path: "%project_name%/Procfile.erb")).render
|
|
21
14
|
builder.call(configuration.merge(template_path: "%project_name%/Procfile.dev.erb")).render
|
|
22
15
|
configuration
|
|
23
16
|
end
|
|
24
|
-
|
|
25
|
-
private
|
|
26
|
-
|
|
27
|
-
attr_reader :configuration, :builder
|
|
28
17
|
end
|
|
29
18
|
end
|
|
30
19
|
end
|
|
@@ -5,25 +5,14 @@ require "refinements/struct"
|
|
|
5
5
|
module Hanamismith
|
|
6
6
|
module Builders
|
|
7
7
|
# Builds project skeleton Progressive Web Application (PWA) manifest.
|
|
8
|
-
class PWA
|
|
8
|
+
class PWA < Rubysmith::Builders::Abstract
|
|
9
9
|
using Refinements::Struct
|
|
10
10
|
|
|
11
|
-
def self.call(...) = new(...).call
|
|
12
|
-
|
|
13
|
-
def initialize configuration, builder: Rubysmith::Builder
|
|
14
|
-
@configuration = configuration
|
|
15
|
-
@builder = builder
|
|
16
|
-
end
|
|
17
|
-
|
|
18
11
|
def call
|
|
19
12
|
path = "%project_name%/app/assets/pwa/manifest.webmanifest.erb"
|
|
20
13
|
builder.call(configuration.merge(template_path: path)).render
|
|
21
14
|
configuration
|
|
22
15
|
end
|
|
23
|
-
|
|
24
|
-
private
|
|
25
|
-
|
|
26
|
-
attr_reader :configuration, :builder
|
|
27
16
|
end
|
|
28
17
|
end
|
|
29
18
|
end
|
|
@@ -6,16 +6,9 @@ module Hanamismith
|
|
|
6
6
|
module Builders
|
|
7
7
|
module Rack
|
|
8
8
|
# Builds project skeleton.
|
|
9
|
-
class Attack
|
|
9
|
+
class Attack < Rubysmith::Builders::Abstract
|
|
10
10
|
using Refinements::Struct
|
|
11
11
|
|
|
12
|
-
def self.call(...) = new(...).call
|
|
13
|
-
|
|
14
|
-
def initialize configuration, builder: Rubysmith::Builder
|
|
15
|
-
@configuration = configuration
|
|
16
|
-
@builder = builder
|
|
17
|
-
end
|
|
18
|
-
|
|
19
12
|
def call
|
|
20
13
|
add_configuration
|
|
21
14
|
add_middleware
|
|
@@ -24,8 +17,6 @@ module Hanamismith
|
|
|
24
17
|
|
|
25
18
|
private
|
|
26
19
|
|
|
27
|
-
attr_reader :configuration, :builder
|
|
28
|
-
|
|
29
20
|
def add_configuration
|
|
30
21
|
template_path = "%project_name%/config/initializers/rack_attack.rb.erb"
|
|
31
22
|
builder.call(configuration.merge(template_path:)).render
|
|
@@ -6,24 +6,13 @@ module Hanamismith
|
|
|
6
6
|
module Builders
|
|
7
7
|
module Rack
|
|
8
8
|
# Builds project skeleton.
|
|
9
|
-
class Configuration
|
|
9
|
+
class Configuration < Rubysmith::Builders::Abstract
|
|
10
10
|
using Refinements::Struct
|
|
11
11
|
|
|
12
|
-
def self.call(...) = new(...).call
|
|
13
|
-
|
|
14
|
-
def initialize configuration, builder: Rubysmith::Builder
|
|
15
|
-
@configuration = configuration
|
|
16
|
-
@builder = builder
|
|
17
|
-
end
|
|
18
|
-
|
|
19
12
|
def call
|
|
20
13
|
builder.call(configuration.merge(template_path: "%project_name%/config.ru.erb")).render
|
|
21
14
|
configuration
|
|
22
15
|
end
|
|
23
|
-
|
|
24
|
-
private
|
|
25
|
-
|
|
26
|
-
attr_reader :configuration, :builder
|
|
27
16
|
end
|
|
28
17
|
end
|
|
29
18
|
end
|
|
@@ -6,26 +6,15 @@ module Hanamismith
|
|
|
6
6
|
module Builders
|
|
7
7
|
module Rack
|
|
8
8
|
# Builds project skeleton.
|
|
9
|
-
class Deflater
|
|
9
|
+
class Deflater < Rubysmith::Builders::Abstract
|
|
10
10
|
using Refinements::Struct
|
|
11
11
|
|
|
12
|
-
def self.call(...) = new(...).call
|
|
13
|
-
|
|
14
|
-
def initialize configuration, builder: Rubysmith::Builder
|
|
15
|
-
@configuration = configuration
|
|
16
|
-
@builder = builder
|
|
17
|
-
end
|
|
18
|
-
|
|
19
12
|
def call
|
|
20
13
|
builder.call(configuration.merge(template_path: "%project_name%/config/app.rb.erb"))
|
|
21
14
|
.insert_after(/Rack::Attack/, " config.middleware.use Rack::Deflater\n")
|
|
22
15
|
|
|
23
16
|
configuration
|
|
24
17
|
end
|
|
25
|
-
|
|
26
|
-
private
|
|
27
|
-
|
|
28
|
-
attr_reader :configuration, :builder
|
|
29
18
|
end
|
|
30
19
|
end
|
|
31
20
|
end
|
|
@@ -5,16 +5,9 @@ require "refinements/struct"
|
|
|
5
5
|
module Hanamismith
|
|
6
6
|
module Builders
|
|
7
7
|
# Builds project skeleton foundation.
|
|
8
|
-
class Refinement
|
|
8
|
+
class Refinement < Rubysmith::Builders::Abstract
|
|
9
9
|
using Refinements::Struct
|
|
10
10
|
|
|
11
|
-
def self.call(...) = new(...).call
|
|
12
|
-
|
|
13
|
-
def initialize configuration, builder: Rubysmith::Builder
|
|
14
|
-
@configuration = configuration
|
|
15
|
-
@builder = builder
|
|
16
|
-
end
|
|
17
|
-
|
|
18
11
|
def call
|
|
19
12
|
%w[
|
|
20
13
|
%project_name%/lib/%project_path%/refines/actions/response.rb.erb
|
|
@@ -25,10 +18,6 @@ module Hanamismith
|
|
|
25
18
|
|
|
26
19
|
configuration
|
|
27
20
|
end
|
|
28
|
-
|
|
29
|
-
private
|
|
30
|
-
|
|
31
|
-
attr_reader :configuration, :builder
|
|
32
21
|
end
|
|
33
22
|
end
|
|
34
23
|
end
|
|
@@ -6,16 +6,9 @@ module Hanamismith
|
|
|
6
6
|
module Builders
|
|
7
7
|
module RSpec
|
|
8
8
|
# Builds project skeleton RSpec application shared context.
|
|
9
|
-
class ApplicationSharedContext
|
|
9
|
+
class ApplicationSharedContext < Rubysmith::Builders::Abstract
|
|
10
10
|
using Refinements::Struct
|
|
11
11
|
|
|
12
|
-
def self.call(...) = new(...).call
|
|
13
|
-
|
|
14
|
-
def initialize configuration, builder: Rubysmith::Builder
|
|
15
|
-
@configuration = configuration
|
|
16
|
-
@builder = builder
|
|
17
|
-
end
|
|
18
|
-
|
|
19
12
|
def call
|
|
20
13
|
return configuration unless configuration.build_rspec
|
|
21
14
|
|
|
@@ -24,10 +17,6 @@ module Hanamismith
|
|
|
24
17
|
|
|
25
18
|
configuration
|
|
26
19
|
end
|
|
27
|
-
|
|
28
|
-
private
|
|
29
|
-
|
|
30
|
-
attr_reader :configuration, :builder
|
|
31
20
|
end
|
|
32
21
|
end
|
|
33
22
|
end
|
|
@@ -6,16 +6,9 @@ module Hanamismith
|
|
|
6
6
|
module Builders
|
|
7
7
|
module RSpec
|
|
8
8
|
# Builds project skeleton RSpec application database support.
|
|
9
|
-
class Database
|
|
9
|
+
class Database < Rubysmith::Builders::Abstract
|
|
10
10
|
using Refinements::Struct
|
|
11
11
|
|
|
12
|
-
def self.call(...) = new(...).call
|
|
13
|
-
|
|
14
|
-
def initialize configuration, builder: Rubysmith::Builder
|
|
15
|
-
@configuration = configuration
|
|
16
|
-
@builder = builder
|
|
17
|
-
end
|
|
18
|
-
|
|
19
12
|
def call
|
|
20
13
|
return configuration unless configuration.build_rspec
|
|
21
14
|
|
|
@@ -24,10 +17,6 @@ module Hanamismith
|
|
|
24
17
|
|
|
25
18
|
configuration
|
|
26
19
|
end
|
|
27
|
-
|
|
28
|
-
private
|
|
29
|
-
|
|
30
|
-
attr_reader :configuration, :builder
|
|
31
20
|
end
|
|
32
21
|
end
|
|
33
22
|
end
|
|
@@ -6,16 +6,9 @@ module Hanamismith
|
|
|
6
6
|
module Builders
|
|
7
7
|
module RSpec
|
|
8
8
|
# Builds project skeleton RSpec application database support.
|
|
9
|
-
class Factory
|
|
9
|
+
class Factory < Rubysmith::Builders::Abstract
|
|
10
10
|
using Refinements::Struct
|
|
11
11
|
|
|
12
|
-
def self.call(...) = new(...).call
|
|
13
|
-
|
|
14
|
-
def initialize configuration, builder: Rubysmith::Builder
|
|
15
|
-
@configuration = configuration
|
|
16
|
-
@builder = builder
|
|
17
|
-
end
|
|
18
|
-
|
|
19
12
|
def call
|
|
20
13
|
return configuration unless configuration.build_rspec
|
|
21
14
|
|
|
@@ -24,10 +17,6 @@ module Hanamismith
|
|
|
24
17
|
|
|
25
18
|
configuration
|
|
26
19
|
end
|
|
27
|
-
|
|
28
|
-
private
|
|
29
|
-
|
|
30
|
-
attr_reader :configuration, :builder
|
|
31
20
|
end
|
|
32
21
|
end
|
|
33
22
|
end
|
|
@@ -6,16 +6,9 @@ module Hanamismith
|
|
|
6
6
|
module Builders
|
|
7
7
|
module RSpec
|
|
8
8
|
# Builds project skeleton RSpec helper.
|
|
9
|
-
class Hanami
|
|
9
|
+
class Hanami < Rubysmith::Builders::Abstract
|
|
10
10
|
using Refinements::Struct
|
|
11
11
|
|
|
12
|
-
def self.call(...) = new(...).call
|
|
13
|
-
|
|
14
|
-
def initialize configuration, builder: Rubysmith::Builder
|
|
15
|
-
@configuration = configuration
|
|
16
|
-
@builder = builder
|
|
17
|
-
end
|
|
18
|
-
|
|
19
12
|
def call
|
|
20
13
|
return configuration unless configuration.build_rspec
|
|
21
14
|
|
|
@@ -24,10 +17,6 @@ module Hanamismith
|
|
|
24
17
|
|
|
25
18
|
configuration
|
|
26
19
|
end
|
|
27
|
-
|
|
28
|
-
private
|
|
29
|
-
|
|
30
|
-
attr_reader :configuration, :builder
|
|
31
20
|
end
|
|
32
21
|
end
|
|
33
22
|
end
|
|
@@ -11,7 +11,7 @@ module Hanamismith
|
|
|
11
11
|
|
|
12
12
|
def initialize(...)
|
|
13
13
|
super
|
|
14
|
-
@
|
|
14
|
+
@template = builder.call configuration.merge(
|
|
15
15
|
template_path: "%project_name%/spec/spec_helper.rb.erb"
|
|
16
16
|
)
|
|
17
17
|
end
|
|
@@ -27,14 +27,14 @@ module Hanamismith
|
|
|
27
27
|
|
|
28
28
|
private
|
|
29
29
|
|
|
30
|
-
attr_reader :
|
|
30
|
+
attr_reader :template
|
|
31
31
|
|
|
32
32
|
def remove_project_requirement
|
|
33
|
-
|
|
33
|
+
template.replace(/require.+#{configuration.project_name}.+\n/, "")
|
|
34
34
|
end
|
|
35
35
|
|
|
36
36
|
def disable_simple_cov_eval
|
|
37
|
-
|
|
37
|
+
template.replace(
|
|
38
38
|
/enable_coverage_for_eval\n/,
|
|
39
39
|
"# TODO: Enable once this issue is fixed: " \
|
|
40
40
|
"https://bugs.ruby-lang.org/issues/19363.\n " \
|
|
@@ -6,16 +6,9 @@ module Hanamismith
|
|
|
6
6
|
module Builders
|
|
7
7
|
module Slices
|
|
8
8
|
# Builds health slice skeleton.
|
|
9
|
-
class Health
|
|
9
|
+
class Health < Rubysmith::Builders::Abstract
|
|
10
10
|
using Refinements::Struct
|
|
11
11
|
|
|
12
|
-
def self.call(...) = new(...).call
|
|
13
|
-
|
|
14
|
-
def initialize configuration, builder: Rubysmith::Builder
|
|
15
|
-
@configuration = configuration
|
|
16
|
-
@builder = builder
|
|
17
|
-
end
|
|
18
|
-
|
|
19
12
|
def call
|
|
20
13
|
private_methods.grep(/\Aadd_/).sort.each { |method| __send__ method }
|
|
21
14
|
configuration
|
|
@@ -23,8 +16,6 @@ module Hanamismith
|
|
|
23
16
|
|
|
24
17
|
private
|
|
25
18
|
|
|
26
|
-
attr_reader :configuration, :builder
|
|
27
|
-
|
|
28
19
|
def add_configuration
|
|
29
20
|
path = "%project_name%/config/slices/health.rb.erb"
|
|
30
21
|
builder.call(configuration.merge(template_path: path)).render
|
|
@@ -6,16 +6,9 @@ module Hanamismith
|
|
|
6
6
|
module Builders
|
|
7
7
|
module Slices
|
|
8
8
|
# Builds home slice skeleton.
|
|
9
|
-
class Home
|
|
9
|
+
class Home < Rubysmith::Builders::Abstract
|
|
10
10
|
using Refinements::Struct
|
|
11
11
|
|
|
12
|
-
def self.call(...) = new(...).call
|
|
13
|
-
|
|
14
|
-
def initialize configuration, builder: Rubysmith::Builder
|
|
15
|
-
@configuration = configuration
|
|
16
|
-
@builder = builder
|
|
17
|
-
end
|
|
18
|
-
|
|
19
12
|
def call
|
|
20
13
|
private_methods.grep(/\Aadd_/).sort.each { |method| __send__ method }
|
|
21
14
|
configuration
|
|
@@ -23,8 +16,6 @@ module Hanamismith
|
|
|
23
16
|
|
|
24
17
|
private
|
|
25
18
|
|
|
26
|
-
attr_reader :configuration, :builder
|
|
27
|
-
|
|
28
19
|
def add_configuration
|
|
29
20
|
path = "%project_name%/config/slices/home.rb.erb"
|
|
30
21
|
builder.call(configuration.merge(template_path: path)).render
|
|
@@ -5,25 +5,14 @@ require "refinements/struct"
|
|
|
5
5
|
module Hanamismith
|
|
6
6
|
module Builders
|
|
7
7
|
# Builds project skeleton stylesheet.
|
|
8
|
-
class Stylesheet
|
|
8
|
+
class Stylesheet < Rubysmith::Builders::Abstract
|
|
9
9
|
using Refinements::Struct
|
|
10
10
|
|
|
11
|
-
def self.call(...) = new(...).call
|
|
12
|
-
|
|
13
|
-
def initialize configuration, builder: Rubysmith::Builder
|
|
14
|
-
@configuration = configuration
|
|
15
|
-
@builder = builder
|
|
16
|
-
end
|
|
17
|
-
|
|
18
11
|
def call
|
|
19
12
|
path = "%project_name%/slices/home/assets/css/app.css.erb"
|
|
20
13
|
builder.call(configuration.merge(template_path: path)).render
|
|
21
14
|
configuration
|
|
22
15
|
end
|
|
23
|
-
|
|
24
|
-
private
|
|
25
|
-
|
|
26
|
-
attr_reader :configuration, :builder
|
|
27
16
|
end
|
|
28
17
|
end
|
|
29
18
|
end
|
|
@@ -21,7 +21,6 @@ module Hanamismith
|
|
|
21
21
|
model: Rubysmith::Configuration::Model
|
|
22
22
|
|
|
23
23
|
registry.add_loader(Etcher::Loaders::YAML.new(self[:defaults_path]))
|
|
24
|
-
.add_transformer(Rubysmith::Configuration::Transformers::CurrentTime)
|
|
25
24
|
.add_transformer(Rubysmith::Configuration::Transformers::GitHubUser.new)
|
|
26
25
|
.add_transformer(Rubysmith::Configuration::Transformers::GitEmail.new)
|
|
27
26
|
.add_transformer(Rubysmith::Configuration::Transformers::GitUser.new)
|
|
@@ -32,6 +31,7 @@ module Hanamismith
|
|
|
32
31
|
)
|
|
33
32
|
)
|
|
34
33
|
.add_transformer(Rubysmith::Configuration::Transformers::TargetRoot)
|
|
34
|
+
.add_transformer(Etcher::Transformers::Time.new)
|
|
35
35
|
end
|
|
36
36
|
|
|
37
37
|
register(:specification) { Spek::Loader.call "#{__dir__}/../../hanamismith.gemspec" }
|
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.
|
|
4
|
+
version: 0.36.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: 2024-05-
|
|
38
|
+
date: 2024-05-25 00:00:00.000000000 Z
|
|
39
39
|
dependencies:
|
|
40
40
|
- !ruby/object:Gem::Dependency
|
|
41
41
|
name: cogger
|
|
@@ -99,14 +99,14 @@ dependencies:
|
|
|
99
99
|
requirements:
|
|
100
100
|
- - "~>"
|
|
101
101
|
- !ruby/object:Gem::Version
|
|
102
|
-
version: '1.
|
|
102
|
+
version: '1.5'
|
|
103
103
|
type: :runtime
|
|
104
104
|
prerelease: false
|
|
105
105
|
version_requirements: !ruby/object:Gem::Requirement
|
|
106
106
|
requirements:
|
|
107
107
|
- - "~>"
|
|
108
108
|
- !ruby/object:Gem::Version
|
|
109
|
-
version: '1.
|
|
109
|
+
version: '1.5'
|
|
110
110
|
- !ruby/object:Gem::Dependency
|
|
111
111
|
name: htmx
|
|
112
112
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -155,14 +155,14 @@ dependencies:
|
|
|
155
155
|
requirements:
|
|
156
156
|
- - "~>"
|
|
157
157
|
- !ruby/object:Gem::Version
|
|
158
|
-
version: '6.
|
|
158
|
+
version: '6.8'
|
|
159
159
|
type: :runtime
|
|
160
160
|
prerelease: false
|
|
161
161
|
version_requirements: !ruby/object:Gem::Requirement
|
|
162
162
|
requirements:
|
|
163
163
|
- - "~>"
|
|
164
164
|
- !ruby/object:Gem::Version
|
|
165
|
-
version: '6.
|
|
165
|
+
version: '6.8'
|
|
166
166
|
- !ruby/object:Gem::Dependency
|
|
167
167
|
name: runcom
|
|
168
168
|
requirement: !ruby/object:Gem::Requirement
|
metadata.gz.sig
CHANGED
|
Binary file
|