piko-lite-box 0.0.1

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.
Files changed (99) hide show
  1. checksums.yaml +7 -0
  2. data/hanami-3.0.1/CHANGELOG.md +1701 -0
  3. data/hanami-3.0.1/LICENSE +20 -0
  4. data/hanami-3.0.1/README.md +89 -0
  5. data/hanami-3.0.1/hanami.gemspec +49 -0
  6. data/hanami-3.0.1/lib/hanami/app.rb +197 -0
  7. data/hanami-3.0.1/lib/hanami/boot.rb +5 -0
  8. data/hanami-3.0.1/lib/hanami/config/actions/content_security_policy.rb +140 -0
  9. data/hanami-3.0.1/lib/hanami/config/actions/cookies.rb +57 -0
  10. data/hanami-3.0.1/lib/hanami/config/actions/sessions.rb +83 -0
  11. data/hanami-3.0.1/lib/hanami/config/actions.rb +189 -0
  12. data/hanami-3.0.1/lib/hanami/config/assets.rb +84 -0
  13. data/hanami-3.0.1/lib/hanami/config/console.rb +79 -0
  14. data/hanami-3.0.1/lib/hanami/config/db.rb +35 -0
  15. data/hanami-3.0.1/lib/hanami/config/i18n.rb +138 -0
  16. data/hanami-3.0.1/lib/hanami/config/logger.rb +207 -0
  17. data/hanami-3.0.1/lib/hanami/config/null_config.rb +17 -0
  18. data/hanami-3.0.1/lib/hanami/config/router.rb +48 -0
  19. data/hanami-3.0.1/lib/hanami/config/views.rb +103 -0
  20. data/hanami-3.0.1/lib/hanami/config.rb +564 -0
  21. data/hanami-3.0.1/lib/hanami/constants.rb +62 -0
  22. data/hanami-3.0.1/lib/hanami/env.rb +52 -0
  23. data/hanami-3.0.1/lib/hanami/errors.rb +41 -0
  24. data/hanami-3.0.1/lib/hanami/extensions/action/i18n_helper.rb +64 -0
  25. data/hanami-3.0.1/lib/hanami/extensions/action/name_inferrer.rb +34 -0
  26. data/hanami-3.0.1/lib/hanami/extensions/action/slice_configured_action.rb +190 -0
  27. data/hanami-3.0.1/lib/hanami/extensions/action.rb +147 -0
  28. data/hanami-3.0.1/lib/hanami/extensions/db/repo.rb +108 -0
  29. data/hanami-3.0.1/lib/hanami/extensions/mailer/slice_configured_mailer.rb +134 -0
  30. data/hanami-3.0.1/lib/hanami/extensions/mailer.rb +28 -0
  31. data/hanami-3.0.1/lib/hanami/extensions/operation/slice_configured_db_operation.rb +90 -0
  32. data/hanami-3.0.1/lib/hanami/extensions/operation.rb +33 -0
  33. data/hanami-3.0.1/lib/hanami/extensions/router/errors.rb +58 -0
  34. data/hanami-3.0.1/lib/hanami/extensions/view/context.rb +298 -0
  35. data/hanami-3.0.1/lib/hanami/extensions/view/part.rb +92 -0
  36. data/hanami-3.0.1/lib/hanami/extensions/view/scope.rb +36 -0
  37. data/hanami-3.0.1/lib/hanami/extensions/view/slice_configured_context.rb +73 -0
  38. data/hanami-3.0.1/lib/hanami/extensions/view/slice_configured_helpers.rb +55 -0
  39. data/hanami-3.0.1/lib/hanami/extensions/view/slice_configured_part.rb +73 -0
  40. data/hanami-3.0.1/lib/hanami/extensions/view/slice_configured_view.rb +243 -0
  41. data/hanami-3.0.1/lib/hanami/extensions/view/standard_helpers.rb +26 -0
  42. data/hanami-3.0.1/lib/hanami/extensions/view.rb +38 -0
  43. data/hanami-3.0.1/lib/hanami/extensions.rb +30 -0
  44. data/hanami-3.0.1/lib/hanami/helpers/assets_helper.rb +804 -0
  45. data/hanami-3.0.1/lib/hanami/helpers/form_helper/form_builder.rb +1389 -0
  46. data/hanami-3.0.1/lib/hanami/helpers/form_helper/values.rb +75 -0
  47. data/hanami-3.0.1/lib/hanami/helpers/form_helper.rb +213 -0
  48. data/hanami-3.0.1/lib/hanami/helpers/i18n_helper.rb +241 -0
  49. data/hanami-3.0.1/lib/hanami/logger/rack_formatter.rb +73 -0
  50. data/hanami-3.0.1/lib/hanami/logger/sql_formatter.rb +80 -0
  51. data/hanami-3.0.1/lib/hanami/logger/sql_logger.rb +48 -0
  52. data/hanami-3.0.1/lib/hanami/middleware/assets.rb +21 -0
  53. data/hanami-3.0.1/lib/hanami/middleware/content_security_policy_nonce.rb +53 -0
  54. data/hanami-3.0.1/lib/hanami/middleware/public_errors_app.rb +75 -0
  55. data/hanami-3.0.1/lib/hanami/middleware/render_errors.rb +90 -0
  56. data/hanami-3.0.1/lib/hanami/port.rb +45 -0
  57. data/hanami-3.0.1/lib/hanami/prepare.rb +5 -0
  58. data/hanami-3.0.1/lib/hanami/provider/source.rb +16 -0
  59. data/hanami-3.0.1/lib/hanami/provider_registrar.rb +28 -0
  60. data/hanami-3.0.1/lib/hanami/providers/assets.rb +28 -0
  61. data/hanami-3.0.1/lib/hanami/providers/db/adapter.rb +75 -0
  62. data/hanami-3.0.1/lib/hanami/providers/db/adapters.rb +66 -0
  63. data/hanami-3.0.1/lib/hanami/providers/db/config.rb +44 -0
  64. data/hanami-3.0.1/lib/hanami/providers/db/gateway.rb +87 -0
  65. data/hanami-3.0.1/lib/hanami/providers/db/sql_adapter.rb +100 -0
  66. data/hanami-3.0.1/lib/hanami/providers/db.rb +325 -0
  67. data/hanami-3.0.1/lib/hanami/providers/db_logging.rb +19 -0
  68. data/hanami-3.0.1/lib/hanami/providers/i18n/backend.rb +373 -0
  69. data/hanami-3.0.1/lib/hanami/providers/i18n/locale/en.yml +57 -0
  70. data/hanami-3.0.1/lib/hanami/providers/i18n.rb +114 -0
  71. data/hanami-3.0.1/lib/hanami/providers/inflector.rb +17 -0
  72. data/hanami-3.0.1/lib/hanami/providers/logger.rb +41 -0
  73. data/hanami-3.0.1/lib/hanami/providers/mailers.rb +101 -0
  74. data/hanami-3.0.1/lib/hanami/providers/rack.rb +47 -0
  75. data/hanami-3.0.1/lib/hanami/providers/relations.rb +31 -0
  76. data/hanami-3.0.1/lib/hanami/providers/routes.rb +29 -0
  77. data/hanami-3.0.1/lib/hanami/rake_tasks.rb +54 -0
  78. data/hanami-3.0.1/lib/hanami/routes.rb +146 -0
  79. data/hanami-3.0.1/lib/hanami/settings/composite_store.rb +53 -0
  80. data/hanami-3.0.1/lib/hanami/settings/env_store.rb +32 -0
  81. data/hanami-3.0.1/lib/hanami/settings.rb +234 -0
  82. data/hanami-3.0.1/lib/hanami/setup.rb +6 -0
  83. data/hanami-3.0.1/lib/hanami/slice/router.rb +280 -0
  84. data/hanami-3.0.1/lib/hanami/slice/routes_helper.rb +37 -0
  85. data/hanami-3.0.1/lib/hanami/slice/routing/middleware/stack.rb +216 -0
  86. data/hanami-3.0.1/lib/hanami/slice/routing/resolver.rb +88 -0
  87. data/hanami-3.0.1/lib/hanami/slice/view_name_inferrer.rb +63 -0
  88. data/hanami-3.0.1/lib/hanami/slice.rb +1239 -0
  89. data/hanami-3.0.1/lib/hanami/slice_configurable.rb +72 -0
  90. data/hanami-3.0.1/lib/hanami/slice_name.rb +111 -0
  91. data/hanami-3.0.1/lib/hanami/slice_registrar.rb +215 -0
  92. data/hanami-3.0.1/lib/hanami/universal_logger.rb +250 -0
  93. data/hanami-3.0.1/lib/hanami/version.rb +45 -0
  94. data/hanami-3.0.1/lib/hanami/web/rack_logger.rb +126 -0
  95. data/hanami-3.0.1/lib/hanami/web/welcome.html.erb +584 -0
  96. data/hanami-3.0.1/lib/hanami/web/welcome.rb +46 -0
  97. data/hanami-3.0.1/lib/hanami.rb +276 -0
  98. data/piko-lite-box.gemspec +11 -0
  99. metadata +137 -0
@@ -0,0 +1,1701 @@
1
+ # Hanami
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Break Versioning](https://www.taoensso.com/break-versioning).
6
+
7
+ A complete Hanami app is composed of multiple gems. For a complete overview of changes, see also these CHANGELOGs:
8
+
9
+ [Assets], [Assets JS], [CLI], [Action], [DB], [Mailer], [Minitest],
10
+ [RSpec], [Reloader], [Router], [Utils], [View], [Webconsole]
11
+
12
+ [Assets]: https://github.com/hanami/hanami-assets/blob/main/CHANGELOG.md
13
+ [Assets JS]: https://github.com/hanami/hanami-assets-js/blob/main/CHANGELOG.md
14
+ [CLI]: https://github.com/hanami/hanami-cli/blob/main/CHANGELOG.md
15
+ [Action]: https://github.com/hanami/hanami-action/blob/main/CHANGELOG.md
16
+ [DB]: https://github.com/hanami/hanami-db/blob/main/CHANGELOG.md
17
+ [Mailer]: https://github.com/hanami/hanami-mailer/blob/main/CHANGELOG.md
18
+ [Minitest]: https://github.com/hanami/hanami-minitest/blob/main/CHANGELOG.md
19
+ [RSpec]: https://github.com/hanami/hanami-rspec/blob/main/CHANGELOG.md
20
+ [Reloader]: https://github.com/hanami/hanami-reloader/blob/main/CHANGELOG.md
21
+ [Router]: https://github.com/hanami/hanami-router/blob/main/CHANGELOG.md
22
+ [Utils]: https://github.com/hanami/hanami-utils/blob/main/CHANGELOG.md
23
+ [View]: https://github.com/hanami/hanami-view/blob/main/CHANGELOG.md
24
+ [Webconsole]: https://github.com/hanami/hanami-webconsole/blob/main/CHANGELOG.md
25
+
26
+ ## [Unreleased]
27
+
28
+ ### Added
29
+
30
+ ### Changed
31
+
32
+ ### Deprecated
33
+
34
+ ### Removed
35
+
36
+ ### Fixed
37
+
38
+ - Don't attempt to inherit mailer template when `hanami-view` if not bundled (@katafrakt in #1611)
39
+
40
+ ### Security
41
+
42
+ [unreleased]: https://github.com/hanami/hanami/compare/v3.0.1...HEAD
43
+
44
+ ## [3.0.1] - 2026-07-03
45
+
46
+ ### Fixed
47
+
48
+ - Only configure template for mailer classes if hanami-view is bundled. (@katafrakt in #1611)
49
+
50
+ [3.0.1]: https://github.com/hanami/hanami/compare/v3.0.0...v3.0.1
51
+
52
+ ## [3.0.0] - 2026-06-30
53
+
54
+ ### Added
55
+
56
+ - Integrate hanami-mailer gem when bundled. (@timriley in #1597, #1600, #1606, #1609)
57
+
58
+ Load templates from `templates/mailers/`. Register a `"mailers.delivery_method"`, which is either an SMTP mailer when `SMTP_ADDRESS`, `SMTP_PORT`, `SMTP_USERNAME`, `SMTP_PASSWORD`, `SMTP_AUTHENTICATION` env 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.
59
+ - Integrate i18n gem when bundled. (@timriley in #1562, #1589, #1590, #1591, #1592, #1593)
60
+
61
+ Register an `"i18n"` component in each slice, which may be configured via `config.i18n` or a dedicated `:i18n` provider. Load translations from `config/i18n/` within each slice. Load shared translations from `config/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.
62
+ - 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, #1608)
63
+ - Allow the built-in logger to be further configured in a `config/providers/logger.rb` provider file, useful for calling arbitrary methods on the logger, like adding backends. (@timriley in #1608)
64
+
65
+ ```ruby
66
+ Hanami.app.configure_provider :logger do
67
+ before :start do
68
+ logger.add_backend(
69
+ stream: Hanami.app.root.join("log", "payments.log"),
70
+ log_if: -> entry { entry.tag?(:payments) }
71
+ )
72
+ end
73
+ end
74
+ ```
75
+ - Support `HANAMI_LOG_LEVEL` env var to set the log level (e.g. `HANAMI_LOG_LEVEL=warn bundle exec hanami server`). Takes precedence over `config.logger.level` set in `config/app.rb`. (@cllns in #1580)
76
+ - Add `config.db.log_level` setting, for changing the log level for SQL logs. (@katafrakt in #1587)
77
+ - New setting `:default_template_engine` that sets which template engine should be used by default when doing `hanami generate`. (@katafrakt in #1564)
78
+ - Add `Hanami::Settings::CompositeStore`, which can be used to chain setting lookups from multiple stores. (@aaronmallen in #1572)
79
+ - Add `Hanami::Slice.with_slices`, returning the slice and all its nested slices. (@timriley in #1604)
80
+
81
+ ### Changed
82
+
83
+ - Default to memoizing all components, except in test env. Opt out for some or all components via `config.no_memoize`. (@timriley in #1573, #1599)
84
+ - Colorize logs by default in development env. (@timriley in #1566)
85
+ - Emit structured log entries for SQL queries, formatted consistently with request logs. (@timriley in #1569)
86
+ - Syntax highlight SQL in logs when the rouge gem is bundled. (@timriley in #1570, #1607)
87
+ - Colorize web request logs. (@timriley in #1571)
88
+ - Change default log level for SQL (and other database) statements from `:info` to `:debug`. (@katafrakt in #1595)
89
+ - Raise a helpful error message when the `Slice.call` Rack entrypoint is called and no routes are available. (@sandbergja in #1586)
90
+ - Apply extensions to hanami-action gem rather than hanami-controller (which is now retired). (@cllns in #1582)
91
+ - Redesign the new app welcome screen to match our new Hanakai visuals. (@makenosound in #1598)
92
+ - Require Ruby 3.3 or newer.
93
+
94
+ ### Removed
95
+
96
+ - Remove default body parsing middleware. This functionality has moved into Hanami Action. (@timriley in #1575)
97
+
98
+ [3.0.0]: https://github.com/hanami/hanami/compare/v2.3.2...v3.0.0
99
+
100
+ ## [3.0.0.rc1] - 2026-06-16
101
+
102
+ ### Added
103
+
104
+ - Integrate hanami-mailer gem when bundled. (@timriley in #1597, #1600)
105
+
106
+ Load templates from `templates/mailers/`. Register a `"mailers.delivery_method"`, which is either an SMTP mailer when `SMTP_ADDRESS`, `SMTP_PORT`, `SMTP_USERNAME`, `SMTP_PASSWORD`, `SMTP_AUTHENTICATION` env 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.
107
+ - Integrate i18n gem when bundled. (@timriley in #1562, #1589, #1590, #1591, #1592, #1593)
108
+
109
+ Register an `"i18n"` component in each slice, which may be configured via `config.i18n` or a dedicated `:i18n` provider. Load translations from `config/i18n/` within each slice. Load shared translations from `config/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.
110
+ - 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)
111
+ - Support `HANAMI_LOG_LEVEL` env var to set the log level (e.g. `HANAMI_LOG_LEVEL=warn bundle exec hanami server`). Takes precedence over `config.logger.level` set in `config/app.rb`. (@cllns in #1580)
112
+ - Add `config.db.log_level` setting, for changing the log level for SQL logs. (@katafrakt in #1587)
113
+ - New setting `:default_template_engine` that sets which template engine should be used by default when doing `hanami generate`. (@katafrakt in #1564)
114
+ - Add `Hanami::Settings::CompositeStore`, which can be used to chain setting lookups from multiple stores. (@aaronmallen in #1572)
115
+
116
+ ### Changed
117
+
118
+ - Default to memoizing all components, except in test env. Opt out for some or all components via `config.no_memoize`. (@timriley in #1573, #1599)
119
+ - Colorize logs by default in development env. (@timriley in #1566)
120
+ - Emit structured log entries for SQL queries, formatted consistently with request logs. (@timriley in #1569)
121
+ - Syntax highlight SQL in logs when the rouge gem is bundled. (@timriley in #1570)
122
+ - Colorize web request logs. (@timriley in #1571)
123
+ - Change default log level for SQL (and other database) statements from `:info` to `:debug`. (@katafrakt in #1595)
124
+ - Raise a helpful error message when the `Slice.call` Rack entrypoint is called and no routes are available. (@sandbergja in #1586)
125
+ - Apply extensions to hanami-action gem rather than hanami-controller (which is now retired). (@cllns in #1582)
126
+ - Redesign the new app welcome screen to match our new Hanakai visuals. (@makenosound in #1598)
127
+ - Require Ruby 3.3 or newer.
128
+
129
+ ### Removed
130
+
131
+ - Remove default body parsing middleware. This functionality has moved into Hanami Action. (@timriley in #1575)
132
+
133
+ [3.0.0.rc1]: https://github.com/hanami/hanami/compare/v2.3.2...v3.0.0.rc1
134
+
135
+ ## [v2.3.2] - 2025-12-04
136
+
137
+ ### Fixed
138
+
139
+ - Support the newly released Bundler v4 by removing upper version bound our dependency on it. Require at least Bundler 2.0 as well. (@timriley in #1559)
140
+
141
+ [v2.3.2]: https://github.com/hanami/hanami/compare/v2.3.1...v2.3.2
142
+
143
+ ## [v2.3.1] - 2025-11-14
144
+
145
+ ### Fixed
146
+
147
+ - Fix a circular require warning when loading router extensions. (@timriley in #1556)
148
+
149
+ ## [v2.3.0] - 2025-11-12
150
+
151
+ ### Added
152
+
153
+ - Add `resources` and `resource` methods to the routes DSL. (@afomera and @timriley in #1542 and #1548)
154
+
155
+ ```ruby
156
+ resources :users
157
+ # Generates:
158
+ # GET /users users.index
159
+ # GET /users/new users.new
160
+ # POST /users users.create
161
+ # GET /users/:id users.show
162
+ # GET /users/:id/edit users.edit
163
+ # PATCH /users/:id users.update
164
+ # DELETE /users/:id users.destroy
165
+
166
+ resource :profile
167
+ # Generates (singular, no index):
168
+ # GET /profile/new profile.new
169
+ # POST /profile profile.create
170
+ # GET /profile profile.show
171
+ # GET /profile/edit profile.edit
172
+ # PATCH /profile profile.update
173
+ # DELETE /profile profile.destroy
174
+ ```
175
+
176
+ ### Changed
177
+
178
+ - Enable body parsing middleware by default. (@timriley in #1549)
179
+
180
+ This will parse multipart form upload bodies in requests with content type of `multipart/form-data`, and JSON bodies in requests with content types of `application/json` or `application/vnd.api+json`.
181
+ - For standard logging, use block-based API to provide log payloads, so that log payloads are not generated if the log severity is less than the configured log level. (@p8 in #1550)
182
+
183
+ ### Fixed
184
+
185
+ - Avoid errors when eagerloading Zeitwerk (or when running `bin/rails zeitwerk:check` if your Hanami app is embedded within Rails) by skipping autoloading for extension files that may depend on non-installed gems. (@timriley in #1498)
186
+ - Only extend `Dry::Operation` for Hanami’s database layer when the hanami-db gem is bundled. (@timriley in #1490)
187
+ - Address deprecation warnings from previous usage of `JSON.fast_generate`. (@krzykamil in #1546)
188
+
189
+ ## [v2.3.0.beta1] - 2025-10-17
190
+
191
+ ### Changed
192
+
193
+ - Use updated API for `config.actions.formats`. (@timriley in #1544)
194
+ - Show relative paths in `MissingActionError`. (@kyleplump and @timriley in #1445)
195
+
196
+ ### Removed
197
+
198
+ - View context `settings` has been removed and is no longer accessible from templates. (@baweaver in #1536)
199
+
200
+ ## [v2.3.0.beta1] - 2025-10-03
201
+
202
+ ### Added
203
+
204
+ - Add `config.console` settings to app. Set an alternative engine with e.g. `config.console.engine = :pry` (`:irb` is default). Add your own methods to the console with `config.console.include MyModule, AnotherModule`. (@alassek in #1540)
205
+ - Support optional nonce in Rack requests, CSP header rules and view helpers (@svoop in #1500)
206
+ - Check `ENV["APP_ENV"]` for the Hanami env if `ENV["HANAMI_ENV"]` is not set. The order of environment variable checks is now `HANAMI_ENV`->`APP_ENV`->`RACK_ENV` (@svoop in #1487).
207
+
208
+ ### Changed
209
+
210
+ - Support both Rack v2 and v3. (@kyleplump in #1493)
211
+ - Support single-character slice names. (@aaronmallen in #1528)
212
+
213
+ ### Fixed
214
+
215
+ - Allow `include Deps` to be used in `Hanami::DB::Repo` subclasses. (@wuarmin in #1523)
216
+ - Properly infer root relations for deeper `Hanami::DB::Repo` subclasses, such as in slices. (@wuarmin in #1478)
217
+ - Delay loading `config/routes.rb` until after autoloading is setup, which means you can access your constants there. (@timriley in #1539)
218
+ - Avoid warning from referencing deprecated `URI::DEFAULT_PARSER`. (@wuarmin in #1518)
219
+
220
+ ## v2.2.1 - 2024-11-12
221
+
222
+ ### Changed
223
+
224
+ - [Tim Riley] Depend on matching minor version of hanami-cli (a version spec of `"~> 2.2.1"` instead of `"~> 2.2"`). This ensures that future bumps to the minor version of hanami-cli will not be inadvertently installed on user machines (#1471)
225
+
226
+ ### Fixed
227
+
228
+ - [Tim Riley] Allow base operation class to load when a Hanami app is generated with `--skip-db` (i.e. when the "rom-sql" gem is not in the bundle) (#1475)
229
+
230
+ ## v2.2.0 - 2024-11-05
231
+
232
+ ### Changed
233
+
234
+ - [Tim Riley] Depend on dry-system v1.1, the stable release featuring the changes supporting the provider improvements introduced in beta1 and beta2 (#1467)
235
+ - [Tim Riley] Added specific "json" gem dependency to gemspec in order to suppress bundled gem deprecation warnings appearing in Ruby 3.3.5 (#1469)
236
+
237
+ ## v2.2.0.rc1 - 2024-10-29
238
+
239
+ ### Added
240
+
241
+ - [Adam Lassek] Add `#connection_options` to db gateways. These are a hash of options that will be passed to the lower-level driver when the gateway connects. For SQL databases, this means [Sequel's connection options](https://sequel.jeremyevans.net/rdoc/files/doc/opening_databases_rdoc.html) (#1450)
242
+ - [Adam Lassek] Automatically configure `Dry::Operation` subclasses within Hanami apps for `transaction` support using the app's ROM container. (#1456)
243
+
244
+ ### Changed
245
+
246
+ - [Tim Riley] Apply config from matching gateways in parent slices (#1459)
247
+ - [Tim Riley] Remove `config.any_adapter` from DB provider (#1459)
248
+
249
+ ## v2.2.0.beta2 - 2024-09-26
250
+
251
+ ### Added
252
+
253
+ - [Tim Riley] Support multiple gateways within each slice's `:db` provider (#1452)
254
+ - [Tim Riley] Register ROM commands and mappers in `db/commands/` and `db/mappers/`. Support registration of components from deeply nested files within these directories. (#1448)
255
+ - [Adam Lassek, Tim Riley] Make `slice` available inside providers (as an alias for `target`) (#1446)
256
+
257
+ ### Changed
258
+
259
+ - [Tim Riley] Register deeply nested relation files with ROM (#1448)
260
+ - [Kyle Plump] Raise helpful error when preparing `:db` provider if the relevant driver gem for the configured database type is not installed (#1453)
261
+ - [Sean Collins] Remove "disabled" attribute on the `<option>` generated via the `select` helper's `prompt:`, so it shows properly on the select box in the browser (#1444)
262
+
263
+ ## v2.2.0.beta1 - 2024-07-16
264
+
265
+ ### Added
266
+
267
+ - [Tim Riley, Adam Lassek] Introduce database layer
268
+ - [Adam Lassek] Add `Hanami::Slice.app?`, returning false for slices and true for the app (#1399)
269
+ - [Tim Riley] Add `Slice#registered?`, an additional method delegating to the internal container. Returns true only if a component is already registered for the given, without triggering lazy loading (#1382)
270
+
271
+ ### Changed
272
+
273
+ - [Tim Riley] `target` inside providers is now the slice itself, instead of the slice's internal container (#1382)
274
+ - Drop support for Ruby 3.0
275
+
276
+ ### Fixed
277
+
278
+ - [Damian C. Rossney] Allow form `label` helper to receive a symbol (#1423)
279
+ - [Damian C. Rossney] Fix invalid input names generated when using form `fields_for_collection` helper (#1421)
280
+ - [Tim Riley] Fix dry-logger compatibility check for versions of dry-logger >= 1.0.4 (#1384)
281
+
282
+ ## v2.1.1 - 2024-05-12
283
+
284
+ ### Fixed
285
+
286
+ - [Tim Riley] Ensure Rack logging continues to work when upgrading to dry-logger 1.0.4 (#1384)
287
+
288
+ ## v2.1.0 - 2024-02-27
289
+
290
+ ### Changed
291
+
292
+ - [Pat Allan] Pass keyword arguments through to configured middleware
293
+ - [Tim Riley] Expect underscored slice names in `public/assets/` to avoid naming conflicts with nested asset entry points. In this arrangement, an "admin" slice will have its assets compiled into `public/assets/_admin/`.
294
+
295
+ ## v2.1.0.rc3 - 2024-02-16
296
+
297
+ ### Changed
298
+
299
+ - [Tim Riley] Return `nil` when setting content via `#content_for` on the app's view context. This
300
+ allows it to be used with template output tags (such as ERB's `<%=`) that capture a block for the
301
+ given content. (#1369)
302
+
303
+ ### Fixed
304
+
305
+ - [Tim Riley] Ensure assets Rake task for Heroku works (#1368)
306
+
307
+ ## v2.1.0.rc2 - 2023-11-08
308
+
309
+ ### Changed
310
+
311
+ - [Tim Riley] Enable `config.render_detailed_errors` in development mode only by default. (#1365)
312
+ - [Tim Riley] Remove current_path from context (#1362)
313
+
314
+ ## v2.1.0.rc1 - 2023-11-01
315
+
316
+ ### Added
317
+
318
+ - [Aaron Moodie & Tim Riley] Render a welcome page when no routes are defined (#1353)
319
+ - [Luca Guidi] Allow _Method Override_ by default, by mounting `Rack::MethodOverride` middleware. (#1344)
320
+
321
+ ### Fixed
322
+
323
+ - [Luca Guidi] Ensure compatibility with Ruby Logger from stdlib (#1352)
324
+
325
+ ### Changed
326
+
327
+ - [Philip Arndt] Add support for a slice's class definition file to exist inside either `config/slices/[slice_name].rb` or `slices/[slice_name]/config/slice.rb`, in that order of precedence, so that a slice can provide its own definition which the app, or the slice's parent slice if that exists, can override if needed.
328
+ - [Tim Riley] Use `helpers` prefix to access helper methods from view parts (e.g. `helpers.format_number`)
329
+ - [Tim Riley] Make it possible to directly initialize view parts to ease their unit tests (#1357)
330
+ - [Tim Riley] Remove short names for assets helpers (#1356):
331
+ - Keep `javascript_tag` (remove `javascript` and `js` aliases)
332
+ - Keep `stylesheet_tag` (renamed from `stylesheet_link_tag`; remove `stylesheet` and `css` aliases)
333
+ - Keep `favicon_tag` (renamed from `favicon_link_tag`; remove `favicon` alias)
334
+ - Keep `image_tag` (remove `image` alias)
335
+ - Keep `video_tag` (remove `video` alias)
336
+ - Keep `audio_tag` (remove `audio` alias)
337
+
338
+ ## v2.1.0.beta2.1 - 2023-10-04
339
+
340
+ ### Added
341
+
342
+ - [Tim Riley, Luca Guidi] Added assets helpers aliases (#1319, #1339):
343
+ - Added `#js` and `#javascript_tag` as alias for `#javascript`
344
+ - Added `#css` and `#stylesheet_link_tag` as alias for `#stylesheet`
345
+ - Added `#image_tag` as alias for `#image`
346
+ - Added `#favicon_link_tag` as alias for `#favicon`
347
+ - Added `#video_tag` as alias for `#video`
348
+ - Added `#audio_tag` as alias for `#audio`
349
+
350
+ ## v2.1.0.beta2 - 2023-10-04
351
+
352
+ ### Added
353
+
354
+ - [Luca Guidi, Tim Riley] Reimplement assets integration (#1319, #1332, #1333, #1336)
355
+ - [Tim Riley] Introduce `Hanami::Helpers::AssetsHelper`, automatically included in view templates, scopes and parts when hanami-assets is bundled (#1319)
356
+
357
+ ### Fixed
358
+
359
+ - [Tim Riley] Return appropriate response statuses based on error type (#1330)
360
+
361
+ ### Changed
362
+
363
+ - [Tim Riley] Removed `#asset_path` in favour of `#asset_url` only (#1319)
364
+
365
+ ## v2.1.0.beta1 - 2023-06-29
366
+
367
+ ### Added
368
+
369
+ - [Tim Riley] Introduce `Hanami::View` extensions to use alongside hanami-view v2.1.0.beta1 (#1292)
370
+ - [Tim Riley] Enable standard helpers (from hanami-view) for all view parts and scopes (#1303,
371
+ #1307)
372
+ - [Tim Riley] Add `Hanami::Helpers::FormHelper` and include in all view parts and scopes (#1305,
373
+ #1307)
374
+ - [Tim Riley] Include user defined helpers (at `MyApp::Views::Helpers` or `MySlice::Views::Helpers`)
375
+ in all view parts and scopes (#1307)
376
+ - [Tim Riley] Introduce `Hanami::Middleware::RenderErrors` middleware to render error responses (in HTML or JSON) when errors are raised. For HTML responses, the error pages are expected to be found in `public/{404,500}.html` (#1309)
377
+ - [Tim Riley] Use hanami-webconsole (if bundled) to render detailed error pages in development mode (#1311).
378
+
379
+ ### Fixed
380
+
381
+ - [Tim Riley] Prevent matching incorrect slice names (due to partial matches) in `Hanami::SliceConfigurable`. This ensures appropriate config is applied to actions and views within their respective slices. (#1302)
382
+ - [Masanori Ohnishi] Ensure content-length properly appears in rack logs (#1306)
383
+
384
+ ## v2.0.3 - 2023-02-01
385
+
386
+ ### Fixed
387
+
388
+ - [Adam Lassek] Ensure to setup a logger in a non-default Hanami env
389
+ - [R Gibim] Use production logger settings for non-default Hanami env
390
+ - [Adam Lassek] Allow slices to have a default for registrations directory
391
+
392
+ ## v2.0.2 - 2022-12-25
393
+
394
+ ### Added
395
+
396
+ - [Luca Guidi] Official support for Ruby 3.2
397
+
398
+ ### Fixed
399
+
400
+ - [Luca Guidi] Content Security Policy: remove deprecated `plugin-types`
401
+
402
+ ## v2.0.1 - 2022-12-06
403
+
404
+ ### Fixed
405
+
406
+ - [Luca Guidi] Ensure `Content-Security-Policy` HTTP response header to be returned as a single line
407
+ - [Tim Riley] Ensure Rack events are on internal notifications system
408
+
409
+ ## v2.0.0 - 2022-11-22
410
+
411
+ ### Added
412
+
413
+ - [Tim Riley] Allow custom code from Hanami app `lib/` to be required before to load the app
414
+ - [Tim Riley] Support the new `Hanami::Action::Config#formats` config from hanami-controller 2.0.0
415
+ - [Tim Riley] Automatically use body_parser middleware when actions `:json` format is configured
416
+
417
+ ### Fixed
418
+
419
+ - [Luca Guidi] Ensure Hanami app to not crash when `hanami-controller` isn't bundled
420
+ - [Piotr Solnica] Several logger fixes
421
+
422
+ ### Changed
423
+
424
+ - [Tim Riley] Don't assign a default MIME Type for Hanami apps
425
+
426
+ ## v2.0.0.rc1 - 2022-11-08
427
+
428
+ ### Added
429
+
430
+ - [Piotr Solnica] Use Zeitwerk to auto-load Hanami
431
+ - [Tim Riley] Introduce `Hanami::Slice.stop` to properly shutdown all the application slices
432
+
433
+ ### Fixed
434
+
435
+ - [Luca Guidi] Ensure to properly mount Rack middleware in routing scope and slice
436
+ - [Tim Riley] Simplify and clarify usage of `Hanami::Config#environment`
437
+ - [Tim Riley] Improve error message for missing action class
438
+ - [Tim Riley] Expect nested slices to use parent’s namespace
439
+
440
+ ### Changed
441
+
442
+ - [Piotr Solnica] Replace `Hanami::Logger` with `Dry::Logger`
443
+ - [Tim Riley] Remove duplicated configuration `config.session` and keep `config.actions.sessions`
444
+
445
+ ## v2.0.0.beta4 - 2022-10-24
446
+
447
+ ### Added
448
+
449
+ - [Peter Solnica] Improve middleware config by avoiding class names and requires: symbols instead of classes can be passed as middleware identifiers (`config.middleware.use(:body_parser, :json)`); constant namespaces can be configured for resolving symbols into class names (`config.middleware.namespaces = [Hanami::Middleware, MyStuff::Middlewares]`), with the first match winning; first-party middleware classes are required automatically. (#1215)
450
+
451
+ ### Fixed
452
+
453
+ - [Luca Guidi] Do not attempt to load routes if hanami-router is not bundled (#1214)
454
+ - [Marc Busqué] Ensure nested slices are considered when auto-configuring application components using `Hanami::SliceConfigurable` (#1212)
455
+ - [Tim Riley] Ensure errors are raised during settings loading for any settings that are missing entirely from ENV (#1222)
456
+
457
+ ### Changed
458
+
459
+ - [Tim Riley] Rename `Hanami::App.configuration` to `Hanami::App.config` and `Hanami::Configuration` to `Hanami::Config` (#1218)
460
+ - [Tim Riley] Make `Hanami::App.settings` available as a class method again (#1213)
461
+ - [Tim Riley] `config/settings.rb` in apps no longer has access to autoloaded constants (changed back to behavior pre-beta3) (#1213)
462
+ - [Tim Riley] Auto-generate a nested `Types` module in `Hanami::Settings` subclasses if dry-types is available, for added convenience in type checking settings (#1213)
463
+ - [Marc Busqué] Hide values from `Hanami::Settings#inspect` (values may contain sensitive data). Values can be inspected via `#inspect_values` (#1217)
464
+
465
+ ## v2.0.0.beta3 - 2022-09-21
466
+
467
+ ### Changed
468
+
469
+ - [Piotr Solnica] Simplify routes definition, by removing `routes` block from `config/routes.rb`
470
+
471
+ ### Added
472
+
473
+ ## v2.0.0.beta2 - 2022-08-16
474
+
475
+ ### Added
476
+
477
+ - [Tim Riley] Added `config.slices` setting to specify a list of slices to load. This may also be set via a comma-separated string in the `HANAMI_SLICES` env var. [#1189]
478
+
479
+ This is useful when only certain parts of your application are required for particular workloads. Specifying those slices directly improves boot time and minimizes memory usage, as well as ensuring clean boundaries between your slices.
480
+
481
+ For example, given an app with both `blog`, `shop` and `admin` slices, you can specify only the first two to load:
482
+
483
+ ```ruby
484
+ # config/app.rb
485
+
486
+ module AppName
487
+ class App < Hanami::App
488
+ config.slices = %w[blog shop]
489
+ end
490
+ end
491
+ ```
492
+
493
+ Or by setting `HANAMI_SLICES=blog,shop` in the env.
494
+
495
+ You can also specify arbitrarily nested slices using dot delimiters. For example, if you have an `admin` slice with nested `shop` and `blog` slices, you can specify `config.slices = %w[admin.shop]` to only load the admin slice and its nested shop slice.
496
+
497
+ - [Tim Riley] Added `App.prepare_load_path`, which need only be called if you explicitly change your app's `config.root`. The `$LOAD_PATH` is otherwise still prepared automatically for the default `root` of `Dir.pwd`. [#1188]
498
+ - [Marc Busqué, Tim Riley] Added `Hanami.setup` to find and load your Hanami app file (expected at `config/app.rb`). This will search in the current directory, and will search upwards through parent directories until the app file is found. [#1197]
499
+
500
+ This behavior allows `Hanami.setup` (and its counterpart convenience require, `require "hanami/setup"`) to work even when called
501
+ from a nested directory within your Hanami app.
502
+
503
+ Also added `Hanami.app_path`, returning the absolute path of the app file, if found.
504
+
505
+ ### Changed
506
+
507
+ - [Tim Riley] Allow access to autoloaded constants from within `config/settings.rb` [#1186]
508
+
509
+ New Hanami apps generate a types module at `lib/[app_name]/types.rb`. Now you can access it within your settings class to type check your settings, e.g.
510
+
511
+ ```ruby
512
+ # config/settings.rb
513
+
514
+ module AppName
515
+ class Settings < Hanami::Settings
516
+ # By default, AppName::Types is defined at `lib/[app_name]/types.rb`, and can be autoloaded here
517
+ setting :some_flag, constructor: Types::Params::Bool
518
+ end
519
+ end
520
+ ```
521
+
522
+ For settings defined within a slice, you can access types (or any constant) defined within the slice:
523
+
524
+ ```ruby
525
+ # slices/slice_name/config/settings.rb
526
+
527
+ module SliceName
528
+ class Settings < Hanami::Settings
529
+ # SliceName::Types is expected to be defined at `slices/[slice_name]/types.rb`
530
+ setting :some_slice_flag, constructor: Types::Params::bool
531
+ end
532
+ end
533
+ ```
534
+
535
+ - [Tim Riley] Every slice has a distinct `Zeitwerk::Loader` instance at `Slice.autoloader`. This change enabled the autoloading within settings described above. [#1186]
536
+ - [Tim Riley] `Slice.settings` reader method has been removed. Access settings via `App["settings"]` or `Slice["settings"]` (after the slice has been prepared) instead. [#1186]
537
+ - [Tim Riley] dry-types is no longer a dependency specified in the gemspec. This is made available to generated app via a line in their `Gemfile` instead. [#1186]
538
+
539
+ ### Fixed
540
+
541
+ - [Tim Riley] `config` explicitly set in `Hanami::Action` or `Hanami::View` base classes (either app- or slice-level) is no longer overridden by slice-level configuration [#1193]
542
+ - [Nikita Shilnikov] Load dry-monitor rack extension explicitly to avoid autoloading errors [#1198] [#1199]
543
+
544
+ ## v2.0.0.beta1.1 - 2022-07-22
545
+
546
+ ### Changed
547
+
548
+ - [Andrew Croome] Specified 2.0.0.beta dependencies for hanami-cli and hanami-utils (to prefer these over previously installed alpha versions) [#1187]
549
+
550
+ ## v2.0.0.beta1 - 2022-07-20
551
+
552
+ ### Added
553
+
554
+ - [Luca Guidi] Added support for `hanami` CLI [#1096]
555
+ - [Luca Guidi] Added support for Rake tasks for compatibility with Ruby hosting services (`db:migrate` and `assets:precompile`) [#1096]
556
+ - [Tim Riley] Add `app/` as source dir for application container [#1174]
557
+ - [Piotr Solnica] Allow Rack middleware to be inserted before/after a specific router middleware [#1176]
558
+
559
+ ```ruby
560
+ # config/routes.rb:
561
+
562
+ module TestApp
563
+ class Routes < Hanami::Routes
564
+ slice :admin, at: "/admin" do
565
+ use TestApp::Middlewares::AppendOne
566
+ use TestApp::Middlewares::Prepare, before: TestApp::Middlewares::AppendOne
567
+ use TestApp::Middlewares::AppendTwo, after: TestApp::Middlewares::AppendOne
568
+ end
569
+ end
570
+ end
571
+ ```
572
+
573
+ ### Fixed
574
+
575
+ - [Tim Riley] Fallback to `RACK_ENV` if `HANAMI_ENV` isn't set [#1168]
576
+ - [Tim Riley] Print error friendly messages when a soft dependency isn't installed [#1166]
577
+ - [Piotr Solnica] Ensure to handle properly Rack middleware that accept a block
578
+
579
+ ```ruby
580
+ # config/app.rb:
581
+
582
+ module TestApp
583
+ class App < Hanami::App
584
+ config.middleware.use(TestApp::TestMiddleware) do |env|
585
+ env["tested"] = "yes"
586
+ end
587
+ end
588
+ end
589
+ ```
590
+
591
+ - [Tim Riley] Ensure to correctly activate session middleware [#1179]
592
+ - [Tim Riley] Avoid redundant auto-registrations for `lib/` files [#1184]
593
+
594
+ ### Changed
595
+
596
+ - [Luca Guidi] Make `app/` the core of Hanami 2 apps
597
+ - [Luca Guidi] `Hanami::Application` -> `Hanami::App`
598
+ - [Luca Guidi] `Hanami.application` -> `Hanami.app`
599
+ - [Luca Guidi] `config/application.rb` -> `config/app.rb`
600
+ - [Luca Guidi] Remove `::Application::` namespace in public API class names (e.g. `Hanami::Application::Routes` -> `Hanami::Routes`) [#1172]
601
+ - [Tim Riley] Removed `Hanami::Configuration#source_dirs` due to the new autoloading and auto-registration features [#1174]
602
+ - [Tim Riley] Removed `Hanami::Configuration#settings_path`, `#settings_class_name` [#1175]
603
+ - [Tim Riley] Removed `Hanami::Configuration::Router#routes_path`, and `#routes_class_name` [#1175]
604
+ - [Tim Riley] Make `Hanami::App` to inherit from `Hanami::Slice` [#1162]
605
+
606
+ ## v2.0.0.alpha8 - 2022-05-19
607
+
608
+ ### Added
609
+
610
+ - [Tim Riley] Introduced `Hanami::Application::Action` as base class for actions that integrate with Hanami applications. Base action classes in Hanami applications should now inherit from this.
611
+ - [Tim Riley] Introduced `Hanami::Application::View` and `Hanami::Application::View::Context` as base classes for views and view contexts that integrate with Hanami applications. Base view classes in Hanami applications should now inherit from these.
612
+ - [Tim Riley] Introduced `Hanami::Application.application_name`, which returns an `Hanami::SliceName` instance, with methods for representing the application name in various formats.
613
+
614
+ ### Fixed
615
+
616
+ - [Andrew Croome] When a request is halted, do not attempt to automatically render any view paired with an `Hanami::Application::Action`
617
+
618
+ ### Changed
619
+
620
+ - [Tim Riley] `Hanami::Application.namespace_name`, `.namespace_path` have been removed. These can now be accessed from the `.application_name`.
621
+ - [Tim Riley] `Hanami::Slice.slice_name` now returns an `Hanami::SliceName` instance instead of a Symbol
622
+ - [Tim Riley] `Hanami::Slice.namespace_path` has been removed. This can now be accessed from the `.slice_name`.
623
+
624
+ ## v2.0.0.alpha7.1 - 2022-03-09
625
+
626
+ ### Fixed
627
+
628
+ - [Tim Riley] Fixed error creating slice classes when the enclosing module did not already exist
629
+
630
+ ## v2.0.0.alpha7 - 2022-03-08
631
+
632
+ ### Added
633
+
634
+ - [Tim Riley] Introduced `Hanami::ApplicationLoadError` and `Hanami::SliceLoadError` exceptions to represent errors encountered during application and slice loading.
635
+ - [Tim Riley] `Hanami::Slice.shutdown` can be used to stop all the providers in a slice
636
+
637
+ ### Changed
638
+
639
+ - [Tim Riley] Slices are now represented as concrete classes (such as `Main::Slice`) inheriting from `Hanami::Slice`, as opposed to _instances_ of `Hanami::Slice`. You may create your own definitions for these slices in `config/slices/[slice_name].rb`, which you can then use for customising per-slice config and behavior, e.g.
640
+
641
+ ```ruby
642
+ # config/slices/main.rb:
643
+
644
+ module Main
645
+ class Slice < Hanami::Slice
646
+ # slice config here
647
+ end
648
+ end
649
+ ```
650
+
651
+ - [Tim Riley] Application-level `config.slice(slice_name, &block)` setting has been removed in favour of slice configuration within concrete slice class definitions
652
+ - [Tim Riley] You can configure your slice imports inside your slice classes, e.g.
653
+
654
+ ```ruby
655
+ # config/slices/main.rb:
656
+
657
+ module Main
658
+ class Slice < Hanami::Slice
659
+ # Import all exported components from "search" slice
660
+ import from: :search
661
+ end
662
+ end
663
+ ```
664
+
665
+ - [Tim Riley] You can configure your slice exports inside your slice classes, e.g.
666
+
667
+ ```ruby
668
+ # config/slices/search.rb:
669
+
670
+ module Search
671
+ class Slice < Hanami::Slice
672
+ # Export the "index_entity" component only
673
+ export ["index_entity"]
674
+ end
675
+ end
676
+ ```
677
+
678
+ - [Tim Riley] For advanced cases, you can configure your slice's container via a `prepare_container` block:
679
+
680
+ ```ruby
681
+ # config/slices/search.rb:
682
+
683
+ module Search
684
+ class Slice < Hanami::Slice
685
+ prepare_container do |container|
686
+ # `container` object is available here, with
687
+ # slice-specific configuration already applied
688
+ end
689
+ end
690
+ end
691
+ ```
692
+
693
+ - [Tim Riley] `Hanami::Application.shutdown` will now also shutdown all registered slices
694
+
695
+ ## v2.0.0.alpha6 - 2022-02-10
696
+
697
+ ### Added
698
+
699
+ - [Luca Guidi] Official support for Ruby: MRI 3.1
700
+ - [Tim Riley] Introduce partial Slice imports and exports. It allows to selectively export a functionality from a slice and import into another.
701
+
702
+ Import from `search` slice, uses `search` as the imported key namespace:
703
+
704
+ ```ruby
705
+ # config/application.rb
706
+
707
+ module MyApp
708
+ class Application < Hanami::Application
709
+ config.slice(:admin) do
710
+ import(from: :search)
711
+ end
712
+ end
713
+ end
714
+ ```
715
+
716
+ Import from `search` slice with custom namespace:
717
+
718
+ ```ruby
719
+ # config/application.rb
720
+
721
+ module MyApp
722
+ class Application < Hanami::Application
723
+ config.slice(:admin) do
724
+ import(from: :search, as: :search_engine)
725
+ end
726
+ end
727
+ end
728
+ ```
729
+
730
+ Import specific keys from `search` slice
731
+
732
+ ```ruby
733
+ # config/application.rb
734
+
735
+ module MyApp
736
+ class Application < Hanami::Application
737
+ config.slice(:admin) do
738
+ import(keys: ["run_query"], from: :search)
739
+ end
740
+ end
741
+ end
742
+ ```
743
+
744
+ Export only specific keys from `search` slice, and import them in `admin`
745
+
746
+ ```ruby
747
+ # config/application.rb
748
+
749
+ module MyApp
750
+ class Application < Hanami::Application
751
+ config.slice(:admin) do
752
+ import(from: :search)
753
+ end
754
+
755
+ config.slice(:search) do
756
+ container.config.exports = %w[run_query index_item]
757
+ end
758
+ end
759
+ end
760
+ ```
761
+
762
+ ### Fixed
763
+
764
+ - [Luca Guidi] Ensure request logger to respect logger formatter option.
765
+
766
+ ### Changed
767
+
768
+ - [Luca Guidi] Drop support for Ruby: MRI 2.6 and 2.7.
769
+ - [Tim Riley] `Hanami.init` => `Hanami.prepare` and `hanami/init` => `hanami/prepare`
770
+ - [Tim Riley] `Hanami.register_bootable` => `Hanami.register_provider`
771
+ - [Tim Riley] `Hanami.start_bootable` => `Hanami.start`
772
+ - [Tim Riley] `Hanami::Slice#init` => `Hanami::Slice#prepare`
773
+ - [Tim Riley] `Hanami::Slice#register_bootable` => `Hanami::Slice#register_provider`
774
+ - [Tim Riley] `Hanami::Slice#start_bootable` => `Hanami::Slice#start`
775
+
776
+ ## v2.0.0.alpha5 - 2022-01-12
777
+
778
+ ### Changed
779
+
780
+ - [Luca Guidi] Sensible default configuration for application logger, with per-environment defaults:
781
+
782
+ The defaults are:
783
+
784
+ - In **production**, log for level `info`, send logs to `$stdout` in JSON format without colours
785
+ - In **development**, log for level `debug`, send logs to `$stdout` in single-line format with colours
786
+ - In **test**, log for level `debug`, send logs to `log/test.log` in single-line format without colours
787
+
788
+ To configure the logger:
789
+
790
+ ```ruby
791
+ module MyApp
792
+ class Application < Hanami::Application
793
+ config.logger.level = :info
794
+
795
+ config.logger.stream = $stdout
796
+ config.logger.stream = "/path/to/file"
797
+ config.logger.stream = StringIO.new
798
+
799
+ config.logger.format = :json
800
+ config.logger.format = MyCustomFormatter.new
801
+
802
+ config.logger.color = false # disable coloring
803
+ config.logger.color = MyCustomColorizer.new
804
+
805
+ config.logger.filters << "secret" # add
806
+ config.logger.filters += ["yet", "another"] # add
807
+ config.logger.filters = ["foo"] # replace
808
+
809
+ # See https://ruby-doc.org/stdlib/libdoc/logger/rdoc/Logger.html
810
+ config.logger.options = ["daily"] # time based log rotation
811
+ config.logger.options = [0, 1048576] # size based log rotation
812
+ end
813
+ end
814
+ ```
815
+
816
+ To configure the logger for specific environments:
817
+
818
+ ```ruby
819
+ module MyApp
820
+ class Application < Hanami::Application
821
+ config.environment(:staging) do
822
+ config.logger.level = :info
823
+ end
824
+ end
825
+ end
826
+ ```
827
+
828
+ To assign a custom replacement logger object:
829
+
830
+ ```ruby
831
+ module MyApp
832
+ class Application < Hanami::Application
833
+ config.logger = MyCustomLogger.new
834
+ end
835
+ end
836
+ ```
837
+
838
+ - [Tim Riley] Comprehensive `config.source_dirs` setting
839
+
840
+ This replaces the previous `component_dir_paths` setting, and contains two nested settings:
841
+
842
+ - `config.source_dirs.component_dirs` (backed by `Dry::System::Config::ComponentDirs`), for directories of source files intended to be registered as components
843
+ - `config.source_dirs.autoload_paths`, for directories of source files not intended for registration as components, but still to be made accessible by the autoloader
844
+
845
+ To add and configure your own additional component dirs:
846
+
847
+ ```ruby
848
+ module MyApp
849
+ class Application < Hanami::Application
850
+ # Adding a simple component dir
851
+ config.source_dirs.component_dirs.add "serializers"
852
+
853
+ # Adding a component dir with custom configuration
854
+ config.source_dirs.component_dirs.add "serializers" do |dir|
855
+ dir.auto_register = proc { |component|
856
+ !component.identifier.start_with?("structs")
857
+ }
858
+ end
859
+ end
860
+ end
861
+ ```
862
+
863
+ To customize the configuration of the default component dirs ("lib", "actions", "repositories", "views"):
864
+
865
+ ```ruby
866
+ module MyApp
867
+ class Application < Hanami::Application
868
+ # Customising a default component dir
869
+ config.source_dirs.component_dirs.dir("lib").auto_register = proc { |component|
870
+ !component.identifier.start_with?("structs")
871
+ }
872
+
873
+ # Setting default config to apply to all component dirs
874
+ config.source_dirs.component_dirs.auto_register = proc { |component|
875
+ !component.identifier.start_with?("entities")
876
+ }
877
+
878
+ # Removing a default component dir
879
+ config.source_dirs.component_dirs.delete("views")
880
+ end
881
+ end
882
+ ```
883
+
884
+ To configure the autoload paths (defaulting to `["entities"]`):
885
+
886
+ ```ruby
887
+ module MyApp
888
+ class Application < Hanami::Application
889
+ # Adding your own autoload paths
890
+ config.source_dirs.autoload_paths << "structs"
891
+
892
+ # Or providing a full replacement
893
+ config.source_dirs.autoload_paths = ["structs"]
894
+ end
895
+ end
896
+ ```
897
+
898
+ - [Tim Riley] Application router is lazy loaded (not requiring application to be fully booted) and now available via `Hanami.rack_app` or `Hanami.application.rack_app`, instead of the previous `Hanami.app` (which required the app to be booted first).
899
+
900
+ ## v2.0.0.alpha4 - 2021-12-07
901
+
902
+ ### Added
903
+
904
+ - [Luca Guidi] Manage Content Security Policy (CSP) with "zero-defaults" policy. New API to change CSP values and to disable the feature.
905
+
906
+ ```ruby
907
+ # Read a CSP value
908
+
909
+ module MyApp
910
+ class Application < Hanami::Application
911
+ config.actions.content_security_policy[:base_uri] # => "'self'"
912
+ end
913
+ end
914
+ ```
915
+
916
+ ```ruby
917
+ # Override a default CSP value
918
+
919
+ module MyApp
920
+ class Application < Hanami::Application
921
+ # This line will generate the following CSP fragment
922
+ # plugin-types ;
923
+ config.actions.content_security_policy[:plugin_types] = nil
924
+ end
925
+ end
926
+ ```
927
+
928
+ ```ruby
929
+ # Append to a default CSP value
930
+
931
+ module MyApp
932
+ class Application < Hanami::Application
933
+ # This line will generate the following CSP fragment
934
+ # script-src 'self' https://my.cdn.test;
935
+ config.actions.content_security_policy[:script_src] += " https://my.cdn.test"
936
+ end
937
+ end
938
+ ```
939
+
940
+ ```ruby
941
+ # Add a custom CSP key. Useful when CSP standard evolves.
942
+
943
+ module MyApp
944
+ class Application < Hanami::Application
945
+ # This line will generate the following CSP fragment
946
+ # my-custom-setting 'self';
947
+ config.actions.content_security_policy['my-custom-setting'] = "'self'"
948
+ end
949
+ end
950
+ ```
951
+
952
+ ```ruby
953
+ # Delete a CSP key.
954
+
955
+ module MyApp
956
+ class Application < Hanami::Application
957
+ config.actions.content_security_policy.delete(:object_src)
958
+ end
959
+ end
960
+ ```
961
+
962
+ ```ruby
963
+ # Disable CSP feature.
964
+
965
+ module MyApp
966
+ class Application < Hanami::Application
967
+ config.actions.content_security_policy = false
968
+ end
969
+ end
970
+ ```
971
+
972
+ ## v2.0.0.alpha3 - 2021-11-09
973
+
974
+ ### Added
975
+
976
+ - [Luca Guidi] Added `Hanami.shutdown` to stop all bootable components in the application container
977
+ - [Tim Riley] Added `component_dir_paths` application setting to allow for components to be loaded from additional directories inside each slice directory. To begin with, this defaults to `%w[actions repositories views]`. Components inside these directories are expected to be namespaced to match the directory name; e.g. given a `main` slice, `slices/main/actions/home.rb` is expected to define `Main::Actions::Home`, and will be registered in the slice container as `"actions.home"`.
978
+
979
+ ### Changed
980
+
981
+ - [Tim Riley] A slice's classes can now be defined directly inside `slices/[slice_name]/lib/`; e.g. given a `main` slice, `slices/main/lib/example.rb` is expected to define `Main::Example`, and will be registered in the slice container as `"example"`
982
+ - [Tim Riley] The root `lib/` directory is no longer configured as a component dir, and classes inside `lib/[app_namespace]/` will no longer be auto-registered into the container. If you need to share components, create them in their own slices as appropriate, and import those slices into the other slices that require them.
983
+ - [Tim Riley] `lib/[app_namespace]/` is configured for autoloading, and `lib/` is added to `$LOAD_PATH` to support explicit requires for source files outside `lib/[app_namespace]/`.
984
+ - [Tim Riley] (Internal) Ported `Hanami::Configuration` and related classes to use dry-configurable
985
+ - [Tim Riley] Application inflector can be entirely replaced, if required, via `Hanami::Configuration#inflector=`. Custom inflection rules can still be provided to the default inflector via `Hanami::Configuration#inflections`.
986
+ - [Marc Busqué] App settings are defined within a concrete class rather than an anonymous block, to allow for users to leverage the typical behavior of Ruby classes, such as for defining their own types module to use for coercing setting values. This class also relies on dry-configurable for its settings implementation, so the standard dry-configurable `setting` API is available, such as the `constructor:` and `default:` options.
987
+
988
+ ```ruby
989
+ # frozen_string_literal: true
990
+
991
+ require "dry/types"
992
+ require "hanami/application/settings"
993
+
994
+ module TestApp
995
+ class Settings < Hanami::Application::Settings
996
+ # Example usage of a types module (previously not possible inside the anonymous block)
997
+ Types = Dry.Types()
998
+
999
+ setting :session_secret, constructor: Types::String.constrained(min_size: 20)
1000
+
1001
+ setting :some_bool, constructor: Types::Params::Bool, default: false
1002
+ end
1003
+ end
1004
+ ```
1005
+
1006
+ - [Marc Busqué] Application `settings_loader` and `settings_loader_options` have been replaced with `settings_store`, which is an updated abstraction for providing setting values to work with the new `Hanami::Application::Settings` implementation noted above (see `Application::Settings::DotenvStore` for the default store, which provides the same behavior as previously)
1007
+ - [Marc Busqué] Routes are defined within a concrete class rather than an anonymous block, to provide consistency with the settings (noted above), as well a place for additional behavior (in future releases):
1008
+
1009
+ ```ruby
1010
+ # frozen_string_literal: true
1011
+
1012
+ require "hanami/application/routes"
1013
+
1014
+ module MyApp
1015
+ class Routes < Hanami::Application::Routes
1016
+ define do
1017
+ slice :main, at: "/" do
1018
+ root to: "home.show"
1019
+ end
1020
+ end
1021
+ end
1022
+ end
1023
+ ```
1024
+
1025
+ ## v2.0.0.alpha2 - 2021-05-04
1026
+
1027
+ ### Added
1028
+
1029
+ - [Luca Guidi] Official support for Ruby: MRI 3.0
1030
+ - [Tim Riley] Code autoloading via Zeitwerk
1031
+ - [Tim Riley] `Hanami::Application` subclasses generate and configure a `Dry::System::Container`, accessible via `.container` and `AppNamespace::Container`, with several common container methods available directly via the application subclass (e.g. `Bookshelf::Application["foo"]` or `Hanami.application["foo"]`)
1032
+ - [Tim Riley] Introduced `Hanami::Application.register_bootable` to register custom components
1033
+ - [Tim Riley] Introduced `Hanami::Application.keys` to get the list of resolved components
1034
+ - [Tim Riley] Dynamically create an auto-injection mixin (e.g. `Bookshelf::Deps`)
1035
+
1036
+ ```ruby
1037
+ # frozen_string_literal: true
1038
+
1039
+ module Bookshelf
1040
+ class CreateThing
1041
+ include Deps[service_client: "some_service.client"]
1042
+
1043
+ def call(attrs)
1044
+ # Validate attrs, etc.
1045
+ service_client.create(attrs)
1046
+ end
1047
+ end
1048
+ end
1049
+ ```
1050
+
1051
+ - [Tim Riley] Introduced application settings. They are accessible via `Hanami.application.settings` in `config/settings.rb`
1052
+ - [Tim Riley] Introduced application slices to organise high-level application concerns. Slices are generated based on subdirectories of `slices/`, and map onto corresponding ruby module namespaces, e.g. `slices/main` -> `Main`, with the slice instance itself being `Main::Slice` (as well as being accessible via `Hanami.application.slices[:main]`)
1053
+ - [Tim Riley] Each slice generates and configures has its own `Dry::System::Container`, accessible via the slice instance (e.g. `Main::Slice.container`) as well as via its own constant (e.g. `Main::Container`)
1054
+ - [Tim Riley] Slice containers automatically import the application container, under the `"application"` namespace
1055
+ - [Tim Riley] Allow slice containers to be imported by other slice containers
1056
+
1057
+ ### Changed
1058
+
1059
+ - [Luca Guidi] Drop support for Ruby: MRI 2.5
1060
+ - [Tim Riley] Removed `config.cookies` in favor of `config.actions.cookies`
1061
+ - [Tim Riley] Removed `config.sessions` in favor of `config.actions.sessions`
1062
+ - [Tim Riley] Removed `config.security` settings
1063
+
1064
+ ## v2.0.0.alpha1 - 2019-01-30
1065
+
1066
+ ### Added
1067
+
1068
+ - [Luca Guidi] Implemented from scratch `hanami version`
1069
+ - [Luca Guidi] Implemented from scratch `hanami server`
1070
+ - [Luca Guidi] Main configuration is opinionated: when a setting is not specified in generated code, it uses a framework default.
1071
+ - [Luca Guidi] Main configuration setting `environment`: to yield env based settings (e.g. `config.environment(:production) { |c| c.logger = {...} }`)
1072
+ - [Luca Guidi] Main configuration setting `base_url`: to set the base URL of the app (e.g. `config.base_url = "https://example.com"`)
1073
+ - [Luca Guidi] Main configuration setting `logger`: to set the logger options (e.g. `config.logger = { level: :info, format: :json }`)
1074
+ - [Luca Guidi] Main configuration setting `routes`: to set the path to routes file (e.g. `config.routes = "path/to/routes"`)
1075
+ - [Luca Guidi] Main configuration setting `cookies`: to set cookies options (e.g. `config.cookies = { max_age: 300 }`)
1076
+ - [Luca Guidi] Main configuration setting `sessions`: to set session options (e.g. `config.sessions = :cookie, { secret: "abc" }`)
1077
+ - [Luca Guidi] Main configuration setting `default_request_format`: to set the fallback for request format (aka MIME Type) (e.g. `config.default_request_format = :json`)
1078
+ - [Luca Guidi] Main configuration setting `default_response_format`: to set the default response format (aka MIME Type) (e.g. `config.default_response_format = :json`)
1079
+ - [Luca Guidi] Main configuration setting `middleware` to mount Rack middleware (e.g. `config.middleware.use MyMiddleware, "argument"`)
1080
+ - [Luca Guidi] Main configuration setting `security` to set security settings (see below)
1081
+ - [Luca Guidi] Main configuration setting `inflections` to configure inflections (e.g. `config.inflections { |i| i.plural "virus", "viruses" }`)
1082
+ - [Luca Guidi] Main configuration security setting `x_frame_options`: defaults to `"deny"` (e.g. `config.security.x_frame_options = "sameorigin"`)
1083
+ - [Luca Guidi] Main configuration security setting `x_content_type_options`: defaults to `"nosniff"` (e.g. `config.security.x_content_type_options = nil`)
1084
+ - [Luca Guidi] Main configuration security setting `x_xss_protection`: defaults to `"1; mode=block"` (e.g. `config.security.x_xss_protection = "1"`)
1085
+ - [Luca Guidi] Main configuration security setting `content_security_policy`: defaults to `"form-action 'self'; frame-ancestors 'self'; base-uri 'self'; default-src 'none'; script-src 'self'; connect-src 'self'; img-src 'self' https: data:; style-src 'self' 'unsafe-inline' https:; font-src 'self'; object-src 'none'; plugin-types application/pdf; child-src 'self'; frame-src 'self'; media-src 'self'"`
1086
+ (e.g. `config.security.content_security_policy[:style_src] += " https://my.cdn.example"` to add another source)
1087
+ (e.g. `config.security.content_security_policy[:plugin_types] = nil` to override the settings)
1088
+
1089
+ ### Changed
1090
+
1091
+ - [Luca Guidi] Drop support for Ruby: MRI 2.3, and 2.4.
1092
+ - [Luca Guidi] `Hanami::Application` must be used as superclass for main application under `config/application.rb` (e.g. `Bookshelf::Application`)
1093
+ - [Luca Guidi] Main configuration is available at `config/application.rb` instead of `config/enviroment.rb`
1094
+ - [Luca Guidi] Removed `Hanami.configure` in favor of main application configuration (e.g. `Bookshelf::Application.config`)
1095
+ - [Luca Guidi] Removed DSL syntax for main configuration (from `cookies max_age: 600` to `config.cookies = { max_age: 600 }`)
1096
+ - [Luca Guidi] Per environment settings must be wrapped in a block (e.g. `config.environment(:production) { |c| c.logger = {} }`)
1097
+ - [Luca Guidi] Concrete applications are no longer supported (e.g. `Web::Application` in `apps/web/application.rb`)
1098
+ - [Luca Guidi] Main routes must be configured at `config/routes.rb`:
1099
+
1100
+ ```ruby
1101
+ # frozen_string_literal: true
1102
+
1103
+ Hanami.application.routes do
1104
+ mount :web, at: "/" do
1105
+ root to: "home#index"
1106
+ end
1107
+
1108
+ mount :admin, at: "/admin" do
1109
+ root to: "home#index"
1110
+ end
1111
+ end
1112
+ ```
1113
+
1114
+ - [Luca Guidi] Per application routes are no longer supported (e.g. `apps/web/config/routes.rb`)
1115
+ - [Luca Guidi] Removed `shotgun` and code reloading from the core. Code reloading is implemented by `hanami-reloader` gem.
1116
+ - [Luca Guidi] Removed support for `.hanamirc`
1117
+
1118
+ ## v1.3.4 - 2021-05-02
1119
+
1120
+ ### Fixed
1121
+
1122
+ - [Slava Kardakov] Fix generated `config.ru` `require_relative` statement
1123
+ - [Armin] Fix `Hanami::CommonLogger` elapsed time compatibility with `rack` 2.1.0+
1124
+ - [Adam Daniels] Fix generated tests compatibility with `minitest` 6.0+
1125
+
1126
+ ## v1.3.3 - 2019-09-20
1127
+
1128
+ ### Added
1129
+
1130
+ - [Gray Manley] Standardize file loading for `.env` files (see: https://github.com/bkeepers/dotenv#what-other-env-files-can-i-use)
1131
+
1132
+ ### Fixed
1133
+
1134
+ - [Alfonso Uceda & Luca Guidi] Ensure to use `:host` option when mounting an application in main router (e.g. `mount Beta::Application.new, at: "/", host: "beta.hanami.test"`)
1135
+
1136
+ ## v1.3.2 - 2019-07-26
1137
+
1138
+ ### Added
1139
+
1140
+ - [Luca Guidi] Support both `hanami-validations` 1 and 2
1141
+
1142
+ ### Fixed
1143
+
1144
+ - [Wisnu Adi Nurcahyo] Ensure `hanami generate` syntax for Welcome page is compatible with ZSH
1145
+ - [Luca Guidi] Don't let `hanami` to crash when called without `bundle exec`
1146
+
1147
+ ## v1.3.1 - 2019-01-18
1148
+
1149
+ ### Added
1150
+
1151
+ - [Luca Guidi] Official support for Ruby: MRI 2.6
1152
+ - [Luca Guidi] Support `bundler` 2.0+
1153
+
1154
+ ### Fixed
1155
+
1156
+ - [Aidan Coyle] Remove from app generator support for deprecated `force_ssl` setting
1157
+ - [Alessandro Caporrini] Remove from app generator support for deprecated `body_parsers` setting
1158
+ - [Daphne Rouw & Sean Collins] Make app generator to work when code in `config/environment.rb` uses double quotes
1159
+
1160
+ ## v1.3.0 - 2018-10-24
1161
+
1162
+ ### Added
1163
+
1164
+ - [Luca Guidi] Automatically log body payload from body parsers
1165
+
1166
+ ### Fixed
1167
+
1168
+ - [Luca Guidi] Generate correct syntax for layout unit tests
1169
+ - [Vladislav Yashin] Fix concatenation of `Pathname` and `String` in `Hanami::CommonLogger`
1170
+
1171
+ ## v1.3.0.beta1 - 2018-08-08
1172
+
1173
+ ### Added
1174
+
1175
+ - [Sean Collins] Generate new projects with RSpec as default testing framework
1176
+ - [Alfonso Uceda] Generate actions/views/mailers with nested module/class definition
1177
+
1178
+ ### Fixed
1179
+
1180
+ - [Anton Davydov] Make possible to pass extra settings for custom logger instances (eg. `logger SemanticLogger.new, :foo, :bar`)
1181
+ - [graywolf] Ensure `hanami generate app` to work without `require_relative` entries in `config/environment.rb`
1182
+ - [Makoto Tajitsu & Luca Guidi] Fixed regression for `hanami new .` that used to generate a broken project
1183
+
1184
+ ### Fixed
1185
+
1186
+ - [John Downey] Don't use thread unsafe `Dir.chdir` to serve static assets
1187
+
1188
+ ## v1.2.0 - 2018-04-11
1189
+
1190
+ ## v1.2.0.rc2 - 2018-04-06
1191
+
1192
+ ### Fixed
1193
+
1194
+ - [Kelsey Judson] Ensure to not reload code under `lib/` when `shotgun` isn't bundled
1195
+
1196
+ ## v1.2.0.rc1 - 2018-03-30
1197
+
1198
+ ## v1.2.0.beta2 - 2018-03-23
1199
+
1200
+ ### Fixed
1201
+
1202
+ - [Luca Guidi] Raise meaningful error message when trying to access `session` or `flash` with disabled sessions
1203
+ - [Pistos] Print stack trace to standard output when a CLI command raises an error
1204
+
1205
+ ## v1.2.0.beta1 - 2018-02-28
1206
+
1207
+ ### Added
1208
+
1209
+ - [Luca Guidi] HTTP/2 Early Hints
1210
+
1211
+ ### Fixed
1212
+
1213
+ - [Alfonso Uceda] Render custom template if an exception is raised from a view or template
1214
+
1215
+ ## v1.1.1 - 2018-02-27
1216
+
1217
+ ### Added
1218
+
1219
+ - [Luca Guidi] Official support for Ruby MRI 2.5+
1220
+
1221
+ ### Fixed
1222
+
1223
+ - [Alfonso Uceda] Fixed regression for mailer generator: when using options like `--from` and `--to` the generated Ruby code isn't valid as it was missing string quotes.
1224
+ - [Luca Guidi] Generate tests for views including `:format` in `exposures`. This fixes view unit tests when the associated template renders a partial.
1225
+
1226
+ ## v1.1.0 - 2017-10-25
1227
+
1228
+ ### Fixed
1229
+
1230
+ - [Luca Guidi] Ensure `hanami db rollback` steps to be a positive integer
1231
+
1232
+ ## v1.1.0.rc1 - 2017-10-16
1233
+
1234
+ ### Added
1235
+
1236
+ - [Yuji Ueki] Generate RSpec tests with `:type` metadata (eg `type: :action`)
1237
+ - [Kirill] Add `--relation` option for `hanami generate model` (eg `bundle exec hanami generate model user --relation=accounts`)
1238
+
1239
+ ## v1.1.0.beta3 - 2017-10-04
1240
+
1241
+ ### Fixed
1242
+
1243
+ - [Luca Guidi] Don't require `:plugins` group when running `hanami new`
1244
+
1245
+ ## v1.1.0.beta2 - 2017-10-03
1246
+
1247
+ ### Added
1248
+
1249
+ - [Luca Guidi] Introduce `:plugins` group for `Gemfile` in order enable Hanami plugin gems
1250
+ - [Alfonso Uceda] CLI: `hanami db rollback` to revert one or more migrations at once
1251
+
1252
+ ### Fixed
1253
+
1254
+ - [Gabriel Gizotti] Fix generate/destroy for nested actions
1255
+
1256
+ ## v1.1.0.beta1 - 2017-08-11
1257
+
1258
+ ### Added
1259
+
1260
+ - [Ben Johnson] Allow to use custom logger as `Hanami.logger` (eg. `Hanami.configure { logger Timber::Logger.new($stdout) }`)
1261
+ - [akhramov] Generate spec file for application layout when generating a new app
1262
+ - [Anton Davydov] Generate `README.md` file for new projects
1263
+ - [Anton Davydov] Selectively boot apps via `HANAMI_APPS=web bundle exec hanami server`
1264
+ - [Marion Duprey & Gabriel Gizotti] Log payload (params) for non-GET HTTP requests
1265
+ - [Marion Duprey & Gabriel Gizotti] Filter sensitive data in logs
1266
+
1267
+ ### Fixed
1268
+
1269
+ - [jarosluv] Ensure to remove the correct migration file when executing `hanami db destroy model`
1270
+ - [sovetnik] Fix require path for Minitest spec helper
1271
+
1272
+ ## v1.0.0 - 2017-04-06
1273
+
1274
+ ## v1.0.0.rc1 - 2017-03-31
1275
+
1276
+ ### Added
1277
+
1278
+ - [Luca Guidi] Allow `logger` setting in `config/environment.rb` to accept arbitrary arguments to make `Hanami::Logger` to be compatible with Ruby's `Logger`. (eg. `logger 'daily', level: :info`)
1279
+
1280
+ ### Fixed
1281
+
1282
+ - [Luca Guidi] Ensure code reloading don't misconfigure mailer settings (regression from v1.0.0.beta3)
1283
+ - [Luca Guidi] Ensure database disconnection to happen in the same thread of `Hanami.boot`
1284
+ - [Luca Guidi] Ensure `mailer` block in `config/environment.rb` to be evaluated multiple times, according to the current Hanami environment
1285
+ - [Luca Guidi] Ensure a Hanami project to require only once the code under `lib/`
1286
+
1287
+ ## v1.0.0.beta3 - 2017-03-17
1288
+
1289
+ ### Fixed
1290
+
1291
+ - [Luca Guidi] Try to disconnect from database at the boot time. This is useful to prune stale connection during production deploys.
1292
+ - [Tobias Sandelius] Don't mount `Hanami::CommonLogger` middleware if logging is disabled for the project.
1293
+ - [Anton Davydov] Don't configure mailers, if it's mailing is disabled for the project.
1294
+ - [Marcello Rocha] Ensure code reloading don't misconfigure mailer settings
1295
+ - [Jimmy Börjesson] Make `apps/web/application.rb` code to wrap around the 80th column
1296
+
1297
+ ### Changed
1298
+
1299
+ - [Luca Guidi] Removed deprecated `ApplicationConfiguration#default_format`. Use `#default_request_format` instead.
1300
+
1301
+ ## v1.0.0.beta2 - 2017-03-02
1302
+
1303
+ ## v1.0.0.beta1 - 2017-02-14
1304
+
1305
+ ### Added
1306
+
1307
+ - [Luca Guidi] Official support for Ruby: MRI 2.4
1308
+ - [yjukaku] CLI: `hanami generate model` now also generates a migration
1309
+ - [Luca Guidi] Generate `config/boot.rb` for new Hanami projects.
1310
+ - [Luca Guidi] Introduced `Hanami.logger` as project logger
1311
+ - [Luca Guidi] Automatic logging of HTTP requests, migrations, and SQL queries
1312
+ - [Luca Guidi] Introduced `environment` for env specific settings in `config/environment.rb`
1313
+
1314
+ ### Fixed
1315
+
1316
+ - [Marcello Rocha] Fix Hanami::Mailer loading
1317
+ - [Kai Kuchenbecker] Serve only existing assets with `Hanami::Static`
1318
+ - [Gabriel Gizotti] Ensure inline ENV vars to not be overwritten by `.env.*` files
1319
+ - [Adrian Madrid] Ensure new Hanami projects to have the right `jdbc` prefix for JRuby
1320
+ - [Luca Guidi] Fixed code reloading for objects under `lib/`
1321
+ - [Semyon Pupkov] Ensure generated mailer to respect the project name under `lib/`
1322
+ - [Semyon Pupkov] Fixed generation of mailer settings for new projects
1323
+ - [Victor Franco] Fixed CLI subcommands help output
1324
+
1325
+ ### Changed
1326
+
1327
+ - [Ozawa Sakuro] Don't include `bundler` as a dependency `Gemfile` for new Hanami projects
1328
+ - [Luca Guidi] Make compatible with Rack 2.0 only
1329
+ - [Luca Guidi] Removed `logger` settings from Hanami applications
1330
+ - [Luca Guidi] Removed logger for Hanami applications (eg `Web.logger`)
1331
+ - [Luca Guidi] Changed mailer syntax in `config/environment.rb`
1332
+
1333
+ ## v0.9.2 - 2016-12-19
1334
+
1335
+ ## Added
1336
+
1337
+ - [The Crab] Mark unit tests/specs as pending for generated actions and views
1338
+
1339
+ ### Fixed
1340
+
1341
+ - [Luca Guidi] Rake task `:environment` no longer depends on the removed `:preload` task
1342
+ - [Luca Guidi] Ensure force SSL to use the default port, or the configured one
1343
+ - [Luca Guidi] Boot the project when other it's started without `hanami server` (eg. `puma` or `rackup`)
1344
+
1345
+ ## v0.9.1 - 2016-11-18
1346
+
1347
+ ### Fixed
1348
+
1349
+ - [Luca Guidi] Ensure JSON body parser to not eval untrusted input
1350
+
1351
+ ## v0.9.0 - 2016-11-15
1352
+
1353
+ ### Added
1354
+
1355
+ - [Christophe Philemotte] Introduced `hanami secret` to generate and print a new sessions secret
1356
+
1357
+ ### Fixed
1358
+
1359
+ - [Bruz Marzolf] Skip project code preloading when code reloading is enabled
1360
+ - [Bruz Marzolf] Ensure to generate project in current directory when running `hanami new .`
1361
+ - [Pascal Betz] Fix constant lookup within the project namespace
1362
+ - [Sean Collins] Ensure consistent order of code loading across operating systems
1363
+ - [Luca Guidi] Ensure to load the project configurations only once
1364
+ - [Luca Guidi] Fix duplicated Rack middleware in single Hanami application stacks
1365
+
1366
+ ### Changed
1367
+
1368
+ - [Luca Guidi] Official support for Ruby MRI 2.3+
1369
+ - [Luca Guidi] Removed support for "application" architecture
1370
+ - [Luca Guidi] Removed `Hanami::Container.new` in favor of `Hanami.app`
1371
+ - [Luca Guidi] Removed `Hanami::Container.configure` in favor of `Hanami.configure`
1372
+ - [Luca Guidi] Configure model and mailer within `Hanami.configure` block in `config/environment.rb`
1373
+ - [Luca Guidi] Removed `mapping` from model configuration
1374
+ - [Luca Guidi] Removed `Hanami::Application.preload!` in favor of `Hanami.boot`
1375
+ - [Luca Guidi] Removed experimental code support for `entr(1)`
1376
+ - [Luca Guidi & Sean Collins] Renamed assets configuration `digest` into `fingerprint`
1377
+
1378
+ ## v0.8.0 - 2016-07-22
1379
+
1380
+ ### Added
1381
+
1382
+ - [Luca Guidi] Generate new projects with Subresurce Integrity enabled in production (security).
1383
+ - [Luca Guidi] Include `X-XSS-Protection: 1; mode=block` in default response headers (security).
1384
+ - [Luca Guidi] Include `X-Content-Type-Options: nosniff` in default response headers (security).
1385
+ - [Trung Lê & Neil Matatall] Added support for Content Security Policy 1.1 and 2.0
1386
+ - [Andrey Deryabin] Experimental code reloading with `entr(1)`
1387
+ - [Anton Davydov] Introduced JSON logging formatter for production environment
1388
+ - [Anton Davydov] Allow to set logging formatters per app and per environment
1389
+ - [Anton Davydov] Allow to set logging levels per app and per environment
1390
+ - [Anton Davydov] Application logging now can log to any stream: standard out, file, `IO` and `StringIO` objects.
1391
+ - [Andrey Deryabin] Allow new projects to be generated with `--template` CLI argument (eg. `hanami new bookshelf --template=haml`)
1392
+ - [Sean Collins] Add `--version` and `-v` for `hanami version` CLI
1393
+
1394
+ ### Fixed
1395
+
1396
+ - [Josh Bodah] Ensure consistent CLI messages
1397
+ - [Andrey Morskov] Ensure consistent user experience and messages for generators
1398
+ - [Luca Guidi] Fixed generators for camel case project names
1399
+ - [Anton Davydov] Fixed model generator for camel case project names
1400
+ - [Leonardo Saraiva] Fix `Rakefile` generation to safely ignore missing RSpec in production
1401
+ - [Sean Collins] When generate an action, append routes to route file (instead of prepend)
1402
+ - [Sean Collins] When an action is destroyed via CLI, ensure to remove the corresponding route
1403
+ - [Bernardo Farah] Fix `require_relative` paths for nested generated actions and views unit tests
1404
+ - [Anton Davydov] If database and assets Rake tasks fails, ensure to exit the process with a non-successful code
1405
+ - [Luca Guidi] remove `Shotgun::Static` in favor of `Hanami::Assets::Static` for development/test and `Hanami::Static` for production
1406
+ - [Alexandr Subbotin] Load initializers in alphabetical order
1407
+ - [Matt McFarland] Fix server side error when CSRF token is not sent
1408
+ - [Erol Fornoles] Fix route generations for mounted apps
1409
+ - [Mahesh] Fix destroy action for application architecture
1410
+ - [Karim Tarek & akhramov] Reference rendering errors in Rack env's `rack.exception` variable. This enables compatibility with exception reporting SaaS.
1411
+ - [Luca Guidi] Detect assets dependencies changes in development (Sass/SCSS)
1412
+ - [Luca Guidi & Lucas Amorim] Make model generator not dependent on the current directory name, but to the project name stored in `.hanamirc`
1413
+
1414
+ ### Changed
1415
+
1416
+ – [Luca Guidi] Drop support for Ruby 2.0 and 2.1
1417
+
1418
+ - [Trung Lê] Database env var is now `DATABASE_URL` (without the project name prefix like `BOOKSHELF_DATABASE_URL`
1419
+ - [Trung Lê] `lib/config/mapping.rb` is no longer generated for new projects and no longer loaded.
1420
+ - [Anton Davydov] New generated projects will depend (in their `Gemfile`) on `hanami` tiny version (`~> 0.8'`) instead of patch version (`0.8.0`)
1421
+ - [Andrey Deryabin] `dotenv` is now a soft dependency that will be added to the `Gemfile` `:development` and `:test` groups for new generated projects.
1422
+ - [Andrey Deryabin] `shotgun` is now a soft dependency that will be added to the `Gemfile` `:development` group for new generated projects.
1423
+ - [Anton Davydov] New logo in welcome page
1424
+ - [Ozawa Sakuro] Remove `require 'rubygems'` from generated code (projects, apps, routes, etc..)
1425
+ - [Eric Freese] Disable Ruby warnings in generated `Rakefile` for Minitest/RSpec tasks
1426
+ - [Luca Guidi] Allow views to render any HTTP status code. In actions use `halt(422)` for default status page or `self.status = 422` for view rendering.
1427
+
1428
+ ## v0.7.3 - 2016-05-23
1429
+
1430
+ ### Fixed
1431
+
1432
+ - [Pascal Betz] Use `Shotgun::Static` to serve static files in development mode and avoid to reload the env
1433
+
1434
+ ## v0.7.2 - 2016-02-09
1435
+
1436
+ ### Fixed
1437
+
1438
+ - [Alfonso Uceda Pompa] Fixed routing issue when static assets server tried to hijack paths that are matching directories in public directory
1439
+
1440
+ ## v0.7.1 - 2016-02-05
1441
+
1442
+ ### Fixed
1443
+
1444
+ - [Anton Davydov] Fixed routing issue when static assets server tried to hijack requests belonging to dynamic endpoints
1445
+ - [Anatolii Didukh] Ensure to fallback to default engine for `hanami console`
1446
+
1447
+ ## v0.7.0 - 2016-01-22
1448
+
1449
+ ### Changed
1450
+
1451
+ - [Luca Guidi] Renamed the project
1452
+
1453
+ ## v0.6.1 - 2016-01-19
1454
+
1455
+ ### Fixed
1456
+
1457
+ - [Anton Davydov] Show the current app name in Welcome page (eg. `/admin` shows instructions on how to generate an action for `Admin` app)
1458
+ - [Anton Davydov] Fix project creation when name contains dashes (eg. `"awesome-project" => "AwesomeProject"`)
1459
+ - [Anton Davydov] Ensure to add assets related entries to `.gitignore` when a project is generated with the `--database` flag
1460
+ - [deepj] Avoid blank lines in generated `Gemfile`
1461
+ - [trexnix] Fix for `lotus destroy app`: it doesn't cause a syntax error in `config/application.rb` anymore
1462
+ - [Serg Ikonnikov & Trung Lê] Ensure console to use the bundled engine
1463
+
1464
+ ## v0.6.0 - 2016-01-12
1465
+
1466
+ ### Added
1467
+
1468
+ - [Luca Guidi] Introduced configurable assets compressors
1469
+ - [Luca Guidi] Introduced "CDN mode" in order to serve static assets via Content Distribution Networks
1470
+ - [Luca Guidi] Introduced "Digest mode" in production in order to generate and serve assets with checksum suffix
1471
+ - [Luca Guidi] Introduced `lotus assets precompile` command to precompile, minify and append checksum suffix to static assets
1472
+ - [Luca Guidi] Send `Content-Cache` HTTP header when serving static assets in production mode
1473
+ - [Luca Guidi] Support new env var `SERVE_STATIC_ASSETS="true"` in order to serve static assets for the entire project
1474
+ - [Luca Guidi] Generate new applications by including `Web::Assets::Helpers` in `view.prepare` block
1475
+ - [Luca Guidi] Introduced new Rake tasks `:preload` and `:environment`
1476
+ - [Luca Guidi] Introduced new Rake tasks `db:migrate` and `assets:precompile` for Rails/Heroku compatibility
1477
+ - [Tadeu Valentt & Lucas Allan Amorin] Added `lotus destroy` command for apps, models, actions, migrations and mailers
1478
+ - [Lucas Allan Amorim] Custom initializers (`apps/web/config/initializers`) they are ran when the project is loaded and about to start
1479
+ - [Trung Lê] Generate mailer templates directory for new projects (eg. `lib/bookshelf/mailers/templates`)
1480
+ - [Tadeu Valentt] Alias `--database` as `-d` for `lotus new`
1481
+ - [Tadeu Valentt] Alias `--arch` as `-a` for `lotus new`
1482
+ - [Sean Collins] Let `lotus generate action` to guess HTTP method (`--method` arg) according to RESTful conventions
1483
+ - [Gonzalo Rodríguez-Baltanás Díaz] Generate new applications with default favicon
1484
+
1485
+ ### Fixed
1486
+
1487
+ - [Neil Matatall] Use "secure compare" for CSRF tokens in order to prevent timing attacks
1488
+ - [Bernardo Farah] Fix support for chunked response body (via `Rack::Chunked::Body`)
1489
+ - [Lucas Allan Amorim] Add `bundler` as a runtime dependency
1490
+ - [Lucas Allan Amorim] Ensure to load properly Bundler dependencies when starting the application
1491
+ - [Luca Guidi] Ensure sessions to be always available for other middleware in Rack stack of single applications
1492
+ - [Ken Gullaksen] Ensure to specify `LOTUS_PORT` env var from `.env`
1493
+ - [Andrey Deryabin] Fix `lotus new .` and prevent to generate the project in a subdirectory of current one
1494
+ - [Jason Charnes] Validate entity name for model generator
1495
+ - [Caius Durling] Fixed generator for nested actions (eg. `lotus generate action web domains/certs#index`)
1496
+ - [Tadeu Valentt] Prevent to generate migrations with the same name
1497
+ - [Luca Guidi] Ensure RSpec examples to be generated with `RSpec.describe` instead of only `describe`
1498
+ - [Andrey Deryabin] Avoid `lotus` command to generate unnecessary `.lotusrc` files
1499
+ - [Jason Charnes] Convert camel case application name into snake case when generating actions (eg. `BeautifulBlossoms` to `beautiful_blossoms`)
1500
+ - [Alfonso Uceda Pompa] Convert dasherized names into underscored names when generating projects (eg. `awesome-project` to `awesome_project`)
1501
+
1502
+ ### Changed
1503
+
1504
+ - [Sean Collins] Welcome page shows current year in copyright notes
1505
+ - [Luca Guidi] Add `/public/assets*` to `.gitignore` of new projects
1506
+ - [Luca Guidi] Removed support for `default_format` in favor of `default_request_format`
1507
+ - [Luca Guidi] Removed support for `apps/web/public` in favor of `apps/web/assets` as assets sources for applications
1508
+ - [Luca Guidi] Removed support for `serve_assets` for single applications in order to global static assets server enabled via `SERVE_STATIC_ASSETS` env var
1509
+ - [Luca Guidi] `assets` configuration in `apps/web/application.rb` now accepts a block to configure sources and other settings
1510
+
1511
+ ## v0.5.0 - 2015-09-30
1512
+
1513
+ ### Added
1514
+
1515
+ - [Ines Coelho & Rosa Faria] Introduced mailers support
1516
+ - [Theo Felippe] Added configuration entries: `#default_request_format` and `default_response_format`
1517
+ - [Rodrigo Panachi] Introduced `logger` configuration for applications, to be used like this: `Web::Logger.debug`
1518
+ - [Ben Lovell] Simpler and less verbose RSpec tests
1519
+ - [Pascal Betz] Introduced `--method` CLI argument for action generator as a way to specify the HTTP verb
1520
+
1521
+ ### Fixed
1522
+
1523
+ - [Luca Guidi] Handle conflicts between directories with the same name while serving static assets
1524
+ - [Derk-Jan Karrenbeld] Include default value `font-src: self` for CSP HTTP header
1525
+ - [Cam Huynh] Make CLI arguments immutable for `Lotus::Environment`
1526
+ - [Andrii Ponomarov] Disable welcome page in test environment
1527
+ - [Alfonso Uceda Pompa] Print error message and exit when no name is provided to model generator
1528
+
1529
+ ### Changed
1530
+
1531
+ - [Theo Felippe] Deprecated `#default_format` in favor of: `#default_request_format`
1532
+
1533
+ ## v0.4.1 - 2015-07-10
1534
+
1535
+ ### Added
1536
+
1537
+ - [Trung Lê] Alias `--database` as `--db` for `lotus new`
1538
+
1539
+ ### Fixed
1540
+
1541
+ - [Alfonso Uceda Pompa] Ensure to load correctly apps in `lotus console`
1542
+ - [Alfonso Uceda Pompa] Ensure to not duplicate prefix for Container mounted apps (eg `/admin/admin/dashboard`)
1543
+ - [Alfonso Uceda Pompa] Ensure generator for "application" architecture to generate session secret
1544
+ - [Alfonso Uceda Pompa & Trung Lê & Hiếu Nguyễn] Exit unsuccessfully when `lotus generate model` doesn't receive a mandatory name for model
1545
+ - [Miguel Molina] Exit unsuccessfully when `lotus new --database` receives an unknown value
1546
+ - [Luca Guidi] Ensure to prepend sessions middleware, so other Rack components can have access to HTTP session
1547
+
1548
+ ## v0.4.0 - 2015-06-23
1549
+
1550
+ ### Added
1551
+
1552
+ - [Luca Guidi] Database migrations and new CLI commands for database operations
1553
+ - [Luca Guidi] Cross Site Request Forgery (CSRF) protection
1554
+ - [Hiếu Nguyễn & Luca Guidi] Application Architecture
1555
+ - [Alfonso Uceda Pompa] Force SSL for applications
1556
+ - [Luca Guidi] Introduced `--url` CLI argument for action generator
1557
+ - [Luca Guidi] Added `rendered` "let" variable for new generated tests for views
1558
+
1559
+ ### Fixed
1560
+
1561
+ - [Alfonso Uceda Pompa] Fix generated routes for Container applications mounted on a path different from `/`.
1562
+ - [Luca Guidi] Reading `.lotusrc` pollutes `ENV` with unwanted variables.
1563
+ - [Alfonso Uceda Pompa] Added sqlite extension to SQLite/SQLite3 database URL.
1564
+
1565
+ ### Changed
1566
+
1567
+ - [Luca Guidi] `.env`, `.env.development` and `.env.test` are generated and expected to be placed at the root of the project.
1568
+ - [Luca Guidi] Remove database mapping from generated apps.
1569
+ - [Trung Lê & Luca Guidi] Remove default generated from new apps.
1570
+ - [Luca Guidi] New projects should depend on `lotus-model ~> 0.4`
1571
+
1572
+ ## v0.3.2 - 2015-05-22
1573
+
1574
+ ### Added
1575
+
1576
+ - [Alfonso Uceda Pompa] Automatic secure cookies if the current connection is using HTTPS.
1577
+ - [Alfonso Uceda Pompa] Routing helpers for actions (via `#routes`).
1578
+ - [My Mai] Introduced `Lotus.root`. It returns the top level directory of the project.
1579
+
1580
+ ### Fixed
1581
+
1582
+ - [Ngọc Nguyễn] Model generator should use new RSpec syntax.
1583
+ - [Ngọc Nguyễn] Model generator must respect file name conventions for Ruby.
1584
+ - [Ngọc Nguyễn] Action generator must respect file name conventions for Ruby.
1585
+ - [Alfonso Uceda Pompa] Action generator must raise error if name isn't provided.
1586
+ - [Luca Guidi] Container generator for RSpec let the application to be preloaded (discard `config.before(:suite)`)
1587
+
1588
+ ## v0.3.1 - 2015-05-15
1589
+
1590
+ ### Added
1591
+
1592
+ - [Hiếu Nguyễn] Introduced application generator (eg. `bundle exec lotus generate app admin` creates `apps/admin`).
1593
+ - [Ngọc Nguyễn] Introduced model generator (eg. `bundle exec lotus generate model user` creates entity, repository and test files).
1594
+ - [Ngọc Nguyễn] Introduced `Lotus.env`, `Lotus.env?` for current environment introspection (eg. `Lotus.env?(:test)` or `Lotus.env?(:staging, :production)`)
1595
+ - [Miguel Molina] Skip view creation when an action is generated via `--skip-view` CLI arg.
1596
+
1597
+ ### Fixed
1598
+
1599
+ - [Luca Guidi] Ensure routes to be loaded for unit tests
1600
+
1601
+ ## v0.3.0 - 2015-03-23
1602
+
1603
+ ### Added
1604
+
1605
+ - [Luca Guidi] Introduced action generator. Eg. `bundle exec lotus generate action web dashboard#index`
1606
+ - [Alfonso Uceda Pompa] Allow to specify default cookies options in application configuration. Eg. `cookies true, { domain: 'lotusrb.org' }`
1607
+ - [Tom Kadwill] Include `Lotus::Helpers` in views.
1608
+ - [Linus Pettersson] Allow to specify `--database` CLI option when generate a new project. Eg. `lotus new bookshelf --database=postgresql`
1609
+ - [Linus Pettersson] Initialize a Git repository when generating a new project
1610
+ - [Alfonso Uceda Pompa] Produce `.lotusrc` when generating a new project
1611
+ - [Alfonso Uceda Pompa] Security HTTP headers. `X-Frame-Options` and `Content-Security-Policy` are now enabled by default.
1612
+ - [Linus Pettersson] Database console. Run with `bundle exec lotus db console`
1613
+ - [Luca Guidi] Dynamic finders for relative and absolute routes. It implements method missing: `Web::Routes.home_path` will resolve to `Web::Routes.path(:home)`.
1614
+
1615
+ ### Changed
1616
+
1617
+ – [Alfonso Uceda Pompa] Cookies will send `HttpOnly` by default. This is for security reasons.
1618
+
1619
+ - [Jan Lelis] Enable `templates` configuration for new generated apps
1620
+ - [Mark Connell] Change SQLite file extension from `.db` to `.sqlite3`
1621
+
1622
+ ## v0.2.1 - 2015-02-06
1623
+
1624
+ ### Added
1625
+
1626
+ - [Huy Đỗ] Introduced `Lotus::Logger`
1627
+ - [Jimmy Zhang] `lotus new` accepts a `--path` argument
1628
+ - [Jimmy Zhang] Project generator for the current directory (`lotus new .`). This is useful to provide a web deliverable for existing Ruby gems.
1629
+ - [Trung Lê] Add example mapping file for project generator: `lib/config/mapping.rb`
1630
+ - [Hiếu Nguyễn] RSpec support for project generator: `--test=rspec` or `--test=minitest` (default)
1631
+
1632
+ ### Fixed
1633
+
1634
+ - [Luca Guidi] `lotus version` to previx `v` (eg `v0.2.1`)
1635
+ - [Rob Yurkowski] Ensure project name doesn't contain special or forbidden characters
1636
+ - [Luca Guidi] Ensure all the applications are loaded in console
1637
+ - [Trung Lê] Container architecture: preload only `lib/<projectname>/**/*.rb`
1638
+ - [Hiếu Nguyễn] Fixed `lotus new` to print usage when project name isn't provided
1639
+
1640
+ ## v0.2.0 - 2014-06-23
1641
+
1642
+ ### Added
1643
+
1644
+ - [Luca Guidi] Introduced `lotus new` as a command to generate projects. It supports "container" architecture for now.
1645
+ - [Luca Guidi] Show a welcome page when one mounted Lotus application doesn't have routes
1646
+ - [Luca Guidi] Introduced `Lotus::Application.preload!` to preload all the Lotus applications in a given Ruby process. (Bulk `Lotus::Application.load!`)
1647
+ - [Trung Lê] Allow browsers to fake non `GET`/`POST` requests via `Rack::MethodOverride`
1648
+ - [Josue Abreu] Allow to define body parses for non `GET` HTTP requests (`body_parsers` configuration)
1649
+ - [Alfonso Uceda Pompa] Allow to toggle static assets serving (`serve_assets` configuration)
1650
+ - [Alfonso Uceda Pompa] Allow to serve assets from multiple sources (`assets` configuration)
1651
+ - [Luca Guidi] Allow to configure `ENV` vars with per environment `.env` files
1652
+ - [Alfonso Uceda Pompa] Introduced `lotus routes` command
1653
+ - [Luca Guidi] Allow to configure low level settings for MVC frameworks (`model`, `view` and `controller` configuration)
1654
+ - [Luca Guidi] Introduced `Lotus::Container`
1655
+ - [Trung Lê] Include `Lotus::Presenter` as part of the duplicated modules
1656
+ - [Trung Lê] Include `Lotus::Entity` and `Lotus::Repository` as part of the duplicated modules
1657
+ - [Luca Guidi] Introduced code reloading for `lotus server`
1658
+ - [Trung Lê] Allow to configure database adapter (`adapter` configuration)
1659
+ - [Luca Guidi & Trung Lê] Allow to configure database mapping (`mapping` configuration)
1660
+ - [Piotr Kurek] Introduced custom templates for non successful responses
1661
+ - [Luca Guidi] Allow to configure exceptions handling (`handle_exceptions` configuration)
1662
+ - [Michal Muskala] Allow to configure sessions (`sessions` configuration)
1663
+ - [Josue Abreu] Allow to configure cookies (`cookies` configuration)
1664
+ - [Piotr Kurek] Allow to yield multiple configurations per application, according to the current environment
1665
+ - [David Celis] Allow to configure Rack middleware stack (`middleware` configuration)
1666
+ - [David Celis] Introduced `lotus console` command. It runs the REPL configured in `Gemfile` (eg. pry or ripl). Defaults to IRb.
1667
+ - [Luca Guidi] Introduced `Lotus::Environment` which holds the information about the current environment, and CLI arguments
1668
+ - [Luca Guidi] Introduced `Lotus::Application.load!` to load and configure an application without requiring user defined code (controllers, views, etc.)
1669
+ - [Leonard Garvey] Introduced `lotus server` command. It runs the application with the Rack server declared in `Gemfile` (eg. puma, thin, unicorn). It defaults to `WEBRick`.
1670
+ - [Luca Guidi] Official support for MRI 2.1 and 2.2
1671
+
1672
+ ### Changed
1673
+
1674
+ - [Alfonso Uceda Pompa] Changed semantic of `assets` configuration. Now it's only used to set the sources for the assets. Static serving assets has now a new configuration: `serve_assets`.
1675
+
1676
+ ### Fixed
1677
+
1678
+ - [Luca Guidi] Ensure `HEAD` requests return empty body
1679
+
1680
+ ## v0.1.0 - 2014-06-23
1681
+
1682
+ ### Added
1683
+
1684
+ - [Luca Guidi] Allow to run multiple Lotus applications in the same Ruby process (framework duplication)
1685
+ - [Luca Guidi] Introduced `Lotus::Routes` as factory to generate application URLs
1686
+ - [Luca Guidi] Allow to configure scheme, host and port (`scheme`, `host` and `port` configuration)
1687
+ - [Luca Guidi] Allow to configure a layout to use for all the views of an application (`layout` configuration)
1688
+ - [Luca Guidi] Allow to configure routes (`routes` configuration)
1689
+ - [Luca Guidi] Allow to configure several load paths for Ruby source files (`load_paths` configuration)
1690
+ - [Luca Guidi] Allow to serve static files (`assets` configuration)
1691
+ - [Luca Guidi] Render default pages for non successful responses (eg `404` or `500`)
1692
+ - [Luca Guidi] Allow to configure the root of an application (`root` configuration)
1693
+ - [Luca Guidi] Introduced `Lotus::Configuration`
1694
+ - [Luca Guidi] Introduced `Lotus::Application`
1695
+ - [Luca Guidi] Official support for MRI 2.0
1696
+
1697
+
1698
+ [v2.3.1]: https://github.com/hanami/hanami/compare/v2.3.0...v2.3.1
1699
+ [v2.3.0]: https://github.com/hanami/hanami/compare/v2.3.0.beta2...v2.3.0
1700
+ [v2.3.0.beta2]: https://github.com/hanami/hanami/compare/v2.3.0.beta1...v2.3.0.beta2
1701
+ [v2.3.0.beta1]: https://github.com/hanami/hanami/compare/v2.2.1...v2.3.0.beta1