Skip to content

v4.5.0

Choose a tag to compare

@caspiano caspiano released this 03 Jun 07:05
· 170 commits to master since this release

Simplifies the usage of annotations on routes.
Now you can pass annotations to a route as below.

...

annotation Test
end

get "/annotation/single", :single_annotation, annotations: @[Test(detail: "single")] do
  render text: {{ @def.annotations(ActionController::TestAnnotation).id.stringify }}
end

get "/annotation/multi", :multi_annotation, annotations: [@[Test], @[Test(detail: "multi"]] do
  render text: {{ @def.annotations(ActionController::TestAnnotation).id.stringify }}
end

...

Included

  • Fixup the version matrix in CI
  • Add tests for multithreading (use the ubuntu crystal image, as alpine does not support multithreading)
  • Use the ameba action in CI
  • Tidy up base.cr with the use of the delegate macro
  • A few clarifications to comments
  • Fix the log formatter to show the level key before rendering the level, in line with other log metadata