hanamismith 0.38.0 → 0.39.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/README.adoc +2 -2
- data/hanamismith.gemspec +8 -8
- data/lib/hanamismith/builders/asset.rb +2 -2
- data/lib/hanamismith/builders/binstub.rb +2 -2
- data/lib/hanamismith/builders/bundler.rb +3 -3
- data/lib/hanamismith/builders/caliber.rb +3 -3
- data/lib/hanamismith/builders/circle_ci.rb +20 -0
- data/lib/hanamismith/builders/console.rb +4 -4
- data/lib/hanamismith/builders/core.rb +11 -14
- data/lib/hanamismith/builders/documentation/readme.rb +3 -3
- data/lib/hanamismith/builders/environments/development.rb +2 -2
- data/lib/hanamismith/builders/environments/test.rb +2 -2
- data/lib/hanamismith/builders/git/ignore.rb +3 -3
- data/lib/hanamismith/builders/{ci/git_hub.rb → git_hub/ci.rb} +5 -5
- data/lib/hanamismith/builders/guard.rb +3 -3
- data/lib/hanamismith/builders/icon.rb +2 -2
- data/lib/hanamismith/builders/javascript.rb +2 -2
- data/lib/hanamismith/builders/node.rb +3 -3
- data/lib/hanamismith/builders/providers/persistence.rb +2 -2
- data/lib/hanamismith/builders/providers/yjit.rb +2 -2
- data/lib/hanamismith/builders/puma/configuration.rb +2 -3
- data/lib/hanamismith/builders/puma/procfile.rb +3 -3
- data/lib/hanamismith/builders/pwa.rb +2 -2
- data/lib/hanamismith/builders/rack/attack.rb +3 -3
- data/lib/hanamismith/builders/rack/configuration.rb +2 -2
- data/lib/hanamismith/builders/rack/deflater.rb +2 -2
- data/lib/hanamismith/builders/rake/configuration.rb +25 -0
- data/lib/hanamismith/builders/refinement.rb +2 -2
- data/lib/hanamismith/builders/rspec/application_shared_context.rb +3 -3
- data/lib/hanamismith/builders/rspec/database.rb +3 -3
- data/lib/hanamismith/builders/rspec/factory.rb +3 -3
- data/lib/hanamismith/builders/rspec/hanami.rb +3 -3
- data/lib/hanamismith/builders/rspec/helper.rb +4 -4
- data/lib/hanamismith/builders/setup.rb +3 -3
- data/lib/hanamismith/builders/slices/health.rb +12 -12
- data/lib/hanamismith/builders/slices/home.rb +15 -15
- data/lib/hanamismith/builders/stylesheet.rb +2 -2
- data/lib/hanamismith/cli/commands/build.rb +37 -35
- data/lib/hanamismith/container.rb +31 -21
- data/lib/hanamismith/extensions/asset.rb +3 -12
- data/lib/hanamismith/extensions/npm.rb +3 -12
- data/lib/hanamismith/templates/%project_name%/.circleci/config.yml.erb +1 -1
- data/lib/hanamismith/templates/%project_name%/.github/workflows/ci.yml.erb +1 -1
- data/lib/hanamismith/templates/%project_name%/.node-version.erb +1 -1
- data/lib/hanamismith/templates/%project_name%/app/assets/pwa/manifest.webmanifest.erb +2 -2
- data/lib/hanamismith/templates/%project_name%/config/providers/persistence.rb.erb +2 -2
- data/lib/hanamismith/templates/%project_name%/env.development.erb +1 -1
- data/lib/hanamismith/templates/%project_name%/env.test.erb +1 -1
- data/lib/hanamismith/templates/%project_name%/package.json.erb +4 -4
- data/lib/hanamismith/templates/%project_name%/slices/health/action.rb.erb +1 -1
- data/lib/hanamismith/templates/%project_name%/slices/health/templates/layouts/app.html.erb.erb +2 -2
- data/lib/hanamismith/templates/%project_name%/slices/health/view.rb.erb +1 -1
- data/lib/hanamismith/templates/%project_name%/slices/home/action.rb.erb +1 -1
- data/lib/hanamismith/templates/%project_name%/slices/home/repository.rb.erb +1 -1
- data/lib/hanamismith/templates/%project_name%/slices/home/templates/layouts/app.html.erb.erb +2 -2
- data/lib/hanamismith/templates/%project_name%/slices/home/templates/show.html.erb.erb +1 -1
- data/lib/hanamismith/templates/%project_name%/slices/home/view.rb.erb +1 -1
- data/lib/hanamismith/templates/%project_name%/spec/features/home_spec.rb.erb +1 -1
- data/lib/hanamismith/templates/%project_name%/spec/lib/%project_path%/refines/actions/response_spec.rb.erb +1 -1
- data/lib/hanamismith.rb +1 -0
- data.tar.gz.sig +0 -0
- metadata +20 -20
- metadata.gz.sig +0 -0
- data/lib/hanamismith/builders/ci/circle.rb +0 -22
- data/lib/hanamismith/builders/rake.rb +0 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 55f5e7cc19bb9183ec19d8055a391210769bbd8eed6cd34016e4be9a1cf1b8d3
|
4
|
+
data.tar.gz: 28f40f1c4f3b8a5225c55873262307cff37382f6e3df66e319cd5c020ebafa42
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ce8433b6a457ab211339e54c0ebcf15015aa778931ef72abf68b19915733e5fae30d336685c53438c7e7e6de6f590aa21bc74a3b0510e7cf27a829df1cbc561f
|
7
|
+
data.tar.gz: 305276a7533e9541098a7a65d994aa362f80877f4cf21f2e4c40f828537b70566a4df7ed6894c3e7fe63087d960a4515cf5c75480ffc54d58ea42b0966727cb3
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/README.adoc
CHANGED
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.39.0"
|
6
6
|
spec.authors = ["Brooke Kuhlmann"]
|
7
7
|
spec.email = ["brooke@alchemists.io"]
|
8
8
|
spec.homepage = "https://alchemists.io/projects/hanamismith"
|
@@ -24,16 +24,16 @@ Gem::Specification.new do |spec|
|
|
24
24
|
|
25
25
|
spec.required_ruby_version = "~> 3.3"
|
26
26
|
spec.add_dependency "cogger", "~> 0.21"
|
27
|
-
spec.add_dependency "containable", "~> 0.
|
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
|
30
|
+
spec.add_dependency "etcher", "~> 2.1"
|
31
31
|
spec.add_dependency "htmx", "~> 1.0"
|
32
|
-
spec.add_dependency "infusible", "~> 3.
|
33
|
-
spec.add_dependency "refinements", "~> 12.
|
34
|
-
spec.add_dependency "rubysmith", "~>
|
35
|
-
spec.add_dependency "runcom", "~> 11.
|
36
|
-
spec.add_dependency "sod", "~> 0.
|
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
|
|
@@ -9,11 +9,11 @@ module Hanamismith
|
|
9
9
|
using Refinements::Struct
|
10
10
|
|
11
11
|
def call
|
12
|
-
builder.call(
|
12
|
+
builder.call(settings.merge(template_path: "%project_name%/bin/hanami.erb"))
|
13
13
|
.render
|
14
14
|
.permit 0o755
|
15
15
|
|
16
|
-
|
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
|
-
|
19
|
+
true
|
20
20
|
end
|
21
21
|
|
22
22
|
private
|
23
23
|
|
24
24
|
def insert_groups
|
25
|
-
return unless
|
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
|
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
|
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(
|
16
|
+
builder.call(settings.merge(template_path: path))
|
17
17
|
.append("\nrequire: rubocop-sequel\n")
|
18
18
|
|
19
|
-
|
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
|
12
|
+
return false unless settings.build_console
|
13
13
|
|
14
14
|
super
|
15
|
-
builder.call(
|
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
|
-
|
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
|
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
|
-
|
13
|
+
true
|
14
14
|
end
|
15
15
|
|
16
16
|
private
|
17
17
|
|
18
18
|
def add_action
|
19
|
-
builder.call(
|
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(
|
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(
|
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(
|
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(
|
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(
|
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(
|
44
|
+
builder.call(settings.merge(template_path: path)).render
|
48
45
|
end
|
49
46
|
|
50
47
|
def add_migrate_directory
|
51
|
-
builder.call(
|
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(
|
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(
|
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
|
13
|
+
return false unless settings.build_readme
|
14
14
|
|
15
15
|
super
|
16
|
-
builder.call(
|
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
|
-
|
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(
|
13
|
+
builder.call(settings.merge(template_path: "%project_name%/env.development.erb"))
|
14
14
|
.render
|
15
15
|
.rename(".env.development")
|
16
16
|
|
17
|
-
|
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(
|
13
|
+
builder.call(settings.merge(template_path: "%project_name%/env.test.erb"))
|
14
14
|
.render
|
15
15
|
.rename(".env.test")
|
16
16
|
|
17
|
-
|
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
|
13
|
+
return false unless settings.build_git
|
14
14
|
|
15
15
|
super
|
16
|
-
builder.call(
|
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
|
-
|
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
|
7
|
+
module GitHub
|
8
8
|
# Builds project skeleton GitHub CI configuration.
|
9
|
-
class
|
9
|
+
class CI < Rubysmith::Builders::Abstract
|
10
10
|
using Refinements::Struct
|
11
11
|
|
12
12
|
def call
|
13
|
-
return
|
13
|
+
return false unless settings.build_git_hub_ci
|
14
14
|
|
15
15
|
path = "%project_name%/.github/workflows/ci.yml.erb"
|
16
|
-
builder.call(
|
17
|
-
|
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
|
12
|
+
return false unless settings.build_guard
|
13
13
|
|
14
14
|
super
|
15
|
-
builder.call(
|
16
|
-
|
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(
|
14
|
-
|
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(
|
14
|
-
|
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(
|
13
|
-
builder.call(
|
14
|
-
|
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(
|
15
|
-
|
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(
|
15
|
-
|
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(
|
14
|
-
.render
|
13
|
+
builder.call(settings.merge(template_path: "%project_name%/config/puma.rb.erb")).render
|
15
14
|
|
16
|
-
|
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(
|
14
|
-
builder.call(
|
15
|
-
|
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(
|
14
|
-
|
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
|
-
|
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(
|
22
|
+
builder.call(settings.merge(template_path:)).render
|
23
23
|
end
|
24
24
|
|
25
25
|
def add_middleware
|
26
|
-
builder.call(
|
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(
|
14
|
-
|
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(
|
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
|
-
|
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(
|
16
|
+
builder.call(settings.merge(template_path: path)).render
|
17
17
|
end
|
18
18
|
|
19
|
-
|
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
|
13
|
+
return false unless settings.build_rspec
|
14
14
|
|
15
15
|
path = "%project_name%/spec/support/shared_contexts/application.rb.erb"
|
16
|
-
builder.call(
|
16
|
+
builder.call(settings.merge(template_path: path)).render
|
17
17
|
|
18
|
-
|
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
|
13
|
+
return false unless settings.build_rspec
|
14
14
|
|
15
15
|
path = "%project_name%/spec/support/database.rb.erb"
|
16
|
-
builder.call(
|
16
|
+
builder.call(settings.merge(template_path: path)).render
|
17
17
|
|
18
|
-
|
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
|
13
|
+
return false unless settings.build_rspec
|
14
14
|
|
15
15
|
path = "%project_name%/spec/support/factory.rb.erb"
|
16
|
-
builder.call(
|
16
|
+
builder.call(settings.merge(template_path: path)).render
|
17
17
|
|
18
|
-
|
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
|
13
|
+
return false unless settings.build_rspec
|
14
14
|
|
15
15
|
path = "%project_name%/spec/hanami_helper.rb.erb"
|
16
|
-
builder.call(
|
16
|
+
builder.call(settings.merge(template_path: path)).render
|
17
17
|
|
18
|
-
|
18
|
+
true
|
19
19
|
end
|
20
20
|
end
|
21
21
|
end
|