Skip to content

Commit

Permalink
Remove redundant session stuff
Browse files Browse the repository at this point in the history
sdogruyol committed Dec 10, 2016
1 parent 9696e6c commit ac8ec0a
Showing 4 changed files with 1 addition and 125 deletions.
8 changes: 0 additions & 8 deletions spec/config_spec.cr
Original file line number Diff line number Diff line change
@@ -23,14 +23,6 @@ describe "Config" do
config.host_binding.should eq "127.0.0.1"
end

it "sets session values" do
config = Kemal.config
config.session["name"] = "kemal"
config.session["expire_time"] = 1.hours
config.session["name"].as(String).should eq "kemal"
config.session["expire_time"].as(Time::Span).should eq 1.hours
end

it "adds a custom handler" do
config = Kemal.config
config.add_handler CustomTestHandler.new
2 changes: 0 additions & 2 deletions src/kemal.cr
Original file line number Diff line number Diff line change
@@ -18,8 +18,6 @@ module Kemal
config.server.tls = config.ssl
{% end %}

Kemal::Sessions.run_reaper!

unless Kemal.config.error_handlers.has_key?(404)
error 404 do |env|
render_404
3 changes: 1 addition & 2 deletions src/kemal/config.cr
Original file line number Diff line number Diff line change
@@ -15,14 +15,13 @@ module Kemal
{% end %}

property host_binding, ssl, port, env, public_folder, logging, running,
always_rescue, serve_static : (Bool | Hash(String, Bool)), server, session : Hash(String, Time::Span | String), extra_options
always_rescue, serve_static : (Bool | Hash(String, Bool)), server, extra_options

def initialize
@host_binding = "0.0.0.0"
@port = 3000
@env = "development"
@serve_static = {"dir_listing" => false, "gzip" => true}
@session = {"name" => "kemal_session", "expire_time" => 48.hours}
@public_folder = "./public"
@logging = true
@logger = nil
113 changes: 0 additions & 113 deletions src/kemal/session.cr

This file was deleted.

0 comments on commit ac8ec0a

Please sign in to comment.