simple_auth 1.3.0 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- simple_auth (1.3.0)
4
+ simple_auth (1.3.1)
5
5
  rails (~> 3.0.0)
6
6
 
7
7
  GEM
@@ -10,7 +10,7 @@ module SimpleAuth
10
10
  module InstanceMethods
11
11
  private
12
12
  def return_to(url = nil, &block)
13
- url = session.fetch(:return_to, url)
13
+ url = session.delete(:return_to) || url
14
14
  url = instance_eval(&block) if block_given?
15
15
  url
16
16
  end
@@ -2,7 +2,7 @@ module SimpleAuth
2
2
  module Version
3
3
  MAJOR = 1
4
4
  MINOR = 3
5
- PATCH = 0
5
+ PATCH = 1
6
6
  STRING = "#{MAJOR}.#{MINOR}.#{PATCH}"
7
7
  end
8
8
  end
@@ -55,6 +55,12 @@ describe ApplicationController do
55
55
  session[:return_to].should == "/stub_resources?some=param"
56
56
  end
57
57
 
58
+ it "should remove return to from session" do
59
+ get :index, :some => "param"
60
+ controller.send(:return_to, "/dashboard")
61
+ session[:return_to].should be_nil
62
+ end
63
+
58
64
  it "should set warning message" do
59
65
  get :index
60
66
  flash[:alert].should == "You need to be logged"
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: simple_auth
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 1.3.0
5
+ version: 1.3.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Nando Vieira
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-03-16 00:00:00 -03:00
13
+ date: 2011-03-28 00:00:00 -03:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency