hanami-view 2.3.1 → 3.0.0

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.
data/CHANGELOG.md CHANGED
@@ -1,331 +1,575 @@
1
- # Hanami::View
1
+ # Changelog
2
2
 
3
- View layer for Hanami
3
+ All notable changes to this project will be documented in this file.
4
4
 
5
- ## v2.3.1 - 2025-11-22
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Break Versioning](https://www.taoensso.com/break-versioning).
7
+
8
+ ## [Unreleased]
9
+
10
+ ### Added
11
+
12
+ ### Changed
13
+
14
+ ### Deprecated
15
+
16
+ ### Removed
17
+
18
+ ### Fixed
19
+
20
+ ### Security
21
+
22
+ [Unreleased]: https://github.com/hanami/view/compare/v3.0.0...HEAD
23
+
24
+ ## [3.0.0] - 2026-06-30
25
+
26
+ ### Added
27
+
28
+ - Track the currently-rendering template name. (@timriley in #277)
29
+
30
+ Expose this as `Hanami::View::Scope#_template_name` (with `template_name` as a convenience alias) and `Hanami::View::Context#current_template_name`.
31
+
32
+ The name is resolved path of the file actually being rendered, relative to its configured `paths` directory, with format/engine extensions stripped. For example, `render("form")` from inside `posts/show.html.erb` returns `"posts/_form"`; a layout at `layouts/app.html.erb` returns `"layouts/app"`.
33
+
34
+ The current template name can be used to enable such behaviors as lazy/relative key lookups for i18n view helpers.
35
+
36
+ ### Changed
37
+
38
+ - **BREAKING:** Default to undecorated exposures. (@timriley in #274)
39
+
40
+ Decorate your exposures with the new `.decorate` method, or the `decorate: true` option for `.expose`. Default back to decorated exposures via `config.decorate_exposures = true`.
41
+ - Cache the view's resolved configuration as a frozen `Data` snapshot (via dry-configurable's `#to_data`) at initialization, avoiding repeated config lookups on the rendering hot path for improved memory usage and speed. (@cllns in #276)
42
+ - Require Ruby 3.3 or newer.
43
+
44
+ ### Fixed
45
+
46
+ - Allow the gem to be eager loaded by Zeitwerk when the optional haml and slim gems are not installed. (@timriley in #279)
47
+ - Use our own Haml template engine even when the haml gem is required before hanami-view. (@timriley in #279)
48
+
49
+ [3.0.0]: https://github.com/hanami/view/compare/v2.3.1...v3.0.0
50
+
51
+ ## [3.0.0.rc1] - 2026-06-16
52
+
53
+ ### Added
54
+
55
+ - Track the currently-rendering template name. (@timriley in #277)
56
+
57
+ Expose this as `Hanami::View::Scope#_template_name` (with `template_name` as a convenience alias) and `Hanami::View::Context#current_template_name`.
58
+
59
+ The name is resolved path of the file actually being rendered, relative to its configured `paths` directory, with format/engine extensions stripped. For example, `render("form")` from inside `posts/show.html.erb` returns `"posts/_form"`; a layout at `layouts/app.html.erb` returns `"layouts/app"`.
60
+
61
+ The current template name can be used to enable such behaviors as lazy/relative key lookups for i18n view helpers.
62
+
63
+ ### Changed
64
+
65
+ - **BREAKING:** Default to undecorated exposures. (@timriley in #274)
66
+
67
+ Decorate your exposures with the new `.decorate` method, or the `decorate: true` option for `.expose`. Default back to decorated exposures via `config.decorate_exposures = true`.
68
+ - Cache the view's resolved configuration as a frozen `Data` snapshot (via dry-configurable's `#to_data`) at initialization, avoiding repeated config lookups on the rendering hot path for improved memory usage and speed. (@cllns in #276)
69
+ - Require Ruby 3.3 or newer.
70
+
71
+ [3.0.0.rc1]: https://github.com/hanami/view/compare/v2.3.1...v3.0.0.rc1
72
+
73
+ ## [2.3.1] - 2025-11-22
6
74
 
7
75
  ### Fixed
8
76
 
9
77
  - Pass through all input arguments when exposure procs receive a keyword splat. (@jaredcwhite in #269)
10
78
 
11
- ## v2.3.0 - 2025-11-12
79
+ [2.3.1]: https://github.com/hanami/view/compare/v2.3.0...v2.3.1
80
+
81
+ ## [2.3.0] - 2025-11-12
12
82
 
13
83
  ### Fixed
14
84
 
15
85
  - Avoid warnings (from deprecated `URI::RFC3986_PARSER.extract`) in escape helper. (@timriley in #267)
16
86
 
17
- ## v2.3.0.beta2 - 2025-10-17
87
+ [2.3.0]: https://github.com/hanami/view/compare/v2.3.0.beta2...v2.3.0
88
+
89
+ ## [2.3.0.beta2] - 2025-10-17
18
90
 
19
91
  ### Changed
20
92
 
21
- - Drop support for Ruby 3.1
93
+ - Drop support for Ruby 3.1.
22
94
 
23
- ## v2.3.0.beta1 - 2025-10-03
95
+ [2.3.0.beta2]: https://github.com/hanami/view/compare/v2.3.0.beta1...v2.3.0.beta2
24
96
 
25
- ## v2.2.1 - 2025-03-17
97
+ ## [2.3.0.beta1] - 2025-10-03
98
+
99
+ [2.3.0.beta1]: https://github.com/hanami/view/compare/v2.2.1...v2.3.0.beta1
100
+
101
+ ## [2.2.1] - 2025-03-17
26
102
 
27
103
  ### Fixed
28
104
 
29
- - Allow multiple named scopes to be built in a single rendering (via a fix to internal scope class cache keys) (@swilgosz in #253)
105
+ - Allow multiple named scopes to be built in a single rendering (via a fix to internal scope class cache keys). (@swilgosz in #253)
106
+
107
+ [2.2.1]: https://github.com/hanami/view/compare/v2.2.0...v2.2.1
108
+
109
+ ## [2.2.0] - 2024-11-05
110
+
111
+ [2.2.0]: https://github.com/hanami/view/compare/v2.2.0.rc1...v2.2.0
30
112
 
31
- ## v2.2.0 - 2024-11-05
113
+ ## [2.2.0.rc1] - 2024-10-29
32
114
 
33
- ## v2.2.0.rc1 - 2024-10-29
115
+ [2.2.0.rc1]: https://github.com/hanami/view/compare/v2.2.0.beta2...v2.2.0.rc1
34
116
 
35
- ## v2.2.0.beta2 - 2024-09-25
117
+ ## [2.2.0.beta2] - 2024-09-25
36
118
 
37
- ## v2.2.0.beta1 - 2024-07-16
119
+ [2.2.0.beta2]: https://github.com/hanami/view/compare/v2.2.0.beta1...v2.2.0.beta2
120
+
121
+ ## [2.2.0.beta1] - 2024-07-16
38
122
 
39
123
  ### Changed
40
124
 
41
- - Drop support for Ruby 3.0
125
+ - Drop support for Ruby 3.0.
126
+
127
+ [2.2.0.beta1]: https://github.com/hanami/view/compare/v2.1.0...v2.2.0.beta1
128
+
129
+ ## [2.1.0] - 2024-02-27
42
130
 
43
- ## v2.1.0 - 2024-02-27
131
+ [2.1.0]: https://github.com/hanami/view/compare/v2.1.0.rc3...v2.1.0
44
132
 
45
- ## v2.1.0.rc3 - 2024-02-16
133
+ ## [2.1.0.rc3] - 2024-02-16
46
134
 
47
135
  ### Changed
48
- - [Tim Riley] Remove unneeded concurrent-ruby gem dependency.
49
136
 
50
- ## v2.1.0.rc2 - 2023-11-08
137
+ - Remove unneeded concurrent-ruby gem dependency. (Tim Riley)
138
+
139
+ [2.1.0.rc3]: https://github.com/hanami/view/compare/v2.1.0.rc2...v2.1.0.rc3
140
+
141
+ ## [2.1.0.rc2] - 2023-11-08
51
142
 
52
143
  ### Changed
53
- - [Tim Riley] Remove `LayoutNotFoundError` and raise `TemplateNotFoundError` for all kinds of missing templates, including layouts.
54
144
 
55
- ## v2.1.0.rc1 - 2023-11-01
145
+ - Remove `LayoutNotFoundError` and raise `TemplateNotFoundError` for all kinds of missing templates, including layouts. (Tim Riley)
146
+
147
+ [2.1.0.rc2]: https://github.com/hanami/view/compare/v2.1.0.rc1...v2.1.0.rc2
148
+
149
+ ## [2.1.0.rc1] - 2023-11-01
56
150
 
57
151
  ### Fixed
58
- - [Tim Riley] Include methods from helper modules as public (#242)
59
- Replace `module_function` with `extend self` to allow helper methods to remain directly usable on their modules, but to also let those methods remain public when the module is included in a class.
60
- This will allow an intermediary `helpers` object to be created for view parts (inside full Hanami apps) to access the standard helpers.
61
152
 
62
- ## v2.1.0.beta2 - 2023-10-04
153
+ - Include methods from helper modules as public. Replace `module_function` with `extend self` to allow helper methods to remain directly usable on their modules, but to also let those methods remain public when the module is included in a class. This will allow an intermediary `helpers` object to be created for view parts (inside full Hanami apps) to access the standard helpers. (Tim Riley in #242)
154
+
155
+ [2.1.0.rc1]: https://github.com/hanami/view/compare/v2.1.0.beta2...v2.1.0.rc1
156
+
157
+ ## [2.1.0.beta2] - 2023-10-04
63
158
 
64
159
  ### Added
65
- - [Luca Guidi] Add `Hanami::View::Rendered#match?`, `#match`, and `#include?` to make it more specs friendly.
66
- - [Philip Arndt] Make `Hanami::View#call` to accept `layout:` keyword argument to specify the layout to use during the rendering.
67
160
 
68
- ## v2.1.0.beta1 - 2023-06-29
161
+ - Add `Hanami::View::Rendered#match?`, `#match`, and `#include?` to make it more specs friendly. (Luca Guidi)
162
+ - Make `Hanami::View#call` to accept `layout:` keyword argument to specify the layout to use during the rendering. (Philip Arndt)
163
+
164
+ [2.1.0.beta2]: https://github.com/hanami/view/compare/v2.1.0.beta1...v2.1.0.beta2
165
+
166
+ ## [2.1.0.beta1] - 2023-06-29
69
167
 
70
168
  ### Added
71
- - [Tim Riley] Introduce new ERB engine, `Hanami::View::ERB`, now used by default for ERB templates;
72
- the erbse gem is no longer a requirement (#226)
73
- - [Tim Riley] Introduce `Hanami::View::HTML::SafeString`, returned when calling `String#html_safe`,
74
- also introduced via a `Hanami::View::HTML::StringExtensions` module prepended onto `String`. (#226)
75
- - [Tim Riley] Auto-escape HTML based on whether it is `#html_safe?` in ERB, Haml and Slim templates (#226)
76
- - [Tim Riley] Add `part_class` and `scope_class` settings, used by the standard `part_builder` and
77
- `scope_builder` as the default class to use when no value-specific part or scope classes can be
78
- found. These settings default to `Hanami::View::Part` and `Hanami::View::Scope` respectively (#227)
79
- - [Tim Riley] Introduce `Hanami::View::Helpers::EscapeHelper`, `Hanami::View::Helpers::TagHelper`,
80
- `Hanami::View::Helpers::LinkToHelper`, `Hanami::View::Helpers::NumberFormattingHelper`. These
81
- helper modules may optionally be mixed into your Part and Scope classes to provide additional
82
- conveniences when authoring your views. To do this by default, create your own
83
- `Hanaim::View::Part` and `Hanami::View::Scope` subclasses that include these modules, and then
84
- configure these as the `part_class` and `scope_class` for your views. (#229)
169
+
170
+ - Introduce new ERB engine, `Hanami::View::ERB`, now used by default for ERB templates; the erbse gem is no longer a requirement. (Tim Riley in #226)
171
+ - Introduce `Hanami::View::HTML::SafeString`, returned when calling `String#html_safe`, also introduced via a `Hanami::View::HTML::StringExtensions` module prepended onto `String`. (Tim Riley in #226)
172
+ - Auto-escape HTML based on whether it is `#html_safe?` in ERB, Haml and Slim templates. (Tim Riley in #226)
173
+ - Add `part_class` and `scope_class` settings, used by the standard `part_builder` and `scope_builder` as the default class to use when no value-specific part or scope classes can be found. These settings default to `Hanami::View::Part` and `Hanami::View::Scope` respectively. (Tim Riley in #227)
174
+ - Introduce `Hanami::View::Helpers::EscapeHelper`, `Hanami::View::Helpers::TagHelper`, `Hanami::View::Helpers::LinkToHelper`, `Hanami::View::Helpers::NumberFormattingHelper`. These helper modules may optionally be mixed into your Part and Scope classes to provide additional conveniences when authoring your views. To do this by default, create your own `Hanaim::View::Part` and `Hanami::View::Scope` subclasses that include these modules, and then configure these as the `part_class` and `scope_class` for your views. (Tim Riley in #229)
85
175
 
86
176
  ### Changed
87
- - [Tim Riley] Use Zeitwerk for code loading; you should now require `require "hanami/view"` just
88
- once (#233)
89
- - [Tim Riley] Change `Context` interface: custom context subclasses now have complete control over
90
- their `#initialize` (no longer need to receive `**options` or call `super`); though any mutable
91
- ivars should be duped in a custom `#initialize_copy` as required. (#223)
92
- - [Tim Riley] Change `PartBuilder` and `ScopeBuilder` interfaces to consist of static methods only (#223)
93
- - [Tim Riley] Finalize the view class config when calling `.new` for the first time (#223)
94
- - [Tim Riley] Consolidate all internal caches to a single `View.cache` (#223)
95
- - [Tim Riley] [Internal] Various refactorings to improve rendering performance (#223)
96
-
97
- ## v2.0.0.alpha8 - 2022-05-19
177
+
178
+ - Use Zeitwerk for code loading; you should now require `require "hanami/view"` just once. (Tim Riley in #233)
179
+ - Change `Context` interface: custom context subclasses now have complete control over their `#initialize` (no longer need to receive `**options` or call `super`); though any mutable ivars should be duped in a custom `#initialize_copy` as required. (Tim Riley in #223)
180
+ - Change `PartBuilder` and `ScopeBuilder` interfaces to consist of static methods only. (Tim Riley in #223)
181
+ - Finalize the view class config when calling `.new` for the first time. (Tim Riley in #223)
182
+ - Consolidate all internal caches to a single `View.cache`. (Tim Riley in #223)
183
+ - [Internal] Various refactorings to improve rendering performance. (Tim Riley in #223)
184
+
185
+ [2.1.0.beta1]: https://github.com/hanami/view/compare/v2.0.0.alpha8...v2.1.0.beta1
186
+
187
+ ## [2.0.0.alpha8] - 2022-05-19
98
188
 
99
189
  ### Added
100
- - [Tim Riley] Access a hash of template locals via accessing `locals` inside any template
190
+
191
+ - Access a hash of template locals via accessing `locals` inside any template. (Tim Riley)
101
192
 
102
193
  ### Changed
103
- - [Tim Riley] Removed automatic integration of `Hanami::View` subclasses with their surrounding Hanami application. View base classes within Hanami apps should inherit from `Hanami::Application::View` instead.
104
194
 
105
- ## v2.0.0.alpha7 - 2022-03-08
195
+ - Removed automatic integration of `Hanami::View` subclasses with their surrounding Hanami application. View base classes within Hanami apps should inherit from `Hanami::Application::View` instead. (Tim Riley)
196
+
197
+ [2.0.0.alpha8]: https://github.com/hanami/view/compare/v2.0.0.alpha7...v2.0.0.alpha8
198
+
199
+ ## [2.0.0.alpha7] - 2022-03-08
106
200
 
107
201
  ### Added
108
- - [Luca Guidi] Automatically inject the app's `settings` and `assets` components (if present) into instances of `Hanami::View::ApplicationContext`
109
- - [Luca Guidi] Temporarily added to `Hanami::View::ApplicationContext` the `#content_for`, `#current_path` `#csrf_token` helpers, ported from the hanami-2-application-template. Some of those helpers will be moved to `hanami-helpers` gem in a later release.
202
+
203
+ - Automatically inject the app's `settings` and `assets` components (if present) into instances of `Hanami::View::ApplicationContext`. (Luca Guidi)
204
+ - Temporarily added to `Hanami::View::ApplicationContext` the `#content_for`, `#current_path` `#csrf_token` helpers, ported from the hanami-2-application-template. Some of those helpers will be moved to `hanami-helpers` gem in a later release. (Luca Guidi)
110
205
 
111
206
  ### Changed
112
- - [Sean Collins] For views within an Hanami application, changed default location for templates from "web/templates" to "templates"
113
- - [Luca Guidi] For views within an Hanami application, the default `part_namespace` is now `"view/parts"` (previously `"views/parts"`)
114
207
 
115
- ## Fixed
116
- - [Luca Guidi] Application-level configuration is now applied to `Hanami::View` subclasses, no matter how deep their inheritance chain (e.g. app base view -> slice base view -> slice view)
208
+ - For views within an Hanami application, changed default location for templates from "web/templates" to "templates". (Sean Collins)
209
+ - For views within an Hanami application, the default `part_namespace` is now `"view/parts"` (previously `"views/parts"`). (Luca Guidi)
210
+
211
+ ### Fixed
212
+
213
+ - Application-level configuration is now applied to `Hanami::View` subclasses, no matter how deep their inheritance chain (e.g. app base view -> slice base view -> slice view). (Luca Guidi)
214
+
215
+ [2.0.0.alpha7]: https://github.com/hanami/view/compare/v2.0.0.alpha6...v2.0.0.alpha7
216
+
217
+ ## [2.0.0.alpha6] - 2022-02-10
117
218
 
118
- ## v2.0.0.alpha6 - 2022-02-10
119
219
  ### Added
120
- - [Luca Guidi] Official support for Ruby: MRI 3.0 and 3.1
220
+
221
+ - Official support for Ruby: MRI 3.0 and 3.1. (Luca Guidi)
121
222
 
122
223
  ### Changed
123
- - [Luca Guidi] Drop support for Ruby: MRI 2.3, 2.4, 2.5, 2.6, and 2.7.
124
224
 
125
- ## v2.0.0.alpha5 - 2022-01-12
225
+ - Drop support for Ruby: MRI 2.3, 2.4, 2.5, 2.6, and 2.7. (Luca Guidi)
226
+
227
+ [2.0.0.alpha6]: https://github.com/hanami/view/compare/v2.0.0.alpha5...v2.0.0.alpha6
228
+
229
+ ## [2.0.0.alpha5] - 2022-01-12
230
+
126
231
  ### Added
127
- - [Marc Busqué] Automatically provide access to Hanami application routes helper as `routes` in default application view context (`Hanami::View::ApplicationContext`)
128
232
 
129
- ## v2.0.0.alpha3 - 2021-11-09
233
+ - Automatically provide access to Hanami application routes helper as `routes` in default application view context (`Hanami::View::ApplicationContext`). (Marc Busqué)
234
+
235
+ [2.0.0.alpha5]: https://github.com/hanami/view/compare/v2.0.0.alpha3...v2.0.0.alpha5
236
+
237
+ ## [2.0.0.alpha3] - 2021-11-09
238
+
130
239
  ### Added
131
- - [Pablo Vicente] Raise `LayoutNotFoundError` exception with friendlier, more specific error message when layouts cannot be found
240
+
241
+ - Raise `LayoutNotFoundError` exception with friendlier, more specific error message when layouts cannot be found. (Pablo Vicente)
132
242
 
133
243
  ### Changed
134
- - [Tim Riley] (Internal) Updated settings to use updated dry-configurable `setting` 0.13.0 API
135
244
 
136
- ## v2.0.0.alpha2 - 2021-05-04
245
+ - (Internal) Updated settings to use updated dry-configurable `setting` 0.13.0 API. (Tim Riley)
246
+
247
+ [2.0.0.alpha3]: https://github.com/hanami/view/compare/v2.0.0.alpha2...v2.0.0.alpha3
248
+
249
+ ## [2.0.0.alpha2] - 2021-05-04
250
+
137
251
  ### Changed
138
- - [Tim Riley] Replaced entire gem with dry-view (now renamed to hanami-view). See [dry-view's documentation](https://dry-rb.org/gems/dry-view/) for its capabilities and [the dry-view changelog](CHANGELOG.dry-view.md) for its history.
139
252
 
140
- ## v1.3.1 - 2019-01-18
253
+ - Replaced entire gem with dry-view (now renamed to hanami-view). See [dry-view's documentation](https://dry-rb.org/gems/dry-view/) for its capabilities and [the dry-view changelog](CHANGELOG.dry-view.md) for its history. (Tim Riley)
254
+
255
+ [2.0.0.alpha2]: https://github.com/hanami/view/compare/v1.3.1...v2.0.0.alpha2
256
+
257
+ ## [1.3.1] - 2019-01-18
258
+
141
259
  ### Added
142
- - [Luca Guidi] Official support for Ruby: MRI 2.6
143
- - [Luca Guidi] Support `bundler` 2.0+
144
260
 
145
- ## v1.3.0 - 2018-10-24
261
+ - Official support for Ruby: MRI 2.6. (Luca Guidi)
262
+ - Support `bundler` 2.0+. (Luca Guidi)
263
+
264
+ [1.3.1]: https://github.com/hanami/view/compare/v1.3.0...v1.3.1
265
+
266
+ ## [1.3.0] - 2018-10-24
267
+
268
+ [1.3.0]: https://github.com/hanami/view/compare/v1.3.0.beta1...v1.3.0
269
+
270
+ ## [1.3.0.beta1] - 2018-08-08
146
271
 
147
- ## v1.3.0.beta1 - 2018-08-08
148
272
  ### Fixed
149
- - [Ferdinand Niedermann] Ensure to set `:disable_escape` option only for Slim and don't let Tilt to emit a warning for other template engines.
150
- - [glaszig] Ensure partial rendering to respect `format` overriding
151
273
 
152
- ## v1.2.1 - 2018-10-16
274
+ - Ensure to set `:disable_escape` option only for Slim and don't let Tilt to emit a warning for other template engines. (Ferdinand Niedermann)
275
+ - Ensure partial rendering to respect `format` overriding. (glaszig)
276
+
277
+ [1.3.0.beta1]: https://github.com/hanami/view/compare/v1.2.1...v1.3.0.beta1
278
+
279
+ ## [1.2.1] - 2018-10-16
280
+
153
281
  ### Added
154
- - [Luca Guidi] Introduced new, backward compatible, signature to render a layout for testing purposes (eg. `ApplicationLayout.new({ format: :html }, "contents").render`)
282
+
283
+ - Introduced new, backward compatible, signature to render a layout for testing purposes (eg. `ApplicationLayout.new({ format: :html }, "contents").render`). (Luca Guidi)
155
284
 
156
285
  ### Fixed
157
- - [Luca Guidi] Ensure layout to be rendered when using HAML 5
158
- - [Luca Guidi] Ensure to raise `NoMethodError` when an unknown method is invoked by a view/template
159
286
 
160
- ## v1.2.0 - 2018-04-06
287
+ - Ensure layout to be rendered when using HAML 5. (Luca Guidi)
288
+ - Ensure to raise `NoMethodError` when an unknown method is invoked by a view/template. (Luca Guidi)
289
+
290
+ [1.2.1]: https://github.com/hanami/view/compare/v1.2.0...v1.2.1
291
+
292
+ ## [1.2.0] - 2018-04-06
293
+
294
+ [1.2.0]: https://github.com/hanami/view/compare/v1.2.0.rc2...v1.2.0
295
+
296
+ ## [1.2.0.rc2] - 2018-04-06
297
+
298
+ [1.2.0.rc2]: https://github.com/hanami/view/compare/v1.2.0.rc1...v1.2.0.rc2
161
299
 
162
- ## v1.2.0.rc2 - 2018-04-06
300
+ ## [1.2.0.rc1] - 2018-03-30
163
301
 
164
- ## v1.2.0.rc1 - 2018-03-30
302
+ [1.2.0.rc1]: https://github.com/hanami/view/compare/v1.2.0.beta2...v1.2.0.rc1
165
303
 
166
- ## v1.2.0.beta2 - 2018-03-23
304
+ ## [1.2.0.beta2] - 2018-03-23
167
305
 
168
- ## v1.2.0.beta1 - 2018-02-28
306
+ [1.2.0.beta2]: https://github.com/hanami/view/compare/v1.2.0.beta1...v1.2.0.beta2
307
+
308
+ ## [1.2.0.beta1] - 2018-02-28
309
+
310
+ [1.2.0.beta1]: https://github.com/hanami/view/compare/v1.1.2...v1.2.0.beta1
311
+
312
+ ## [1.1.2] - 2018-04-10
169
313
 
170
- ## v1.1.2 - 2018-04-10
171
314
  ### Fixed
172
- - [Luca Guidi] Ensure to be able to use `exposures` even when they aren't duplicable objects
173
315
 
174
- ## v1.1.1 - 2018-02-27
316
+ - Ensure to be able to use `exposures` even when they aren't duplicable objects. (Luca Guidi)
317
+
318
+ [1.1.2]: https://github.com/hanami/view/compare/v1.1.1...v1.1.2
319
+
320
+ ## [1.1.1] - 2018-02-27
321
+
175
322
  ### Added
176
- - [Luca Guidi] Official support for Ruby: MRI 2.5
323
+
324
+ - Official support for Ruby: MRI 2.5. (Luca Guidi)
177
325
 
178
326
  ### Fixed
179
- - [Alfonso Uceda] Ensure that `exposures` are properly overwritten for partials when `locals:` option is used
180
327
 
181
- ## v1.1.0 - 2017-10-25
328
+ - Ensure that `exposures` are properly overwritten for partials when `locals:` option is used. (Alfonso Uceda)
329
+
330
+ [1.1.1]: https://github.com/hanami/view/compare/v1.1.0...v1.1.1
331
+
332
+ ## [1.1.0] - 2017-10-25
333
+
334
+ [1.1.0]: https://github.com/hanami/view/compare/v1.1.0.rc1...v1.1.0
335
+
336
+ ## [1.1.0.rc1] - 2017-10-16
337
+
338
+ [1.1.0.rc1]: https://github.com/hanami/view/compare/v1.1.0.beta3...v1.1.0.rc1
182
339
 
183
- ## v1.1.0.rc1 - 2017-10-16
340
+ ## [1.1.0.beta3] - 2017-10-04
184
341
 
185
- ## v1.1.0.beta3 - 2017-10-04
342
+ [1.1.0.beta3]: https://github.com/hanami/view/compare/v1.1.0.beta2...v1.1.0.beta3
343
+
344
+ ## [1.1.0.beta2] - 2017-10-03
186
345
 
187
- ## v1.1.0.beta2 - 2017-10-03
188
346
  ### Added
189
- - [Luca Guidi] Added `Hanami::Layout#local` to safely access locals from layouts
190
347
 
191
- ## v1.1.0.beta1 - 2017-08-11
348
+ - Added `Hanami::Layout#local` to safely access locals from layouts. (Luca Guidi)
349
+
350
+ [1.1.0.beta2]: https://github.com/hanami/view/compare/v1.1.0.beta1...v1.1.0.beta2
351
+
352
+ ## [1.1.0.beta1] - 2017-08-11
353
+
192
354
  ### Fixed
193
- - [yjukaku] Raise `Hanami::View::UnknownRenderTypeError` when an argument different from `:template` or `:partial` is passed to `render`
194
355
 
195
- ## v1.0.1 - 2017-08-04
356
+ - Raise `Hanami::View::UnknownRenderTypeError` when an argument different from `:template` or `:partial` is passed to `render`. (yjukaku)
357
+
358
+ [1.1.0.beta1]: https://github.com/hanami/view/compare/v1.0.1...v1.1.0.beta1
359
+
360
+ ## [1.0.1] - 2017-08-04
361
+
196
362
  ### Added
197
- - [Luca Guidi] Compatibility with `haml` 5.0
198
363
 
199
- ## v1.0.0 - 2017-04-06
364
+ - Compatibility with `haml` 5.0. (Luca Guidi)
365
+
366
+ [1.0.1]: https://github.com/hanami/view/compare/v1.0.0...v1.0.1
367
+
368
+ ## [1.0.0] - 2017-04-06
369
+
370
+ [1.0.0]: https://github.com/hanami/view/compare/v1.0.0.rc1...v1.0.0
371
+
372
+ ## [1.0.0.rc1] - 2017-03-31
200
373
 
201
- ## v1.0.0.rc1 - 2017-03-31
374
+ [1.0.0.rc1]: https://github.com/hanami/view/compare/v1.0.0.beta2...v1.0.0.rc1
375
+
376
+ ## [1.0.0.beta2] - 2017-03-17
202
377
 
203
- ## v1.0.0.beta2 - 2017-03-17
204
378
  ### Changed
205
- - [Luca Guidi] Remove deprecated `Hanami::View::Rendering::LayoutScope#content`
206
379
 
207
- ## v1.0.0.beta1 - 2017-02-14
380
+ - Remove deprecated `Hanami::View::Rendering::LayoutScope#content`. (Luca Guidi)
381
+
382
+ [1.0.0.beta2]: https://github.com/hanami/view/compare/v1.0.0.beta1...v1.0.0.beta2
383
+
384
+ ## [1.0.0.beta1] - 2017-02-14
385
+
208
386
  ### Added
209
- - [Luca Guidi] Official support for Ruby: MRI 2.4
210
- - [Vladimir Dralo] Allow `View#initialize` to splat keyword arguments
211
387
 
212
- ## v0.8.0 - 2016-11-15
213
- ### Fixed
214
- - [Luca Guidi] Ensure `Rendering::NullLocal` to work with HAML templates
388
+ - Official support for Ruby: MRI 2.4. (Luca Guidi)
389
+ - Allow `View#initialize` to splat keyword arguments. (Vladimir Dralo)
390
+
391
+ [1.0.0.beta1]: https://github.com/hanami/view/compare/v0.8.0...v1.0.0.beta1
392
+
393
+ ## [0.8.0] - 2016-11-15
215
394
 
216
395
  ### Changed
217
- - [Luca Guidi] Official support for Ruby: MRI 2.3+ and JRuby 9.1.5.0+
218
396
 
219
- ## v0.7.0 - 2016-07-22
220
- ### Added
221
- - [Luca Guidi] Introduced `#local` for views, layouts and templates. It allows to safely access locals without raising errors in case the referenced local is missing.
397
+ - Official support for Ruby: MRI 2.3+ and JRuby 9.1.5.0+. (Luca Guidi)
222
398
 
223
399
  ### Fixed
224
- - [nessur] Find the correct partial in case of deeply nested templates.
225
- - [Marcello Rocha] Ensure `Hanami::Presenter` to respect method visibility of wrapped object.
226
- - [Luca Guidi] Ensure to use new registry when loading the framework
400
+
401
+ - Ensure `Rendering::NullLocal` to work with HAML templates. (Luca Guidi)
402
+
403
+ [0.8.0]: https://github.com/hanami/view/compare/v0.7.0...v0.8.0
404
+
405
+ ## [0.7.0] - 2016-07-22
406
+
407
+ ### Added
408
+
409
+ - Introduced `#local` for views, layouts and templates. It allows to safely access locals without raising errors in case the referenced local is missing. (Luca Guidi)
227
410
 
228
411
  ### Changed
229
- – [Luca Guidi] Drop support for Ruby 2.0 and 2.1. Official support for JRuby 9.0.5.0+.
230
- – [Luca Guidi] Deprecate `#content` in favor of `#local`.
231
412
 
232
- ## v0.6.1 - 2016-02-05
413
+ - Drop support for Ruby 2.0 and 2.1. Official support for JRuby 9.0.5.0+. (Luca Guidi)
414
+ - Deprecate `#content` in favor of `#local`. (Luca Guidi)
415
+
416
+ ### Fixed
417
+
418
+ - Find the correct partial in case of deeply nested templates. (nessur)
419
+ - Ensure `Hanami::Presenter` to respect method visibility of wrapped object. (Marcello Rocha)
420
+ - Ensure to use new registry when loading the framework. (Luca Guidi)
421
+
422
+ [0.7.0]: https://github.com/hanami/view/compare/v0.6.1...v0.7.0
423
+
424
+ ## [0.6.1] - 2016-02-05
425
+
233
426
  ### Changed
234
- - [Steve Hook] Preload partial templates in order to boost performances for partials rendering (2x faster)
427
+
428
+ - Preload partial templates in order to boost performances for partials rendering (2x faster). (Steve Hook)
235
429
 
236
430
  ### Fixed
237
- - [Luca Guidi] Disable Slim autoescape to use `Hanami::View`'s feature
238
431
 
239
- ## v0.6.0 - 2016-01-22
432
+ - Disable Slim autoescape to use `Hanami::View`'s feature. (Luca Guidi)
433
+
434
+ [0.6.1]: https://github.com/hanami/view/compare/v0.6.0...v0.6.1
435
+
436
+ ## [0.6.0] - 2016-01-22
437
+
240
438
  ### Changed
241
- - [Luca Guidi] Renamed the project
242
439
 
243
- ## v0.5.0 - 2016-01-12
440
+ - Renamed the project. (Luca Guidi)
441
+
442
+ [0.6.0]: https://github.com/hanami/view/compare/v0.5.0...v0.6.0
443
+
444
+ ## [0.5.0] - 2016-01-12
445
+
244
446
  ### Added
245
- - [Luca Guidi] Added `Lotus::View::Configuration#default_encoding` to set the encoding for templates
246
447
 
247
- ### Fixed
248
- - [Luca Guidi] Let exceptions to be raised as they occur in rendering context. This fixes misleading backtraces for exceptions.
249
- - [Martin Rubi] Raise a `Lotus::View::MissingTemplateError` when rendering a missing partial from a template
250
- - [Luca Guidi] Fix for `template.erb is not valid US-ASCII (Encoding::InvalidByteSequenceError)` when system encoding is not set
448
+ - Added `Lotus::View::Configuration#default_encoding` to set the encoding for templates. (Luca Guidi)
251
449
 
252
450
  ### Changed
253
- - [Liam Dawson] Introduced `Lotus::View::Error` and let all the framework exceptions to inherit from it.
254
451
 
255
- ## v0.4.4 - 2015-09-30
452
+ - Introduced `Lotus::View::Error` and let all the framework exceptions to inherit from it. (Liam Dawson)
453
+
454
+ ### Fixed
455
+
456
+ - Let exceptions to be raised as they occur in rendering context. This fixes misleading backtraces for exceptions. (Luca Guidi)
457
+ - Raise a `Lotus::View::MissingTemplateError` when rendering a missing partial from a template. (Martin Rubi)
458
+ - Fix for `template.erb is not valid US-ASCII (Encoding::InvalidByteSequenceError)` when system encoding is not set. (Luca Guidi)
459
+
460
+ [0.5.0]: https://github.com/hanami/view/compare/v0.4.4...v0.5.0
461
+
462
+ ## [0.4.4] - 2015-09-30
463
+
256
464
  ### Added
257
- - [Luca Guidi] Autoescape for layout helpers.
258
465
 
259
- ## v0.4.3 - 2015-07-10
466
+ - Autoescape for layout helpers. (Luca Guidi)
467
+
468
+ [0.4.4]: https://github.com/hanami/view/compare/v0.4.3...v0.4.4
469
+
470
+ ## [0.4.3] - 2015-07-10
471
+
260
472
  ### Fixed
261
- - [Farrel Lifson] Force partial finder to be explicit when to templates have the same name.
262
473
 
263
- ## v0.4.2 - 2015-06-23
474
+ - Force partial finder to be explicit when to templates have the same name. (Farrel Lifson)
475
+
476
+ [0.4.3]: https://github.com/hanami/view/compare/v0.4.2...v0.4.3
477
+
478
+ ## [0.4.2] - 2015-06-23
479
+
264
480
  ### Fixed
265
- - [Tom Kadwill] Ensure views to use methods defined by the associated layout.
266
481
 
267
- ## v0.4.1 - 2015-05-22
482
+ - Ensure views to use methods defined by the associated layout. (Tom Kadwill)
483
+
484
+ [0.4.2]: https://github.com/hanami/view/compare/v0.4.1...v0.4.2
485
+
486
+ ## [0.4.1] - 2015-05-22
487
+
268
488
  ### Added
269
- - [Luca Guidi] Introduced `#content` to render optional contents in a different context (eg. a view sets a page specific javascript in the application template footer).
270
489
 
271
- ## v0.4.0 - 2015-03-23
490
+ - Introduced `#content` to render optional contents in a different context (eg. a view sets a page specific javascript in the application template footer). (Luca Guidi)
491
+
492
+ [0.4.1]: https://github.com/hanami/view/compare/v0.4.0...v0.4.1
493
+
494
+ ## [0.4.0] - 2015-03-23
495
+
272
496
  ### Changed
273
- - [Luca Guidi] Autoescape concrete and virtual methods from presenters
274
- - [Luca Guidi] Autoescape concrete and virtual methods from views
497
+
498
+ - Autoescape concrete and virtual methods from presenters. (Luca Guidi)
499
+ - Autoescape concrete and virtual methods from views. (Luca Guidi)
275
500
 
276
501
  ### Fixed
277
- - [Tom Kadwill] Improve error message for undefined method in view
278
- - [Luca Guidi] Ensure that layouts will include modules from `Configuration#prepare`
279
502
 
280
- ## v0.3.0 - 2014-12-23
503
+ - Improve error message for undefined method in view. (Tom Kadwill)
504
+ - Ensure that layouts will include modules from `Configuration#prepare`. (Luca Guidi)
505
+
506
+ [0.4.0]: https://github.com/hanami/view/compare/v0.3.0...v0.4.0
507
+
508
+ ## [0.3.0] - 2014-12-23
509
+
281
510
  ### Added
282
- - [Trung Lê] When duplicate the framework, also duplicate `Presenter`
283
- - [Benny Klotz] Introduced `Scope#class`, `#inspect`, `LayoutScope#class` and `#inspect`
284
- - [Alfonso Uceda Pompa & Trung Lê] Introduced `Configuration#prepare`
285
- - [Luca Guidi] Implemented "respond to" logic for `Lotus::View::Scope` (`respond_to?` and `respond_to_missing?`)
286
- - [Luca Guidi] Implemented "respond to" logic for `Lotus::Layout` (`respond_to?` and `respond_to_missing?`)
287
- - [Jeremy Stephens] Allow view concrete methods that accept a block to be invoked from templates
288
- - [Peter Suschlik] Implemented "respond to" logic for `Lotus::Presenter` (`respond_to?` and `respond_to_missing?`)
289
- - [Luca Guidi] Official support for Ruby 2.2
511
+
512
+ - When duplicate the framework, also duplicate `Presenter`. (Trung Lê)
513
+ - Introduced `Scope#class`, `#inspect`, `LayoutScope#class` and `#inspect`. (Benny Klotz)
514
+ - Introduced `Configuration#prepare`. (Alfonso Uceda Pompa & Trung )
515
+ - Implemented "respond to" logic for `Lotus::View::Scope` (`respond_to?` and `respond_to_missing?`). (Luca Guidi)
516
+ - Implemented "respond to" logic for `Lotus::Layout` (`respond_to?` and `respond_to_missing?`). (Luca Guidi)
517
+ - Allow view concrete methods that accept a block to be invoked from templates. (Jeremy Stephens)
518
+ - Implemented "respond to" logic for `Lotus::Presenter` (`respond_to?` and `respond_to_missing?`). (Peter Suschlik)
519
+ - Official support for Ruby 2.2. (Luca Guidi)
290
520
 
291
521
  ### Changed
292
- - [Alfonso Uceda Pompa] Raise an exception when a layout doesn't have an associated template
522
+
523
+ - Raise an exception when a layout doesn't have an associated template. (Alfonso Uceda Pompa)
293
524
 
294
525
  ### Fixed
295
- - [Luca Guidi] Ensure that concrete methods in layouts are available in templates
296
- - [Luca Guidi] Ensure to associate the right layout to a view in case fo duplicated framework
297
- - [Luca Guidi] Safe override of Ruby's top level methods in Scope. (Eg. use `select` from a view, not from `::Kernel`)
298
526
 
299
- ## v0.2.0 - 2014-06-23
527
+ - Ensure that concrete methods in layouts are available in templates. (Luca Guidi)
528
+ - Ensure to associate the right layout to a view in case fo duplicated framework. (Luca Guidi)
529
+ - Safe override of Ruby's top level methods in Scope. (Eg. use `select` from a view, not from `::Kernel`). (Luca Guidi)
530
+
531
+ [0.3.0]: https://github.com/hanami/view/compare/v0.2.0...v0.3.0
532
+
533
+ ## [0.2.0] - 2014-06-23
534
+
300
535
  ### Added
301
- - [Luca Guidi] Introduced `Configuration#duplicate`
302
- - [Luca Guidi] Introduced `Configuration#layout` to define the layout that all the views will use
303
- - [Luca Guidi] Introduced `Configuration#load_paths` to define several sources where to lookup for templates
304
- - [Luca Guidi] Introduced `Configuration#root` to define the root path where to find templates
305
- - [Luca Guidi] Introduced `Lotus::View::Configuration`
306
- - [Grant Ammons] Allow view concrete methods with arity > 0 to be invoked from templates
307
- - [Luca Guidi] Official support for Ruby 2.1
536
+
537
+ - Introduced `Configuration#duplicate`. (Luca Guidi)
538
+ - Introduced `Configuration#layout` to define the layout that all the views will use. (Luca Guidi)
539
+ - Introduced `Configuration#load_paths` to define several sources where to lookup for templates. (Luca Guidi)
540
+ - Introduced `Configuration#root` to define the root path where to find templates. (Luca Guidi)
541
+ - Introduced `Lotus::View::Configuration`. (Luca Guidi)
542
+ - Allow view concrete methods with arity > 0 to be invoked from templates. (Grant Ammons)
543
+ - Official support for Ruby 2.1. (Luca Guidi)
308
544
 
309
545
  ### Changed
310
- - [Luca Guidi] `Rendering::TemplatesFinder` now look recursively for templates, starting from the root.
311
- - [Luca Guidi] Removed `View.layout=`
312
- - [Luca Guidi] Removed `View.root=`
546
+
547
+ - `Rendering::TemplatesFinder` now look recursively for templates, starting from the root. (Luca Guidi)
548
+ - Removed `View.layout=`. (Luca Guidi)
549
+ - Removed `View.root=`. (Luca Guidi)
313
550
 
314
551
  ### Fixed
315
- - [Luca Guidi] Ensure outermost locals to not shadow innermost inside templates/partials
316
552
 
317
- ## v0.1.0 - 2014-03-23
553
+ - Ensure outermost locals to not shadow innermost inside templates/partials. (Luca Guidi)
554
+
555
+ [0.2.0]: https://github.com/hanami/view/compare/v0.1.0...v0.2.0
556
+
557
+ ## [0.1.0] - 2014-03-23
558
+
318
559
  ### Added
319
- - [Luca Guidi] Allow custom rendering policy via `Action#render` override. This bypasses the template lookup and rendering.
320
- - [Luca Guidi] Introduced `Lotus::Presenter`
321
- - [Luca Guidi] Introduced templates rendering from templates and layouts
322
- - [Luca Guidi] Introduced partials rendering from templates and layouts
323
- - [Luca Guidi] Introduced layouts support
324
- - [Luca Guidi] Introduced `Lotus::View.load!` as entry point to load views and templates
325
- - [Luca Guidi] Allow to setup template name via `View.template`
326
- - [Luca Guidi] Rendering context also considers locals passed to the constructor
327
- - [Luca Guidi] Introduced `View.format` as DSL to declare which format to handle
328
- - [Luca Guidi] Introduced view subclasses as way to handle different formats (mime types)
329
- - [Luca Guidi] Introduced multiple templates per each View
330
- - [Luca Guidi] Implemented basic rendering with templates
331
- - [Luca Guidi] Official support for Ruby 2.0
560
+
561
+ - Allow custom rendering policy via `Action#render` override. This bypasses the template lookup and rendering. (Luca Guidi)
562
+ - Introduced `Lotus::Presenter`. (Luca Guidi)
563
+ - Introduced templates rendering from templates and layouts. (Luca Guidi)
564
+ - Introduced partials rendering from templates and layouts. (Luca Guidi)
565
+ - Introduced layouts support. (Luca Guidi)
566
+ - Introduced `Lotus::View.load!` as entry point to load views and templates. (Luca Guidi)
567
+ - Allow to setup template name via `View.template`. (Luca Guidi)
568
+ - Rendering context also considers locals passed to the constructor. (Luca Guidi)
569
+ - Introduced `View.format` as DSL to declare which format to handle. (Luca Guidi)
570
+ - Introduced view subclasses as way to handle different formats (mime types). (Luca Guidi)
571
+ - Introduced multiple templates per each View. (Luca Guidi)
572
+ - Implemented basic rendering with templates. (Luca Guidi)
573
+ - Official support for Ruby 2.0. (Luca Guidi)
574
+
575
+ [0.1.0]: https://github.com/hanami/view/releases/tag/v0.1.0