README.rdoc in session_countdown-0.4.0 vs README.rdoc in session_countdown-0.5.0

- old
+ new

@@ -3,17 +3,22 @@ A Ruby on Rails plugin that puts a countdown timer on the session object. - session.countdown_start(30.minutes) + session.countdown_start(1.hour) + session.countdown_count #=> 3600 session.countdown_running? # => true - session.countdown_expire + # 60 minutes pass + session.countdown_count #=> 0 session.countdown_running? # => false session.countdown_expired? # => true session.countdown_restart session.countdown_running? # => true + session.countdown_abort + session.countdown_running? # => false + session.countdown_expired? # => false === But why?!? Sometimes I need to build my own custom rails authentication systems rather than use plugins such as Authlogic, Devise or @@ -24,11 +29,11 @@ authentication stuff, so why not combine the two? == API -<i>Note that countdown_expire(), countdown_restart() and +<i>Note that countdown_abort(), countdown_restart() and countdown_count() will throw a NoCountdown exception if called on a non-existent countdown timer.</i> Start a countdown timer @@ -41,11 +46,11 @@ session.countdown_running?(name = :default) Expire early (i.e. logout) - session.countdown_expire(name = :default) + session.countdown_abort(name = :default) Restart, using the duration supplied to countdown_start session.countdown_restart(name = :default) @@ -99,10 +104,10 @@ end end def logout - session.countdown_expire + session.countdown_abort flash[:notice] = "You are now logged out" redirect_to :index end