devise_google_authenticator 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -7,16 +7,33 @@ This is a devise[https://github.com/plataformatec/devise] extension to allow you
7
7
  * Version 0.2 - tidied up some of the code - changed the references to AsteriskLabs
8
8
  * Version 0.3 - first working version! With working generators, tests, and doesnt require changes to Devise's Sign In view
9
9
  * Version 0.3.1 - Slight updated in the dependencies.
10
+ * Version 0.3.2 - Updated to include support for Devise 2.0.0 and above (no longer supports 1.5.3 or lower), you'll need version 0.3.1 to use older Devise
10
11
 
11
12
  == Installation
12
13
 
13
14
  Add the gem to your Gemfile (don't forget devise too):
14
15
 
15
- * gem 'devise', '~> 1.5.3'
16
- * gem 'devise_google_authenticator', '0.3.1'
16
+ * gem 'devise'
17
+ * gem 'devise_google_authenticator', '0.3.2'
17
18
 
18
19
  Don't forget to "bundle install"
19
20
 
21
+ === Devise Installation (In case you haven't done it)
22
+
23
+ To setup Devise, you need to do the following (but refer to https://github.com/plataformatec/devise for more information)
24
+
25
+ Install Devise:
26
+ * rails g devise:install
27
+
28
+ Setup the User or Admin model
29
+ * rails g devise MODEL
30
+
31
+ Configure your app for authorisation, edit your Controller and add this before_filter:
32
+
33
+ * before_filter :authenticate_user!
34
+
35
+ Make sure your "root" route is configured in config/routes.rb
36
+
20
37
  === Automatic Installation (Lets assume this is a bare bones app)
21
38
 
22
39
  Run the following generator to add the necessary configuration options to Devise's config file:
@@ -1,13 +1,13 @@
1
1
  class Devise::CheckgaController < Devise::SessionsController
2
2
  prepend_before_filter :require_no_authentication, :only => [ :show, :update ]
3
- include Devise::Controllers::InternalHelpers
3
+ include Devise::Controllers::Helpers
4
4
 
5
5
  def show
6
6
  @tmpid = params[:id]
7
7
  if @tmpid.nil?
8
8
  redirect_to :root
9
9
  else
10
- render_with_scope :show
10
+ render :show
11
11
  end
12
12
  end
13
13
 
@@ -1,11 +1,11 @@
1
- class Devise::DisplayqrController < ApplicationController
1
+ class Devise::DisplayqrController < DeviseController
2
2
  prepend_before_filter :authenticate_scope!, :only => [:show,:update]
3
3
 
4
- include Devise::Controllers::InternalHelpers
4
+ include Devise::Controllers::Helpers
5
5
 
6
6
  def show
7
7
  if not resource.nil? and not resource.gauth_secret.nil?
8
- render_with_scope :show
8
+ render :show
9
9
  else
10
10
  sign_in scope, resource, :bypass => true
11
11
  redirect_to stored_location_for(scope) || :root
@@ -19,7 +19,7 @@ class Devise::DisplayqrController < ApplicationController
19
19
  sign_in scope, resource, :bypass => true
20
20
  redirect_to stored_location_for(scope) || :root
21
21
  else
22
- render_with_scope :show
22
+ render :show
23
23
  end
24
24
  end
25
25
 
@@ -17,13 +17,13 @@ module DeviseGoogleAuthenticator::Patches
17
17
 
18
18
  respond_with resource, :location => {:controller => 'displayqr', :action => 'show'}
19
19
  else
20
- set_flash_message :notice, :inactive_signed_up, :reason => inactive_reason(resource) if is_navigational_format?
20
+ set_flash_message :notice, :"signed_up_but_#{resource.inactive_message}" if is_navigational_format?
21
21
  expire_session_data_after_sign_in!
22
22
  respond_with resource, :location => after_inactive_sign_up_path_for(resource)
23
23
  end
24
24
  else
25
- clean_up_passwords(resource)
26
- respond_with_navigational(resource) { render_with_scope :new }
25
+ clean_up_passwords resource
26
+ respond_with resource
27
27
  end
28
28
  end
29
29
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: devise_google_authenticator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,22 +9,22 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-01-29 00:00:00.000000000Z
12
+ date: 2012-02-19 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
16
- requirement: &70204026425020 !ruby/object:Gem::Requirement
16
+ requirement: &70141007631400 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
20
20
  - !ruby/object:Gem::Version
21
- version: 1.0.7
21
+ version: 1.1.3
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *70204026425020
24
+ version_requirements: *70141007631400
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rails
27
- requirement: &70204026424120 !ruby/object:Gem::Requirement
27
+ requirement: &70141007630660 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,35 +32,35 @@ dependencies:
32
32
  version: 3.0.0
33
33
  - - <=
34
34
  - !ruby/object:Gem::Version
35
- version: 3.2.0
35
+ version: 3.3.0
36
36
  type: :runtime
37
37
  prerelease: false
38
- version_requirements: *70204026424120
38
+ version_requirements: *70141007630660
39
39
  - !ruby/object:Gem::Dependency
40
40
  name: devise
41
- requirement: &70204026423260 !ruby/object:Gem::Requirement
41
+ requirement: &70141007629960 !ruby/object:Gem::Requirement
42
42
  none: false
43
43
  requirements:
44
44
  - - ! '>='
45
45
  - !ruby/object:Gem::Version
46
- version: 1.4.6
47
- - - <
46
+ version: 2.0.0
47
+ - - <=
48
48
  - !ruby/object:Gem::Version
49
- version: '1.6'
49
+ version: 2.1.0
50
50
  type: :runtime
51
51
  prerelease: false
52
- version_requirements: *70204026423260
52
+ version_requirements: *70141007629960
53
53
  - !ruby/object:Gem::Dependency
54
54
  name: rotp
55
- requirement: &70204026422440 !ruby/object:Gem::Requirement
55
+ requirement: &70141007629200 !ruby/object:Gem::Requirement
56
56
  none: false
57
57
  requirements:
58
- - - <
58
+ - - <=
59
59
  - !ruby/object:Gem::Version
60
60
  version: 1.3.2
61
61
  type: :runtime
62
62
  prerelease: false
63
- version_requirements: *70204026422440
63
+ version_requirements: *70141007629200
64
64
  description: Devise Google Authenticator Extension, for adding Google's OTP to your
65
65
  Rails apps!
66
66
  email: xntrik@gmail.com