Skip to content

Commit

Permalink
0.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
sdogruyol committed Jun 17, 2018
1 parent b716443 commit bc720cc
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.10.0 (02-10-2018)

- Crystal 0.25.0 support 🎉

# 0.9.0 (02-10-2018)

- Crystal 0.24.1 support 🎉
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.9.0
version: 0.10.0

authors:
- Serdar Dogruyol <dogruyolserdar@gmail.com>

development_dependencies:
kemal:
github: kemalcr/kemal
version: 0.22.0
version: 0.23.0
2 changes: 1 addition & 1 deletion spec/base_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ describe "Session" do

it "should raise SecretRequiredException if secret is not set" do
Kemal::Session.config.secret = ""
expect_raises("Kemal::Session::SecretRequiredException") do
expect_raises(Kemal::Session::SecretRequiredException) do
context = create_context("")
session = Kemal::Session.new(context)
end
Expand Down
4 changes: 2 additions & 2 deletions src/kemal-session/engines/file.cr
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ module Kemal
def run_gc
each_session do |session|
full_path = session_filename(session.id)
age = Time.utc_now - File.stat(full_path).mtime # mtime is always saved in utc
age = Time.utc_now - File.info(full_path).modification_time # mtime is always saved in utc
session.destroy if age.total_seconds > Session.config.timeout.total_seconds
end
end
Expand Down Expand Up @@ -103,7 +103,7 @@ module Kemal
def read_or_create_storage_instance(session_id : String) : StorageInstance
if session_exists?(session_id)
f = session_filename(session_id)
@cached_session_read_time = File.stat(f).mtime
@cached_session_read_time = File.info(f).modification_time
json = File.read(f)
if json && json.size > 0
return StorageInstance.from_json(json)
Expand Down

0 comments on commit bc720cc

Please sign in to comment.