Releases: zendesk/curly
Releases · zendesk/curly
v3.3.0
v3.2.0
- Adds support for Ruby 3.2
- Drops support for Ruby 2.6
- Drops support for Rails 4.2
Full Changelog: v3.1.0...v3.2.0
Curly 2.0.0
This is the second major release of Curly, and there's some awesome new stuff in there as well as some breaking changes.
Breaking Changes
- Some methods and exceptions have been renamed to emphasize the nomenclature used by Curly: components consist of a name, an optional identifier and a set of attributes.
- The syntax checker is now stricter. If a presenter method has a required argument, a component must specify an identifier. If the method doesn't have an argument, a component must not specify an argument.
New Features
- Components can now have attributes, e.g.
{{widget width=200px height=100px title="Hello there!"}}
. Any attribute specified on a component must be present as a keyword argument on the presenter method. If the keyword argument is required, the attribute must be specified. - Collection blocks allow you to enumerate a collection right within a Curly template! Using the special
{{*<component>}}
block syntax, e.g.{{*comments}}<li>{{body}} -- {{author}}{{/comments}}
, you can specify a sub-template that is used to render each item in the collection returned by the presenter method. The presenter class used to render the sub-template is deduced based on the component name; in this case, CommentPresenter.
Curly 0.12.0
-
Allow Curly to output Curly syntax by using the
{{{ ... }}
syntax:{{{curly_example}}
Curly 0.11.0
- Make Curly raise an exception when a reference or comment is not closed.
- Fix a bug that caused an infinite loop when there was whitespace in a reference.
Curly 0.10.2
- Fix a bug that caused non-string presenter method return values to be
discarded.
Curly 0.10.1
- Fix a bug in the compiler that caused some templates to be erroneously HTML escaped.
Curly 0.10.0
-
Allow comments in Curly templates using the
{{! ... }}
syntax:{{! This is a comment }}
Curly 0.9.1
- Better error handling. If a presenter class cannot be found, we not
raise a more descriptive exception. - Include the superclass' dependencies in a presenter's dependency list.
Curly 0.9.0
- Allow running setup code before rendering a Curly view. Simply add a
#setup!
method to your presenter – it will be called by Curly just
before the view is rendered.