lib/tynn/session.rb in tynn-1.0.0 vs lib/tynn/session.rb in tynn-1.1.0

- old
+ new

@@ -5,11 +5,11 @@ # Examples # # require "tynn" # require "tynn/session" # - # Tynn.helpers(Tynn::Session, secret: "__change_me__") + # Tynn.plugin(Tynn::Session, secret: "__change_me__") # # Tynn.define do # root do # res.write(sprintf("hei %s", session[:username])) # end @@ -28,11 +28,11 @@ # attacker to tamper the data. So, it's recommended to load the token # from the environment. # # Examples # - # Tynn.helpers(Tynn::Session, secret: ENV["SESSION_SECRET"]) + # Tynn.plugin(Tynn::Session, secret: ENV["SESSION_SECRET"]) # # Under the hood, Tynn::Session uses the +Rack::Session::Cookie+ middleware. # Thus, supports all the options available for this middleware: # # key - The name of the cookie. Defaults to <tt>"rack.session"</tt>. @@ -48,10 +48,10 @@ # is temporary and is no retained after the browser is # closed. Defaults to +nil+. # # Examples # - # Tynn.helpers( + # Tynn.plugin( # Tynn::Session, # key: "app", # secret: ENV["SESSION_SECRET"], # expire_after: 36_000, # seconds # httponly: true,