dry-web-roda 0.8.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -0
- data/lib/dry/web/roda/application.rb +0 -2
- data/lib/dry/web/roda/generators/abstract_project.rb +2 -2
- data/lib/dry/web/roda/generators/flat_project.rb +1 -1
- data/lib/dry/web/roda/generators/sub_app.rb +20 -9
- data/lib/dry/web/roda/generators/umbrella_project.rb +1 -1
- data/lib/dry/web/roda/templates/config.ru.tt +1 -1
- data/lib/dry/web/roda/templates/example_routes.rb.tt +1 -1
- data/lib/dry/web/roda/templates/flat_project/boot.rb.tt +1 -1
- data/lib/dry/web/roda/templates/flat_project/{application.rb.tt → web.rb.tt} +16 -3
- data/lib/dry/web/roda/templates/repository.rb.tt +1 -1
- data/lib/dry/web/roda/templates/spec/support/web/helpers.rb.tt +1 -1
- data/lib/dry/web/roda/templates/subapp/boot.rb.tt +3 -3
- data/lib/dry/web/roda/templates/subapp/container.rb.tt +13 -11
- data/lib/dry/web/roda/templates/subapp/example_routes.rb.tt +7 -0
- data/lib/dry/web/roda/templates/subapp/import.rb.tt +7 -0
- data/lib/dry/web/roda/templates/subapp/view__context.rb.tt +10 -0
- data/lib/dry/web/roda/templates/subapp/view__controller.rb.tt +19 -0
- data/lib/dry/web/roda/templates/subapp/web.rb.tt +44 -0
- data/lib/dry/web/roda/templates/subapp/welcome.rb.tt +13 -0
- data/lib/dry/web/roda/templates/umbrella_project/boot.rb.tt +1 -1
- data/lib/dry/web/roda/templates/umbrella_project/{application.rb.tt → web.rb.tt} +4 -2
- data/lib/dry/web/roda/templates/{view_context.rb.tt → view__context.rb.tt} +0 -0
- data/lib/dry/web/roda/templates/{view_controller.rb.tt → view__controller.rb.tt} +1 -1
- data/lib/dry/web/roda/version.rb +1 -1
- data/lib/roda/plugins/dry_view.rb +1 -8
- metadata +12 -10
- data/lib/dry/web/roda/templates/subapp/application.rb.tt +0 -29
- data/lib/dry/web/roda/templates/subapp/transactions.rb.tt +0 -11
- data/lib/dry/web/roda/templates/subapp/view_context.rb.tt +0 -8
- data/lib/dry/web/roda/templates/subapp/view_controller.rb.tt +0 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d51d0133c498a3b101e824cbb91adfc1b7a87cfc
|
4
|
+
data.tar.gz: 747565954671456f454dcfb0e12e42ff5bc24565
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 61b414798d0270f2e71dd81e7d54a27ccecf272975f0e43e773a06ee064e74f5dfebb500733bf6e96f1fd723b2306f2e9925392f29f0571238554653e4a79ad9
|
7
|
+
data.tar.gz: fc6d2c99bc0af374820a297e4350fb0c60fe49df08c560ec1603ffc6a0949136b3d1cfa1cfee9352500ac2f8f30aa40777cda699fc718ff786224380c0045328
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,19 @@
|
|
1
|
+
# 0.9.0 - 2017-10-27
|
2
|
+
|
3
|
+
### Changed
|
4
|
+
|
5
|
+
- `Dry::Web::Roda::Application` no longer automatically enables `error_handler` and `multi_route` Roda plugins (timriley)
|
6
|
+
- `DryView` Roda plugin no longer automatically enables `csrf` and `flash` Roda plugins (timriley)
|
7
|
+
- `DryView` Roda plugin no longer populates its `#view_context_options` with flash and CSRF data (timriley)
|
8
|
+
|
9
|
+
In generated projects:
|
10
|
+
|
11
|
+
- Nest sub-apps under the root project namespace (e.g. `MyApp::Main`) instead of keeping them at the top-level (`Main`) (timriley)
|
12
|
+
- Rename `Dry::Web::Roda::Application` subclasses from `Application` to `Web` (timriley)
|
13
|
+
- Comment out `r.multi_route` routing instruction in `Web` classes by default, to avoid future Roda exceptions (timriley)
|
14
|
+
- Enable more Roda plugins (`csrf`, `error_handler`, `flash`, `multi_route`) directly in `Web` classes (timriley)
|
15
|
+
- Add default implementation of `#view_context_options` to `Web` classes for `dry_view` Roda plugin (timriley)
|
16
|
+
|
1
17
|
# 0.8.0 - 2017-10-26
|
2
18
|
|
3
19
|
### Changed
|
@@ -53,8 +53,8 @@ module Dry
|
|
53
53
|
add_template('repository.rb.tt', "lib/#{underscored_project_name}/repository.rb")
|
54
54
|
add_template('.keep', 'lib/persistence/relations/.keep')
|
55
55
|
add_template('.keep', 'lib/persistence/commands/.keep')
|
56
|
-
add_template('
|
57
|
-
add_template('
|
56
|
+
add_template('view__context.rb.tt', "lib/#{underscored_project_name}/view/context.rb")
|
57
|
+
add_template('view__controller.rb.tt', "lib/#{underscored_project_name}/view/controller.rb")
|
58
58
|
end
|
59
59
|
|
60
60
|
def add_log
|
@@ -19,7 +19,7 @@ module Dry
|
|
19
19
|
end
|
20
20
|
|
21
21
|
def add_application
|
22
|
-
add_template("flat_project/
|
22
|
+
add_template("flat_project/web.rb.tt", "system/#{underscored_project_name}/web.rb")
|
23
23
|
end
|
24
24
|
|
25
25
|
def add_views
|
@@ -21,22 +21,33 @@ module Dry
|
|
21
21
|
options.fetch(:umbrella)
|
22
22
|
end
|
23
23
|
|
24
|
+
def underscored_umbrella_name
|
25
|
+
Inflections.underscored_name(umbrella_name)
|
26
|
+
end
|
27
|
+
|
28
|
+
def lib_path
|
29
|
+
"lib/#{underscored_umbrella_name}/#{underscored_project_name}"
|
30
|
+
end
|
31
|
+
|
32
|
+
def system_lib_path
|
33
|
+
"system/#{underscored_umbrella_name}/#{underscored_project_name}"
|
34
|
+
end
|
35
|
+
|
24
36
|
def add_lib
|
25
|
-
add_template('subapp/
|
26
|
-
add_template('subapp/
|
27
|
-
add_template('welcome.rb.tt', "
|
37
|
+
add_template('subapp/view__context.rb.tt', "#{lib_path}/view/context.rb")
|
38
|
+
add_template('subapp/view__controller.rb.tt', "#{lib_path}/view/controller.rb")
|
39
|
+
add_template('subapp/welcome.rb.tt', "#{lib_path}/views/welcome.rb")
|
28
40
|
end
|
29
41
|
|
30
42
|
def add_system
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
add_template('import.rb.tt', "system/#{underscored_project_name}/import.rb")
|
43
|
+
add_template('subapp/web.rb.tt', "#{system_lib_path}/web.rb")
|
44
|
+
add_template('subapp/container.rb.tt', "#{system_lib_path}/container.rb")
|
45
|
+
add_template('subapp/import.rb.tt', "#{system_lib_path}/import.rb")
|
35
46
|
add_template('subapp/boot.rb.tt', 'system/boot.rb')
|
36
47
|
end
|
37
48
|
|
38
49
|
def add_web
|
39
|
-
add_template('example_routes.rb.tt', 'web/routes/example.rb')
|
50
|
+
add_template('subapp/example_routes.rb.tt', 'web/routes/example.rb')
|
40
51
|
add_template('application.html.slim', 'web/templates/layouts/application.html.slim')
|
41
52
|
add_template('welcome.html.slim', 'web/templates/welcome.html.slim')
|
42
53
|
end
|
@@ -45,7 +56,7 @@ module Dry
|
|
45
56
|
{
|
46
57
|
underscored_project_name: underscored_project_name,
|
47
58
|
camel_cased_app_name: Inflections.camel_cased_name(target_dir),
|
48
|
-
underscored_umbrella_name:
|
59
|
+
underscored_umbrella_name: underscored_umbrella_name,
|
49
60
|
camel_cased_umbrella_name: Inflections.camel_cased_name(umbrella_name),
|
50
61
|
}
|
51
62
|
end
|
@@ -14,7 +14,7 @@ module Dry
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def add_application
|
17
|
-
add_template("umbrella_project/
|
17
|
+
add_template("umbrella_project/web.rb.tt", "system/#{underscored_project_name}/web.rb")
|
18
18
|
end
|
19
19
|
|
20
20
|
def post_process_callback
|
@@ -1,2 +1,2 @@
|
|
1
1
|
require_relative "system/boot"
|
2
|
-
run <%= config[:camel_cased_app_name] %>::
|
2
|
+
run <%= config[:camel_cased_app_name] %>::Web.freeze.app
|
@@ -2,7 +2,7 @@ require "dry/web/roda/application"
|
|
2
2
|
require_relative "container"
|
3
3
|
|
4
4
|
module <%= config[:camel_cased_app_name] %>
|
5
|
-
class
|
5
|
+
class Web < Dry::Web::Roda::Application
|
6
6
|
configure do |config|
|
7
7
|
config.container = Container
|
8
8
|
config.routes = "web/routes".freeze
|
@@ -13,11 +13,14 @@ module <%= config[:camel_cased_app_name] %>
|
|
13
13
|
use Rack::Session::Cookie, key: "<%= config[:underscored_project_name] %>.session", secret: self["settings"].session_secret
|
14
14
|
|
15
15
|
plugin :csrf, raise: true
|
16
|
-
plugin :flash
|
17
16
|
plugin :dry_view
|
17
|
+
plugin :error_handler
|
18
|
+
plugin :flash
|
19
|
+
plugin :multi_route
|
18
20
|
|
19
21
|
route do |r|
|
20
|
-
|
22
|
+
# Enable this after writing your first web/routes/ file
|
23
|
+
# r.multi_route
|
21
24
|
|
22
25
|
r.root do
|
23
26
|
r.view "welcome"
|
@@ -29,6 +32,16 @@ module <%= config[:camel_cased_app_name] %>
|
|
29
32
|
raise e
|
30
33
|
end
|
31
34
|
|
35
|
+
# Request-specific options for dry-view context object
|
36
|
+
def view_context_options
|
37
|
+
{
|
38
|
+
flash: flash,
|
39
|
+
csrf_token: Rack::Csrf.token(request.env),
|
40
|
+
csrf_metatag: Rack::Csrf.metatag(request.env),
|
41
|
+
csrf_tag: Rack::Csrf.tag(request.env),
|
42
|
+
}
|
43
|
+
end
|
44
|
+
|
32
45
|
load_routes!
|
33
46
|
end
|
34
47
|
end
|
@@ -6,6 +6,6 @@ require "<%= config[:underscored_project_name] %>/import"
|
|
6
6
|
|
7
7
|
module <%= config[:camel_cased_app_name] %>
|
8
8
|
class Repository < ROM::Repository::Root
|
9
|
-
include
|
9
|
+
include Import.args["persistence.rom"]
|
10
10
|
end
|
11
11
|
end
|
@@ -1,5 +1,5 @@
|
|
1
|
-
require_relative "<%= config[:underscored_project_name] %>/container"
|
1
|
+
require_relative "<%= config[:underscored_umbrella_name] %>/<%= config[:underscored_project_name] %>/container"
|
2
2
|
|
3
|
-
<%= config[:camel_cased_app_name] %>::Container.finalize!
|
3
|
+
<%= config[:camel_cased_umbrella_name] %>::<%= config[:camel_cased_app_name] %>::Container.finalize!
|
4
4
|
|
5
|
-
require "<%= config[:underscored_project_name] %>/
|
5
|
+
require "<%= config[:underscored_umbrella_name] %>/<%= config[:underscored_project_name] %>/web"
|
@@ -2,18 +2,20 @@ require "pathname"
|
|
2
2
|
require "dry/web/container"
|
3
3
|
require "dry/system/components"
|
4
4
|
|
5
|
-
module <%= config[:
|
6
|
-
|
7
|
-
|
8
|
-
|
5
|
+
module <%= config[:camel_cased_umbrella_name] %>
|
6
|
+
module <%= config[:camel_cased_app_name] %>
|
7
|
+
class Container < Dry::Web::Container
|
8
|
+
require root.join("system/<%= config[:underscored_umbrella_name] %>/container")
|
9
|
+
import core: <%= config[:camel_cased_umbrella_name] %>::Container
|
9
10
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
11
|
+
configure do |config|
|
12
|
+
config.root = Pathname(__FILE__).join("../../..").realpath.dirname.freeze
|
13
|
+
config.logger = <%= config[:camel_cased_umbrella_name] %>::Container[:logger]
|
14
|
+
config.default_namespace = "<%= config[:underscored_umbrella_name] %>.<%= config[:underscored_project_name] %>"
|
15
|
+
config.auto_register = %w[lib/<%= config[:underscored_umbrella_name] %>/<%= config[:underscored_project_name] %>]
|
16
|
+
end
|
16
17
|
|
17
|
-
|
18
|
+
load_paths! "lib"
|
19
|
+
end
|
18
20
|
end
|
19
21
|
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
require "<%= config[:underscored_umbrella_name] %>/view/context"
|
2
|
+
|
3
|
+
module <%= config[:camel_cased_umbrella_name] %>
|
4
|
+
module <%= config[:camel_cased_app_name] %>
|
5
|
+
module View
|
6
|
+
class Context < <%= config[:camel_cased_umbrella_name] %>::View::Context
|
7
|
+
end
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# auto_register: false
|
2
|
+
|
3
|
+
require "slim"
|
4
|
+
require "dry/view/controller"
|
5
|
+
require "<%= config[:underscored_umbrella_name] %>/<%= config[:underscored_project_name] %>/container"
|
6
|
+
|
7
|
+
module <%= config[:camel_cased_umbrella_name] %>
|
8
|
+
module <%= config[:camel_cased_app_name] %>
|
9
|
+
module View
|
10
|
+
class Controller < Dry::View::Controller
|
11
|
+
configure do |config|
|
12
|
+
config.paths = [Container.root.join("web/templates")]
|
13
|
+
config.context = Container["view.context"]
|
14
|
+
config.layout = "application"
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
require "dry/web/roda/application"
|
2
|
+
require_relative "container"
|
3
|
+
|
4
|
+
module <%= config[:camel_cased_umbrella_name] %>
|
5
|
+
module <%= config[:camel_cased_app_name] %>
|
6
|
+
class Web < Dry::Web::Roda::Application
|
7
|
+
configure do |config|
|
8
|
+
config.container = Container
|
9
|
+
config.routes = "web/routes".freeze
|
10
|
+
end
|
11
|
+
|
12
|
+
opts[:root] = Pathname(__FILE__).join("../../..").realpath.dirname
|
13
|
+
|
14
|
+
use Rack::Session::Cookie, key: "<%= config[:underscored_umbrella_name] %>.<%= config[:underscored_project_name] %>.session", secret: self["core.settings"].session_secret
|
15
|
+
|
16
|
+
plugin :csrf, raise: true
|
17
|
+
plugin :dry_view
|
18
|
+
plugin :error_handler
|
19
|
+
plugin :flash
|
20
|
+
plugin :multi_route
|
21
|
+
|
22
|
+
route do |r|
|
23
|
+
# Enable this after writing your first web/routes/ file
|
24
|
+
# r.multi_route
|
25
|
+
|
26
|
+
r.root do
|
27
|
+
r.view "welcome"
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
# Request-specific options for dry-view context object
|
32
|
+
def view_context_options
|
33
|
+
{
|
34
|
+
flash: flash,
|
35
|
+
csrf_token: Rack::Csrf.token(request.env),
|
36
|
+
csrf_metatag: Rack::Csrf.metatag(request.env),
|
37
|
+
csrf_tag: Rack::Csrf.tag(request.env),
|
38
|
+
}
|
39
|
+
end
|
40
|
+
|
41
|
+
load_routes!
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
require "<%= config[:underscored_umbrella_name] %>/<%= config[:underscored_project_name] %>/view/controller"
|
2
|
+
|
3
|
+
module <%= config[:camel_cased_umbrella_name] %>
|
4
|
+
module <%= config[:camel_cased_app_name] %>
|
5
|
+
module Views
|
6
|
+
class Welcome < View::Controller
|
7
|
+
configure do |config|
|
8
|
+
config.template = "welcome"
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -2,13 +2,15 @@ require "dry/web/roda/application"
|
|
2
2
|
require_relative "container"
|
3
3
|
|
4
4
|
module <%= config[:camel_cased_app_name] %>
|
5
|
-
class
|
5
|
+
class Web < Dry::Web::Roda::Application
|
6
6
|
configure do |config|
|
7
7
|
config.container = Container
|
8
8
|
end
|
9
9
|
|
10
|
+
plugin :error_handler
|
11
|
+
|
10
12
|
route do |r|
|
11
|
-
r.run
|
13
|
+
r.run <%= config[:camel_cased_app_name] %>::Main::Web.freeze.app
|
12
14
|
end
|
13
15
|
|
14
16
|
error do |e|
|
File without changes
|
data/lib/dry/web/roda/version.rb
CHANGED
@@ -2,8 +2,6 @@ class Roda
|
|
2
2
|
module RodaPlugins
|
3
3
|
module DryView
|
4
4
|
def self.load_dependencies(app)
|
5
|
-
app.plugin :csrf
|
6
|
-
app.plugin :flash
|
7
5
|
app.plugin :flow
|
8
6
|
end
|
9
7
|
|
@@ -13,12 +11,7 @@ class Roda
|
|
13
11
|
end
|
14
12
|
|
15
13
|
def view_context_options
|
16
|
-
{
|
17
|
-
flash: flash,
|
18
|
-
csrf_token: Rack::Csrf.token(request.env),
|
19
|
-
csrf_metatag: Rack::Csrf.metatag(request.env),
|
20
|
-
csrf_tag: Rack::Csrf.tag(request.env),
|
21
|
-
}
|
14
|
+
{}
|
22
15
|
end
|
23
16
|
end
|
24
17
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dry-web-roda
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Piotr Solnica
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-10-
|
11
|
+
date: 2017-10-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-configurable
|
@@ -207,8 +207,8 @@ files:
|
|
207
207
|
- lib/dry/web/roda/templates/console.tt
|
208
208
|
- lib/dry/web/roda/templates/container.rb.tt
|
209
209
|
- lib/dry/web/roda/templates/example_routes.rb.tt
|
210
|
-
- lib/dry/web/roda/templates/flat_project/application.rb.tt
|
211
210
|
- lib/dry/web/roda/templates/flat_project/boot.rb.tt
|
211
|
+
- lib/dry/web/roda/templates/flat_project/web.rb.tt
|
212
212
|
- lib/dry/web/roda/templates/import.rb.tt
|
213
213
|
- lib/dry/web/roda/templates/monitor.rb.tt
|
214
214
|
- lib/dry/web/roda/templates/operation.rb.tt
|
@@ -225,17 +225,19 @@ files:
|
|
225
225
|
- lib/dry/web/roda/templates/spec/support/db/helpers.rb.tt
|
226
226
|
- lib/dry/web/roda/templates/spec/support/web/helpers.rb.tt
|
227
227
|
- lib/dry/web/roda/templates/spec/web_spec_helper.rb
|
228
|
-
- lib/dry/web/roda/templates/subapp/application.rb.tt
|
229
228
|
- lib/dry/web/roda/templates/subapp/boot.rb.tt
|
230
229
|
- lib/dry/web/roda/templates/subapp/container.rb.tt
|
231
|
-
- lib/dry/web/roda/templates/subapp/
|
232
|
-
- lib/dry/web/roda/templates/subapp/
|
233
|
-
- lib/dry/web/roda/templates/subapp/
|
230
|
+
- lib/dry/web/roda/templates/subapp/example_routes.rb.tt
|
231
|
+
- lib/dry/web/roda/templates/subapp/import.rb.tt
|
232
|
+
- lib/dry/web/roda/templates/subapp/view__context.rb.tt
|
233
|
+
- lib/dry/web/roda/templates/subapp/view__controller.rb.tt
|
234
|
+
- lib/dry/web/roda/templates/subapp/web.rb.tt
|
235
|
+
- lib/dry/web/roda/templates/subapp/welcome.rb.tt
|
234
236
|
- lib/dry/web/roda/templates/types.rb
|
235
|
-
- lib/dry/web/roda/templates/umbrella_project/application.rb.tt
|
236
237
|
- lib/dry/web/roda/templates/umbrella_project/boot.rb.tt
|
237
|
-
- lib/dry/web/roda/templates/
|
238
|
-
- lib/dry/web/roda/templates/
|
238
|
+
- lib/dry/web/roda/templates/umbrella_project/web.rb.tt
|
239
|
+
- lib/dry/web/roda/templates/view__context.rb.tt
|
240
|
+
- lib/dry/web/roda/templates/view__controller.rb.tt
|
239
241
|
- lib/dry/web/roda/templates/welcome.html.slim
|
240
242
|
- lib/dry/web/roda/templates/welcome.rb.tt
|
241
243
|
- lib/dry/web/roda/version.rb
|
@@ -1,29 +0,0 @@
|
|
1
|
-
require "dry/web/roda/application"
|
2
|
-
require_relative "container"
|
3
|
-
|
4
|
-
module <%= config[:camel_cased_app_name] %>
|
5
|
-
class Application < Dry::Web::Roda::Application
|
6
|
-
configure do |config|
|
7
|
-
config.container = Container
|
8
|
-
config.routes = "web/routes".freeze
|
9
|
-
end
|
10
|
-
|
11
|
-
opts[:root] = Pathname(__FILE__).join("../..").realpath.dirname
|
12
|
-
|
13
|
-
use Rack::Session::Cookie, key: "<%= config[:underscored_project_name] %>.session", secret: self["core.settings"].session_secret
|
14
|
-
|
15
|
-
plugin :csrf, raise: true
|
16
|
-
plugin :flash
|
17
|
-
plugin :dry_view
|
18
|
-
|
19
|
-
route do |r|
|
20
|
-
r.multi_route
|
21
|
-
|
22
|
-
r.root do
|
23
|
-
r.view "welcome"
|
24
|
-
end
|
25
|
-
end
|
26
|
-
|
27
|
-
load_routes!
|
28
|
-
end
|
29
|
-
end
|
@@ -1,11 +0,0 @@
|
|
1
|
-
require "dry-transaction"
|
2
|
-
require "<%= config[:underscored_project_name] %>/container"
|
3
|
-
require "<%= config[:underscored_project_name] %>/import"
|
4
|
-
|
5
|
-
module <%= config[:camel_cased_app_name] %>
|
6
|
-
class Transactions < <%= config[:camel_cased_umbrella_name] %>::Transactions
|
7
|
-
configure do |config|
|
8
|
-
config.container = <%= config[:camel_cased_app_name] %>::Container
|
9
|
-
end
|
10
|
-
end
|
11
|
-
end
|
@@ -1,17 +0,0 @@
|
|
1
|
-
# auto_register: false
|
2
|
-
|
3
|
-
require "slim"
|
4
|
-
require "dry-view"
|
5
|
-
require "<%= config[:underscored_project_name] %>/container"
|
6
|
-
|
7
|
-
module <%= config[:camel_cased_app_name] %>
|
8
|
-
module View
|
9
|
-
class Controller < Dry::View::Controller
|
10
|
-
configure do |config|
|
11
|
-
config.paths = [Container.root.join("web/templates")]
|
12
|
-
config.context = Container["view.context"]
|
13
|
-
config.layout = "application"
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|