hanami 2.0.0.alpha5 → 2.0.0.alpha7.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 +141 -0
- data/README.md +2 -6
- data/hanami.gemspec +5 -4
- data/lib/hanami/application/container/{boot → providers}/inflector.rb +1 -1
- data/lib/hanami/application/container/{boot → providers}/logger.rb +1 -1
- data/lib/hanami/application/container/providers/rack_logger.rb +15 -0
- data/lib/hanami/application/container/{boot → providers}/rack_monitor.rb +2 -2
- data/lib/hanami/application/container/{boot → providers}/routes_helper.rb +1 -1
- data/lib/hanami/application/container/{boot → providers}/settings.rb +1 -1
- data/lib/hanami/application/routing/router.rb +1 -1
- data/lib/hanami/application/slice_registrar.rb +106 -0
- data/lib/hanami/application.rb +75 -142
- data/lib/hanami/cli/application/cli.rb +1 -1
- data/lib/hanami/configuration/actions.rb +90 -0
- data/lib/hanami/configuration.rb +4 -23
- data/lib/hanami/constants.rb +23 -0
- data/lib/hanami/errors.rb +12 -0
- data/lib/hanami/{init.rb → prepare.rb} +1 -1
- data/lib/hanami/slice.rb +192 -128
- data/lib/hanami/version.rb +1 -1
- data/lib/hanami/web/rack_logger.rb +27 -51
- data/lib/hanami.rb +15 -7
- metadata +20 -16
- data/lib/hanami/application/autoloader/inflector_adapter.rb +0 -22
- data/lib/hanami/application/container/boot/rack_logger.rb +0 -19
@@ -1,22 +0,0 @@
|
|
1
|
-
module Hanami
|
2
|
-
class Application
|
3
|
-
module Autoloader
|
4
|
-
# Allows the Hanami standard inflector (from dry-inflector) to be used with Zeitwerk
|
5
|
-
class InflectorAdapter
|
6
|
-
def initialize(inflector)
|
7
|
-
@inflector = inflector
|
8
|
-
end
|
9
|
-
|
10
|
-
def camelize(basename, _abspath)
|
11
|
-
# Discard unused `_abspath` argument before calling our own inflector's
|
12
|
-
# `#camelize` (which takes only one argument)
|
13
|
-
inflector.camelize(basename)
|
14
|
-
end
|
15
|
-
|
16
|
-
private
|
17
|
-
|
18
|
-
attr_reader :inflector
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
@@ -1,19 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
Hanami.application.register_bootable :rack_logger do |container|
|
4
|
-
start do
|
5
|
-
require "hanami/web/rack_logger"
|
6
|
-
|
7
|
-
use :logger
|
8
|
-
use :rack_monitor
|
9
|
-
|
10
|
-
rack_logger = Hanami::Web::RackLogger.new(
|
11
|
-
container[:logger],
|
12
|
-
filter_params: Hanami.application.configuration.logger.filters
|
13
|
-
)
|
14
|
-
|
15
|
-
rack_logger.attach container[:rack_monitor]
|
16
|
-
|
17
|
-
register :rack_logger, rack_logger
|
18
|
-
end
|
19
|
-
end
|