hanami-view 2.3.1 → 3.0.0.rc1

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