Skip to content

Commit

Permalink
Update changelog to 0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
straight-shoota committed Oct 16, 2018
1 parent 12a327e commit 371fc8d
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 6 deletions.
51 changes: 47 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,59 @@
# Changelog
All notable changes to Crinja will be documented in this file.

## 0.4.0 (2018-10-16)

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.

```cr
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` by `Crinja::Object` and renamed hook methods to `crinja_attribute` and `crinja_call`. `getitem` hook has been removed.
* **(breaking-change)** Added `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`.
* **(breaking-change)** Renamed `Crinja::Callable::Arguments` to `Crinja::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` to `Crinja::Arguments.:UnknownArgumentError`.
* **(breaking-change)** Renamed `Crinja::Callable::Arguments::ArgumentError` to `Crinja::Arguments::Error`.
* **(breaking-change)** Renamed `Crinja::PyTuple` to `Crinja::Tuple`.
* **(breaking-change)** Updated `BakedFileLoader` for compatibility with `baked_file_system 0.9.6`
* Upgraded to Crystal 0.26.1.
* Fixed number filters (`int` and `float`) 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.

## 0.3.0 (2018-06-29)

This release updated Crinja to work with Crystal 0.25.1

Notable changes:

* Renamed `Crinja::Environment` to just `Crinja`
* Removed `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.
* Removed `Crinja::Bindings`. Some methods are obsolete with `Crinja::Value`, others moved to `Crinja` namespace.
* Added automatic testing of usage examples (`./examples`) on travis-ci
* **(breaking-change)** Renamed `Crinja::Environment` to just `Crinja`
* **(breaking-change)** Removed `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.
* **(breaking-change)** Removed `Crinja::Bindings`. Some methods are obsolete with `Crinja::Value`, others moved to `Crinja` namespace.
* Added dedicated documentation of [*Template Syntax*](https://github.com/straight-shoota/crinja/blob/5b1a3c30fac48f8bfccab5043fbda209f7859046/TEMPLATE_SYNTAX.md)

## 0.2.1 (2018-01-01)
Expand Down
9 changes: 7 additions & 2 deletions shard.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
name: crinja
version: 0.3.0
version: 0.4.0
license: Apache-2.0
crystal: 0.25.1
crystal: 0.26.1

authors:
- Johannes Müller <straightshoota@gmail.com>

description: |
Implementation of Jinja2 runtime template language in Crystal
https://straight-shoota.github.io/crinja/
targets:
crinja:
main: src/cli.cr
Expand Down

0 comments on commit 371fc8d

Please sign in to comment.