Added
-
Integrate hanami-mailer gem when bundled. (@timriley in #1597, #1600)
Load templates from
templates/mailers/. Register a"mailers.delivery_method", which is either an SMTP mailer whenSMTP_ADDRESS,SMTP_PORT,SMTP_USERNAME,SMTP_PASSWORD,SMTP_AUTHENTICATIONenv vars are present. These can also be prefixed with a slice name. Register a test delivery always in the test env, and also in other envs when the env vars are absent. -
Integrate i18n gem when bundled. (@timriley in #1562, #1589, #1590, #1591, #1592)
Register an
"i18n"component in each slice, which may be configured viaconfig.i18nor a dedicated:i18nprovider. Load translations fromconfig/i18n/within each slice. Load shared translations fromconfig/i18n/shared/at the app-level only. Bundle default English translations for#localize. Make helpers available in views and actions, which also prefix relative keys (with a leading ".") with their own dot-delimited template or action names. -
Wrap the configured app logger with
Hanami::UniversalLogger, to provide a consistent logging interface regardless of the underlying logger. The app can now be depended upon to support (1) structured logging via keyword args passed to log methods, and (2) tagged logging via#tagged. (@timriley in #1567, #1568) -
Support
HANAMI_LOG_LEVELenv var to set the log level (e.g.HANAMI_LOG_LEVEL=warn bundle exec hanami server). Takes precedence overconfig.logger.levelset inconfig/app.rb. (@cllns in #1580) -
Add
config.db.log_levelsetting, for changing the log level for SQL logs. (@katafrakt in #1587) -
New setting
:default_template_enginethat sets which template engine should be used by default when doinghanami generate. (@katafrakt in #1564) -
Add
Hanami::Settings::CompositeStore, which can be used to chain setting lookups from multiple stores. (@aaronmallen in #1572)
Changed
- Default to memoizing all components, except in test env. Opt out for some or all components via
config.no_memoize. (@timriley in #1573, #1599) - Colorize logs by default in development env. (@timriley in #1566)
- Emit structured log entries for SQL queries, formatted consistently with request logs. (@timriley in #1569)
- Syntax highlight SQL in logs when the rouge gem is bundled. (@timriley in #1570)
- Colorize web request logs. (@timriley in #1571)
- Change default log level for SQL (and other database) statements from
:infoto:debug. (@katafrakt in #1595) - Raise a helpful error message when the
Slice.callRack entrypoint is called and no routes are available. (@sandbergja in #1586) - Apply extensions to hanami-action gem rather than hanami-controller (which is now retired). (@cllns in #1582)
- Redesign the new app welcome screen to match our new Hanakai visuals. (@makenosound in #1598)
- Require Ruby 3.3 or newer.