dry-web-roda 0.6.3 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (118) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +22 -0
  3. data/CONTRIBUTING.md +29 -0
  4. data/Gemfile +4 -3
  5. data/README.md +1 -1
  6. data/dry-web-roda.gemspec +0 -2
  7. data/lib/dry/web/roda/cli.rb +2 -2
  8. data/lib/dry/web/roda/cli/generate.rb +1 -1
  9. data/lib/dry/web/roda/generate.rb +32 -34
  10. data/lib/dry/web/roda/generators/abstract_generator.rb +54 -0
  11. data/lib/dry/web/roda/generators/abstract_project.rb +118 -0
  12. data/lib/dry/web/roda/generators/flat_project.rb +20 -14
  13. data/lib/dry/web/roda/generators/sub_app.rb +34 -13
  14. data/lib/dry/web/roda/generators/umbrella_project.rb +10 -19
  15. data/lib/dry/web/roda/templates/.env.test.tt +1 -0
  16. data/lib/dry/web/roda/templates/.env.tt +2 -0
  17. data/lib/dry/web/roda/templates/.gitignore +8 -0
  18. data/lib/dry/web/roda/{skeletons/flat_project/lib/__underscored_app_name__ → templates}/.keep +0 -0
  19. data/lib/dry/web/roda/templates/.rspec +2 -0
  20. data/lib/dry/web/roda/{skeletons/flat_project → templates}/Gemfile +4 -3
  21. data/lib/dry/web/roda/{skeletons/umbrella_project → templates}/README.md.tt +2 -2
  22. data/lib/dry/web/roda/templates/Rakefile.tt +66 -0
  23. data/lib/dry/web/roda/{skeletons/flat_project/web/templates/layouts → templates}/application.html.slim +0 -0
  24. data/lib/dry/web/roda/templates/boot__settings.rb.tt +10 -0
  25. data/lib/dry/web/roda/{skeletons/flat_project → templates}/config.ru.tt +0 -0
  26. data/lib/dry/web/roda/{skeletons/flat_project/bin → templates}/console.tt +0 -0
  27. data/lib/dry/web/roda/templates/container.rb.tt +14 -0
  28. data/lib/dry/web/roda/{skeletons/flat_project/web/routes/example.rb.tt → templates/example_routes.rb.tt} +0 -0
  29. data/lib/dry/web/roda/{skeletons/flat_project/system/__underscored_app_name__ → templates/flat_project}/application.rb.tt +6 -1
  30. data/lib/dry/web/roda/templates/flat_project/boot.rb.tt +10 -0
  31. data/lib/dry/web/roda/{skeletons/flat_project/system/__underscored_app_name__ → templates}/import.rb.tt +0 -0
  32. data/lib/dry/web/roda/{skeletons/flat_project/system/boot → templates}/monitor.rb.tt +0 -0
  33. data/lib/dry/web/roda/templates/operation.rb.tt +9 -0
  34. data/lib/dry/web/roda/{skeletons/flat_project/system/__underscored_app_name__ → templates}/repository.rb.tt +4 -2
  35. data/lib/dry/web/roda/templates/rom.rb.tt +39 -0
  36. data/lib/dry/web/roda/{skeletons/flat_project/db → templates}/sample_data.rb +0 -0
  37. data/lib/dry/web/roda/{skeletons/flat_project/db → templates}/seed.rb +0 -0
  38. data/lib/dry/web/roda/templates/settings.rb.tt +9 -0
  39. data/lib/dry/web/roda/{skeletons/flat_project/bin → templates}/setup +0 -0
  40. data/lib/dry/web/roda/{skeletons/umbrella_project/spec/db_helper.rb.tt → templates/spec/db_spec_helper.rb.tt} +2 -3
  41. data/lib/dry/web/roda/templates/spec/factories/example.rb +9 -0
  42. data/lib/dry/web/roda/{skeletons/flat_project → templates}/spec/spec_helper.rb.tt +1 -1
  43. data/lib/dry/web/roda/templates/spec/support/db/factory.rb +8 -0
  44. data/lib/dry/web/roda/templates/spec/support/db/helpers.rb.tt +13 -0
  45. data/lib/dry/web/roda/templates/spec/support/web/helpers.rb.tt +9 -0
  46. data/lib/dry/web/roda/{skeletons/umbrella_project/spec/app_helper.rb → templates/spec/web_spec_helper.rb} +8 -6
  47. data/lib/dry/web/roda/{skeletons/sub_app/system/__underscored_app_name__ → templates/subapp}/application.rb.tt +6 -1
  48. data/lib/dry/web/roda/templates/subapp/boot.rb.tt +5 -0
  49. data/lib/dry/web/roda/{skeletons/sub_app/system/__underscored_app_name__ → templates/subapp}/container.rb.tt +6 -9
  50. data/lib/dry/web/roda/{skeletons/sub_app/system/__underscored_app_name__ → templates/subapp}/transactions.rb.tt +2 -3
  51. data/lib/dry/web/roda/templates/subapp/view_context.rb.tt +8 -0
  52. data/lib/dry/web/roda/templates/subapp/view_controller.rb.tt +17 -0
  53. data/lib/dry/web/roda/{skeletons/flat_project/lib → templates}/types.rb +0 -0
  54. data/lib/dry/web/roda/{skeletons/umbrella_project/system/__underscored_app_name__ → templates/umbrella_project}/application.rb.tt +6 -1
  55. data/lib/dry/web/roda/templates/umbrella_project/boot.rb.tt +16 -0
  56. data/lib/dry/web/roda/templates/view_context.rb.tt +43 -0
  57. data/lib/dry/web/roda/templates/view_controller.rb.tt +17 -0
  58. data/lib/dry/web/roda/{skeletons/flat_project/web/templates → templates}/welcome.html.slim +0 -0
  59. data/lib/dry/web/roda/{skeletons/flat_project/lib/__underscored_app_name__/views → templates}/welcome.rb.tt +2 -2
  60. data/lib/dry/web/roda/version.rb +1 -1
  61. data/lib/roda/plugins/dry_view.rb +1 -1
  62. data/spec/support/project.rb +1 -1
  63. metadata +51 -116
  64. data/lib/dry/web/roda/skeletons/flat_project/README.md.tt +0 -12
  65. data/lib/dry/web/roda/skeletons/flat_project/Rakefile.tt +0 -81
  66. data/lib/dry/web/roda/skeletons/flat_project/config/settings.yml.tt +0 -8
  67. data/lib/dry/web/roda/skeletons/flat_project/lib/persistence/commands/.keep +0 -0
  68. data/lib/dry/web/roda/skeletons/flat_project/lib/persistence/relations/.keep +0 -0
  69. data/lib/dry/web/roda/skeletons/flat_project/log/.keep +0 -0
  70. data/lib/dry/web/roda/skeletons/flat_project/spec/app_helper.rb +0 -35
  71. data/lib/dry/web/roda/skeletons/flat_project/spec/db_helper.rb.tt +0 -24
  72. data/lib/dry/web/roda/skeletons/flat_project/spec/support/db/test_factories.rb +0 -3
  73. data/lib/dry/web/roda/skeletons/flat_project/spec/support/test_helpers.rb.tt +0 -15
  74. data/lib/dry/web/roda/skeletons/flat_project/system/__underscored_app_name__/container.rb.tt +0 -23
  75. data/lib/dry/web/roda/skeletons/flat_project/system/__underscored_app_name__/settings.rb.tt +0 -17
  76. data/lib/dry/web/roda/skeletons/flat_project/system/__underscored_app_name__/transactions.rb.tt +0 -34
  77. data/lib/dry/web/roda/skeletons/flat_project/system/__underscored_app_name__/view_context.rb.tt +0 -39
  78. data/lib/dry/web/roda/skeletons/flat_project/system/__underscored_app_name__/view_controller.rb.tt +0 -13
  79. data/lib/dry/web/roda/skeletons/flat_project/system/boot.rb.tt +0 -11
  80. data/lib/dry/web/roda/skeletons/flat_project/system/boot/rom.rb.tt +0 -32
  81. data/lib/dry/web/roda/skeletons/flat_project/system/boot/view.rb.tt +0 -3
  82. data/lib/dry/web/roda/skeletons/flat_project/transactions/example.rb.tt +0 -10
  83. data/lib/dry/web/roda/skeletons/sub_app/lib/__underscored_app_name__/.keep +0 -0
  84. data/lib/dry/web/roda/skeletons/sub_app/lib/__underscored_app_name__/views/welcome.rb.tt +0 -11
  85. data/lib/dry/web/roda/skeletons/sub_app/system/__underscored_app_name__/import.rb.tt +0 -5
  86. data/lib/dry/web/roda/skeletons/sub_app/system/__underscored_app_name__/view_context.rb.tt +0 -6
  87. data/lib/dry/web/roda/skeletons/sub_app/system/__underscored_app_name__/view_controller.rb.tt +0 -13
  88. data/lib/dry/web/roda/skeletons/sub_app/system/boot.rb.tt +0 -8
  89. data/lib/dry/web/roda/skeletons/sub_app/system/boot/view.rb.tt +0 -3
  90. data/lib/dry/web/roda/skeletons/sub_app/transactions/example.rb.tt +0 -9
  91. data/lib/dry/web/roda/skeletons/sub_app/web/routes/example.rb.tt +0 -7
  92. data/lib/dry/web/roda/skeletons/sub_app/web/templates/layouts/application.html.slim +0 -3
  93. data/lib/dry/web/roda/skeletons/sub_app/web/templates/welcome.html.slim +0 -1
  94. data/lib/dry/web/roda/skeletons/umbrella_project/.gitignore +0 -8
  95. data/lib/dry/web/roda/skeletons/umbrella_project/Gemfile +0 -40
  96. data/lib/dry/web/roda/skeletons/umbrella_project/Rakefile.tt +0 -81
  97. data/lib/dry/web/roda/skeletons/umbrella_project/bin/console.tt +0 -7
  98. data/lib/dry/web/roda/skeletons/umbrella_project/bin/setup +0 -7
  99. data/lib/dry/web/roda/skeletons/umbrella_project/config.ru.tt +0 -2
  100. data/lib/dry/web/roda/skeletons/umbrella_project/config/settings.yml.tt +0 -8
  101. data/lib/dry/web/roda/skeletons/umbrella_project/db/sample_data.rb +0 -1
  102. data/lib/dry/web/roda/skeletons/umbrella_project/db/seed.rb +0 -1
  103. data/lib/dry/web/roda/skeletons/umbrella_project/lib/__underscored_app_name__/repository.rb.tt +0 -11
  104. data/lib/dry/web/roda/skeletons/umbrella_project/lib/__underscored_app_name__/transactions.rb.tt +0 -33
  105. data/lib/dry/web/roda/skeletons/umbrella_project/lib/__underscored_app_name__/view_context.rb.tt +0 -39
  106. data/lib/dry/web/roda/skeletons/umbrella_project/lib/persistence/commands/.keep +0 -0
  107. data/lib/dry/web/roda/skeletons/umbrella_project/lib/persistence/relations/.keep +0 -0
  108. data/lib/dry/web/roda/skeletons/umbrella_project/lib/types.rb +0 -6
  109. data/lib/dry/web/roda/skeletons/umbrella_project/log/.keep +0 -0
  110. data/lib/dry/web/roda/skeletons/umbrella_project/spec/spec_helper.rb.tt +0 -61
  111. data/lib/dry/web/roda/skeletons/umbrella_project/spec/support/db/test_factories.rb +0 -3
  112. data/lib/dry/web/roda/skeletons/umbrella_project/spec/support/test_helpers.rb.tt +0 -15
  113. data/lib/dry/web/roda/skeletons/umbrella_project/system/__underscored_app_name__/container.rb.tt +0 -18
  114. data/lib/dry/web/roda/skeletons/umbrella_project/system/__underscored_app_name__/import.rb.tt +0 -5
  115. data/lib/dry/web/roda/skeletons/umbrella_project/system/__underscored_app_name__/settings.rb.tt +0 -17
  116. data/lib/dry/web/roda/skeletons/umbrella_project/system/boot.rb.tt +0 -12
  117. data/lib/dry/web/roda/skeletons/umbrella_project/system/boot/monitor.rb.tt +0 -9
  118. data/lib/dry/web/roda/skeletons/umbrella_project/system/boot/rom.rb.tt +0 -32
@@ -1,9 +0,0 @@
1
- require "<%= config[:underscored_app_name] %>/transactions"
2
-
3
- <%= config[:camel_cased_app_name] %>::Transactions.define do |t|
4
- # Define your dry-transaction objects here:
5
- #
6
- # t.define "<%= config[:underscored_app_name] %>.transactions.users.sign_up" do
7
- # step :persist, with: "<%= config[:underscored_app_name] %>.users.operations.sign_up"
8
- # end
9
- end
@@ -1,7 +0,0 @@
1
- # Define your routes like this:
2
- #
3
- # class <%= config[:camel_cased_app_name] %>::Application
4
- # route "example" do |r|
5
- # # Routes go here
6
- # end
7
- # end
@@ -1 +0,0 @@
1
- h1 Welcome to dry-web-roda!
@@ -1,8 +0,0 @@
1
- # Ignore secrets in app settings (copy a version to settings.example.yml if you want to check one in)
2
- /config/settings.yml
3
-
4
- # RSpec
5
- /spec/examples.txt
6
-
7
- # Logs
8
- /log/*.log
@@ -1,40 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gem "rake"
4
-
5
- # Web framework
6
- gem "dry-web", ">= 0.6.0"
7
- gem "dry-web-roda", ">= 0.6.0"
8
- gem "puma"
9
- gem "rack_csrf"
10
-
11
- gem "rack", ">= 2.0"
12
- gem "shotgun", ">= 0.9.2"
13
-
14
- # Database persistence
15
- gem "pg"
16
- gem "rom", ">= 3.1.0"
17
- gem "rom-repository"
18
- gem "rom-sql", ">= 1.1.0"
19
-
20
- # Application dependencies
21
- gem "dry-matcher"
22
- gem "dry-monads"
23
- gem "dry-struct"
24
- gem "dry-transaction"
25
- gem "dry-types"
26
- gem "dry-validation"
27
- gem "dry-view", ">= 0.2.2"
28
- gem "slim"
29
-
30
- group :development, :test do
31
- gem "pry-byebug", platform: :mri
32
- end
33
-
34
- group :test do
35
- gem "capybara"
36
- gem "capybara-screenshot"
37
- gem "database_cleaner"
38
- gem "poltergeist"
39
- gem "rspec"
40
- end
@@ -1,81 +0,0 @@
1
- require "bundler/setup"
2
-
3
- require "byebug" unless ENV["RACK_ENV"] == "production"
4
-
5
- begin
6
- require "rspec/core/rake_task"
7
- RSpec::Core::RakeTask.new :spec
8
- task default: [:spec]
9
- rescue LoadError
10
- end
11
-
12
- require_relative "system/<%= config[:underscored_app_name] %>/container"
13
-
14
- require "rom/sql/rake_task"
15
- require "sequel"
16
- namespace :db do
17
- task :setup do
18
- <%= config[:camel_cased_app_name] %>::Container.boot! :rom
19
- end
20
-
21
- # The following migration tasks are adapted from https://gist.github.com/kalmbach/4471560
22
- Sequel.extension :migration
23
- DB = Sequel.connect(<%= config[:camel_cased_app_name] %>::Container.settings.database_url)
24
-
25
- desc "Prints current schema version"
26
- task :version do
27
- version = if DB.tables.include?(:schema_migrations)
28
- DB[:schema_migrations].order(:filename).last[:filename]
29
- end || "not available"
30
-
31
- puts "Current schema version: #{version}"
32
- end
33
-
34
- namespace :structure do
35
- desc "Dump database structure to db/structure.sql"
36
- task :dump do
37
- require "uri"
38
- uri = URI(DB.url)
39
-
40
- dump = `pg_dump -h #{uri.hostname} -s -x -O #{uri.path.tr("/", "")}`
41
- File.open "db/structure.sql", "w" do |file|
42
- file.write dump
43
- end
44
- end
45
- end
46
-
47
- task :check_migrations_exist do
48
- unless Dir["db/migrate/*.rb"].any?
49
- puts "No migrations found"
50
- exit 1
51
- end
52
- end
53
-
54
- # Enhance the migration task provided by ROM
55
- desc "Perform migration up to latest migration available"
56
- task :migrate => [:check_migrations_exist] do
57
- # Once db:migrate finishes, dump the db structure:
58
- Rake::Task["db:structure:dump"].execute
59
-
60
- # And print the current migration version:
61
- Rake::Task["db:version"].execute
62
- end
63
-
64
- desc "Perform rollback to specified target"
65
- task :rollback, :target do |t, args|
66
- Sequel::Migrator.run(DB, "db/migrate", :target => args[:target].to_i)
67
- Rake::Task["db:version"].execute
68
- end
69
-
70
- desc "Load seed data into the database"
71
- task :seed do
72
- seed_data = File.join("db", "seed.rb")
73
- load(seed_data) if File.exist?(seed_data)
74
- end
75
-
76
- desc "Load a small, representative set of data so that the application can start in a useful state (for development)."
77
- task :sample_data do
78
- sample_data = File.join("db", "sample_data.rb")
79
- load(sample_data) if File.exist?(sample_data)
80
- end
81
- end
@@ -1,7 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require "bundler/setup"
4
- require "dry/web/console"
5
- require_relative "../system/boot"
6
-
7
- Dry::Web::Console.start
@@ -1,7 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- APP_ROOT = File.expand_path("../../", __FILE__)
4
-
5
- Dir.chdir(APP_ROOT) do
6
- # Set up your app for development here
7
- end
@@ -1,2 +0,0 @@
1
- require_relative "system/boot"
2
- run <%= config[:camel_cased_app_name] %>::Application.freeze.app
@@ -1,8 +0,0 @@
1
- development: &base
2
- database_url: 'postgres://localhost/<%= config[:underscored_app_name] %>_development'
3
- session_secret: '<%= SecureRandom.hex %>'
4
- test:
5
- <<: *base
6
- database_url: 'postgres://localhost/<%= config[:underscored_app_name] %>_test'
7
- production:
8
- <<: *base
@@ -1 +0,0 @@
1
- # Build your sample data here
@@ -1 +0,0 @@
1
- # Build your seed data here
@@ -1,11 +0,0 @@
1
- require "rom-repository"
2
- require "<%= config[:underscored_app_name] %>/container"
3
- require "<%= config[:underscored_app_name] %>/import"
4
-
5
- <%= config[:camel_cased_app_name] %>::Container.boot! :rom
6
-
7
- module <%= config[:camel_cased_app_name] %>
8
- class Repository < ROM::Repository::Root
9
- include <%= config[:camel_cased_app_name] %>::Import.args["persistence.rom"]
10
- end
11
- end
@@ -1,33 +0,0 @@
1
- require "dry-configurable"
2
- require "dry-transaction"
3
-
4
- module <%= config[:camel_cased_app_name] %>
5
- class Transactions
6
- extend Dry::Configurable
7
-
8
- attr_reader :options
9
-
10
- setting :container
11
- setting :options, {}
12
-
13
- def self.define(&block)
14
- yield(new(options))
15
- end
16
-
17
- def self.options
18
- {container: config.container}.merge(config.options)
19
- end
20
-
21
- def initialize(options)
22
- @options = options
23
- end
24
-
25
- def container
26
- options[:container]
27
- end
28
-
29
- def define(name, &block)
30
- container.register(name, Dry.Transaction(options, &block))
31
- end
32
- end
33
- end
@@ -1,39 +0,0 @@
1
- module <%= config[:camel_cased_app_name] %>
2
- class ViewContext
3
- attr_reader :attrs
4
-
5
- def initialize(attrs = {})
6
- @attrs = attrs
7
- end
8
-
9
- def csrf_token
10
- self[:csrf_token]
11
- end
12
-
13
- def csrf_metatag
14
- self[:csrf_metatag]
15
- end
16
-
17
- def csrf_tag
18
- self[:csrf_tag]
19
- end
20
-
21
- def flash
22
- self[:flash]
23
- end
24
-
25
- def flash?
26
- %i[notice alert].any? { |type| flash[type] }
27
- end
28
-
29
- def with(new_attrs)
30
- self.class.new(attrs.merge(new_attrs))
31
- end
32
-
33
- private
34
-
35
- def [](name)
36
- attrs.fetch(name)
37
- end
38
- end
39
- end
@@ -1,6 +0,0 @@
1
- require "dry-struct"
2
- require "dry-types"
3
-
4
- module Types
5
- include Dry::Types.module
6
- end
@@ -1,61 +0,0 @@
1
- ENV["RACK_ENV"] = "test"
2
-
3
- require "byebug"
4
-
5
- SPEC_ROOT = Pathname(__FILE__).dirname
6
-
7
- Dir[SPEC_ROOT.join("support/*.rb").to_s].each(&method(:require))
8
- Dir[SPEC_ROOT.join("shared/*.rb").to_s].each(&method(:require))
9
-
10
- require SPEC_ROOT.join("../system/<%= config[:underscored_app_name] %>/container")
11
-
12
- RSpec.configure do |config|
13
- config.disable_monkey_patching!
14
-
15
- config.expect_with :rspec do |expectations|
16
- # This option will default to `true` in RSpec 4.
17
- expectations.include_chain_clauses_in_custom_matcher_descriptions = true
18
- end
19
-
20
- config.mock_with :rspec do |mocks|
21
- # Prevents you from mocking or stubbing a method that does not exist on a
22
- # real object. This is generally recommended, and will default to `true`
23
- # in RSpec 4.
24
- mocks.verify_partial_doubles = true
25
- end
26
-
27
- # These two settings work together to allow you to limit a spec run to
28
- # individual examples or groups you care about by tagging them with `:focus`
29
- # metadata. When nothing is tagged with `:focus`, all examples get run.
30
- config.filter_run :focus
31
- config.run_all_when_everything_filtered = true
32
-
33
- # Allows RSpec to persist some state between runs in order to support the
34
- # `--only-failures` and `--next-failure` CLI options.
35
- config.example_status_persistence_file_path = "spec/examples.txt"
36
-
37
- # Many RSpec users commonly either run the entire suite or an individual
38
- # file, and it's useful to allow more verbose output when running an
39
- # individual spec file.
40
- if config.files_to_run.one?
41
- # Use the documentation formatter for detailed output, unless a formatter
42
- # has already been configured (e.g. via a command-line flag).
43
- config.default_formatter = "doc"
44
- end
45
-
46
- # Print the 10 slowest examples and example groups at the end of the spec
47
- # run, to help surface which specs are running particularly slow.
48
- config.profile_examples = 10
49
-
50
- # Run specs in random order to surface order dependencies. If you find an
51
- # order dependency and want to debug it, you can fix the order by providing
52
- # the seed, which is printed after each run.
53
- # --seed 1234
54
- config.order = :random
55
-
56
- # Seed global randomization in this process using the `--seed` CLI option.
57
- # Setting this allows you to use `--seed` to deterministically reproduce
58
- # test failures related to randomization by passing the same `--seed` value
59
- # as the one that triggered the failure.
60
- Kernel.srand config.seed
61
- end
@@ -1,3 +0,0 @@
1
- module TestFactories
2
- # Helper methods to create test data go here
3
- end
@@ -1,15 +0,0 @@
1
- module TestHelpers
2
- module_function
3
-
4
- def app
5
- <%= config[:camel_cased_app_name] %>::Application.app
6
- end
7
-
8
- def rom
9
- <%= config[:camel_cased_app_name] %>::Container["persistence.rom"]
10
- end
11
-
12
- def db_connection
13
- rom.gateways[:default].connection
14
- end
15
- end
@@ -1,18 +0,0 @@
1
- require "dry/web/umbrella"
2
- require_relative "settings"
3
-
4
- module <%= config[:camel_cased_app_name] %>
5
- class Container < Dry::Web::Umbrella
6
- configure do
7
- config.name = :core
8
- config.settings_loader = <%= config[:camel_cased_app_name] %>::Settings
9
- config.listeners = true
10
- end
11
-
12
- load_paths! "lib", "system"
13
-
14
- def self.settings
15
- config.settings
16
- end
17
- end
18
- end
@@ -1,5 +0,0 @@
1
- require_relative "container"
2
-
3
- module <%= config[:camel_cased_app_name] %>
4
- Import = <%= config[:camel_cased_app_name] %>::Container.injector
5
- end
@@ -1,17 +0,0 @@
1
- require "dry/web/settings"
2
- require "dry-types"
3
-
4
- module <%= config[:camel_cased_app_name] %>
5
- class Settings < Dry::Web::Settings
6
- module Types
7
- include Dry::Types.module
8
-
9
- module Required
10
- String = Types::Strict::String.constrained(min_size: 1)
11
- end
12
- end
13
-
14
- setting :database_url, Types::Required::String
15
- setting :session_secret, Types::Required::String
16
- end
17
- end
@@ -1,12 +0,0 @@
1
- require "byebug" if ENV["RACK_ENV"] == "development"
2
- require "pry" if ENV["RACK_ENV"] == "development"
3
-
4
- require_relative "<%= config[:underscored_app_name] %>/container"
5
-
6
- <%= config[:camel_cased_app_name] %>::Container.finalize! do |container|
7
- end
8
-
9
- app_paths = Pathname(__FILE__).dirname.join("../apps").realpath.join("*")
10
- Dir[app_paths].each { |f| require "#{f}/system/boot" }
11
-
12
- require_relative "<%= config[:underscored_app_name] %>/application"