v0.4.0 (2018-10-16)
straight-shoota
released this
16 Oct 12:54
·
107 commits
to master
since this release
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.
- (breaking-change) Replaced
Crinja::PyObject
byCrinja::Object
and renamed hook methods tocrinja_attribute
andcrinja_call
.getitem
hook has been removed. - (breaking-change) Added
Crinja::Object::Auto
for generating automatic bindings forcrinja_attribute
(previously provided byCrinja::PyObject.getattr
). The behaviour can be configured using annotationsCrinja::Attribute
andCrinja::Attributes
. - (breaking-change) Renamed
Crinja::Callable::Arguments
toCrinja::Arguments
. The API has been simplified by removing unused setters. - (breaking-change) Removed
Crinja::Arguments#[](key : Symbol)
. Use a string key instead. - (breaking-change) Renamed
Crinja::Callable::Arguments::UnknownArgumentException
toCrinja::Arguments.:UnknownArgumentError
. - (breaking-change) Renamed
Crinja::Callable::Arguments::ArgumentError
toCrinja::Arguments::Error
. - (breaking-change) Renamed
Crinja::PyTuple
toCrinja::Tuple
. - (breaking-change) Updated
BakedFileLoader
for compatibility withbaked_file_system 0.9.6
- Upgraded to Crystal 0.26.1.
- Fixed number filters (
int
andfloat
) to not rely on raising an error. - Fixed
generate-docs
script. - Added
Makefile
. - Added Circle CI integration with nighly builds testing with Crystal nightly.
- Added integration tests for usage examples (
./examples
) in travis-ci and Circle CI. - Added automatic docs generation to circle CI workflow and removed it from travis-ci.
- Added formatter checks to CI checks.
- Added preliminary Windows support by removing dependency on
xml
. - Added this changelog.
- Improved reference to exmples in README.