Skip to content

Commit

Permalink
0.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
sdogruyol committed Jan 2, 2018
1 parent 089cb6a commit a9e3289
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
18 changes: 11 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
# 0.9.0 (02-10-2018)

- Crystal 0.24.1 support 🎉

# 0.6.0 (01-01-2017)

This is a major release which adds `StoreableObject`. Big thanks to @neovintage :+1

### StorableObject

`kemal-session` has the ability to save objects to session storage. By saving objects to session storage, this opens up the ability to have more advanced data types that aren't supported by the base types (Int32, Float64, String, Bool).
Any object that you want to save to session storage needs to be a subclass of `Session::StorableObject`.
The subclass needs to define two different methods. First, a class method to deserialize the object from a String, called `unserialize`. The
second method, is an instance method called `serialize`. `serialize` will take the object and turn it into a String for the session storage engine to
`kemal-session` has the ability to save objects to session storage. By saving objects to session storage, this opens up the ability to have more advanced data types that aren't supported by the base types (Int32, Float64, String, Bool).
Any object that you want to save to session storage needs to be a subclass of `Session::StorableObject`.
The subclass needs to define two different methods. First, a class method to deserialize the object from a String, called `unserialize`. The
second method, is an instance method called `serialize`. `serialize` will take the object and turn it into a String for the session storage engine to
handle. Here's an example implementation:

```crystal
Expand All @@ -27,7 +31,7 @@ class UserStorableObject < Session::StorableObject
end
```

Once a `StorableObject` subclass has been defined, you can save that in session storage just like the base types. Here's an example using
Once a `StorableObject` subclass has been defined, you can save that in session storage just like the base types. Here's an example using
the `UserStorableObject` implementation:

```crystal
Expand All @@ -50,7 +54,7 @@ or advice, check with the underlying session storage implementation.

# 0.5.0 (22-12-2016)

This is a major release which adds Session administration capabilities (check #7 for more info). Big thanks to @neovintage and @Thyra 🎉
This is a major release which adds Session administration capabilities (check #7 for more info). Big thanks to @neovintage and @Thyra 🎉

- `#get` to get a session with the given `session_id`.
- `#all` to get every saved sessions.
Expand All @@ -61,4 +65,4 @@ This is a major release which adds Session administration capabilities (check #7
# 0.4.0 (03-12-2016)

- Sign cookies with `secret`. It's required to have a `secret`. (thanks @neovintage)
- Fix multiple GC initilization.
- Fix multiple GC initilization.
4 changes: 2 additions & 2 deletions shard.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: kemal-session
version: 0.7.0
version: 0.9.0

authors:
- Serdar Dogruyol <[email protected]>

development_dependencies:
kemal:
github: kemalcr/kemal
branch: master
version: 0.22.0

0 comments on commit a9e3289

Please sign in to comment.