simple_auth 3.1.2 → 3.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3d766e5009401ad9ed59c71e123f83046e23ea750ed8cc1f0aa7d3d3953f4185
4
- data.tar.gz: fefbd6744a260ded45f3cb53db8fb5d407b0b4c8ac1fac606a9d49ce3321379c
3
+ metadata.gz: b1d2a68a9455a5f601c57c8f98d70af46795e492f084815a9f2f1f929591d3b0
4
+ data.tar.gz: 0f0cb2fec8e43e8d2c00970618bb120b9914d4c2ffe113b93038bacec2d8c4d4
5
5
  SHA512:
6
- metadata.gz: 2b07279571d5d771fe036f2102a4c9c0333aea5eb8c87816a37c5c1742fd365b60926dd59dfe5e9cd265019a99035b41d250a2d939d711836ce50d50dfcc1ba0
7
- data.tar.gz: 896be7f120ffe8154a7b3cdf7b90b4782b9b2f5914454ed8745051c9b1e612180afd0929cb2cd6c5f1286a6179b92e766a697e77b17fab3905e470ec9589d5ab
6
+ metadata.gz: 38930354c31b9b9b43970e0efc9d7ae0a71b643702fd8f37b46527a811e30174f32a31e339225d56f3c08175b7e96d24dc9baa764622bc2ad1b6bd27538d0e3d
7
+ data.tar.gz: 80715edb98f53b659ca8a95cdda946863da7eb25e4310398621f0fffc24e4becbe0d78e2c9c412a06972a765bbc448a2ecfbf064abac0a10da7fe0b41bd607c1
@@ -1,3 +1,7 @@
1
+ # v3.1.3
2
+
3
+ - Remove session[:return_to] after using it.
4
+
1
5
  # v3.1.2
2
6
 
3
7
  - Make flash message key configurable via
@@ -50,7 +50,7 @@ module SimpleAuth
50
50
  end
51
51
 
52
52
  private def return_to(url)
53
- session[:return_to] || url
53
+ session.delete(:return_to) || url
54
54
  end
55
55
 
56
56
  private def simple_auth_require_logged_scope(scope)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SimpleAuth
4
- VERSION = "3.1.2"
4
+ VERSION = "3.1.3"
5
5
  end
@@ -35,9 +35,11 @@ class PagesControllerTest < ActionController::TestCase
35
35
  test "redirects to requested url" do
36
36
  get :index
37
37
  assert_redirected_to login_path
38
+ assert_equal "/index", session[:return_to]
38
39
 
39
40
  get :log_in
40
41
  assert_redirected_to controller: :pages, action: :index
42
+ refute session.key?(:return_to)
41
43
  end
42
44
 
43
45
  test "redirects to default url" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.2
4
+ version: 3.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nando Vieira
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-02-20 00:00:00.000000000 Z
11
+ date: 2020-02-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: globalid