hanami 2.0.0.alpha7.1 → 2.0.0.beta1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +457 -237
- data/FEATURES.md +30 -9
- data/README.md +1 -3
- data/hanami.gemspec +21 -11
- data/lib/hanami/app.rb +141 -0
- data/lib/hanami/assets/application_configuration.rb +10 -4
- data/lib/hanami/configuration/actions/content_security_policy.rb +118 -0
- data/lib/hanami/configuration/actions/cookies.rb +29 -0
- data/lib/hanami/configuration/actions/sessions.rb +46 -0
- data/lib/hanami/configuration/actions.rb +23 -12
- data/lib/hanami/configuration/logger.rb +13 -10
- data/lib/hanami/configuration/router.rb +2 -6
- data/lib/hanami/configuration/sessions.rb +1 -1
- data/lib/hanami/configuration/views.rb +86 -0
- data/lib/hanami/configuration.rb +139 -82
- data/lib/hanami/constants.rb +30 -2
- data/lib/hanami/errors.rb +4 -1
- data/lib/hanami/extensions/action/slice_configured_action.rb +103 -0
- data/lib/hanami/extensions/action.rb +79 -0
- data/lib/hanami/extensions/view/context.rb +106 -0
- data/lib/hanami/extensions/view/slice_configured_context.rb +71 -0
- data/lib/hanami/extensions/view/slice_configured_view.rb +107 -0
- data/lib/hanami/extensions/view.rb +33 -0
- data/lib/hanami/extensions.rb +10 -0
- data/lib/hanami/providers/inflector.rb +13 -0
- data/lib/hanami/providers/logger.rb +13 -0
- data/lib/hanami/providers/rack.rb +27 -0
- data/lib/hanami/providers/routes.rb +33 -0
- data/lib/hanami/providers/settings.rb +23 -0
- data/lib/hanami/rake_tasks.rb +61 -0
- data/lib/hanami/routes.rb +51 -0
- data/lib/hanami/server.rb +1 -1
- data/lib/hanami/settings/dotenv_store.rb +58 -0
- data/lib/hanami/settings.rb +90 -0
- data/lib/hanami/setup.rb +4 -2
- data/lib/hanami/{application → slice}/router.rb +18 -13
- data/lib/hanami/slice/routes_helper.rb +37 -0
- data/lib/hanami/{application → slice}/routing/middleware/stack.rb +43 -5
- data/lib/hanami/slice/routing/resolver.rb +97 -0
- data/lib/hanami/slice/view_name_inferrer.rb +63 -0
- data/lib/hanami/slice.rb +252 -82
- data/lib/hanami/slice_configurable.rb +62 -0
- data/lib/hanami/slice_name.rb +111 -0
- data/lib/hanami/slice_registrar.rb +119 -0
- data/lib/hanami/version.rb +1 -1
- data/lib/hanami/web/rack_logger.rb +1 -1
- data/lib/hanami.rb +34 -26
- data/spec/integration/application_middleware_stack_spec.rb +84 -0
- data/spec/integration/assets/cdn_spec.rb +48 -0
- data/spec/integration/assets/fingerprint_spec.rb +42 -0
- data/spec/integration/assets/helpers_spec.rb +50 -0
- data/spec/integration/assets/serve_spec.rb +70 -0
- data/spec/integration/assets/subresource_integrity_spec.rb +54 -0
- data/spec/integration/body_parsers_spec.rb +50 -0
- data/spec/integration/cli/assets/precompile_spec.rb +147 -0
- data/spec/integration/cli/assets_spec.rb +14 -0
- data/spec/integration/cli/console_spec.rb +105 -0
- data/spec/integration/cli/db/apply_spec.rb +74 -0
- data/spec/integration/cli/db/console_spec.rb +40 -0
- data/spec/integration/cli/db/create_spec.rb +50 -0
- data/spec/integration/cli/db/drop_spec.rb +54 -0
- data/spec/integration/cli/db/migrate_spec.rb +108 -0
- data/spec/integration/cli/db/prepare_spec.rb +36 -0
- data/spec/integration/cli/db/rollback_spec.rb +96 -0
- data/spec/integration/cli/db/version_spec.rb +38 -0
- data/spec/integration/cli/db_spec.rb +21 -0
- data/spec/integration/cli/destroy/action_spec.rb +143 -0
- data/spec/integration/cli/destroy/app_spec.rb +118 -0
- data/spec/integration/cli/destroy/mailer_spec.rb +74 -0
- data/spec/integration/cli/destroy/migration_spec.rb +70 -0
- data/spec/integration/cli/destroy/model_spec.rb +113 -0
- data/spec/integration/cli/destroy_spec.rb +18 -0
- data/spec/integration/cli/generate/action_spec.rb +469 -0
- data/spec/integration/cli/generate/app_spec.rb +215 -0
- data/spec/integration/cli/generate/mailer_spec.rb +189 -0
- data/spec/integration/cli/generate/migration_spec.rb +72 -0
- data/spec/integration/cli/generate/model_spec.rb +290 -0
- data/spec/integration/cli/generate/secret_spec.rb +56 -0
- data/spec/integration/cli/generate_spec.rb +19 -0
- data/spec/integration/cli/new/database_spec.rb +235 -0
- data/spec/integration/cli/new/hanami_head_spec.rb +27 -0
- data/spec/integration/cli/new/template_spec.rb +118 -0
- data/spec/integration/cli/new/test_spec.rb +274 -0
- data/spec/integration/cli/new_spec.rb +970 -0
- data/spec/integration/cli/plugins_spec.rb +39 -0
- data/spec/integration/cli/routes_spec.rb +49 -0
- data/spec/integration/cli/server_spec.rb +626 -0
- data/spec/integration/cli/version_spec.rb +85 -0
- data/spec/integration/early_hints_spec.rb +35 -0
- data/spec/integration/handle_exceptions_spec.rb +244 -0
- data/spec/integration/head_spec.rb +89 -0
- data/spec/integration/http_headers_spec.rb +29 -0
- data/spec/integration/mailer_spec.rb +32 -0
- data/spec/integration/middleware_spec.rb +81 -0
- data/spec/integration/mount_applications_spec.rb +88 -0
- data/spec/integration/project_initializers_spec.rb +40 -0
- data/spec/integration/rackup_spec.rb +35 -0
- data/spec/integration/rake/with_minitest_spec.rb +67 -0
- data/spec/integration/rake/with_rspec_spec.rb +69 -0
- data/spec/integration/routing_helpers_spec.rb +61 -0
- data/spec/integration/security/content_security_policy_spec.rb +46 -0
- data/spec/integration/security/csrf_protection_spec.rb +42 -0
- data/spec/integration/security/force_ssl_spec.rb +29 -0
- data/spec/integration/security/x_content_type_options_spec.rb +46 -0
- data/spec/integration/security/x_frame_options_spec.rb +46 -0
- data/spec/integration/security/x_xss_protection_spec.rb +46 -0
- data/spec/integration/send_file_spec.rb +51 -0
- data/spec/integration/sessions_spec.rb +247 -0
- data/spec/integration/static_middleware_spec.rb +21 -0
- data/spec/integration/streaming_spec.rb +41 -0
- data/spec/integration/unsafe_send_file_spec.rb +52 -0
- data/spec/isolation/hanami/application/already_configured_spec.rb +19 -0
- data/spec/isolation/hanami/application/inherit_anonymous_class_spec.rb +10 -0
- data/spec/isolation/hanami/application/inherit_concrete_class_spec.rb +14 -0
- data/spec/isolation/hanami/application/not_configured_spec.rb +9 -0
- data/spec/isolation/hanami/application/routes/configured_spec.rb +44 -0
- data/spec/isolation/hanami/application/routes/not_configured_spec.rb +16 -0
- data/spec/isolation/hanami/boot/success_spec.rb +50 -0
- data/spec/new_integration/action/configuration_spec.rb +26 -0
- data/spec/new_integration/action/cookies_spec.rb +58 -0
- data/spec/new_integration/action/csrf_protection_spec.rb +54 -0
- data/spec/new_integration/action/routes_spec.rb +73 -0
- data/spec/new_integration/action/sessions_spec.rb +50 -0
- data/spec/new_integration/action/view_integration_spec.rb +165 -0
- data/spec/new_integration/action/view_rendering/automatic_rendering_spec.rb +247 -0
- data/spec/new_integration/action/view_rendering/paired_view_inference_spec.rb +115 -0
- data/spec/new_integration/action/view_rendering_spec.rb +107 -0
- data/spec/new_integration/code_loading/loading_from_app_spec.rb +152 -0
- data/spec/new_integration/code_loading/loading_from_slice_spec.rb +165 -0
- data/spec/new_integration/container/application_routes_helper_spec.rb +48 -0
- data/spec/new_integration/container/auto_injection_spec.rb +53 -0
- data/spec/new_integration/container/auto_registration_spec.rb +86 -0
- data/spec/new_integration/container/autoloader_spec.rb +80 -0
- data/spec/new_integration/container/imports_spec.rb +253 -0
- data/spec/new_integration/container/prepare_container_spec.rb +123 -0
- data/spec/new_integration/container/shutdown_spec.rb +91 -0
- data/spec/new_integration/container/standard_bootable_components_spec.rb +124 -0
- data/spec/new_integration/rack_app/middleware_spec.rb +215 -0
- data/spec/new_integration/rack_app/non_booted_rack_app_spec.rb +105 -0
- data/spec/new_integration/rack_app/rack_app_spec.rb +524 -0
- data/spec/new_integration/settings_spec.rb +115 -0
- data/spec/new_integration/slices/external_slice_spec.rb +92 -0
- data/spec/new_integration/slices/slice_configuration_spec.rb +40 -0
- data/spec/new_integration/slices/slice_routing_spec.rb +226 -0
- data/spec/new_integration/slices/slice_settings_spec.rb +141 -0
- data/spec/new_integration/slices_spec.rb +101 -0
- data/spec/new_integration/view/configuration_spec.rb +49 -0
- data/spec/new_integration/view/context/assets_spec.rb +67 -0
- data/spec/new_integration/view/context/inflector_spec.rb +48 -0
- data/spec/new_integration/view/context/request_spec.rb +61 -0
- data/spec/new_integration/view/context/routes_spec.rb +86 -0
- data/spec/new_integration/view/context/settings_spec.rb +50 -0
- data/spec/new_integration/view/inflector_spec.rb +57 -0
- data/spec/new_integration/view/part_namespace_spec.rb +96 -0
- data/spec/new_integration/view/path_spec.rb +56 -0
- data/spec/new_integration/view/template_spec.rb +68 -0
- data/spec/new_integration/view/views_spec.rb +103 -0
- data/spec/spec_helper.rb +16 -0
- data/spec/support/app_integration.rb +91 -0
- data/spec/support/coverage.rb +1 -0
- data/spec/support/fixtures/hanami-plugin/Gemfile +8 -0
- data/spec/support/fixtures/hanami-plugin/README.md +35 -0
- data/spec/support/fixtures/hanami-plugin/Rakefile +4 -0
- data/spec/support/fixtures/hanami-plugin/bin/console +15 -0
- data/spec/support/fixtures/hanami-plugin/bin/setup +8 -0
- data/spec/support/fixtures/hanami-plugin/hanami-plugin.gemspec +28 -0
- data/spec/support/fixtures/hanami-plugin/lib/hanami/plugin/cli.rb +19 -0
- data/spec/support/fixtures/hanami-plugin/lib/hanami/plugin/version.rb +7 -0
- data/spec/support/fixtures/hanami-plugin/lib/hanami/plugin.rb +8 -0
- data/spec/support/rspec.rb +27 -0
- data/spec/support/shared_examples/cli/generate/app.rb +494 -0
- data/spec/support/shared_examples/cli/generate/migration.rb +32 -0
- data/spec/support/shared_examples/cli/generate/model.rb +81 -0
- data/spec/support/shared_examples/cli/new.rb +97 -0
- data/spec/unit/hanami/configuration/actions/content_security_policy_spec.rb +102 -0
- data/spec/unit/hanami/configuration/actions/cookies_spec.rb +46 -0
- data/spec/unit/hanami/configuration/actions/csrf_protection_spec.rb +57 -0
- data/spec/unit/hanami/configuration/actions/default_values_spec.rb +52 -0
- data/spec/unit/hanami/configuration/actions/sessions_spec.rb +50 -0
- data/spec/unit/hanami/configuration/actions_spec.rb +78 -0
- data/spec/unit/hanami/configuration/base_url_spec.rb +25 -0
- data/spec/unit/hanami/configuration/inflector_spec.rb +35 -0
- data/spec/unit/hanami/configuration/logger_spec.rb +203 -0
- data/spec/unit/hanami/configuration/views_spec.rb +120 -0
- data/spec/unit/hanami/configuration_spec.rb +43 -0
- data/spec/unit/hanami/env_spec.rb +54 -0
- data/spec/unit/hanami/routes_spec.rb +25 -0
- data/spec/unit/hanami/settings/dotenv_store_spec.rb +119 -0
- data/spec/unit/hanami/settings_spec.rb +56 -0
- data/spec/unit/hanami/slice_configurable_spec.rb +104 -0
- data/spec/unit/hanami/slice_name_spec.rb +47 -0
- data/spec/unit/hanami/slice_spec.rb +17 -0
- data/spec/unit/hanami/version_spec.rb +7 -0
- data/spec/unit/hanami/web/rack_logger_spec.rb +78 -0
- metadata +363 -55
- data/lib/hanami/application/container/providers/inflector.rb +0 -7
- data/lib/hanami/application/container/providers/logger.rb +0 -7
- data/lib/hanami/application/container/providers/rack_logger.rb +0 -15
- data/lib/hanami/application/container/providers/rack_monitor.rb +0 -12
- data/lib/hanami/application/container/providers/routes_helper.rb +0 -9
- data/lib/hanami/application/container/providers/settings.rb +0 -7
- data/lib/hanami/application/routes.rb +0 -55
- data/lib/hanami/application/routes_helper.rb +0 -34
- data/lib/hanami/application/routing/resolver/node.rb +0 -50
- data/lib/hanami/application/routing/resolver/trie.rb +0 -59
- data/lib/hanami/application/routing/resolver.rb +0 -87
- data/lib/hanami/application/routing/router.rb +0 -36
- data/lib/hanami/application/settings/dotenv_store.rb +0 -60
- data/lib/hanami/application/settings.rb +0 -93
- data/lib/hanami/application/slice_registrar.rb +0 -106
- data/lib/hanami/application.rb +0 -299
- data/lib/hanami/boot/source_dirs.rb +0 -44
- data/lib/hanami/cli/application/cli.rb +0 -40
- data/lib/hanami/cli/application/command.rb +0 -47
- data/lib/hanami/cli/application/commands/console.rb +0 -81
- data/lib/hanami/cli/application/commands.rb +0 -16
- data/lib/hanami/cli/base_command.rb +0 -48
- data/lib/hanami/cli/commands/command.rb +0 -171
- data/lib/hanami/cli/commands/server.rb +0 -88
- data/lib/hanami/cli/commands.rb +0 -65
- data/lib/hanami/configuration/middleware.rb +0 -20
- data/lib/hanami/configuration/source_dirs.rb +0 -42
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hanami
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.0.
|
4
|
+
version: 2.0.0.beta1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Luca Guidi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-07-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -36,34 +36,42 @@ dependencies:
|
|
36
36
|
requirements:
|
37
37
|
- - "~>"
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version: '0.
|
40
|
-
- - ">="
|
41
|
-
- !ruby/object:Gem::Version
|
42
|
-
version: 0.12.1
|
39
|
+
version: '0.15'
|
43
40
|
type: :runtime
|
44
41
|
prerelease: false
|
45
42
|
version_requirements: !ruby/object:Gem::Requirement
|
46
43
|
requirements:
|
47
44
|
- - "~>"
|
48
45
|
- !ruby/object:Gem::Version
|
49
|
-
version: '0.
|
50
|
-
- - ">="
|
51
|
-
- !ruby/object:Gem::Version
|
52
|
-
version: 0.12.1
|
46
|
+
version: '0.15'
|
53
47
|
- !ruby/object:Gem::Dependency
|
54
48
|
name: dry-core
|
55
49
|
requirement: !ruby/object:Gem::Requirement
|
56
50
|
requirements:
|
57
51
|
- - "~>"
|
58
52
|
- !ruby/object:Gem::Version
|
59
|
-
version: '0.
|
53
|
+
version: '0.7'
|
60
54
|
type: :runtime
|
61
55
|
prerelease: false
|
62
56
|
version_requirements: !ruby/object:Gem::Requirement
|
63
57
|
requirements:
|
64
58
|
- - "~>"
|
65
59
|
- !ruby/object:Gem::Version
|
66
|
-
version: '0.
|
60
|
+
version: '0.7'
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
|
+
name: dry-types
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - "~>"
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '1.5'
|
68
|
+
type: :runtime
|
69
|
+
prerelease: false
|
70
|
+
version_requirements: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - "~>"
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '1.5'
|
67
75
|
- !ruby/object:Gem::Dependency
|
68
76
|
name: dry-inflector
|
69
77
|
requirement: !ruby/object:Gem::Requirement
|
@@ -85,67 +93,73 @@ dependencies:
|
|
85
93
|
- !ruby/object:Gem::Version
|
86
94
|
version: 0.2.1
|
87
95
|
- !ruby/object:Gem::Dependency
|
88
|
-
name: dry-
|
96
|
+
name: dry-system
|
89
97
|
requirement: !ruby/object:Gem::Requirement
|
90
98
|
requirements:
|
99
|
+
- - "~>"
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: '0.25'
|
91
102
|
- - ">="
|
92
103
|
- !ruby/object:Gem::Version
|
93
|
-
version:
|
104
|
+
version: 0.25.0
|
94
105
|
type: :runtime
|
95
106
|
prerelease: false
|
96
107
|
version_requirements: !ruby/object:Gem::Requirement
|
97
108
|
requirements:
|
109
|
+
- - "~>"
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: '0.25'
|
98
112
|
- - ">="
|
99
113
|
- !ruby/object:Gem::Version
|
100
|
-
version:
|
114
|
+
version: 0.25.0
|
101
115
|
- !ruby/object:Gem::Dependency
|
102
|
-
name: dry-
|
116
|
+
name: dry-monitor
|
103
117
|
requirement: !ruby/object:Gem::Requirement
|
104
118
|
requirements:
|
105
119
|
- - "~>"
|
106
120
|
- !ruby/object:Gem::Version
|
107
|
-
version: '0.
|
121
|
+
version: '0.6'
|
108
122
|
- - ">="
|
109
123
|
- !ruby/object:Gem::Version
|
110
|
-
version: 0.
|
124
|
+
version: 0.6.0
|
111
125
|
type: :runtime
|
112
126
|
prerelease: false
|
113
127
|
version_requirements: !ruby/object:Gem::Requirement
|
114
128
|
requirements:
|
115
129
|
- - "~>"
|
116
130
|
- !ruby/object:Gem::Version
|
117
|
-
version: '0.
|
131
|
+
version: '0.6'
|
118
132
|
- - ">="
|
119
133
|
- !ruby/object:Gem::Version
|
120
|
-
version: 0.
|
134
|
+
version: 0.6.0
|
121
135
|
- !ruby/object:Gem::Dependency
|
122
136
|
name: hanami-cli
|
123
137
|
requirement: !ruby/object:Gem::Requirement
|
124
138
|
requirements:
|
125
139
|
- - "~>"
|
126
140
|
- !ruby/object:Gem::Version
|
127
|
-
version: 2.0.
|
141
|
+
version: 2.0.beta
|
128
142
|
type: :runtime
|
129
143
|
prerelease: false
|
130
144
|
version_requirements: !ruby/object:Gem::Requirement
|
131
145
|
requirements:
|
132
146
|
- - "~>"
|
133
147
|
- !ruby/object:Gem::Version
|
134
|
-
version: 2.0.
|
148
|
+
version: 2.0.beta
|
135
149
|
- !ruby/object:Gem::Dependency
|
136
150
|
name: hanami-utils
|
137
151
|
requirement: !ruby/object:Gem::Requirement
|
138
152
|
requirements:
|
139
153
|
- - "~>"
|
140
154
|
- !ruby/object:Gem::Version
|
141
|
-
version: 2.0.
|
155
|
+
version: 2.0.beta
|
142
156
|
type: :runtime
|
143
157
|
prerelease: false
|
144
158
|
version_requirements: !ruby/object:Gem::Requirement
|
145
159
|
requirements:
|
146
160
|
- - "~>"
|
147
161
|
- !ruby/object:Gem::Version
|
148
|
-
version: 2.0.
|
162
|
+
version: 2.0.beta
|
149
163
|
- !ruby/object:Gem::Dependency
|
150
164
|
name: zeitwerk
|
151
165
|
requirement: !ruby/object:Gem::Requirement
|
@@ -216,52 +230,199 @@ files:
|
|
216
230
|
- README.md
|
217
231
|
- hanami.gemspec
|
218
232
|
- lib/hanami.rb
|
219
|
-
- lib/hanami/
|
220
|
-
- lib/hanami/application/container/providers/inflector.rb
|
221
|
-
- lib/hanami/application/container/providers/logger.rb
|
222
|
-
- lib/hanami/application/container/providers/rack_logger.rb
|
223
|
-
- lib/hanami/application/container/providers/rack_monitor.rb
|
224
|
-
- lib/hanami/application/container/providers/routes_helper.rb
|
225
|
-
- lib/hanami/application/container/providers/settings.rb
|
226
|
-
- lib/hanami/application/router.rb
|
227
|
-
- lib/hanami/application/routes.rb
|
228
|
-
- lib/hanami/application/routes_helper.rb
|
229
|
-
- lib/hanami/application/routing/middleware/stack.rb
|
230
|
-
- lib/hanami/application/routing/resolver.rb
|
231
|
-
- lib/hanami/application/routing/resolver/node.rb
|
232
|
-
- lib/hanami/application/routing/resolver/trie.rb
|
233
|
-
- lib/hanami/application/routing/router.rb
|
234
|
-
- lib/hanami/application/settings.rb
|
235
|
-
- lib/hanami/application/settings/dotenv_store.rb
|
236
|
-
- lib/hanami/application/slice_registrar.rb
|
233
|
+
- lib/hanami/app.rb
|
237
234
|
- lib/hanami/assets/application_configuration.rb
|
238
235
|
- lib/hanami/assets/configuration.rb
|
239
236
|
- lib/hanami/boot.rb
|
240
|
-
- lib/hanami/boot/source_dirs.rb
|
241
|
-
- lib/hanami/cli/application/cli.rb
|
242
|
-
- lib/hanami/cli/application/command.rb
|
243
|
-
- lib/hanami/cli/application/commands.rb
|
244
|
-
- lib/hanami/cli/application/commands/console.rb
|
245
|
-
- lib/hanami/cli/base_command.rb
|
246
|
-
- lib/hanami/cli/commands.rb
|
247
|
-
- lib/hanami/cli/commands/command.rb
|
248
|
-
- lib/hanami/cli/commands/server.rb
|
249
237
|
- lib/hanami/configuration.rb
|
250
238
|
- lib/hanami/configuration/actions.rb
|
239
|
+
- lib/hanami/configuration/actions/content_security_policy.rb
|
240
|
+
- lib/hanami/configuration/actions/cookies.rb
|
241
|
+
- lib/hanami/configuration/actions/sessions.rb
|
251
242
|
- lib/hanami/configuration/logger.rb
|
252
|
-
- lib/hanami/configuration/middleware.rb
|
253
243
|
- lib/hanami/configuration/null_configuration.rb
|
254
244
|
- lib/hanami/configuration/router.rb
|
255
245
|
- lib/hanami/configuration/sessions.rb
|
256
|
-
- lib/hanami/configuration/
|
246
|
+
- lib/hanami/configuration/views.rb
|
257
247
|
- lib/hanami/constants.rb
|
258
248
|
- lib/hanami/errors.rb
|
249
|
+
- lib/hanami/extensions.rb
|
250
|
+
- lib/hanami/extensions/action.rb
|
251
|
+
- lib/hanami/extensions/action/slice_configured_action.rb
|
252
|
+
- lib/hanami/extensions/view.rb
|
253
|
+
- lib/hanami/extensions/view/context.rb
|
254
|
+
- lib/hanami/extensions/view/slice_configured_context.rb
|
255
|
+
- lib/hanami/extensions/view/slice_configured_view.rb
|
259
256
|
- lib/hanami/prepare.rb
|
257
|
+
- lib/hanami/providers/inflector.rb
|
258
|
+
- lib/hanami/providers/logger.rb
|
259
|
+
- lib/hanami/providers/rack.rb
|
260
|
+
- lib/hanami/providers/routes.rb
|
261
|
+
- lib/hanami/providers/settings.rb
|
262
|
+
- lib/hanami/rake_tasks.rb
|
263
|
+
- lib/hanami/routes.rb
|
260
264
|
- lib/hanami/server.rb
|
265
|
+
- lib/hanami/settings.rb
|
266
|
+
- lib/hanami/settings/dotenv_store.rb
|
261
267
|
- lib/hanami/setup.rb
|
262
268
|
- lib/hanami/slice.rb
|
269
|
+
- lib/hanami/slice/router.rb
|
270
|
+
- lib/hanami/slice/routes_helper.rb
|
271
|
+
- lib/hanami/slice/routing/middleware/stack.rb
|
272
|
+
- lib/hanami/slice/routing/resolver.rb
|
273
|
+
- lib/hanami/slice/view_name_inferrer.rb
|
274
|
+
- lib/hanami/slice_configurable.rb
|
275
|
+
- lib/hanami/slice_name.rb
|
276
|
+
- lib/hanami/slice_registrar.rb
|
263
277
|
- lib/hanami/version.rb
|
264
278
|
- lib/hanami/web/rack_logger.rb
|
279
|
+
- spec/integration/application_middleware_stack_spec.rb
|
280
|
+
- spec/integration/assets/cdn_spec.rb
|
281
|
+
- spec/integration/assets/fingerprint_spec.rb
|
282
|
+
- spec/integration/assets/helpers_spec.rb
|
283
|
+
- spec/integration/assets/serve_spec.rb
|
284
|
+
- spec/integration/assets/subresource_integrity_spec.rb
|
285
|
+
- spec/integration/body_parsers_spec.rb
|
286
|
+
- spec/integration/cli/assets/precompile_spec.rb
|
287
|
+
- spec/integration/cli/assets_spec.rb
|
288
|
+
- spec/integration/cli/console_spec.rb
|
289
|
+
- spec/integration/cli/db/apply_spec.rb
|
290
|
+
- spec/integration/cli/db/console_spec.rb
|
291
|
+
- spec/integration/cli/db/create_spec.rb
|
292
|
+
- spec/integration/cli/db/drop_spec.rb
|
293
|
+
- spec/integration/cli/db/migrate_spec.rb
|
294
|
+
- spec/integration/cli/db/prepare_spec.rb
|
295
|
+
- spec/integration/cli/db/rollback_spec.rb
|
296
|
+
- spec/integration/cli/db/version_spec.rb
|
297
|
+
- spec/integration/cli/db_spec.rb
|
298
|
+
- spec/integration/cli/destroy/action_spec.rb
|
299
|
+
- spec/integration/cli/destroy/app_spec.rb
|
300
|
+
- spec/integration/cli/destroy/mailer_spec.rb
|
301
|
+
- spec/integration/cli/destroy/migration_spec.rb
|
302
|
+
- spec/integration/cli/destroy/model_spec.rb
|
303
|
+
- spec/integration/cli/destroy_spec.rb
|
304
|
+
- spec/integration/cli/generate/action_spec.rb
|
305
|
+
- spec/integration/cli/generate/app_spec.rb
|
306
|
+
- spec/integration/cli/generate/mailer_spec.rb
|
307
|
+
- spec/integration/cli/generate/migration_spec.rb
|
308
|
+
- spec/integration/cli/generate/model_spec.rb
|
309
|
+
- spec/integration/cli/generate/secret_spec.rb
|
310
|
+
- spec/integration/cli/generate_spec.rb
|
311
|
+
- spec/integration/cli/new/database_spec.rb
|
312
|
+
- spec/integration/cli/new/hanami_head_spec.rb
|
313
|
+
- spec/integration/cli/new/template_spec.rb
|
314
|
+
- spec/integration/cli/new/test_spec.rb
|
315
|
+
- spec/integration/cli/new_spec.rb
|
316
|
+
- spec/integration/cli/plugins_spec.rb
|
317
|
+
- spec/integration/cli/routes_spec.rb
|
318
|
+
- spec/integration/cli/server_spec.rb
|
319
|
+
- spec/integration/cli/version_spec.rb
|
320
|
+
- spec/integration/early_hints_spec.rb
|
321
|
+
- spec/integration/handle_exceptions_spec.rb
|
322
|
+
- spec/integration/head_spec.rb
|
323
|
+
- spec/integration/http_headers_spec.rb
|
324
|
+
- spec/integration/mailer_spec.rb
|
325
|
+
- spec/integration/middleware_spec.rb
|
326
|
+
- spec/integration/mount_applications_spec.rb
|
327
|
+
- spec/integration/project_initializers_spec.rb
|
328
|
+
- spec/integration/rackup_spec.rb
|
329
|
+
- spec/integration/rake/with_minitest_spec.rb
|
330
|
+
- spec/integration/rake/with_rspec_spec.rb
|
331
|
+
- spec/integration/routing_helpers_spec.rb
|
332
|
+
- spec/integration/security/content_security_policy_spec.rb
|
333
|
+
- spec/integration/security/csrf_protection_spec.rb
|
334
|
+
- spec/integration/security/force_ssl_spec.rb
|
335
|
+
- spec/integration/security/x_content_type_options_spec.rb
|
336
|
+
- spec/integration/security/x_frame_options_spec.rb
|
337
|
+
- spec/integration/security/x_xss_protection_spec.rb
|
338
|
+
- spec/integration/send_file_spec.rb
|
339
|
+
- spec/integration/sessions_spec.rb
|
340
|
+
- spec/integration/static_middleware_spec.rb
|
341
|
+
- spec/integration/streaming_spec.rb
|
342
|
+
- spec/integration/unsafe_send_file_spec.rb
|
343
|
+
- spec/isolation/hanami/application/already_configured_spec.rb
|
344
|
+
- spec/isolation/hanami/application/inherit_anonymous_class_spec.rb
|
345
|
+
- spec/isolation/hanami/application/inherit_concrete_class_spec.rb
|
346
|
+
- spec/isolation/hanami/application/not_configured_spec.rb
|
347
|
+
- spec/isolation/hanami/application/routes/configured_spec.rb
|
348
|
+
- spec/isolation/hanami/application/routes/not_configured_spec.rb
|
349
|
+
- spec/isolation/hanami/boot/success_spec.rb
|
350
|
+
- spec/new_integration/action/configuration_spec.rb
|
351
|
+
- spec/new_integration/action/cookies_spec.rb
|
352
|
+
- spec/new_integration/action/csrf_protection_spec.rb
|
353
|
+
- spec/new_integration/action/routes_spec.rb
|
354
|
+
- spec/new_integration/action/sessions_spec.rb
|
355
|
+
- spec/new_integration/action/view_integration_spec.rb
|
356
|
+
- spec/new_integration/action/view_rendering/automatic_rendering_spec.rb
|
357
|
+
- spec/new_integration/action/view_rendering/paired_view_inference_spec.rb
|
358
|
+
- spec/new_integration/action/view_rendering_spec.rb
|
359
|
+
- spec/new_integration/code_loading/loading_from_app_spec.rb
|
360
|
+
- spec/new_integration/code_loading/loading_from_slice_spec.rb
|
361
|
+
- spec/new_integration/container/application_routes_helper_spec.rb
|
362
|
+
- spec/new_integration/container/auto_injection_spec.rb
|
363
|
+
- spec/new_integration/container/auto_registration_spec.rb
|
364
|
+
- spec/new_integration/container/autoloader_spec.rb
|
365
|
+
- spec/new_integration/container/imports_spec.rb
|
366
|
+
- spec/new_integration/container/prepare_container_spec.rb
|
367
|
+
- spec/new_integration/container/shutdown_spec.rb
|
368
|
+
- spec/new_integration/container/standard_bootable_components_spec.rb
|
369
|
+
- spec/new_integration/rack_app/middleware_spec.rb
|
370
|
+
- spec/new_integration/rack_app/non_booted_rack_app_spec.rb
|
371
|
+
- spec/new_integration/rack_app/rack_app_spec.rb
|
372
|
+
- spec/new_integration/settings_spec.rb
|
373
|
+
- spec/new_integration/slices/external_slice_spec.rb
|
374
|
+
- spec/new_integration/slices/slice_configuration_spec.rb
|
375
|
+
- spec/new_integration/slices/slice_routing_spec.rb
|
376
|
+
- spec/new_integration/slices/slice_settings_spec.rb
|
377
|
+
- spec/new_integration/slices_spec.rb
|
378
|
+
- spec/new_integration/view/configuration_spec.rb
|
379
|
+
- spec/new_integration/view/context/assets_spec.rb
|
380
|
+
- spec/new_integration/view/context/inflector_spec.rb
|
381
|
+
- spec/new_integration/view/context/request_spec.rb
|
382
|
+
- spec/new_integration/view/context/routes_spec.rb
|
383
|
+
- spec/new_integration/view/context/settings_spec.rb
|
384
|
+
- spec/new_integration/view/inflector_spec.rb
|
385
|
+
- spec/new_integration/view/part_namespace_spec.rb
|
386
|
+
- spec/new_integration/view/path_spec.rb
|
387
|
+
- spec/new_integration/view/template_spec.rb
|
388
|
+
- spec/new_integration/view/views_spec.rb
|
389
|
+
- spec/spec_helper.rb
|
390
|
+
- spec/support/app_integration.rb
|
391
|
+
- spec/support/coverage.rb
|
392
|
+
- spec/support/fixtures/hanami-plugin/Gemfile
|
393
|
+
- spec/support/fixtures/hanami-plugin/README.md
|
394
|
+
- spec/support/fixtures/hanami-plugin/Rakefile
|
395
|
+
- spec/support/fixtures/hanami-plugin/bin/console
|
396
|
+
- spec/support/fixtures/hanami-plugin/bin/setup
|
397
|
+
- spec/support/fixtures/hanami-plugin/hanami-plugin.gemspec
|
398
|
+
- spec/support/fixtures/hanami-plugin/lib/hanami/plugin.rb
|
399
|
+
- spec/support/fixtures/hanami-plugin/lib/hanami/plugin/cli.rb
|
400
|
+
- spec/support/fixtures/hanami-plugin/lib/hanami/plugin/version.rb
|
401
|
+
- spec/support/rspec.rb
|
402
|
+
- spec/support/shared_examples/cli/generate/app.rb
|
403
|
+
- spec/support/shared_examples/cli/generate/migration.rb
|
404
|
+
- spec/support/shared_examples/cli/generate/model.rb
|
405
|
+
- spec/support/shared_examples/cli/new.rb
|
406
|
+
- spec/unit/hanami/configuration/actions/content_security_policy_spec.rb
|
407
|
+
- spec/unit/hanami/configuration/actions/cookies_spec.rb
|
408
|
+
- spec/unit/hanami/configuration/actions/csrf_protection_spec.rb
|
409
|
+
- spec/unit/hanami/configuration/actions/default_values_spec.rb
|
410
|
+
- spec/unit/hanami/configuration/actions/sessions_spec.rb
|
411
|
+
- spec/unit/hanami/configuration/actions_spec.rb
|
412
|
+
- spec/unit/hanami/configuration/base_url_spec.rb
|
413
|
+
- spec/unit/hanami/configuration/inflector_spec.rb
|
414
|
+
- spec/unit/hanami/configuration/logger_spec.rb
|
415
|
+
- spec/unit/hanami/configuration/views_spec.rb
|
416
|
+
- spec/unit/hanami/configuration_spec.rb
|
417
|
+
- spec/unit/hanami/env_spec.rb
|
418
|
+
- spec/unit/hanami/routes_spec.rb
|
419
|
+
- spec/unit/hanami/settings/dotenv_store_spec.rb
|
420
|
+
- spec/unit/hanami/settings_spec.rb
|
421
|
+
- spec/unit/hanami/slice_configurable_spec.rb
|
422
|
+
- spec/unit/hanami/slice_name_spec.rb
|
423
|
+
- spec/unit/hanami/slice_spec.rb
|
424
|
+
- spec/unit/hanami/version_spec.rb
|
425
|
+
- spec/unit/hanami/web/rack_logger_spec.rb
|
265
426
|
homepage: http://hanamirb.org
|
266
427
|
licenses:
|
267
428
|
- MIT
|
@@ -283,8 +444,155 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
283
444
|
- !ruby/object:Gem::Version
|
284
445
|
version: 1.3.1
|
285
446
|
requirements: []
|
286
|
-
rubygems_version: 3.3.
|
447
|
+
rubygems_version: 3.3.7
|
287
448
|
signing_key:
|
288
449
|
specification_version: 4
|
289
450
|
summary: The web, with simplicity
|
290
|
-
test_files:
|
451
|
+
test_files:
|
452
|
+
- spec/integration/application_middleware_stack_spec.rb
|
453
|
+
- spec/integration/assets/cdn_spec.rb
|
454
|
+
- spec/integration/assets/fingerprint_spec.rb
|
455
|
+
- spec/integration/assets/helpers_spec.rb
|
456
|
+
- spec/integration/assets/serve_spec.rb
|
457
|
+
- spec/integration/assets/subresource_integrity_spec.rb
|
458
|
+
- spec/integration/body_parsers_spec.rb
|
459
|
+
- spec/integration/cli/assets/precompile_spec.rb
|
460
|
+
- spec/integration/cli/assets_spec.rb
|
461
|
+
- spec/integration/cli/console_spec.rb
|
462
|
+
- spec/integration/cli/db/apply_spec.rb
|
463
|
+
- spec/integration/cli/db/console_spec.rb
|
464
|
+
- spec/integration/cli/db/create_spec.rb
|
465
|
+
- spec/integration/cli/db/drop_spec.rb
|
466
|
+
- spec/integration/cli/db/migrate_spec.rb
|
467
|
+
- spec/integration/cli/db/prepare_spec.rb
|
468
|
+
- spec/integration/cli/db/rollback_spec.rb
|
469
|
+
- spec/integration/cli/db/version_spec.rb
|
470
|
+
- spec/integration/cli/db_spec.rb
|
471
|
+
- spec/integration/cli/destroy/action_spec.rb
|
472
|
+
- spec/integration/cli/destroy/app_spec.rb
|
473
|
+
- spec/integration/cli/destroy/mailer_spec.rb
|
474
|
+
- spec/integration/cli/destroy/migration_spec.rb
|
475
|
+
- spec/integration/cli/destroy/model_spec.rb
|
476
|
+
- spec/integration/cli/destroy_spec.rb
|
477
|
+
- spec/integration/cli/generate/action_spec.rb
|
478
|
+
- spec/integration/cli/generate/app_spec.rb
|
479
|
+
- spec/integration/cli/generate/mailer_spec.rb
|
480
|
+
- spec/integration/cli/generate/migration_spec.rb
|
481
|
+
- spec/integration/cli/generate/model_spec.rb
|
482
|
+
- spec/integration/cli/generate/secret_spec.rb
|
483
|
+
- spec/integration/cli/generate_spec.rb
|
484
|
+
- spec/integration/cli/new/database_spec.rb
|
485
|
+
- spec/integration/cli/new/hanami_head_spec.rb
|
486
|
+
- spec/integration/cli/new/template_spec.rb
|
487
|
+
- spec/integration/cli/new/test_spec.rb
|
488
|
+
- spec/integration/cli/new_spec.rb
|
489
|
+
- spec/integration/cli/plugins_spec.rb
|
490
|
+
- spec/integration/cli/routes_spec.rb
|
491
|
+
- spec/integration/cli/server_spec.rb
|
492
|
+
- spec/integration/cli/version_spec.rb
|
493
|
+
- spec/integration/early_hints_spec.rb
|
494
|
+
- spec/integration/handle_exceptions_spec.rb
|
495
|
+
- spec/integration/head_spec.rb
|
496
|
+
- spec/integration/http_headers_spec.rb
|
497
|
+
- spec/integration/mailer_spec.rb
|
498
|
+
- spec/integration/middleware_spec.rb
|
499
|
+
- spec/integration/mount_applications_spec.rb
|
500
|
+
- spec/integration/project_initializers_spec.rb
|
501
|
+
- spec/integration/rackup_spec.rb
|
502
|
+
- spec/integration/rake/with_minitest_spec.rb
|
503
|
+
- spec/integration/rake/with_rspec_spec.rb
|
504
|
+
- spec/integration/routing_helpers_spec.rb
|
505
|
+
- spec/integration/security/content_security_policy_spec.rb
|
506
|
+
- spec/integration/security/csrf_protection_spec.rb
|
507
|
+
- spec/integration/security/force_ssl_spec.rb
|
508
|
+
- spec/integration/security/x_content_type_options_spec.rb
|
509
|
+
- spec/integration/security/x_frame_options_spec.rb
|
510
|
+
- spec/integration/security/x_xss_protection_spec.rb
|
511
|
+
- spec/integration/send_file_spec.rb
|
512
|
+
- spec/integration/sessions_spec.rb
|
513
|
+
- spec/integration/static_middleware_spec.rb
|
514
|
+
- spec/integration/streaming_spec.rb
|
515
|
+
- spec/integration/unsafe_send_file_spec.rb
|
516
|
+
- spec/isolation/hanami/application/already_configured_spec.rb
|
517
|
+
- spec/isolation/hanami/application/inherit_anonymous_class_spec.rb
|
518
|
+
- spec/isolation/hanami/application/inherit_concrete_class_spec.rb
|
519
|
+
- spec/isolation/hanami/application/not_configured_spec.rb
|
520
|
+
- spec/isolation/hanami/application/routes/configured_spec.rb
|
521
|
+
- spec/isolation/hanami/application/routes/not_configured_spec.rb
|
522
|
+
- spec/isolation/hanami/boot/success_spec.rb
|
523
|
+
- spec/new_integration/action/configuration_spec.rb
|
524
|
+
- spec/new_integration/action/cookies_spec.rb
|
525
|
+
- spec/new_integration/action/csrf_protection_spec.rb
|
526
|
+
- spec/new_integration/action/routes_spec.rb
|
527
|
+
- spec/new_integration/action/sessions_spec.rb
|
528
|
+
- spec/new_integration/action/view_integration_spec.rb
|
529
|
+
- spec/new_integration/action/view_rendering/automatic_rendering_spec.rb
|
530
|
+
- spec/new_integration/action/view_rendering/paired_view_inference_spec.rb
|
531
|
+
- spec/new_integration/action/view_rendering_spec.rb
|
532
|
+
- spec/new_integration/code_loading/loading_from_app_spec.rb
|
533
|
+
- spec/new_integration/code_loading/loading_from_slice_spec.rb
|
534
|
+
- spec/new_integration/container/application_routes_helper_spec.rb
|
535
|
+
- spec/new_integration/container/auto_injection_spec.rb
|
536
|
+
- spec/new_integration/container/auto_registration_spec.rb
|
537
|
+
- spec/new_integration/container/autoloader_spec.rb
|
538
|
+
- spec/new_integration/container/imports_spec.rb
|
539
|
+
- spec/new_integration/container/prepare_container_spec.rb
|
540
|
+
- spec/new_integration/container/shutdown_spec.rb
|
541
|
+
- spec/new_integration/container/standard_bootable_components_spec.rb
|
542
|
+
- spec/new_integration/rack_app/middleware_spec.rb
|
543
|
+
- spec/new_integration/rack_app/non_booted_rack_app_spec.rb
|
544
|
+
- spec/new_integration/rack_app/rack_app_spec.rb
|
545
|
+
- spec/new_integration/settings_spec.rb
|
546
|
+
- spec/new_integration/slices/external_slice_spec.rb
|
547
|
+
- spec/new_integration/slices/slice_configuration_spec.rb
|
548
|
+
- spec/new_integration/slices/slice_routing_spec.rb
|
549
|
+
- spec/new_integration/slices/slice_settings_spec.rb
|
550
|
+
- spec/new_integration/slices_spec.rb
|
551
|
+
- spec/new_integration/view/configuration_spec.rb
|
552
|
+
- spec/new_integration/view/context/assets_spec.rb
|
553
|
+
- spec/new_integration/view/context/inflector_spec.rb
|
554
|
+
- spec/new_integration/view/context/request_spec.rb
|
555
|
+
- spec/new_integration/view/context/routes_spec.rb
|
556
|
+
- spec/new_integration/view/context/settings_spec.rb
|
557
|
+
- spec/new_integration/view/inflector_spec.rb
|
558
|
+
- spec/new_integration/view/part_namespace_spec.rb
|
559
|
+
- spec/new_integration/view/path_spec.rb
|
560
|
+
- spec/new_integration/view/template_spec.rb
|
561
|
+
- spec/new_integration/view/views_spec.rb
|
562
|
+
- spec/spec_helper.rb
|
563
|
+
- spec/support/app_integration.rb
|
564
|
+
- spec/support/coverage.rb
|
565
|
+
- spec/support/fixtures/hanami-plugin/Gemfile
|
566
|
+
- spec/support/fixtures/hanami-plugin/README.md
|
567
|
+
- spec/support/fixtures/hanami-plugin/Rakefile
|
568
|
+
- spec/support/fixtures/hanami-plugin/bin/console
|
569
|
+
- spec/support/fixtures/hanami-plugin/bin/setup
|
570
|
+
- spec/support/fixtures/hanami-plugin/hanami-plugin.gemspec
|
571
|
+
- spec/support/fixtures/hanami-plugin/lib/hanami/plugin/cli.rb
|
572
|
+
- spec/support/fixtures/hanami-plugin/lib/hanami/plugin/version.rb
|
573
|
+
- spec/support/fixtures/hanami-plugin/lib/hanami/plugin.rb
|
574
|
+
- spec/support/rspec.rb
|
575
|
+
- spec/support/shared_examples/cli/generate/app.rb
|
576
|
+
- spec/support/shared_examples/cli/generate/migration.rb
|
577
|
+
- spec/support/shared_examples/cli/generate/model.rb
|
578
|
+
- spec/support/shared_examples/cli/new.rb
|
579
|
+
- spec/unit/hanami/configuration/actions/content_security_policy_spec.rb
|
580
|
+
- spec/unit/hanami/configuration/actions/cookies_spec.rb
|
581
|
+
- spec/unit/hanami/configuration/actions/csrf_protection_spec.rb
|
582
|
+
- spec/unit/hanami/configuration/actions/default_values_spec.rb
|
583
|
+
- spec/unit/hanami/configuration/actions/sessions_spec.rb
|
584
|
+
- spec/unit/hanami/configuration/actions_spec.rb
|
585
|
+
- spec/unit/hanami/configuration/base_url_spec.rb
|
586
|
+
- spec/unit/hanami/configuration/inflector_spec.rb
|
587
|
+
- spec/unit/hanami/configuration/logger_spec.rb
|
588
|
+
- spec/unit/hanami/configuration/views_spec.rb
|
589
|
+
- spec/unit/hanami/configuration_spec.rb
|
590
|
+
- spec/unit/hanami/env_spec.rb
|
591
|
+
- spec/unit/hanami/routes_spec.rb
|
592
|
+
- spec/unit/hanami/settings/dotenv_store_spec.rb
|
593
|
+
- spec/unit/hanami/settings_spec.rb
|
594
|
+
- spec/unit/hanami/slice_configurable_spec.rb
|
595
|
+
- spec/unit/hanami/slice_name_spec.rb
|
596
|
+
- spec/unit/hanami/slice_spec.rb
|
597
|
+
- spec/unit/hanami/version_spec.rb
|
598
|
+
- spec/unit/hanami/web/rack_logger_spec.rb
|
@@ -1,15 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
Hanami.application.register_provider :rack_logger do
|
4
|
-
start do
|
5
|
-
require "hanami/web/rack_logger"
|
6
|
-
|
7
|
-
target.start :logger
|
8
|
-
target.start :rack_monitor
|
9
|
-
|
10
|
-
rack_logger = Hanami::Web::RackLogger.new(target[:logger])
|
11
|
-
rack_logger.attach target[:rack_monitor]
|
12
|
-
|
13
|
-
register :rack_logger, rack_logger
|
14
|
-
end
|
15
|
-
end
|
@@ -1,12 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
Hanami.application.register_provider :rack_monitor do
|
4
|
-
start do
|
5
|
-
require "dry/monitor"
|
6
|
-
require "dry/monitor/rack/middleware"
|
7
|
-
|
8
|
-
middleware = Dry::Monitor::Rack::Middleware.new(target[:notifications])
|
9
|
-
|
10
|
-
register :rack_monitor, middleware
|
11
|
-
end
|
12
|
-
end
|
@@ -1,55 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Hanami
|
4
|
-
class Application
|
5
|
-
# Application routes
|
6
|
-
#
|
7
|
-
# Users are expected to inherit from this class to define their application
|
8
|
-
# routes.
|
9
|
-
#
|
10
|
-
# @example
|
11
|
-
# # config/routes.rb
|
12
|
-
# # frozen_string_literal: true
|
13
|
-
#
|
14
|
-
# require "hanami/application/routes"
|
15
|
-
#
|
16
|
-
# module MyApp
|
17
|
-
# class Routes < Hanami::Application::Routes
|
18
|
-
# define do
|
19
|
-
# slice :main, at: "/" do
|
20
|
-
# root to: "home.show"
|
21
|
-
# end
|
22
|
-
# end
|
23
|
-
# end
|
24
|
-
# end
|
25
|
-
#
|
26
|
-
# See {Hanami::Application::Router} for the syntax allowed within the
|
27
|
-
# `define` block.
|
28
|
-
#
|
29
|
-
# @see Hanami::Application::Router
|
30
|
-
# @since 2.0.0
|
31
|
-
class Routes
|
32
|
-
# Defines application routes
|
33
|
-
#
|
34
|
-
# @yield DSL syntax to define application routes executed in the context
|
35
|
-
# of {Hanami::Application::Router}
|
36
|
-
#
|
37
|
-
# @return [Proc]
|
38
|
-
def self.define(&block)
|
39
|
-
@_routes = block
|
40
|
-
end
|
41
|
-
|
42
|
-
# @api private
|
43
|
-
def self.routes
|
44
|
-
@_routes || raise(<<~MSG)
|
45
|
-
Routes need to be defined before being able to fetch them. E.g.,
|
46
|
-
define do
|
47
|
-
slice :main, at: "/" do
|
48
|
-
root to: "home.show"
|
49
|
-
end
|
50
|
-
end
|
51
|
-
MSG
|
52
|
-
end
|
53
|
-
end
|
54
|
-
end
|
55
|
-
end
|