hanamismith 0.37.0 → 0.39.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data/README.adoc +2 -2
  4. data/hanamismith.gemspec +9 -9
  5. data/lib/hanamismith/builders/asset.rb +2 -2
  6. data/lib/hanamismith/builders/binstub.rb +2 -2
  7. data/lib/hanamismith/builders/bundler.rb +3 -3
  8. data/lib/hanamismith/builders/caliber.rb +3 -3
  9. data/lib/hanamismith/builders/circle_ci.rb +20 -0
  10. data/lib/hanamismith/builders/console.rb +4 -4
  11. data/lib/hanamismith/builders/core.rb +11 -14
  12. data/lib/hanamismith/builders/documentation/readme.rb +3 -3
  13. data/lib/hanamismith/builders/environments/development.rb +2 -2
  14. data/lib/hanamismith/builders/environments/test.rb +2 -2
  15. data/lib/hanamismith/builders/git/ignore.rb +3 -3
  16. data/lib/hanamismith/builders/{ci/git_hub.rb → git_hub/ci.rb} +5 -5
  17. data/lib/hanamismith/builders/guard.rb +3 -3
  18. data/lib/hanamismith/builders/icon.rb +2 -2
  19. data/lib/hanamismith/builders/javascript.rb +2 -2
  20. data/lib/hanamismith/builders/node.rb +3 -3
  21. data/lib/hanamismith/builders/providers/persistence.rb +2 -2
  22. data/lib/hanamismith/builders/providers/yjit.rb +2 -2
  23. data/lib/hanamismith/builders/puma/configuration.rb +2 -3
  24. data/lib/hanamismith/builders/puma/procfile.rb +3 -3
  25. data/lib/hanamismith/builders/pwa.rb +2 -2
  26. data/lib/hanamismith/builders/rack/attack.rb +3 -3
  27. data/lib/hanamismith/builders/rack/configuration.rb +2 -2
  28. data/lib/hanamismith/builders/rack/deflater.rb +2 -2
  29. data/lib/hanamismith/builders/rake/configuration.rb +25 -0
  30. data/lib/hanamismith/builders/refinement.rb +2 -2
  31. data/lib/hanamismith/builders/rspec/application_shared_context.rb +3 -3
  32. data/lib/hanamismith/builders/rspec/database.rb +3 -3
  33. data/lib/hanamismith/builders/rspec/factory.rb +3 -3
  34. data/lib/hanamismith/builders/rspec/hanami.rb +3 -3
  35. data/lib/hanamismith/builders/rspec/helper.rb +5 -10
  36. data/lib/hanamismith/builders/setup.rb +3 -3
  37. data/lib/hanamismith/builders/slices/health.rb +12 -12
  38. data/lib/hanamismith/builders/slices/home.rb +15 -15
  39. data/lib/hanamismith/builders/stylesheet.rb +2 -2
  40. data/lib/hanamismith/cli/commands/build.rb +37 -35
  41. data/lib/hanamismith/container.rb +31 -21
  42. data/lib/hanamismith/extensions/asset.rb +3 -12
  43. data/lib/hanamismith/extensions/npm.rb +3 -12
  44. data/lib/hanamismith/templates/%project_name%/.circleci/config.yml.erb +1 -1
  45. data/lib/hanamismith/templates/%project_name%/.github/workflows/ci.yml.erb +1 -1
  46. data/lib/hanamismith/templates/%project_name%/.node-version.erb +1 -1
  47. data/lib/hanamismith/templates/%project_name%/app/assets/pwa/manifest.webmanifest.erb +2 -2
  48. data/lib/hanamismith/templates/%project_name%/config/providers/persistence.rb.erb +2 -2
  49. data/lib/hanamismith/templates/%project_name%/env.development.erb +1 -1
  50. data/lib/hanamismith/templates/%project_name%/env.test.erb +1 -1
  51. data/lib/hanamismith/templates/%project_name%/package.json.erb +4 -4
  52. data/lib/hanamismith/templates/%project_name%/slices/health/action.rb.erb +1 -1
  53. data/lib/hanamismith/templates/%project_name%/slices/health/templates/layouts/app.html.erb.erb +2 -2
  54. data/lib/hanamismith/templates/%project_name%/slices/health/view.rb.erb +1 -1
  55. data/lib/hanamismith/templates/%project_name%/slices/home/action.rb.erb +1 -1
  56. data/lib/hanamismith/templates/%project_name%/slices/home/repository.rb.erb +1 -1
  57. data/lib/hanamismith/templates/%project_name%/slices/home/templates/layouts/app.html.erb.erb +2 -2
  58. data/lib/hanamismith/templates/%project_name%/slices/home/templates/show.html.erb.erb +1 -1
  59. data/lib/hanamismith/templates/%project_name%/slices/home/view.rb.erb +1 -1
  60. data/lib/hanamismith/templates/%project_name%/spec/features/home_spec.rb.erb +1 -1
  61. data/lib/hanamismith/templates/%project_name%/spec/lib/%project_path%/refines/actions/response_spec.rb.erb +1 -1
  62. data/lib/hanamismith.rb +1 -0
  63. data.tar.gz.sig +0 -0
  64. metadata +22 -22
  65. metadata.gz.sig +0 -0
  66. data/lib/hanamismith/builders/ci/circle.rb +0 -22
  67. data/lib/hanamismith/builders/rake.rb +0 -23
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4c23515a55e0ec7d00ffa6c9d5c0087b5f6a6242e0d4ce90df885e64ade31079
4
- data.tar.gz: 2b982477941d6019db20dbe56df3765bc9468fb0ac93091f729531e5eeed91c9
3
+ metadata.gz: 55f5e7cc19bb9183ec19d8055a391210769bbd8eed6cd34016e4be9a1cf1b8d3
4
+ data.tar.gz: 28f40f1c4f3b8a5225c55873262307cff37382f6e3df66e319cd5c020ebafa42
5
5
  SHA512:
6
- metadata.gz: 966ad7065f82e17cffff42b7cc624a9e81b75b68d3cc8d2ecab33d02536519dc24ac45929915cf171d80f9ffed09481c108730ec3b08404c47dee761bfb683a0
7
- data.tar.gz: e5e614a6216b9c7fb6c04ef91594bb06dcfd66d30b3fb16297fde714680f852dc22b3000c1fe5858479f4004e2874b8c2c0127de37a08477d933e1d8fb9a07e8
6
+ metadata.gz: ce8433b6a457ab211339e54c0ebcf15015aa778931ef72abf68b19915733e5fae30d336685c53438c7e7e6de6f590aa21bc74a3b0510e7cf27a829df1cbc561f
7
+ data.tar.gz: 305276a7533e9541098a7a65d994aa362f80877f4cf21f2e4c40f828537b70566a4df7ed6894c3e7fe63087d960a4515cf5c75480ffc54d58ea42b0966727cb3
checksums.yaml.gz.sig CHANGED
Binary file
data/README.adoc CHANGED
@@ -98,8 +98,8 @@ link:https://alchemists.io/projects/rubysmith/#_configuration[Rubysmith]. It is
98
98
 
99
99
  [source,yaml]
100
100
  ----
101
- :project:
102
- :url:
101
+ project:
102
+ url:
103
103
  # Add key/value pairs here.
104
104
  ----
105
105
 
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.37.0"
5
+ spec.version = "0.39.0"
6
6
  spec.authors = ["Brooke Kuhlmann"]
7
7
  spec.email = ["brooke@alchemists.io"]
8
8
  spec.homepage = "https://alchemists.io/projects/hanamismith"
@@ -23,17 +23,17 @@ Gem::Specification.new do |spec|
23
23
  spec.cert_chain = [Gem.default_cert_path]
24
24
 
25
25
  spec.required_ruby_version = "~> 3.3"
26
- spec.add_dependency "cogger", "~> 0.15"
27
- spec.add_dependency "containable", "~> 0.0"
26
+ spec.add_dependency "cogger", "~> 0.21"
27
+ spec.add_dependency "containable", "~> 0.2"
28
28
  spec.add_dependency "dry-monads", "~> 1.6"
29
29
  spec.add_dependency "dry-schema", "~> 1.13"
30
- spec.add_dependency "etcher", "~> 1.6"
30
+ spec.add_dependency "etcher", "~> 2.1"
31
31
  spec.add_dependency "htmx", "~> 1.0"
32
- spec.add_dependency "infusible", "~> 3.5"
33
- spec.add_dependency "refinements", "~> 12.1"
34
- spec.add_dependency "rubysmith", "~> 6.9"
35
- spec.add_dependency "runcom", "~> 11.0"
36
- spec.add_dependency "sod", "~> 0.8"
32
+ spec.add_dependency "infusible", "~> 3.8"
33
+ spec.add_dependency "refinements", "~> 12.5"
34
+ spec.add_dependency "rubysmith", "~> 7.0"
35
+ spec.add_dependency "runcom", "~> 11.5"
36
+ spec.add_dependency "sod", "~> 0.12"
37
37
  spec.add_dependency "spek", "~> 3.0"
38
38
  spec.add_dependency "zeitwerk", "~> 2.6"
39
39
 
@@ -10,8 +10,8 @@ module Hanamismith
10
10
 
11
11
  def call
12
12
  path = "%project_name%/config/assets.js.erb"
13
- builder.call(configuration.merge(template_path: path)).render
14
- configuration
13
+ builder.call(settings.merge(template_path: path)).render
14
+ true
15
15
  end
16
16
  end
17
17
  end
@@ -9,11 +9,11 @@ module Hanamismith
9
9
  using Refinements::Struct
10
10
 
11
11
  def call
12
- builder.call(configuration.merge(template_path: "%project_name%/bin/hanami.erb"))
12
+ builder.call(settings.merge(template_path: "%project_name%/bin/hanami.erb"))
13
13
  .render
14
14
  .permit 0o755
15
15
 
16
- configuration
16
+ true
17
17
  end
18
18
  end
19
19
  end
@@ -16,13 +16,13 @@ module Hanamismith
16
16
  end
17
17
 
18
18
  remove_zeitwerk
19
- configuration
19
+ true
20
20
  end
21
21
 
22
22
  private
23
23
 
24
24
  def insert_groups
25
- return unless configuration.build_minimum
25
+ return unless settings.build_minimum
26
26
 
27
27
  with_template.append <<~CONTENT
28
28
  group :development do
@@ -103,7 +103,7 @@ module Hanamismith
103
103
  def remove_zeitwerk = with_template.replace(/.+zeitwerk.+\n\n/, "\n")
104
104
 
105
105
  def with_template
106
- builder.call configuration.merge(template_path: "%project_name%/Gemfile.erb")
106
+ builder.call settings.merge(template_path: "%project_name%/Gemfile.erb")
107
107
  end
108
108
  end
109
109
  end
@@ -9,14 +9,14 @@ module Hanamismith
9
9
  using Refinements::Struct
10
10
 
11
11
  def call
12
- return configuration unless configuration.build_caliber
12
+ return false unless settings.build_caliber
13
13
 
14
14
  super
15
15
  path = "%project_name%/.config/rubocop/config.yml.erb"
16
- builder.call(configuration.merge(template_path: path))
16
+ builder.call(settings.merge(template_path: path))
17
17
  .append("\nrequire: rubocop-sequel\n")
18
18
 
19
- configuration
19
+ true
20
20
  end
21
21
  end
22
22
  end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "refinements/struct"
4
+
5
+ module Hanamismith
6
+ module Builders
7
+ # Builds project skeleton Circle CI configuration.
8
+ class CircleCI < Rubysmith::Builders::Abstract
9
+ using Refinements::Struct
10
+
11
+ def call
12
+ return false unless settings.build_circle_ci
13
+
14
+ path = "%project_name%/.circleci/config.yml.erb"
15
+ builder.call(settings.merge(template_path: path)).render.replace(/\n\n\Z/, "\n")
16
+ true
17
+ end
18
+ end
19
+ end
20
+ end
@@ -9,15 +9,15 @@ module Hanamismith
9
9
  using Refinements::Struct
10
10
 
11
11
  def call
12
- return configuration unless configuration.build_console
12
+ return false unless settings.build_console
13
13
 
14
14
  super
15
- builder.call(configuration.merge(template_path: "%project_name%/bin/console.erb"))
15
+ builder.call(settings.merge(template_path: "%project_name%/bin/console.erb"))
16
16
  .replace(/require Bundler.root.+/, %(require "hanami/prepare"))
17
17
 
18
18
  add_irb_autocomplete
19
19
 
20
- configuration
20
+ true
21
21
  end
22
22
 
23
23
  private
@@ -33,7 +33,7 @@ module Hanamismith
33
33
  end
34
34
 
35
35
  def with_template
36
- builder.call configuration.merge(template_path: "%project_name%/bin/console.erb")
36
+ builder.call settings.merge(template_path: "%project_name%/bin/console.erb")
37
37
  end
38
38
  end
39
39
  end
@@ -10,56 +10,53 @@ module Hanamismith
10
10
 
11
11
  def call
12
12
  private_methods.grep(/\Aadd_/).sort.each { |method| __send__ method }
13
- configuration
13
+ true
14
14
  end
15
15
 
16
16
  private
17
17
 
18
18
  def add_action
19
- builder.call(configuration.merge(template_path: "%project_name%/app/action.rb.erb")).render
19
+ builder.call(settings.merge(template_path: "%project_name%/app/action.rb.erb")).render
20
20
  end
21
21
 
22
22
  def add_repository
23
- builder.call(configuration.merge(template_path: "%project_name%/app/repository.rb.erb"))
24
- .render
23
+ builder.call(settings.merge(template_path: "%project_name%/app/repository.rb.erb")).render
25
24
  end
26
25
 
27
26
  def add_view
28
- builder.call(configuration.merge(template_path: "%project_name%/app/view.rb.erb")).render
27
+ builder.call(settings.merge(template_path: "%project_name%/app/view.rb.erb")).render
29
28
  end
30
29
 
31
30
  def add_application_configuration
32
- builder.call(configuration.merge(template_path: "%project_name%/config/app.rb.erb")).render
31
+ builder.call(settings.merge(template_path: "%project_name%/config/app.rb.erb")).render
33
32
  end
34
33
 
35
34
  def add_routes_configuration
36
- builder.call(configuration.merge(template_path: "%project_name%/config/routes.rb.erb"))
37
- .render
35
+ builder.call(settings.merge(template_path: "%project_name%/config/routes.rb.erb")).render
38
36
  end
39
37
 
40
38
  def add_settings_configuration
41
- builder.call(configuration.merge(template_path: "%project_name%/config/settings.rb.erb"))
42
- .render
39
+ builder.call(settings.merge(template_path: "%project_name%/config/settings.rb.erb")).render
43
40
  end
44
41
 
45
42
  def add_types
46
43
  path = "%project_name%/lib/%project_path%/types.rb.erb"
47
- builder.call(configuration.merge(template_path: path)).render
44
+ builder.call(settings.merge(template_path: path)).render
48
45
  end
49
46
 
50
47
  def add_migrate_directory
51
- builder.call(configuration.merge(template_path: "%project_name%/db/migrate")).make_path
48
+ builder.call(settings.merge(template_path: "%project_name%/db/migrate")).make_path
52
49
  end
53
50
 
54
51
  def add_public_http_errors
55
52
  %w[404 500].each do |code|
56
53
  path = "%project_name%/public/#{code}.html.erb"
57
- builder.call(configuration.merge(template_path: path)).render
54
+ builder.call(settings.merge(template_path: path)).render
58
55
  end
59
56
  end
60
57
 
61
58
  def add_temp_directory
62
- builder.call(configuration.merge(template_path: "%project_name%/tmp")).make_path
59
+ builder.call(settings.merge(template_path: "%project_name%/tmp")).make_path
63
60
  end
64
61
  end
65
62
  end
@@ -10,14 +10,14 @@ module Hanamismith
10
10
  using Refinements::Struct
11
11
 
12
12
  def call
13
- return configuration unless configuration.build_readme
13
+ return false unless settings.build_readme
14
14
 
15
15
  super
16
- builder.call(configuration.merge(template_path: "%project_name%/README.#{kind}.erb"))
16
+ builder.call(settings.merge(template_path: "%project_name%/README.#{kind}.erb"))
17
17
  .replace("Rubysmith", "Hanamismith")
18
18
  .replace("rubysmith", "hanamismith")
19
19
 
20
- configuration
20
+ true
21
21
  end
22
22
  end
23
23
  end
@@ -10,11 +10,11 @@ module Hanamismith
10
10
  using Refinements::Struct
11
11
 
12
12
  def call
13
- builder.call(configuration.merge(template_path: "%project_name%/env.development.erb"))
13
+ builder.call(settings.merge(template_path: "%project_name%/env.development.erb"))
14
14
  .render
15
15
  .rename(".env.development")
16
16
 
17
- configuration
17
+ true
18
18
  end
19
19
  end
20
20
  end
@@ -10,11 +10,11 @@ module Hanamismith
10
10
  using Refinements::Struct
11
11
 
12
12
  def call
13
- builder.call(configuration.merge(template_path: "%project_name%/env.test.erb"))
13
+ builder.call(settings.merge(template_path: "%project_name%/env.test.erb"))
14
14
  .render
15
15
  .rename(".env.test")
16
16
 
17
- configuration
17
+ true
18
18
  end
19
19
  end
20
20
  end
@@ -10,17 +10,17 @@ module Hanamismith
10
10
  using Refinements::Struct
11
11
 
12
12
  def call
13
- return configuration unless configuration.build_git
13
+ return false unless settings.build_git
14
14
 
15
15
  super
16
- builder.call(configuration.merge(template_path: "%project_name%/.gitignore.erb"))
16
+ builder.call(settings.merge(template_path: "%project_name%/.gitignore.erb"))
17
17
  .insert_before "tmp\n", <<~CONTENT
18
18
  node_modules
19
19
  public/assets
20
20
  public/assets.json
21
21
  CONTENT
22
22
 
23
- configuration
23
+ true
24
24
  end
25
25
  end
26
26
  end
@@ -4,17 +4,17 @@ require "refinements/struct"
4
4
 
5
5
  module Hanamismith
6
6
  module Builders
7
- module CI
7
+ module GitHub
8
8
  # Builds project skeleton GitHub CI configuration.
9
- class GitHub < Rubysmith::Builders::Abstract
9
+ class CI < Rubysmith::Builders::Abstract
10
10
  using Refinements::Struct
11
11
 
12
12
  def call
13
- return configuration unless configuration.build_git_hub_ci
13
+ return false unless settings.build_git_hub_ci
14
14
 
15
15
  path = "%project_name%/.github/workflows/ci.yml.erb"
16
- builder.call(configuration.merge(template_path: path)).render.replace(/\n\n\Z/, "\n")
17
- configuration
16
+ builder.call(settings.merge(template_path: path)).render.replace(/\n\n\Z/, "\n")
17
+ true
18
18
  end
19
19
  end
20
20
  end
@@ -9,11 +9,11 @@ module Hanamismith
9
9
  using Refinements::Struct
10
10
 
11
11
  def call
12
- return configuration unless configuration.build_guard
12
+ return false unless settings.build_guard
13
13
 
14
14
  super
15
- builder.call(configuration.merge(template_path: "%project_name%/Guardfile.erb")).render
16
- configuration
15
+ builder.call(settings.merge(template_path: "%project_name%/Guardfile.erb")).render
16
+ true
17
17
  end
18
18
  end
19
19
  end
@@ -10,8 +10,8 @@ module Hanamismith
10
10
 
11
11
  def call
12
12
  path = "%project_name%/app/assets/images/icon.svg.erb"
13
- builder.call(configuration.merge(template_path: path)).render
14
- configuration
13
+ builder.call(settings.merge(template_path: path)).render
14
+ true
15
15
  end
16
16
  end
17
17
  end
@@ -10,8 +10,8 @@ module Hanamismith
10
10
 
11
11
  def call
12
12
  path = "%project_name%/slices/home/assets/js/app.js.erb"
13
- builder.call(configuration.merge(template_path: path)).render
14
- configuration
13
+ builder.call(settings.merge(template_path: path)).render
14
+ true
15
15
  end
16
16
  end
17
17
  end
@@ -9,9 +9,9 @@ module Hanamismith
9
9
  using Refinements::Struct
10
10
 
11
11
  def call
12
- builder.call(configuration.merge(template_path: "%project_name%/package.json.erb")).render
13
- builder.call(configuration.merge(template_path: "%project_name%/.node-version.erb")).render
14
- configuration
12
+ builder.call(settings.merge(template_path: "%project_name%/package.json.erb")).render
13
+ builder.call(settings.merge(template_path: "%project_name%/.node-version.erb")).render
14
+ true
15
15
  end
16
16
  end
17
17
  end
@@ -11,8 +11,8 @@ module Hanamismith
11
11
 
12
12
  def call
13
13
  path = "%project_name%/config/providers/persistence.rb.erb"
14
- builder.call(configuration.merge(template_path: path)).render
15
- configuration
14
+ builder.call(settings.merge(template_path: path)).render
15
+ true
16
16
  end
17
17
  end
18
18
  end
@@ -11,8 +11,8 @@ module Hanamismith
11
11
 
12
12
  def call
13
13
  path = "%project_name%/config/providers/yjit.rb.erb"
14
- builder.call(configuration.merge(template_path: path)).render
15
- configuration
14
+ builder.call(settings.merge(template_path: path)).render
15
+ true
16
16
  end
17
17
  end
18
18
  end
@@ -10,10 +10,9 @@ module Hanamismith
10
10
  using Refinements::Struct
11
11
 
12
12
  def call
13
- builder.call(configuration.merge(template_path: "%project_name%/config/puma.rb.erb"))
14
- .render
13
+ builder.call(settings.merge(template_path: "%project_name%/config/puma.rb.erb")).render
15
14
 
16
- configuration
15
+ true
17
16
  end
18
17
  end
19
18
  end
@@ -10,9 +10,9 @@ module Hanamismith
10
10
  using Refinements::Struct
11
11
 
12
12
  def call
13
- builder.call(configuration.merge(template_path: "%project_name%/Procfile.erb")).render
14
- builder.call(configuration.merge(template_path: "%project_name%/Procfile.dev.erb")).render
15
- configuration
13
+ builder.call(settings.merge(template_path: "%project_name%/Procfile.erb")).render
14
+ builder.call(settings.merge(template_path: "%project_name%/Procfile.dev.erb")).render
15
+ true
16
16
  end
17
17
  end
18
18
  end
@@ -10,8 +10,8 @@ module Hanamismith
10
10
 
11
11
  def call
12
12
  path = "%project_name%/app/assets/pwa/manifest.webmanifest.erb"
13
- builder.call(configuration.merge(template_path: path)).render
14
- configuration
13
+ builder.call(settings.merge(template_path: path)).render
14
+ true
15
15
  end
16
16
  end
17
17
  end
@@ -12,18 +12,18 @@ module Hanamismith
12
12
  def call
13
13
  add_configuration
14
14
  add_middleware
15
- configuration
15
+ true
16
16
  end
17
17
 
18
18
  private
19
19
 
20
20
  def add_configuration
21
21
  template_path = "%project_name%/config/initializers/rack_attack.rb.erb"
22
- builder.call(configuration.merge(template_path:)).render
22
+ builder.call(settings.merge(template_path:)).render
23
23
  end
24
24
 
25
25
  def add_middleware
26
- builder.call(configuration.merge(template_path: "%project_name%/config/app.rb.erb"))
26
+ builder.call(settings.merge(template_path: "%project_name%/config/app.rb.erb"))
27
27
  .insert_after(/require/, %(\nrequire_relative "initializers/rack_attack"\n))
28
28
  .insert_before(/environment/, " config.middleware.use Rack::Attack\n\n")
29
29
  end
@@ -10,8 +10,8 @@ module Hanamismith
10
10
  using Refinements::Struct
11
11
 
12
12
  def call
13
- builder.call(configuration.merge(template_path: "%project_name%/config.ru.erb")).render
14
- configuration
13
+ builder.call(settings.merge(template_path: "%project_name%/config.ru.erb")).render
14
+ true
15
15
  end
16
16
  end
17
17
  end
@@ -10,10 +10,10 @@ module Hanamismith
10
10
  using Refinements::Struct
11
11
 
12
12
  def call
13
- builder.call(configuration.merge(template_path: "%project_name%/config/app.rb.erb"))
13
+ builder.call(settings.merge(template_path: "%project_name%/config/app.rb.erb"))
14
14
  .insert_after(/Rack::Attack/, " config.middleware.use Rack::Deflater\n")
15
15
 
16
- configuration
16
+ true
17
17
  end
18
18
  end
19
19
  end
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "refinements/struct"
4
+
5
+ module Hanamismith
6
+ module Builders
7
+ module Rake
8
+ # Builds project skeleton Rake configuration file.
9
+ class Configuration < Rubysmith::Builders::Rake::Configuration
10
+ using Refinements::Struct
11
+
12
+ def call
13
+ return false unless settings.build_rake
14
+
15
+ super
16
+ builder.call(settings.merge(template_path: "%project_name%/Rakefile.erb"))
17
+ .render
18
+ .insert_after(%r(bundler/setup), %(require "hanami/rake_tasks"))
19
+
20
+ true
21
+ end
22
+ end
23
+ end
24
+ end
25
+ end
@@ -13,10 +13,10 @@ module Hanamismith
13
13
  %project_name%/lib/%project_path%/refines/actions/response.rb.erb
14
14
  %project_name%/spec/lib/%project_path%/refines/actions/response_spec.rb.erb
15
15
  ].each do |path|
16
- builder.call(configuration.merge(template_path: path)).render
16
+ builder.call(settings.merge(template_path: path)).render
17
17
  end
18
18
 
19
- configuration
19
+ true
20
20
  end
21
21
  end
22
22
  end
@@ -10,12 +10,12 @@ module Hanamismith
10
10
  using Refinements::Struct
11
11
 
12
12
  def call
13
- return configuration unless configuration.build_rspec
13
+ return false unless settings.build_rspec
14
14
 
15
15
  path = "%project_name%/spec/support/shared_contexts/application.rb.erb"
16
- builder.call(configuration.merge(template_path: path)).render
16
+ builder.call(settings.merge(template_path: path)).render
17
17
 
18
- configuration
18
+ true
19
19
  end
20
20
  end
21
21
  end
@@ -10,12 +10,12 @@ module Hanamismith
10
10
  using Refinements::Struct
11
11
 
12
12
  def call
13
- return configuration unless configuration.build_rspec
13
+ return false unless settings.build_rspec
14
14
 
15
15
  path = "%project_name%/spec/support/database.rb.erb"
16
- builder.call(configuration.merge(template_path: path)).render
16
+ builder.call(settings.merge(template_path: path)).render
17
17
 
18
- configuration
18
+ true
19
19
  end
20
20
  end
21
21
  end
@@ -10,12 +10,12 @@ module Hanamismith
10
10
  using Refinements::Struct
11
11
 
12
12
  def call
13
- return configuration unless configuration.build_rspec
13
+ return false unless settings.build_rspec
14
14
 
15
15
  path = "%project_name%/spec/support/factory.rb.erb"
16
- builder.call(configuration.merge(template_path: path)).render
16
+ builder.call(settings.merge(template_path: path)).render
17
17
 
18
- configuration
18
+ true
19
19
  end
20
20
  end
21
21
  end
@@ -10,12 +10,12 @@ module Hanamismith
10
10
  using Refinements::Struct
11
11
 
12
12
  def call
13
- return configuration unless configuration.build_rspec
13
+ return false unless settings.build_rspec
14
14
 
15
15
  path = "%project_name%/spec/hanami_helper.rb.erb"
16
- builder.call(configuration.merge(template_path: path)).render
16
+ builder.call(settings.merge(template_path: path)).render
17
17
 
18
- configuration
18
+ true
19
19
  end
20
20
  end
21
21
  end