minimalist_authentication 2.1.3 → 2.1.4

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 935a598b82c32db75d86f12b9203887d53939e8763885a652706d16da95e7df2
4
- data.tar.gz: e41c59375354ab1d34eff454d0887aed10fe1069429bfc38a54a0a57b911d2c1
3
+ metadata.gz: f7b87a8cef7609390ef22d26995cb8ee9acca53ad0307c03ce7d83851411b6f4
4
+ data.tar.gz: 5ca3252dc0515e323ae37de9658224629182bf5c8c0aa9c18f11d400b802c046
5
5
  SHA512:
6
- metadata.gz: 4a17bab0b57ac7bfa73b118a7281408f4ff9f32bf55e79cedf3974e77d9dc949f86ffce45e78414115660f6292d3613ea182fbfd30b091758871b44b55b59280
7
- data.tar.gz: a0a7d1f82249c434fdc9981008b7807133c4c1b503910f927d6947a312f241a11c3c509b7bd94a8a394883efac7b127230591def744a1f275d40c84be3c7bb91
6
+ metadata.gz: a095c584ebc5b2dac48db94956cccce2057d845f640888d5b9ddca1566dbfcc84c239104043ee91cdf8495bf8120e23c12d179a03664e6aefcd00eb5367f82f4
7
+ data.tar.gz: 2bdab56fcaf45777c4330f3bc45cac2bbc9981d3fda5209fed92702805d44f9de7918d846dda787902448a7e5a234aa8681407f67849cd602b0e47c6080b645a
@@ -3,7 +3,8 @@ module MinimalistAuthentication
3
3
  extend ActiveSupport::Concern
4
4
 
5
5
  included do
6
- skip_before_action :authorization_required, only: %i(new create)
6
+ skip_before_action :authorization_required, only: %i(new create)
7
+ before_action :redirect_logged_in_users, only: :new
7
8
  end
8
9
 
9
10
  def new
@@ -52,6 +53,11 @@ module MinimalistAuthentication
52
53
  end
53
54
  end
54
55
 
56
+ def redirect_logged_in_users
57
+ redirect_to(login_redirect_to) if logged_in?
58
+ end
59
+
60
+
55
61
  def after_authentication_success
56
62
  redirect_back_or_default(login_redirect_to)
57
63
  end
@@ -1,3 +1,3 @@
1
1
  module MinimalistAuthentication
2
- VERSION = '2.1.3'
2
+ VERSION = '2.1.4'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minimalist_authentication
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.3
4
+ version: 2.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaron Baldwin
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-10-11 00:00:00.000000000 Z
12
+ date: 2019-04-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -126,7 +126,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
126
126
  version: '0'
127
127
  requirements: []
128
128
  rubyforge_project:
129
- rubygems_version: 2.7.6
129
+ rubygems_version: 2.7.7
130
130
  signing_key:
131
131
  specification_version: 4
132
132
  summary: A Rails authentication plugin that takes a minimalist approach.