Implementation of Jinja2 template language in Crystal
Compatibility with PCRE2 (Crystal 1.8)
Compatbility with Crystal 1.1
TagCycleException
do
tag (#33, thanks @n-rodriguez)Compatibility with Crystal 0.35.0
Compatibility with Crystal 0.34.0
Log
framework from Crystal 0.34.0This release brings compatibility with Crystal 0.32.1
This release brings compatibility with Crystal 0.29.0
This release doesn't add any new features but fixes compatibility with Crystal 0.27.0.
This release comes with some refactorings of the public API to make it easier to use. Most prominently, annotation based autogenerator for exposing object properties to the Crinja runtime were added.
require "crinja"
class User
include Crinja::Object::Auto
@[Crinja::Attribute]
def name : String
"john paul"
end
end
Crinja.new.from_string("{{ user.name }}").render({"user" => User.new}) # => "john paul"
Autogeneration of crinja_call
will be left for the next release.
Most other changes involve the CI infrastructure, with Circle CI taking over the main load from travis.
Crinja::PyObject
by Crinja::Object
and renamed hook methods to crinja_attribute
and crinja_call
. getitem
hook has been removed.Crinja::Object::Auto
for generating automatic bindings for crinja_attribute
(previously provided by Crinja::PyObject.getattr
). The behaviour can be configured using annotations Crinja::Attribute
and Crinja::Attributes
.Crinja::Callable::Arguments
to Crinja::Arguments
. The API has been simplified by removing unused setters.Crinja::Arguments#[](key : Symbol)
. Use a string key instead.Crinja::Callable::Arguments::UnknownArgumentException
to Crinja::Arguments.:UnknownArgumentError
.Crinja::Callable::Arguments::ArgumentError
to Crinja::Arguments::Error
.Crinja::PyTuple
to Crinja::Tuple
.BakedFileLoader
for compatibility with baked_file_system 0.9.6
int
and float
) to not rely on raising an error.generate-docs
script.Makefile
../examples
) in travis-ci and Circle CI.xml
.This release updated Crinja to work with Crystal 0.25.1
Notable changes:
Crinja::Environment
to just Crinja
Crinja::Type
in favour of Crinja::Value
to avoid recursive aliases and reduce a lot of .as(Type)
castings all over the place. This change was similar to JSON::Type
-> JSON::Any
in Crystal 0.25.0.Crinja::Bindings
. Some methods are obsolete with Crinja::Value
, others moved to Crinja
namespace../examples
) on travis-ci