easy_auth 0.3.3 → 0.3.4

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
  SHA1:
3
- metadata.gz: 8f40883f3052fc3797de55bd7ebcdb6b7d3ef922
4
- data.tar.gz: 78b26d776af9c8c859927afacb2b7eccffb1a9be
3
+ metadata.gz: 584175a8f8187ad7c3ee1dd9821a7496fbd6fded
4
+ data.tar.gz: a1a716d95186be6d01bd963c904b10489847812d
5
5
  SHA512:
6
- metadata.gz: 575264a1f286c362a89c668ebf2443b22bdc42c51196e4cd5a22e8a22bc84cd9e6c47482732320a64b7b82ab543816720f6787bb7ecb8f03a5067449019e422a
7
- data.tar.gz: 09aeb2e30e8cc3696f2dacb355b65e5962cd0c8f4a170cf18b830071c2fe2a2a2799533b233373e8a95842763bb2b20f28b91997182f2c8f63c8a6257db8d1cf
6
+ metadata.gz: 186de3f553d0176c8d0cb0c511d3bcfc0d2b48b562998b3edde1c2d3f6f58fa226e522529672ce979715bf60ecd7968428fe8462804534e1a485731843adbab9
7
+ data.tar.gz: db61422a248c40b7bdfb7a259e0ea4bc60b929986930ffbae0286c783be2ca2b6b2794fe149a26863957c441dd5c713314459132efac29e8a2187ddc7773d575
@@ -4,16 +4,4 @@ module EasyAuth::Controllers::Authenticated
4
4
  included do
5
5
  before_filter :attempt_to_authenticate
6
6
  end
7
-
8
- private
9
-
10
- def attempt_to_authenticate
11
- if account_not_signed_in?
12
- session[:requested_path] = request.method == 'GET' ? request.fullpath : request.referer
13
- respond_to do |format|
14
- format.html { redirect_to main_app.sign_in_url }
15
- format.json { render :json => {}, :status => 401 }
16
- end
17
- end
18
- end
19
7
  end
@@ -40,6 +40,16 @@ module EasyAuth::Helpers::EasyAuth
40
40
  end
41
41
  alias :user_not_signed_in? :account_not_signed_in?
42
42
 
43
+ def attempt_to_authenticate
44
+ if account_not_signed_in?
45
+ session[:requested_path] = request.method == 'GET' ? request.fullpath : request.referer
46
+ respond_to do |format|
47
+ format.html { redirect_to main_app.sign_in_url }
48
+ format.json { render :json => {}, :status => 401 }
49
+ end
50
+ end
51
+ end
52
+
43
53
  private
44
54
 
45
55
  def delete_session_data
@@ -1,3 +1,3 @@
1
1
  module EasyAuth
2
- VERSION = '0.3.3'
2
+ VERSION = '0.3.4'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: easy_auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Cardarella
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-03-28 00:00:00.000000000 Z
12
+ date: 2014-03-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails