Skip to content

Commit

Permalink
Release 1.0.0 (#97)
Browse files Browse the repository at this point in the history
  • Loading branch information
sdogruyol authored Mar 23, 2021
1 parent 51244a8 commit fca592f
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 9 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# 1.0.0 (?-03-2021)

- Crystal 1.0.0 support :tada:
- Kemal 1.0.0 support :tada:
- Secure cookies with `samesite` [#96](https://github.com/kemalcr/kemal-session/pull/96). Thanks @kingsleysh :pray:
# 0.13.0 (14-02-2021)

- Crystal 0.36.0 support :tada:
Expand Down
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,7 @@ Here's an example implementation:

```crystal
class UserStorableObject
JSON.mapping({
id: Int32,
name: String
})
include JSON::Serializable
include Kemal::Session::StorableObject
def initialize(@id : Int32, @name : String); end
Expand Down
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.13.0
version: 1.0.0

authors:
- Serdar Dogruyol <[email protected]>

crystal: 0.36.0
crystal: ">= 0.36.0"

development_dependencies:
kemal:
Expand Down
2 changes: 1 addition & 1 deletion spec/base_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ describe "Session" do

describe "cookie" do
it "should create a cookie with the samesite set to strict" do
Kemal::Session.config do |config|
Kemal::Session.config do |config|
config.cookie_name = "woops"
config.samesite = HTTP::Cookie::SameSite::Strict
end
Expand Down
4 changes: 2 additions & 2 deletions src/kemal-session/base.cr
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,12 @@ module Kemal
Please set your session secret within your config via
Kemal::Session.config do |config|
config.secret = \"my_super_secret\"
config.secret = "my_super_secret"
end
or
Kemal::Session.config.secret = \"my_super_secret\"
Kemal::Session.config.secret = "my_super_secret"
ERROR
super error_message
end
Expand Down
1 change: 1 addition & 0 deletions src/kemal-session/engines/file.cr
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ module Kemal
class FileEngine < Engine
class StorageInstance
include JSON::Serializable

macro define_storage(vars)
{% for name, type in vars %}
@{{name.id}}s = Hash(String, {{type}}).new
Expand Down
1 change: 1 addition & 0 deletions src/kemal-session/engines/memory.cr
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ module Kemal
class MemoryEngine < Engine
class StorageInstance
include JSON::Serializable

macro define_storage(vars)
getter! id : String
property! last_access_at : Int64
Expand Down

0 comments on commit fca592f

Please sign in to comment.