Skip to content

Releases: kemalcr/kemal

v0.16.1

12 Oct 13:57
Compare
Choose a tag to compare
  • Improved Multipart support with more info on parsed files. parse_multipart(env) now yields
    an UploadFile object which has the following properties field,data,meta,`headers.
post "/upload" do |env|
  parse_multipart(env) do |f|
    image1 = f.data if f.field == "image1"
    image2 = f.data if f.field == "image2"
    puts f.meta
    puts f.headers
    "Upload complete"
  end
end

v0.16.0

01 Oct 15:54
Compare
Choose a tag to compare
  • Multipart support <3 (thanks @RX14). Now you can handle file uploads.
post "/upload" do |env|
  parse_multipart(env) do |field, data|
    image1 = data if field == "image1"
    image2 = data if field == "image2"
    "Upload complete"
  end
end
  • Make session configurable. Now you can specify session name and expire time wit
Kemal.config.session["name"] = "your_app"
Kemal.config.session["expire_time"] = 48.hours
  • Session now supports more types. (String, Int32, Float64, Bool)
  • Add gzip helper to enable / disable gzip compression on responses.
  • Static file caching with etag and gzip (thanks @crisward)
  • Kemal.run now accepts port to listen.

v0.15.1

05 Sep 14:57
Compare
Choose a tag to compare
Don't forget to call_next on NullLogHandler

v0.15.0

03 Sep 14:15
Compare
Choose a tag to compare
  • Add context store
  • KEMAL_ENV respects to Kemal.config.env and needs to be explicitly set.
  • Kemal::InitHandler is introduced. Adds initial configuration, headers like X-Powered-By.
  • Add send_file to helpers.
  • Add mime types.
  • Fix parsing JSON params when "charset" is present in "Content-Type" header.
  • Use http-only cookie for session
  • Inject STDOUT by default in CommonLogHandler

v0.14.1

13 Jul 18:25
Compare
Choose a tag to compare
Bump version

v0.14.0

05 Jul 19:20
Compare
Choose a tag to compare

This is a major release with the following changes.

  • Added Session middleware for easily adding session support to your application. (Thanks @mperham)
  • Added CSRF middleware to protect you against CSRF attacks. (Thanks @mperham)
  • Now you can customize 500 errors too.
  • Kemal now only logs to STDOUT.
  • Removed -e flag from CLI. You can use KEMAL_ENV to configure your environment.
  • Support user defined additional options as part of the Config

v0.13.0

17 Jun 12:19
Compare
Choose a tag to compare

This is a major release with the following

  • Crystal 0.18.0 support.
  • Allow 404 error handler to be customizable.
  • Allow multiple values for a single parameter key. (thanks @MGerrior )
  • Add "headers" helper to make it easier to add headers to response. (thanks @MGerrior )

v0.12.0

08 May 17:48
Compare
Choose a tag to compare

This is a major release with following changes.

  • Crystal 0.16.0 support.
  • Custom error handlers. Now you can easily customize your error page.
error 403 do |env|
  "Access forbidden!"
end

get "/" do |env|
  env.response.status_code = 403
end
  • Filters no longer demands you to return the Context.

v0.11.2

27 Mar 18:45
Compare
Choose a tag to compare

Crystal _0.14.2_ support.

v0.11.0

19 Mar 13:20
Compare
Choose a tag to compare

This is a major release with some breaking changes.

  • _(breaking change)_ Kemal no longer runs at startup. You need to _explicity_ run it with Kemal.run.

Example:

require "kemal"

get "/" do 
  "Hello from Kemal."
end

Kemal.run