hanami 2.0.0.beta2 → 2.0.0.beta3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -1
- data/lib/hanami/configuration/null_configuration.rb +2 -2
- data/lib/hanami/configuration.rb +17 -17
- data/lib/hanami/routes.rb +48 -21
- data/lib/hanami/version.rb +1 -1
- data/spec/{new_integration → integration}/action/cookies_spec.rb +0 -0
- data/spec/{new_integration → integration}/action/csrf_protection_spec.rb +0 -0
- data/spec/{new_integration → integration}/action/routes_spec.rb +3 -5
- data/spec/{new_integration → integration}/action/sessions_spec.rb +0 -0
- data/spec/{new_integration → integration}/action/slice_configuration_spec.rb +0 -0
- data/spec/{new_integration → integration}/action/view_integration_spec.rb +0 -0
- data/spec/{new_integration → integration}/action/view_rendering/automatic_rendering_spec.rb +0 -0
- data/spec/{new_integration → integration}/action/view_rendering/paired_view_inference_spec.rb +0 -0
- data/spec/{new_integration → integration}/action/view_rendering_spec.rb +0 -0
- data/spec/{new_integration → integration}/code_loading/loading_from_app_spec.rb +0 -0
- data/spec/{new_integration → integration}/code_loading/loading_from_lib_spec.rb +0 -0
- data/spec/{new_integration → integration}/code_loading/loading_from_slice_spec.rb +0 -0
- data/spec/{new_integration → integration}/container/application_routes_helper_spec.rb +1 -3
- data/spec/{new_integration → integration}/container/auto_injection_spec.rb +0 -0
- data/spec/{new_integration → integration}/container/auto_registration_spec.rb +0 -0
- data/spec/{new_integration → integration}/container/autoloader_spec.rb +0 -0
- data/spec/{new_integration → integration}/container/imports_spec.rb +0 -0
- data/spec/{new_integration → integration}/container/prepare_container_spec.rb +0 -0
- data/spec/{new_integration → integration}/container/shutdown_spec.rb +0 -0
- data/spec/{new_integration → integration}/container/standard_bootable_components_spec.rb +0 -0
- data/spec/{new_integration → integration}/dotenv_loading_spec.rb +0 -0
- data/spec/{new_integration → integration}/rack_app/middleware_spec.rb +9 -15
- data/spec/{new_integration → integration}/rack_app/non_booted_rack_app_spec.rb +3 -5
- data/spec/{new_integration → integration}/rack_app/rack_app_spec.rb +28 -48
- data/spec/{new_integration → integration}/settings/access_to_constants_spec.rb +0 -0
- data/spec/{new_integration → integration}/settings/loading_from_env_spec.rb +0 -0
- data/spec/{new_integration → integration}/settings/settings_component_loading_spec.rb +0 -0
- data/spec/{new_integration → integration}/settings/using_types_spec.rb +0 -0
- data/spec/{new_integration → integration}/setup_spec.rb +20 -0
- data/spec/{new_integration → integration}/slices/external_slice_spec.rb +2 -4
- data/spec/{new_integration → integration}/slices/slice_configuration_spec.rb +0 -0
- data/spec/{new_integration → integration}/slices/slice_loading_spec.rb +0 -0
- data/spec/{new_integration → integration}/slices/slice_routing_spec.rb +5 -13
- data/spec/{new_integration → integration}/slices/slice_settings_spec.rb +0 -0
- data/spec/{new_integration → integration}/slices_spec.rb +0 -0
- data/spec/{new_integration → integration}/view/context/assets_spec.rb +0 -0
- data/spec/{new_integration → integration}/view/context/inflector_spec.rb +0 -0
- data/spec/{new_integration → integration}/view/context/request_spec.rb +0 -0
- data/spec/{new_integration → integration}/view/context/routes_spec.rb +1 -3
- data/spec/{new_integration → integration}/view/context/settings_spec.rb +0 -0
- data/spec/{new_integration → integration}/view/inflector_spec.rb +0 -0
- data/spec/{new_integration → integration}/view/part_namespace_spec.rb +0 -0
- data/spec/{new_integration → integration}/view/path_spec.rb +0 -0
- data/spec/{new_integration → integration}/view/slice_configuration_spec.rb +0 -0
- data/spec/{new_integration → integration}/view/template_spec.rb +0 -0
- data/spec/{new_integration → integration}/view/views_spec.rb +0 -0
- data/spec/unit/hanami/configuration/actions_spec.rb +4 -15
- data/spec/unit/hanami/configuration/router_spec.rb +45 -0
- data/spec/unit/hanami/configuration/views_spec.rb +4 -15
- data/spec/unit/hanami/version_spec.rb +1 -1
- metadata +97 -244
- data/lib/hanami/server.rb +0 -29
- data/spec/integration/application_middleware_stack_spec.rb +0 -84
- data/spec/integration/assets/cdn_spec.rb +0 -48
- data/spec/integration/assets/fingerprint_spec.rb +0 -42
- data/spec/integration/assets/helpers_spec.rb +0 -50
- data/spec/integration/assets/serve_spec.rb +0 -70
- data/spec/integration/assets/subresource_integrity_spec.rb +0 -54
- data/spec/integration/body_parsers_spec.rb +0 -50
- data/spec/integration/cli/assets/precompile_spec.rb +0 -147
- data/spec/integration/cli/assets_spec.rb +0 -14
- data/spec/integration/cli/console_spec.rb +0 -105
- data/spec/integration/cli/db/apply_spec.rb +0 -74
- data/spec/integration/cli/db/console_spec.rb +0 -40
- data/spec/integration/cli/db/create_spec.rb +0 -50
- data/spec/integration/cli/db/drop_spec.rb +0 -54
- data/spec/integration/cli/db/migrate_spec.rb +0 -108
- data/spec/integration/cli/db/prepare_spec.rb +0 -36
- data/spec/integration/cli/db/rollback_spec.rb +0 -96
- data/spec/integration/cli/db/version_spec.rb +0 -38
- data/spec/integration/cli/db_spec.rb +0 -21
- data/spec/integration/cli/destroy/action_spec.rb +0 -143
- data/spec/integration/cli/destroy/app_spec.rb +0 -118
- data/spec/integration/cli/destroy/mailer_spec.rb +0 -74
- data/spec/integration/cli/destroy/migration_spec.rb +0 -70
- data/spec/integration/cli/destroy/model_spec.rb +0 -113
- data/spec/integration/cli/destroy_spec.rb +0 -18
- data/spec/integration/cli/generate/action_spec.rb +0 -469
- data/spec/integration/cli/generate/app_spec.rb +0 -215
- data/spec/integration/cli/generate/mailer_spec.rb +0 -189
- data/spec/integration/cli/generate/migration_spec.rb +0 -72
- data/spec/integration/cli/generate/model_spec.rb +0 -290
- data/spec/integration/cli/generate/secret_spec.rb +0 -56
- data/spec/integration/cli/generate_spec.rb +0 -19
- data/spec/integration/cli/new/database_spec.rb +0 -235
- data/spec/integration/cli/new/hanami_head_spec.rb +0 -27
- data/spec/integration/cli/new/template_spec.rb +0 -118
- data/spec/integration/cli/new/test_spec.rb +0 -274
- data/spec/integration/cli/new_spec.rb +0 -970
- data/spec/integration/cli/plugins_spec.rb +0 -39
- data/spec/integration/cli/routes_spec.rb +0 -49
- data/spec/integration/cli/server_spec.rb +0 -626
- data/spec/integration/cli/version_spec.rb +0 -85
- data/spec/integration/early_hints_spec.rb +0 -35
- data/spec/integration/handle_exceptions_spec.rb +0 -244
- data/spec/integration/head_spec.rb +0 -89
- data/spec/integration/http_headers_spec.rb +0 -29
- data/spec/integration/mailer_spec.rb +0 -32
- data/spec/integration/middleware_spec.rb +0 -81
- data/spec/integration/mount_applications_spec.rb +0 -88
- data/spec/integration/project_initializers_spec.rb +0 -40
- data/spec/integration/rackup_spec.rb +0 -35
- data/spec/integration/rake/with_minitest_spec.rb +0 -67
- data/spec/integration/rake/with_rspec_spec.rb +0 -69
- data/spec/integration/routing_helpers_spec.rb +0 -61
- data/spec/integration/security/content_security_policy_spec.rb +0 -46
- data/spec/integration/security/csrf_protection_spec.rb +0 -42
- data/spec/integration/security/force_ssl_spec.rb +0 -29
- data/spec/integration/security/x_content_type_options_spec.rb +0 -46
- data/spec/integration/security/x_frame_options_spec.rb +0 -46
- data/spec/integration/security/x_xss_protection_spec.rb +0 -46
- data/spec/integration/send_file_spec.rb +0 -51
- data/spec/integration/sessions_spec.rb +0 -247
- data/spec/integration/static_middleware_spec.rb +0 -21
- data/spec/integration/streaming_spec.rb +0 -41
- data/spec/integration/unsafe_send_file_spec.rb +0 -52
- data/spec/support/fixtures/hanami-plugin/Gemfile +0 -8
- data/spec/support/fixtures/hanami-plugin/README.md +0 -35
- data/spec/support/fixtures/hanami-plugin/Rakefile +0 -4
- data/spec/support/fixtures/hanami-plugin/bin/console +0 -15
- data/spec/support/fixtures/hanami-plugin/bin/setup +0 -8
- data/spec/support/fixtures/hanami-plugin/hanami-plugin.gemspec +0 -28
- data/spec/support/fixtures/hanami-plugin/lib/hanami/plugin/cli.rb +0 -19
- data/spec/support/fixtures/hanami-plugin/lib/hanami/plugin/version.rb +0 -7
- data/spec/support/fixtures/hanami-plugin/lib/hanami/plugin.rb +0 -8
- data/spec/unit/hanami/routes_spec.rb +0 -25
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -10,7 +10,7 @@ RSpec.describe Hanami::Configuration, "#actions" do
|
|
10
10
|
|
11
11
|
subject(:actions) { configuration.actions }
|
12
12
|
|
13
|
-
context "
|
13
|
+
context "hanami-controller is bundled" do
|
14
14
|
it "is a full actions configuration" do
|
15
15
|
is_expected.to be_an_instance_of(Hanami::Configuration::Actions)
|
16
16
|
|
@@ -48,21 +48,10 @@ RSpec.describe Hanami::Configuration, "#actions" do
|
|
48
48
|
end
|
49
49
|
end
|
50
50
|
|
51
|
-
context "
|
51
|
+
context "hanami-controller is not bundled" do
|
52
52
|
before do
|
53
|
-
|
54
|
-
|
55
|
-
end
|
56
|
-
|
57
|
-
allow_any_instance_of(described_class)
|
58
|
-
.to receive(:require)
|
59
|
-
.with(anything)
|
60
|
-
.and_call_original
|
61
|
-
|
62
|
-
allow_any_instance_of(described_class)
|
63
|
-
.to receive(:require)
|
64
|
-
.with("hanami/action")
|
65
|
-
.and_raise load_error
|
53
|
+
allow(Hanami).to receive(:bundled?).and_call_original
|
54
|
+
expect(Hanami).to receive(:bundled?).with("hanami-controller").and_return(false)
|
66
55
|
end
|
67
56
|
|
68
57
|
it "does not expose any settings" do
|
@@ -0,0 +1,45 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "hanami/configuration"
|
4
|
+
require "hanami/configuration/router"
|
5
|
+
|
6
|
+
RSpec.describe Hanami::Configuration, "#router" do
|
7
|
+
let(:configuration) { described_class.new(app_name: app_name, env: :development) }
|
8
|
+
let(:app_name) { "MyApp::app" }
|
9
|
+
|
10
|
+
subject(:router) { configuration.router }
|
11
|
+
|
12
|
+
context "hanami-router is bundled" do
|
13
|
+
it "is a full router configuration" do
|
14
|
+
is_expected.to be_an_instance_of(Hanami::Configuration::Router)
|
15
|
+
|
16
|
+
is_expected.to respond_to(:resolver)
|
17
|
+
end
|
18
|
+
|
19
|
+
it "loads the middleware stack" do
|
20
|
+
subject
|
21
|
+
|
22
|
+
expect(configuration.middleware_stack).not_to be_nil
|
23
|
+
end
|
24
|
+
|
25
|
+
it "can be finalized" do
|
26
|
+
is_expected.to respond_to(:finalize!)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
context "hanami-router is not bundled" do
|
31
|
+
before do
|
32
|
+
allow(Hanami).to receive(:bundled?).and_call_original
|
33
|
+
expect(Hanami).to receive(:bundled?).with("hanami-router").and_return(false)
|
34
|
+
end
|
35
|
+
|
36
|
+
it "does not expose any settings" do
|
37
|
+
is_expected.not_to be_an_instance_of(Hanami::Configuration::Router)
|
38
|
+
is_expected.not_to respond_to(:resolver)
|
39
|
+
end
|
40
|
+
|
41
|
+
it "can be finalized" do
|
42
|
+
is_expected.to respond_to(:finalize!)
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
@@ -10,7 +10,7 @@ RSpec.describe Hanami::Configuration, "#views" do
|
|
10
10
|
|
11
11
|
subject(:views) { configuration.views }
|
12
12
|
|
13
|
-
context "
|
13
|
+
context "hanami-view is bundled" do
|
14
14
|
it "exposes Hanami::Views's app configuration" do
|
15
15
|
is_expected.to be_an_instance_of(Hanami::Configuration::Views)
|
16
16
|
|
@@ -90,21 +90,10 @@ RSpec.describe Hanami::Configuration, "#views" do
|
|
90
90
|
end
|
91
91
|
end
|
92
92
|
|
93
|
-
context "
|
93
|
+
context "hanami-view is not bundled" do
|
94
94
|
before do
|
95
|
-
|
96
|
-
|
97
|
-
end
|
98
|
-
|
99
|
-
allow_any_instance_of(described_class)
|
100
|
-
.to receive(:require)
|
101
|
-
.with(anything)
|
102
|
-
.and_call_original
|
103
|
-
|
104
|
-
allow_any_instance_of(described_class)
|
105
|
-
.to receive(:require)
|
106
|
-
.with("hanami/view")
|
107
|
-
.and_raise load_error
|
95
|
+
allow(Hanami).to receive(:bundled?).and_call_original
|
96
|
+
expect(Hanami).to receive(:bundled?).with("hanami-view").and_return(false)
|
108
97
|
end
|
109
98
|
|
110
99
|
it "does not expose any settings" do
|
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.beta3
|
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-09-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -247,7 +247,6 @@ files:
|
|
247
247
|
- lib/hanami/providers/settings.rb
|
248
248
|
- lib/hanami/rake_tasks.rb
|
249
249
|
- lib/hanami/routes.rb
|
250
|
-
- lib/hanami/server.rb
|
251
250
|
- lib/hanami/settings.rb
|
252
251
|
- lib/hanami/settings/env_store.rb
|
253
252
|
- lib/hanami/setup.rb
|
@@ -262,70 +261,52 @@ files:
|
|
262
261
|
- lib/hanami/slice_registrar.rb
|
263
262
|
- lib/hanami/version.rb
|
264
263
|
- lib/hanami/web/rack_logger.rb
|
265
|
-
- spec/integration/
|
266
|
-
- spec/integration/
|
267
|
-
- spec/integration/
|
268
|
-
- spec/integration/
|
269
|
-
- spec/integration/
|
270
|
-
- spec/integration/
|
271
|
-
- spec/integration/
|
272
|
-
- spec/integration/
|
273
|
-
- spec/integration/
|
274
|
-
- spec/integration/
|
275
|
-
- spec/integration/
|
276
|
-
- spec/integration/
|
277
|
-
- spec/integration/
|
278
|
-
- spec/integration/
|
279
|
-
- spec/integration/
|
280
|
-
- spec/integration/
|
281
|
-
- spec/integration/
|
282
|
-
- spec/integration/
|
283
|
-
- spec/integration/
|
284
|
-
- spec/integration/
|
285
|
-
- spec/integration/
|
286
|
-
- spec/integration/
|
287
|
-
- spec/integration/
|
288
|
-
- spec/integration/
|
289
|
-
- spec/integration/
|
290
|
-
- spec/integration/
|
291
|
-
- spec/integration/
|
292
|
-
- spec/integration/
|
293
|
-
- spec/integration/
|
294
|
-
- spec/integration/
|
295
|
-
- spec/integration/
|
296
|
-
- spec/integration/
|
297
|
-
- spec/integration/
|
298
|
-
- spec/integration/
|
299
|
-
- spec/integration/
|
300
|
-
- spec/integration/
|
301
|
-
- spec/integration/
|
302
|
-
- spec/integration/
|
303
|
-
- spec/integration/
|
304
|
-
- spec/integration/
|
305
|
-
- spec/integration/
|
306
|
-
- spec/integration/
|
307
|
-
- spec/integration/
|
308
|
-
- spec/integration/
|
309
|
-
- spec/integration/
|
310
|
-
- spec/integration/
|
311
|
-
- spec/integration/middleware_spec.rb
|
312
|
-
- spec/integration/mount_applications_spec.rb
|
313
|
-
- spec/integration/project_initializers_spec.rb
|
314
|
-
- spec/integration/rackup_spec.rb
|
315
|
-
- spec/integration/rake/with_minitest_spec.rb
|
316
|
-
- spec/integration/rake/with_rspec_spec.rb
|
317
|
-
- spec/integration/routing_helpers_spec.rb
|
318
|
-
- spec/integration/security/content_security_policy_spec.rb
|
319
|
-
- spec/integration/security/csrf_protection_spec.rb
|
320
|
-
- spec/integration/security/force_ssl_spec.rb
|
321
|
-
- spec/integration/security/x_content_type_options_spec.rb
|
322
|
-
- spec/integration/security/x_frame_options_spec.rb
|
323
|
-
- spec/integration/security/x_xss_protection_spec.rb
|
324
|
-
- spec/integration/send_file_spec.rb
|
325
|
-
- spec/integration/sessions_spec.rb
|
326
|
-
- spec/integration/static_middleware_spec.rb
|
327
|
-
- spec/integration/streaming_spec.rb
|
328
|
-
- spec/integration/unsafe_send_file_spec.rb
|
264
|
+
- spec/integration/action/cookies_spec.rb
|
265
|
+
- spec/integration/action/csrf_protection_spec.rb
|
266
|
+
- spec/integration/action/routes_spec.rb
|
267
|
+
- spec/integration/action/sessions_spec.rb
|
268
|
+
- spec/integration/action/slice_configuration_spec.rb
|
269
|
+
- spec/integration/action/view_integration_spec.rb
|
270
|
+
- spec/integration/action/view_rendering/automatic_rendering_spec.rb
|
271
|
+
- spec/integration/action/view_rendering/paired_view_inference_spec.rb
|
272
|
+
- spec/integration/action/view_rendering_spec.rb
|
273
|
+
- spec/integration/code_loading/loading_from_app_spec.rb
|
274
|
+
- spec/integration/code_loading/loading_from_lib_spec.rb
|
275
|
+
- spec/integration/code_loading/loading_from_slice_spec.rb
|
276
|
+
- spec/integration/container/application_routes_helper_spec.rb
|
277
|
+
- spec/integration/container/auto_injection_spec.rb
|
278
|
+
- spec/integration/container/auto_registration_spec.rb
|
279
|
+
- spec/integration/container/autoloader_spec.rb
|
280
|
+
- spec/integration/container/imports_spec.rb
|
281
|
+
- spec/integration/container/prepare_container_spec.rb
|
282
|
+
- spec/integration/container/shutdown_spec.rb
|
283
|
+
- spec/integration/container/standard_bootable_components_spec.rb
|
284
|
+
- spec/integration/dotenv_loading_spec.rb
|
285
|
+
- spec/integration/rack_app/middleware_spec.rb
|
286
|
+
- spec/integration/rack_app/non_booted_rack_app_spec.rb
|
287
|
+
- spec/integration/rack_app/rack_app_spec.rb
|
288
|
+
- spec/integration/settings/access_to_constants_spec.rb
|
289
|
+
- spec/integration/settings/loading_from_env_spec.rb
|
290
|
+
- spec/integration/settings/settings_component_loading_spec.rb
|
291
|
+
- spec/integration/settings/using_types_spec.rb
|
292
|
+
- spec/integration/setup_spec.rb
|
293
|
+
- spec/integration/slices/external_slice_spec.rb
|
294
|
+
- spec/integration/slices/slice_configuration_spec.rb
|
295
|
+
- spec/integration/slices/slice_loading_spec.rb
|
296
|
+
- spec/integration/slices/slice_routing_spec.rb
|
297
|
+
- spec/integration/slices/slice_settings_spec.rb
|
298
|
+
- spec/integration/slices_spec.rb
|
299
|
+
- spec/integration/view/context/assets_spec.rb
|
300
|
+
- spec/integration/view/context/inflector_spec.rb
|
301
|
+
- spec/integration/view/context/request_spec.rb
|
302
|
+
- spec/integration/view/context/routes_spec.rb
|
303
|
+
- spec/integration/view/context/settings_spec.rb
|
304
|
+
- spec/integration/view/inflector_spec.rb
|
305
|
+
- spec/integration/view/part_namespace_spec.rb
|
306
|
+
- spec/integration/view/path_spec.rb
|
307
|
+
- spec/integration/view/slice_configuration_spec.rb
|
308
|
+
- spec/integration/view/template_spec.rb
|
309
|
+
- spec/integration/view/views_spec.rb
|
329
310
|
- spec/isolation/hanami/application/already_configured_spec.rb
|
330
311
|
- spec/isolation/hanami/application/inherit_anonymous_class_spec.rb
|
331
312
|
- spec/isolation/hanami/application/inherit_concrete_class_spec.rb
|
@@ -333,64 +314,9 @@ files:
|
|
333
314
|
- spec/isolation/hanami/application/routes/configured_spec.rb
|
334
315
|
- spec/isolation/hanami/application/routes/not_configured_spec.rb
|
335
316
|
- spec/isolation/hanami/boot/success_spec.rb
|
336
|
-
- spec/new_integration/action/cookies_spec.rb
|
337
|
-
- spec/new_integration/action/csrf_protection_spec.rb
|
338
|
-
- spec/new_integration/action/routes_spec.rb
|
339
|
-
- spec/new_integration/action/sessions_spec.rb
|
340
|
-
- spec/new_integration/action/slice_configuration_spec.rb
|
341
|
-
- spec/new_integration/action/view_integration_spec.rb
|
342
|
-
- spec/new_integration/action/view_rendering/automatic_rendering_spec.rb
|
343
|
-
- spec/new_integration/action/view_rendering/paired_view_inference_spec.rb
|
344
|
-
- spec/new_integration/action/view_rendering_spec.rb
|
345
|
-
- spec/new_integration/code_loading/loading_from_app_spec.rb
|
346
|
-
- spec/new_integration/code_loading/loading_from_lib_spec.rb
|
347
|
-
- spec/new_integration/code_loading/loading_from_slice_spec.rb
|
348
|
-
- spec/new_integration/container/application_routes_helper_spec.rb
|
349
|
-
- spec/new_integration/container/auto_injection_spec.rb
|
350
|
-
- spec/new_integration/container/auto_registration_spec.rb
|
351
|
-
- spec/new_integration/container/autoloader_spec.rb
|
352
|
-
- spec/new_integration/container/imports_spec.rb
|
353
|
-
- spec/new_integration/container/prepare_container_spec.rb
|
354
|
-
- spec/new_integration/container/shutdown_spec.rb
|
355
|
-
- spec/new_integration/container/standard_bootable_components_spec.rb
|
356
|
-
- spec/new_integration/dotenv_loading_spec.rb
|
357
|
-
- spec/new_integration/rack_app/middleware_spec.rb
|
358
|
-
- spec/new_integration/rack_app/non_booted_rack_app_spec.rb
|
359
|
-
- spec/new_integration/rack_app/rack_app_spec.rb
|
360
|
-
- spec/new_integration/settings/access_to_constants_spec.rb
|
361
|
-
- spec/new_integration/settings/loading_from_env_spec.rb
|
362
|
-
- spec/new_integration/settings/settings_component_loading_spec.rb
|
363
|
-
- spec/new_integration/settings/using_types_spec.rb
|
364
|
-
- spec/new_integration/setup_spec.rb
|
365
|
-
- spec/new_integration/slices/external_slice_spec.rb
|
366
|
-
- spec/new_integration/slices/slice_configuration_spec.rb
|
367
|
-
- spec/new_integration/slices/slice_loading_spec.rb
|
368
|
-
- spec/new_integration/slices/slice_routing_spec.rb
|
369
|
-
- spec/new_integration/slices/slice_settings_spec.rb
|
370
|
-
- spec/new_integration/slices_spec.rb
|
371
|
-
- spec/new_integration/view/context/assets_spec.rb
|
372
|
-
- spec/new_integration/view/context/inflector_spec.rb
|
373
|
-
- spec/new_integration/view/context/request_spec.rb
|
374
|
-
- spec/new_integration/view/context/routes_spec.rb
|
375
|
-
- spec/new_integration/view/context/settings_spec.rb
|
376
|
-
- spec/new_integration/view/inflector_spec.rb
|
377
|
-
- spec/new_integration/view/part_namespace_spec.rb
|
378
|
-
- spec/new_integration/view/path_spec.rb
|
379
|
-
- spec/new_integration/view/slice_configuration_spec.rb
|
380
|
-
- spec/new_integration/view/template_spec.rb
|
381
|
-
- spec/new_integration/view/views_spec.rb
|
382
317
|
- spec/spec_helper.rb
|
383
318
|
- spec/support/app_integration.rb
|
384
319
|
- spec/support/coverage.rb
|
385
|
-
- spec/support/fixtures/hanami-plugin/Gemfile
|
386
|
-
- spec/support/fixtures/hanami-plugin/README.md
|
387
|
-
- spec/support/fixtures/hanami-plugin/Rakefile
|
388
|
-
- spec/support/fixtures/hanami-plugin/bin/console
|
389
|
-
- spec/support/fixtures/hanami-plugin/bin/setup
|
390
|
-
- spec/support/fixtures/hanami-plugin/hanami-plugin.gemspec
|
391
|
-
- spec/support/fixtures/hanami-plugin/lib/hanami/plugin.rb
|
392
|
-
- spec/support/fixtures/hanami-plugin/lib/hanami/plugin/cli.rb
|
393
|
-
- spec/support/fixtures/hanami-plugin/lib/hanami/plugin/version.rb
|
394
320
|
- spec/support/rspec.rb
|
395
321
|
- spec/support/shared_examples/cli/generate/app.rb
|
396
322
|
- spec/support/shared_examples/cli/generate/migration.rb
|
@@ -405,11 +331,11 @@ files:
|
|
405
331
|
- spec/unit/hanami/configuration/base_url_spec.rb
|
406
332
|
- spec/unit/hanami/configuration/inflector_spec.rb
|
407
333
|
- spec/unit/hanami/configuration/logger_spec.rb
|
334
|
+
- spec/unit/hanami/configuration/router_spec.rb
|
408
335
|
- spec/unit/hanami/configuration/slices_spec.rb
|
409
336
|
- spec/unit/hanami/configuration/views_spec.rb
|
410
337
|
- spec/unit/hanami/configuration_spec.rb
|
411
338
|
- spec/unit/hanami/env_spec.rb
|
412
|
-
- spec/unit/hanami/routes_spec.rb
|
413
339
|
- spec/unit/hanami/settings/env_store_spec.rb
|
414
340
|
- spec/unit/hanami/settings_spec.rb
|
415
341
|
- spec/unit/hanami/slice_configurable_spec.rb
|
@@ -438,75 +364,57 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
438
364
|
- !ruby/object:Gem::Version
|
439
365
|
version: 1.3.1
|
440
366
|
requirements: []
|
441
|
-
rubygems_version: 3.3.
|
367
|
+
rubygems_version: 3.3.3
|
442
368
|
signing_key:
|
443
369
|
specification_version: 4
|
444
370
|
summary: The web, with simplicity
|
445
371
|
test_files:
|
446
|
-
- spec/integration/
|
447
|
-
- spec/integration/
|
448
|
-
- spec/integration/
|
449
|
-
- spec/integration/
|
450
|
-
- spec/integration/
|
451
|
-
- spec/integration/
|
452
|
-
- spec/integration/
|
453
|
-
- spec/integration/
|
454
|
-
- spec/integration/
|
455
|
-
- spec/integration/
|
456
|
-
- spec/integration/
|
457
|
-
- spec/integration/
|
458
|
-
- spec/integration/
|
459
|
-
- spec/integration/
|
460
|
-
- spec/integration/
|
461
|
-
- spec/integration/
|
462
|
-
- spec/integration/
|
463
|
-
- spec/integration/
|
464
|
-
- spec/integration/
|
465
|
-
- spec/integration/
|
466
|
-
- spec/integration/
|
467
|
-
- spec/integration/
|
468
|
-
- spec/integration/
|
469
|
-
- spec/integration/
|
470
|
-
- spec/integration/
|
471
|
-
- spec/integration/
|
472
|
-
- spec/integration/
|
473
|
-
- spec/integration/
|
474
|
-
- spec/integration/
|
475
|
-
- spec/integration/
|
476
|
-
- spec/integration/
|
477
|
-
- spec/integration/
|
478
|
-
- spec/integration/
|
479
|
-
- spec/integration/
|
480
|
-
- spec/integration/
|
481
|
-
- spec/integration/
|
482
|
-
- spec/integration/
|
483
|
-
- spec/integration/
|
484
|
-
- spec/integration/
|
485
|
-
- spec/integration/
|
486
|
-
- spec/integration/
|
487
|
-
- spec/integration/
|
488
|
-
- spec/integration/
|
489
|
-
- spec/integration/
|
490
|
-
- spec/integration/
|
491
|
-
- spec/integration/
|
492
|
-
- spec/integration/middleware_spec.rb
|
493
|
-
- spec/integration/mount_applications_spec.rb
|
494
|
-
- spec/integration/project_initializers_spec.rb
|
495
|
-
- spec/integration/rackup_spec.rb
|
496
|
-
- spec/integration/rake/with_minitest_spec.rb
|
497
|
-
- spec/integration/rake/with_rspec_spec.rb
|
498
|
-
- spec/integration/routing_helpers_spec.rb
|
499
|
-
- spec/integration/security/content_security_policy_spec.rb
|
500
|
-
- spec/integration/security/csrf_protection_spec.rb
|
501
|
-
- spec/integration/security/force_ssl_spec.rb
|
502
|
-
- spec/integration/security/x_content_type_options_spec.rb
|
503
|
-
- spec/integration/security/x_frame_options_spec.rb
|
504
|
-
- spec/integration/security/x_xss_protection_spec.rb
|
505
|
-
- spec/integration/send_file_spec.rb
|
506
|
-
- spec/integration/sessions_spec.rb
|
507
|
-
- spec/integration/static_middleware_spec.rb
|
508
|
-
- spec/integration/streaming_spec.rb
|
509
|
-
- spec/integration/unsafe_send_file_spec.rb
|
372
|
+
- spec/integration/action/cookies_spec.rb
|
373
|
+
- spec/integration/action/csrf_protection_spec.rb
|
374
|
+
- spec/integration/action/routes_spec.rb
|
375
|
+
- spec/integration/action/sessions_spec.rb
|
376
|
+
- spec/integration/action/slice_configuration_spec.rb
|
377
|
+
- spec/integration/action/view_integration_spec.rb
|
378
|
+
- spec/integration/action/view_rendering/automatic_rendering_spec.rb
|
379
|
+
- spec/integration/action/view_rendering/paired_view_inference_spec.rb
|
380
|
+
- spec/integration/action/view_rendering_spec.rb
|
381
|
+
- spec/integration/code_loading/loading_from_app_spec.rb
|
382
|
+
- spec/integration/code_loading/loading_from_lib_spec.rb
|
383
|
+
- spec/integration/code_loading/loading_from_slice_spec.rb
|
384
|
+
- spec/integration/container/application_routes_helper_spec.rb
|
385
|
+
- spec/integration/container/auto_injection_spec.rb
|
386
|
+
- spec/integration/container/auto_registration_spec.rb
|
387
|
+
- spec/integration/container/autoloader_spec.rb
|
388
|
+
- spec/integration/container/imports_spec.rb
|
389
|
+
- spec/integration/container/prepare_container_spec.rb
|
390
|
+
- spec/integration/container/shutdown_spec.rb
|
391
|
+
- spec/integration/container/standard_bootable_components_spec.rb
|
392
|
+
- spec/integration/dotenv_loading_spec.rb
|
393
|
+
- spec/integration/rack_app/middleware_spec.rb
|
394
|
+
- spec/integration/rack_app/non_booted_rack_app_spec.rb
|
395
|
+
- spec/integration/rack_app/rack_app_spec.rb
|
396
|
+
- spec/integration/settings/access_to_constants_spec.rb
|
397
|
+
- spec/integration/settings/loading_from_env_spec.rb
|
398
|
+
- spec/integration/settings/settings_component_loading_spec.rb
|
399
|
+
- spec/integration/settings/using_types_spec.rb
|
400
|
+
- spec/integration/setup_spec.rb
|
401
|
+
- spec/integration/slices/external_slice_spec.rb
|
402
|
+
- spec/integration/slices/slice_configuration_spec.rb
|
403
|
+
- spec/integration/slices/slice_loading_spec.rb
|
404
|
+
- spec/integration/slices/slice_routing_spec.rb
|
405
|
+
- spec/integration/slices/slice_settings_spec.rb
|
406
|
+
- spec/integration/slices_spec.rb
|
407
|
+
- spec/integration/view/context/assets_spec.rb
|
408
|
+
- spec/integration/view/context/inflector_spec.rb
|
409
|
+
- spec/integration/view/context/request_spec.rb
|
410
|
+
- spec/integration/view/context/routes_spec.rb
|
411
|
+
- spec/integration/view/context/settings_spec.rb
|
412
|
+
- spec/integration/view/inflector_spec.rb
|
413
|
+
- spec/integration/view/part_namespace_spec.rb
|
414
|
+
- spec/integration/view/path_spec.rb
|
415
|
+
- spec/integration/view/slice_configuration_spec.rb
|
416
|
+
- spec/integration/view/template_spec.rb
|
417
|
+
- spec/integration/view/views_spec.rb
|
510
418
|
- spec/isolation/hanami/application/already_configured_spec.rb
|
511
419
|
- spec/isolation/hanami/application/inherit_anonymous_class_spec.rb
|
512
420
|
- spec/isolation/hanami/application/inherit_concrete_class_spec.rb
|
@@ -514,64 +422,9 @@ test_files:
|
|
514
422
|
- spec/isolation/hanami/application/routes/configured_spec.rb
|
515
423
|
- spec/isolation/hanami/application/routes/not_configured_spec.rb
|
516
424
|
- spec/isolation/hanami/boot/success_spec.rb
|
517
|
-
- spec/new_integration/action/cookies_spec.rb
|
518
|
-
- spec/new_integration/action/csrf_protection_spec.rb
|
519
|
-
- spec/new_integration/action/routes_spec.rb
|
520
|
-
- spec/new_integration/action/sessions_spec.rb
|
521
|
-
- spec/new_integration/action/slice_configuration_spec.rb
|
522
|
-
- spec/new_integration/action/view_integration_spec.rb
|
523
|
-
- spec/new_integration/action/view_rendering/automatic_rendering_spec.rb
|
524
|
-
- spec/new_integration/action/view_rendering/paired_view_inference_spec.rb
|
525
|
-
- spec/new_integration/action/view_rendering_spec.rb
|
526
|
-
- spec/new_integration/code_loading/loading_from_app_spec.rb
|
527
|
-
- spec/new_integration/code_loading/loading_from_lib_spec.rb
|
528
|
-
- spec/new_integration/code_loading/loading_from_slice_spec.rb
|
529
|
-
- spec/new_integration/container/application_routes_helper_spec.rb
|
530
|
-
- spec/new_integration/container/auto_injection_spec.rb
|
531
|
-
- spec/new_integration/container/auto_registration_spec.rb
|
532
|
-
- spec/new_integration/container/autoloader_spec.rb
|
533
|
-
- spec/new_integration/container/imports_spec.rb
|
534
|
-
- spec/new_integration/container/prepare_container_spec.rb
|
535
|
-
- spec/new_integration/container/shutdown_spec.rb
|
536
|
-
- spec/new_integration/container/standard_bootable_components_spec.rb
|
537
|
-
- spec/new_integration/dotenv_loading_spec.rb
|
538
|
-
- spec/new_integration/rack_app/middleware_spec.rb
|
539
|
-
- spec/new_integration/rack_app/non_booted_rack_app_spec.rb
|
540
|
-
- spec/new_integration/rack_app/rack_app_spec.rb
|
541
|
-
- spec/new_integration/settings/access_to_constants_spec.rb
|
542
|
-
- spec/new_integration/settings/loading_from_env_spec.rb
|
543
|
-
- spec/new_integration/settings/settings_component_loading_spec.rb
|
544
|
-
- spec/new_integration/settings/using_types_spec.rb
|
545
|
-
- spec/new_integration/setup_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_loading_spec.rb
|
549
|
-
- spec/new_integration/slices/slice_routing_spec.rb
|
550
|
-
- spec/new_integration/slices/slice_settings_spec.rb
|
551
|
-
- spec/new_integration/slices_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/slice_configuration_spec.rb
|
561
|
-
- spec/new_integration/view/template_spec.rb
|
562
|
-
- spec/new_integration/view/views_spec.rb
|
563
425
|
- spec/spec_helper.rb
|
564
426
|
- spec/support/app_integration.rb
|
565
427
|
- spec/support/coverage.rb
|
566
|
-
- spec/support/fixtures/hanami-plugin/Gemfile
|
567
|
-
- spec/support/fixtures/hanami-plugin/README.md
|
568
|
-
- spec/support/fixtures/hanami-plugin/Rakefile
|
569
|
-
- spec/support/fixtures/hanami-plugin/bin/console
|
570
|
-
- spec/support/fixtures/hanami-plugin/bin/setup
|
571
|
-
- spec/support/fixtures/hanami-plugin/hanami-plugin.gemspec
|
572
|
-
- spec/support/fixtures/hanami-plugin/lib/hanami/plugin/cli.rb
|
573
|
-
- spec/support/fixtures/hanami-plugin/lib/hanami/plugin/version.rb
|
574
|
-
- spec/support/fixtures/hanami-plugin/lib/hanami/plugin.rb
|
575
428
|
- spec/support/rspec.rb
|
576
429
|
- spec/support/shared_examples/cli/generate/app.rb
|
577
430
|
- spec/support/shared_examples/cli/generate/migration.rb
|
@@ -586,11 +439,11 @@ test_files:
|
|
586
439
|
- spec/unit/hanami/configuration/base_url_spec.rb
|
587
440
|
- spec/unit/hanami/configuration/inflector_spec.rb
|
588
441
|
- spec/unit/hanami/configuration/logger_spec.rb
|
442
|
+
- spec/unit/hanami/configuration/router_spec.rb
|
589
443
|
- spec/unit/hanami/configuration/slices_spec.rb
|
590
444
|
- spec/unit/hanami/configuration/views_spec.rb
|
591
445
|
- spec/unit/hanami/configuration_spec.rb
|
592
446
|
- spec/unit/hanami/env_spec.rb
|
593
|
-
- spec/unit/hanami/routes_spec.rb
|
594
447
|
- spec/unit/hanami/settings/env_store_spec.rb
|
595
448
|
- spec/unit/hanami/settings_spec.rb
|
596
449
|
- spec/unit/hanami/slice_configurable_spec.rb
|
data/lib/hanami/server.rb
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "hanami"
|
4
|
-
require "rack"
|
5
|
-
|
6
|
-
module Hanami
|
7
|
-
# Rack compatible server.
|
8
|
-
#
|
9
|
-
# It is run with:
|
10
|
-
#
|
11
|
-
# `bundle exec hanami server`
|
12
|
-
#
|
13
|
-
# It runs the app, by using the server specified in your `Gemfile`
|
14
|
-
# (eg. Puma or Unicorn).
|
15
|
-
#
|
16
|
-
# @since 0.8.0
|
17
|
-
# @api private
|
18
|
-
class Server < ::Rack::Server
|
19
|
-
# Primarily this removes the ::Rack::Chunked middleware
|
20
|
-
# which is the cause of Safari content-length bugs.
|
21
|
-
#
|
22
|
-
# @since 0.8.0
|
23
|
-
def middleware
|
24
|
-
mw = ::Hash.new { |e, m| e[m] = [] }
|
25
|
-
mw["development"].concat([::Rack::ShowExceptions, ::Rack::Lint])
|
26
|
-
mw
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|