hanamismith 0.47.0 → 0.49.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (31) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +4 -1
  3. data/README.adoc +5 -12
  4. data/hanamismith.gemspec +8 -8
  5. data/lib/hanamismith/builders/bundler.rb +8 -8
  6. data/lib/hanamismith/builders/core.rb +20 -4
  7. data/lib/hanamismith/builders/setup.rb +1 -4
  8. data/lib/hanamismith/cli/commands/build.rb +0 -3
  9. data/lib/hanamismith/templates/%project_name%/.circleci/config.yml.erb +1 -3
  10. data/lib/hanamismith/templates/%project_name%/.github/workflows/ci.yml.erb +1 -3
  11. data/lib/hanamismith/templates/%project_name%/.node-version.erb +1 -1
  12. data/lib/hanamismith/templates/%project_name%/app/db/relation.rb.erb +9 -0
  13. data/lib/hanamismith/templates/%project_name%/app/db/repository.rb.erb +9 -0
  14. data/lib/hanamismith/templates/%project_name%/app/db/struct.rb.erb +9 -0
  15. data/lib/hanamismith/templates/%project_name%/bin/hanami.erb +1 -16
  16. data/lib/hanamismith/templates/%project_name%/config/routes.rb.erb +4 -0
  17. data/lib/hanamismith/templates/%project_name%/config/settings.rb.erb +0 -1
  18. data/lib/hanamismith/templates/%project_name%/config.ru.erb +1 -3
  19. data/lib/hanamismith/templates/%project_name%/lib/%project_path%/types.rb.erb +1 -2
  20. data/lib/hanamismith/templates/%project_name%/package.json.erb +1 -1
  21. data/lib/hanamismith/templates/%project_name%/public/.well-known/security.txt.erb +7 -0
  22. data/lib/hanamismith/templates/%project_name%/spec/hanami_helper.rb.erb +22 -10
  23. data.tar.gz.sig +0 -0
  24. metadata +21 -23
  25. metadata.gz.sig +0 -0
  26. data/lib/hanamismith/builders/providers/persistence.rb +0 -20
  27. data/lib/hanamismith/builders/rspec/database.rb +0 -23
  28. data/lib/hanamismith/builders/rspec/factory.rb +0 -23
  29. data/lib/hanamismith/templates/%project_name%/app/repository.rb.erb +0 -10
  30. data/lib/hanamismith/templates/%project_name%/spec/support/database.rb.erb +0 -10
  31. data/lib/hanamismith/templates/%project_name%/spec/support/factory.rb.erb +0 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 15ced88b790700acab11c1e346fef93f5ee23303b2522fb1d91e7195d44e2d85
4
- data.tar.gz: 40bbd375e9ad02b4ba4bc354566b50765ee8d502d1e94f7890a1ef0b49bd75ec
3
+ metadata.gz: 10fe7dd2d05906100558c794fb23524c86585ac2a9350933d79927ed72bf4034
4
+ data.tar.gz: aa155e6a53d45842e1ad20c235507a09f2a07f0782c34bfcd0d58d6c35e0d680
5
5
  SHA512:
6
- metadata.gz: 67725c7b9d51066ed0493707e9e038ea7886a892e6380cfa327c61511dd59abe4fcde119b9e7b699fed2f7962a8b4c5e7728609b06ec90d1a86593b01101bdf1
7
- data.tar.gz: 130b0a0740d356890c76d49d92b382f9e97aaef8ea77636dbe5cf12d0c15614c1709523de5d3d0ff3feb59ac99cec2bd2c4d113aee9875e9d0f27f3300d1c2f8
6
+ metadata.gz: 3f2a8607f93b2369ae2702f4db91b6111bb4e3191ece92f8b3f7cc6998604ad4007c269978aabd5eed2fec6cb7bba4036fcf59477a48f92bb3ef821a31ebc896
7
+ data.tar.gz: 02bd71d9f19edb7d2dcf0c7becc7a797e41604bc7366178eb647f85186f4445de6437050b1af58a15c352d79e0813f0d169aa9d34b53fb165354e3b26b1bc85a
checksums.yaml.gz.sig CHANGED
@@ -1 +1,4 @@
1
- g{��y����7S�m3���:�[]մ��Z�mQG��W��/�x�����tw����O������E\��+�~�`0Ga��h�#����%}��p9?�$�&�����L/G�������l��a����dv���u*7���c:�������e�З�@8�����8x��pL��@�Ϗ3f�fXl�N�5���p5��2!Aح�ma<Skn!�z(�ь�#�%�6�mDZ ��S5�'�w�;S��R�PB��M�+�s����i�D��Tab�Kx��O�m�nC������w1��y0$��-(*$�U7��^�E�[��3������U�l�T�)�.��[2��CTC���Yx�����k�^%^�ʔW����� �3�[
1
+ Bqǐ��3��=�
2
+ Y�f?�LR%X0A�U��%h���:��M�Q>���S�'V_V/�[UaDX�u���[�H��hRE����/̤�������v��h�C
3
+ B݄͋?��in��$t͖Q@؅����
4
+ �[�
data/README.adoc CHANGED
@@ -4,7 +4,6 @@
4
4
 
5
5
  :capybara_link: link:https://github.com/teamcapybara/capybara[Capybara]
6
6
  :cuprite_link: link:https://cuprite.rubycdp.com[Cuprite]
7
- :dry_link: link:https://dry-rb.org[Dry RB]
8
7
  :dotenv_link: link:https://github.com/bkeepers/dotenv[Dotenv]
9
8
  :dotfiles_link: link:https://alchemists.io/projects/dotfiles[Dotfiles]
10
9
  :hanami_link: link:https://hanamirb.org[Hanami]
@@ -17,23 +16,17 @@
17
16
 
18
17
  = Hanamismith
19
18
 
20
- Hanamismith is a Command Line Interface (CLI) for smithing Hanami projects. Perfect when you need a professional and robust tool for building new project skeletons. To quote from the {dry_link} and {hanami_link} teams:
21
- ____
22
- If you're looking for new ways to build maintainable, secure, faster and testable Ruby applications, you're in for a treat. *Hanami is built for people like you*.
23
- ____
24
-
25
- Welcome to the modern age of web development. This gem will help you get up and running as quickly as possible. 🚀
19
+ Hanamismith is a Command Line Interface (CLI) for smithing Hanami projects. Perfect when you need a professional, configurable, and robust tool for building new project skeletons.
26
20
 
27
21
  toc::[]
28
22
 
29
23
  == Features
30
24
 
31
25
  * Built atop {rubysmith_link} for building project skeleton.
32
- * Uses {dry_link} for functional programming.
33
26
  * Uses {hanami_link} for web application development.
34
- * Uses {htmx_link} for Hypermedia REST APIs (i.e. HTML over the wire) so you can write less code and avoid bloated JavaScript stacks.
27
+ * Uses {htmx_link} for Hypermedia REST so you can write less code and avoid bloated JavaScript stacks.
35
28
  * Uses {pg_link} coupled with {rom_link} for database management.
36
- * Uses {rack_link}, specifically: `Rack::Deflater` and link:https://github.com/rack/rack-attack[Rack::Attack].
29
+ * Uses {rack_link}, specifically: link:https://github.com/rack/rack-attack[Rack::Attack], `Rack::Deflater`, and `Rack::Static`.
37
30
  * Uses {puma_link} as the default web server and fully configured for local and production environments.
38
31
  * Uses {capybara_link} with {cuprite_link} (driver) for full, headless, feature testing.
39
32
  * Uses {dotenv_link} for managing your environment configurations.
@@ -44,7 +37,7 @@ toc::[]
44
37
 
45
38
  == Screenshots/Screencasts
46
39
 
47
- image:https://alchemists.io/images/projects/hanamismith/screenshots/home.png[Home,width=695,height=706,role=focal_point]
40
+ image:https://alchemists.io/images/projects/hanamismith/screenshots/home.png[Home,width=702,height=694,role=focal_point]
48
41
 
49
42
  The above is a screenshot of a _Demo_ project that was generated and run locally. For a fully working demonstration application -- as built by this gem -- check out the link:https://github.com/bkuhlmann/hemo[Hemo] project. Here's a quick screencast overview of this demonstration application in action:
50
43
 
@@ -120,7 +113,7 @@ bin/setup
120
113
  bin/rake
121
114
 
122
115
  # Develop (red, green, refactor)
123
- bin/guard
116
+ NO_COVERAGE=true retest
124
117
  git commit # (repeat until finished with implementation)
125
118
 
126
119
  # Run: With Overmind (recommended)
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.47.0"
5
+ spec.version = "0.49.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", "<= 3.4"
26
- spec.add_dependency "cogger", "~> 0.26"
26
+ spec.add_dependency "cogger", "~> 0.31"
27
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", "~> 2.1"
30
+ spec.add_dependency "etcher", "~> 2.7"
31
31
  spec.add_dependency "htmx", "~> 1.0"
32
- spec.add_dependency "infusible", "~> 3.11"
33
- spec.add_dependency "refinements", "~> 12.9"
34
- spec.add_dependency "rubysmith", "~> 7.7"
35
- spec.add_dependency "runcom", "~> 11.5"
36
- spec.add_dependency "sod", "~> 0.17"
32
+ spec.add_dependency "infusible", "~> 3.12"
33
+ spec.add_dependency "refinements", "~> 12.10"
34
+ spec.add_dependency "rubysmith", "~> 7.9"
35
+ spec.add_dependency "runcom", "~> 11.10"
36
+ spec.add_dependency "sod", "~> 0.20"
37
37
  spec.add_dependency "spek", "~> 3.0"
38
38
  spec.add_dependency "zeitwerk", "~> 2.7"
39
39
 
@@ -35,13 +35,13 @@ module Hanamismith
35
35
 
36
36
  def insert_hanami
37
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"
38
+ gem "hanami", "~> 2.2.0"
39
+ gem "hanami-assets", "~> 2.2.0"
40
+ gem "hanami-controller", "~> 2.2.0"
41
+ gem "hanami-db", "~> 2.2.0"
42
+ gem "hanami-router", "~> 2.2.0"
43
+ gem "hanami-validations", "~> 2.2.0"
44
+ gem "hanami-view", "~> 2.2.0"
45
45
  CONTENT
46
46
  end
47
47
 
@@ -83,7 +83,7 @@ module Hanamismith
83
83
 
84
84
  def insert_development
85
85
  with_template.insert_after(/group :development do/, <<~CONTENT.gsub("gem", " gem"))
86
- gem "hanami-webconsole", "~> 2.1"
86
+ gem "hanami-webconsole", "~> 2.2.0"
87
87
  gem "localhost", "~> 1.2"
88
88
  gem "rerun", "~> 0.14"
89
89
  CONTENT
@@ -15,12 +15,21 @@ module Hanamismith
15
15
 
16
16
  private
17
17
 
18
- def add_action
19
- builder.call(settings.merge(template_path: "%project_name%/app/action.rb.erb")).render
18
+ def add_db_relation
19
+ builder.call(settings.merge(template_path: "%project_name%/app/db/relation.rb.erb")).render
20
+ end
21
+
22
+ def add_db_repository
23
+ builder.call(settings.merge(template_path: "%project_name%/app/db/repository.rb.erb"))
24
+ .render
25
+ end
26
+
27
+ def add_db_struct
28
+ builder.call(settings.merge(template_path: "%project_name%/app/db/struct.rb.erb")).render
20
29
  end
21
30
 
22
- def add_repository
23
- builder.call(settings.merge(template_path: "%project_name%/app/repository.rb.erb")).render
31
+ def add_action
32
+ builder.call(settings.merge(template_path: "%project_name%/app/action.rb.erb")).render
24
33
  end
25
34
 
26
35
  def add_view
@@ -48,6 +57,13 @@ module Hanamismith
48
57
  builder.call(settings.merge(template_path: "%project_name%/db/migrate")).make_path
49
58
  end
50
59
 
60
+ def add_well_known_security_text
61
+ return unless settings.build_security
62
+
63
+ path = "%project_name%/public/.well-known/security.txt.erb"
64
+ builder.call(settings.merge(template_path: path)).render
65
+ end
66
+
51
67
  def add_public_http_errors
52
68
  %w[404 500].each do |code|
53
69
  path = "%project_name%/public/#{code}.html.erb"
@@ -26,10 +26,7 @@ module Hanamismith
26
26
  Runner.call "npm install"
27
27
 
28
28
  puts "Configurating databases..."
29
- Runner.call "bin/hanami db create"
30
- Runner.call "bin/hanami db migrate"
31
- Runner.call "HANAMI_ENV=test bin/hanami db create"
32
- Runner.call "HANAMI_ENV=test bin/hanami db migrate"
29
+ Runner.call "bin/hanami db prepare"
33
30
  CONTENT
34
31
  end
35
32
  end
@@ -13,7 +13,6 @@ module Hanamismith
13
13
  BUILDERS = [
14
14
  Rubysmith::Builders::Init,
15
15
  Builders::Core,
16
- Builders::Providers::Persistence,
17
16
  Builders::Providers::YJIT,
18
17
  Builders::Refinement,
19
18
  Builders::Icon,
@@ -47,8 +46,6 @@ module Hanamismith
47
46
  Rubysmith::Builders::RSpec::Binstub,
48
47
  Rubysmith::Builders::RSpec::Context,
49
48
  Builders::RSpec::ApplicationSharedContext,
50
- Builders::RSpec::Database,
51
- Builders::RSpec::Factory,
52
49
  Builders::RSpec::Helper,
53
50
  Builders::RSpec::Hanami,
54
51
  Builders::Rack::Configuration,
@@ -64,9 +64,7 @@ jobs:
64
64
 
65
65
  - run:
66
66
  name: Database Setup
67
- command: |
68
- bin/hanami db create
69
- bin/hanami db migrate
67
+ command: bin/hanami db prepare
70
68
 
71
69
  - run:
72
70
  name: Build
@@ -54,9 +54,7 @@ jobs:
54
54
  run: npm install
55
55
 
56
56
  - name: Database Setup
57
- run: |
58
- bin/hanami db create
59
- bin/hanami db migrate
57
+ run: bin/hanami db prepare
60
58
 
61
59
  - name: Build
62
60
  run: |
@@ -1 +1 @@
1
- 22.9.0
1
+ 23.1.0
@@ -0,0 +1,9 @@
1
+ require "hanami/db/relation"
2
+
3
+ <% namespace do %>
4
+ module DB
5
+ # The application database base relation.
6
+ class Relation < Hanami::DB::Relation
7
+ end
8
+ end
9
+ <% end %>
@@ -0,0 +1,9 @@
1
+ require "hanami/db/repo"
2
+
3
+ <% namespace do %>
4
+ module DB
5
+ # The application database base repository.
6
+ class Repository < Hanami::DB::Repo
7
+ end
8
+ end
9
+ <% end %>
@@ -0,0 +1,9 @@
1
+ require "hanami/db/struct"
2
+
3
+ <% namespace do %>
4
+ module DB
5
+ # The application database base struct.
6
+ class Struct < Hanami::DB::Struct
7
+ end
8
+ end
9
+ <% end %>
@@ -1,20 +1,5 @@
1
1
  #! /usr/bin/env ruby
2
2
 
3
3
  require "bundler/setup"
4
- require "hanami/cli"
5
4
 
6
- Hanami::CLI.tap do |cli|
7
- cli.register "db create", Hanami::CLI::Commands::App::DB::Create
8
- cli.register "db create_migration", Hanami::CLI::Commands::App::DB::CreateMigration
9
- cli.register "db drop", Hanami::CLI::Commands::App::DB::Drop
10
- cli.register "db migrate", Hanami::CLI::Commands::App::DB::Migrate
11
- cli.register "db setup", Hanami::CLI::Commands::App::DB::Setup
12
- cli.register "db reset", Hanami::CLI::Commands::App::DB::Reset
13
- cli.register "db rollback", Hanami::CLI::Commands::App::DB::Rollback
14
- cli.register "db seed", Hanami::CLI::Commands::App::DB::Seed
15
- cli.register "db structure dump", Hanami::CLI::Commands::App::DB::Structure::Dump
16
- cli.register "db version", Hanami::CLI::Commands::App::DB::Version
17
- end
18
-
19
- Hanami::CLI::Bundler.require :cli
20
- Dry::CLI.new(Hanami::CLI).call
5
+ load Gem.bin_path "hanami-cli", "hanami"
@@ -3,5 +3,9 @@
3
3
  class Routes < Hanami::Routes
4
4
  slice(:health, at: "/up") { root to: "show" }
5
5
  slice(:home, at: "/") { root to: "show" }
6
+
7
+ <% if settings.build_security %>
8
+ use Rack::Static, root: "public", urls: ["/.well-known/security.txt"]
9
+ <% end %>
6
10
  end
7
11
  <% end %>
@@ -1,6 +1,5 @@
1
1
  <% namespace do %>
2
2
  # The application base settings.
3
3
  class Settings < Hanami::Settings
4
- setting :database_url, constructor: Types::Params::String
5
4
  end
6
5
  <% end %>
@@ -1,6 +1,4 @@
1
1
  require "hanami/boot"
2
2
  Bundler.require :tools if Hanami.env? :development
3
3
 
4
- app = Rack::Builder.app { run Hanami.app }
5
-
6
- run app
4
+ run Hanami.app
@@ -3,8 +3,7 @@ require "dry/types"
3
3
  <% namespace do %>
4
4
  Types = Dry.Types
5
5
 
6
- # Defines custom types.
6
+ # The custom types.
7
7
  module Types
8
- # Add custom types here.
9
8
  end
10
9
  <% end %>
@@ -8,6 +8,6 @@
8
8
  "type": "module",
9
9
  "keywords": ["ruby", "hanami"],
10
10
  "dependencies": {
11
- "hanami-assets": "^2.1.1"
11
+ "hanami-assets": "^2.2.0"
12
12
  }
13
13
  }
@@ -0,0 +1,7 @@
1
+ Contact: <%= settings.project_uri_security %>
2
+ Encryption: <%= settings.organization_uri %>/keybase.txt
3
+ Policy: <%= settings.project_uri_security %>
4
+ Preferred-Languages: en
5
+ Canonical: <%= settings.organization_uri %>/.well-known/security.txt
6
+ Permission: none
7
+ Expires: <%= (Time.new.utc + (60 * 60 * 24 * 183)).iso8601 %>
@@ -1,14 +1,14 @@
1
1
  require "capybara/cuprite"
2
2
  require "capybara/rspec"
3
3
  require "database_cleaner/sequel"
4
+ require "dry/monads"
4
5
  require "rack/test"
6
+ require "rom-factory"
5
7
  require "spec_helper"
6
8
 
7
9
  ENV["HANAMI_ENV"] = "test"
8
10
 
9
11
  require "hanami/prepare"
10
- require_relative "support/database"
11
- require_relative "support/factory"
12
12
 
13
13
  using Refinements::Pathname
14
14
 
@@ -22,25 +22,37 @@ Capybara.register_driver :cuprite do |app|
22
22
  Capybara::Cuprite::Driver.new app, browser_options:, window_size: [1920, 1080]
23
23
  end
24
24
 
25
- DatabaseCleaner[:sequel].strategy = :transaction
26
-
27
25
  Pathname.require_tree SPEC_ROOT.join("support/factories")
28
26
 
29
27
  RSpec.configure do |config|
30
28
  config.include Capybara::DSL, Capybara::RSpecMatchers, :web
29
+ config.include Dry::Monads[:result]
31
30
  config.include Rack::Test::Methods, type: :request
32
- config.include Test::Database, :db
31
+
33
32
  config.include_context "with Hanami application", type: :request
34
33
 
34
+ databases = proc do
35
+ Hanami.app.slices.with_nested.prepend(Hanami.app).each.with_object Set.new do |slice, dbs|
36
+ next unless slice.key? "db.rom"
37
+
38
+ dbs.merge slice["db.rom"].gateways.values.map(&:connection).to_enum
39
+ end
40
+ end
41
+
35
42
  config.before :suite do
36
- Hanami.app.start :persistence
37
- DatabaseCleaner[:sequel].clean_with :truncation
43
+ databases.call.each do |db|
44
+ DatabaseCleaner[:sequel, db:].clean_with :truncation, except: ["schema_migrations"]
45
+ end
38
46
  end
39
47
 
40
48
  config.prepend_before :each, :db do |example|
41
- DatabaseCleaner[:sequel].strategy = example.metadata[:js] ? :truncation : :transaction
42
- DatabaseCleaner[:sequel].start
49
+ databases.call.each do |db|
50
+ DatabaseCleaner[:sequel, db:].strategy = example.metadata[:js] ? :truncation : :transaction
51
+ DatabaseCleaner[:sequel, db:].start
52
+ end
43
53
  end
44
54
 
45
- config.append_after(:each, :db) { DatabaseCleaner[:sequel].clean }
55
+ config.append_after :each, :db do
56
+ databases.call.each { |db| DatabaseCleaner[:sequel, db:].clean }
57
+ end
46
58
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hanamismith
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.47.0
4
+ version: 0.49.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-10-13 00:00:00.000000000 Z
38
+ date: 2024-11-09 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: cogger
@@ -43,14 +43,14 @@ dependencies:
43
43
  requirements:
44
44
  - - "~>"
45
45
  - !ruby/object:Gem::Version
46
- version: '0.26'
46
+ version: '0.31'
47
47
  type: :runtime
48
48
  prerelease: false
49
49
  version_requirements: !ruby/object:Gem::Requirement
50
50
  requirements:
51
51
  - - "~>"
52
52
  - !ruby/object:Gem::Version
53
- version: '0.26'
53
+ version: '0.31'
54
54
  - !ruby/object:Gem::Dependency
55
55
  name: containable
56
56
  requirement: !ruby/object:Gem::Requirement
@@ -99,14 +99,14 @@ dependencies:
99
99
  requirements:
100
100
  - - "~>"
101
101
  - !ruby/object:Gem::Version
102
- version: '2.1'
102
+ version: '2.7'
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: '2.1'
109
+ version: '2.7'
110
110
  - !ruby/object:Gem::Dependency
111
111
  name: htmx
112
112
  requirement: !ruby/object:Gem::Requirement
@@ -127,70 +127,70 @@ dependencies:
127
127
  requirements:
128
128
  - - "~>"
129
129
  - !ruby/object:Gem::Version
130
- version: '3.11'
130
+ version: '3.12'
131
131
  type: :runtime
132
132
  prerelease: false
133
133
  version_requirements: !ruby/object:Gem::Requirement
134
134
  requirements:
135
135
  - - "~>"
136
136
  - !ruby/object:Gem::Version
137
- version: '3.11'
137
+ version: '3.12'
138
138
  - !ruby/object:Gem::Dependency
139
139
  name: refinements
140
140
  requirement: !ruby/object:Gem::Requirement
141
141
  requirements:
142
142
  - - "~>"
143
143
  - !ruby/object:Gem::Version
144
- version: '12.9'
144
+ version: '12.10'
145
145
  type: :runtime
146
146
  prerelease: false
147
147
  version_requirements: !ruby/object:Gem::Requirement
148
148
  requirements:
149
149
  - - "~>"
150
150
  - !ruby/object:Gem::Version
151
- version: '12.9'
151
+ version: '12.10'
152
152
  - !ruby/object:Gem::Dependency
153
153
  name: rubysmith
154
154
  requirement: !ruby/object:Gem::Requirement
155
155
  requirements:
156
156
  - - "~>"
157
157
  - !ruby/object:Gem::Version
158
- version: '7.7'
158
+ version: '7.9'
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: '7.7'
165
+ version: '7.9'
166
166
  - !ruby/object:Gem::Dependency
167
167
  name: runcom
168
168
  requirement: !ruby/object:Gem::Requirement
169
169
  requirements:
170
170
  - - "~>"
171
171
  - !ruby/object:Gem::Version
172
- version: '11.5'
172
+ version: '11.10'
173
173
  type: :runtime
174
174
  prerelease: false
175
175
  version_requirements: !ruby/object:Gem::Requirement
176
176
  requirements:
177
177
  - - "~>"
178
178
  - !ruby/object:Gem::Version
179
- version: '11.5'
179
+ version: '11.10'
180
180
  - !ruby/object:Gem::Dependency
181
181
  name: sod
182
182
  requirement: !ruby/object:Gem::Requirement
183
183
  requirements:
184
184
  - - "~>"
185
185
  - !ruby/object:Gem::Version
186
- version: '0.17'
186
+ version: '0.20'
187
187
  type: :runtime
188
188
  prerelease: false
189
189
  version_requirements: !ruby/object:Gem::Requirement
190
190
  requirements:
191
191
  - - "~>"
192
192
  - !ruby/object:Gem::Version
193
- version: '0.17'
193
+ version: '0.20'
194
194
  - !ruby/object:Gem::Dependency
195
195
  name: spek
196
196
  requirement: !ruby/object:Gem::Requirement
@@ -252,7 +252,6 @@ files:
252
252
  - lib/hanamismith/builders/icon.rb
253
253
  - lib/hanamismith/builders/javascript.rb
254
254
  - lib/hanamismith/builders/node.rb
255
- - lib/hanamismith/builders/providers/persistence.rb
256
255
  - lib/hanamismith/builders/providers/yjit.rb
257
256
  - lib/hanamismith/builders/puma/configuration.rb
258
257
  - lib/hanamismith/builders/puma/procfile.rb
@@ -263,8 +262,6 @@ files:
263
262
  - lib/hanamismith/builders/rake/configuration.rb
264
263
  - lib/hanamismith/builders/refinement.rb
265
264
  - lib/hanamismith/builders/rspec/application_shared_context.rb
266
- - lib/hanamismith/builders/rspec/database.rb
267
- - lib/hanamismith/builders/rspec/factory.rb
268
265
  - lib/hanamismith/builders/rspec/hanami.rb
269
266
  - lib/hanamismith/builders/rspec/helper.rb
270
267
  - lib/hanamismith/builders/setup.rb
@@ -286,7 +283,9 @@ files:
286
283
  - lib/hanamismith/templates/%project_name%/app/action.rb.erb
287
284
  - lib/hanamismith/templates/%project_name%/app/assets/images/icon.svg.erb
288
285
  - lib/hanamismith/templates/%project_name%/app/assets/pwa/manifest.webmanifest.erb
289
- - lib/hanamismith/templates/%project_name%/app/repository.rb.erb
286
+ - lib/hanamismith/templates/%project_name%/app/db/relation.rb.erb
287
+ - lib/hanamismith/templates/%project_name%/app/db/repository.rb.erb
288
+ - lib/hanamismith/templates/%project_name%/app/db/struct.rb.erb
290
289
  - lib/hanamismith/templates/%project_name%/app/view.rb.erb
291
290
  - lib/hanamismith/templates/%project_name%/bin/hanami.erb
292
291
  - lib/hanamismith/templates/%project_name%/config.ru.erb
@@ -305,6 +304,7 @@ files:
305
304
  - lib/hanamismith/templates/%project_name%/lib/%project_path%/refines/actions/response.rb.erb
306
305
  - lib/hanamismith/templates/%project_name%/lib/%project_path%/types.rb.erb
307
306
  - lib/hanamismith/templates/%project_name%/package.json.erb
307
+ - lib/hanamismith/templates/%project_name%/public/.well-known/security.txt.erb
308
308
  - lib/hanamismith/templates/%project_name%/public/404.html.erb
309
309
  - lib/hanamismith/templates/%project_name%/public/500.html.erb
310
310
  - lib/hanamismith/templates/%project_name%/slices/health/action.rb.erb
@@ -328,8 +328,6 @@ files:
328
328
  - lib/hanamismith/templates/%project_name%/spec/hanami_helper.rb.erb
329
329
  - lib/hanamismith/templates/%project_name%/spec/lib/%project_path%/refines/actions/response_spec.rb.erb
330
330
  - lib/hanamismith/templates/%project_name%/spec/slices/health/actions/show_spec.rb.erb
331
- - lib/hanamismith/templates/%project_name%/spec/support/database.rb.erb
332
- - lib/hanamismith/templates/%project_name%/spec/support/factory.rb.erb
333
331
  - lib/hanamismith/templates/%project_name%/spec/support/shared_contexts/application.rb.erb
334
332
  homepage: https://alchemists.io/projects/hanamismith
335
333
  licenses:
@@ -360,7 +358,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
360
358
  - !ruby/object:Gem::Version
361
359
  version: '0'
362
360
  requirements: []
363
- rubygems_version: 3.5.21
361
+ rubygems_version: 3.5.23
364
362
  signing_key:
365
363
  specification_version: 4
366
364
  summary: A command line interface for smithing Hanami projects.
metadata.gz.sig CHANGED
Binary file
@@ -1,20 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "refinements/struct"
4
-
5
- module Hanamismith
6
- module Builders
7
- module Providers
8
- # Builds project skeleton for persistence provider.
9
- class Persistence < Rubysmith::Builders::Abstract
10
- using Refinements::Struct
11
-
12
- def call
13
- path = "%project_name%/config/providers/persistence.rb.erb"
14
- builder.call(settings.merge(template_path: path)).render
15
- true
16
- end
17
- end
18
- end
19
- end
20
- end
@@ -1,23 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "refinements/struct"
4
-
5
- module Hanamismith
6
- module Builders
7
- module RSpec
8
- # Builds project skeleton RSpec application database support.
9
- class Database < Rubysmith::Builders::Abstract
10
- using Refinements::Struct
11
-
12
- def call
13
- return false unless settings.build_rspec
14
-
15
- path = "%project_name%/spec/support/database.rb.erb"
16
- builder.call(settings.merge(template_path: path)).render
17
-
18
- true
19
- end
20
- end
21
- end
22
- end
23
- end
@@ -1,23 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "refinements/struct"
4
-
5
- module Hanamismith
6
- module Builders
7
- module RSpec
8
- # Builds project skeleton RSpec application database support.
9
- class Factory < Rubysmith::Builders::Abstract
10
- using Refinements::Struct
11
-
12
- def call
13
- return false unless settings.build_rspec
14
-
15
- path = "%project_name%/spec/support/factory.rb.erb"
16
- builder.call(settings.merge(template_path: path)).render
17
-
18
- true
19
- end
20
- end
21
- end
22
- end
23
- end
@@ -1,10 +0,0 @@
1
- # auto_register: false
2
-
3
- require "rom-repository"
4
-
5
- <% namespace do %>
6
- # The application repository.
7
- class Repository < ROM::Repository::Root
8
- include Deps[container: "persistence.rom"]
9
- end
10
- <% end %>
@@ -1,10 +0,0 @@
1
- module Test
2
- # Provides convenience methods for testing purposes.
3
- module Database
4
- def self.relations = rom.relations
5
-
6
- def self.rom = Hanami.app["persistence.rom"]
7
-
8
- def self.db = Hanami.app["persistence.db"]
9
- end
10
- end
@@ -1,6 +0,0 @@
1
- require "rom-factory"
2
- require_relative "database"
3
-
4
- module Test
5
- Factory = ROM::Factory.configure { |config| config.rom = Test::Database.rom }
6
- end