devise_gauth 0.4.1 → 0.4.3
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 +4 -4
- data/README.md +1 -1
- data/lib/{devise_google_authenticatable → devise_gauth}/controllers/helpers.rb +1 -1
- data/lib/{devise_google_authenticatable → devise_gauth}/models/google_authenticatable.rb +1 -1
- data/lib/{devise_google_authenticatable → devise_gauth}/orm/active_record.rb +4 -5
- data/lib/{devise_google_authenticatable → devise_gauth}/patches/display_qr.rb +1 -1
- data/lib/{devise_google_authenticatable → devise_gauth}/patches.rb +2 -2
- data/lib/{devise_google_authenticatable → devise_gauth}/rails.rb +5 -5
- data/lib/{devise_google_authenticatable → devise_gauth}/schema.rb +1 -1
- data/lib/devise_gauth/version.rb +5 -0
- data/lib/{devise_google_authenticatable → devise_gauth}/views/helpers.rb +1 -1
- data/lib/{devise_google_authenticator.rb → devise_gauth.rb} +12 -11
- data/lib/generators/active_record/devise_google_authenticator_generator.rb +3 -3
- data/lib/generators/active_record/templates/migration.rb +1 -1
- data/lib/generators/{devise_google_authenticator/devise_google_authenticator_generator.rb → devise_gauth/devise_gauth_generator.rb} +4 -4
- data/lib/generators/{devise_google_authenticator → devise_gauth}/install_generator.rb +3 -3
- data/lib/generators/{devise_google_authenticator → devise_gauth}/views_generator.rb +1 -1
- data/lib/generators/mongoid/devise_google_authenticator_generator.rb +1 -1
- metadata +21 -21
- data/lib/devise_google_authenticatable/version.rb +0 -5
- /data/lib/{devise_google_authenticatable → devise_gauth}/hooks/totp_authenticatable.rb +0 -0
- /data/lib/{devise_google_authenticatable → devise_gauth}/routes.rb +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f5d375b4b4cc691c0ac00cebf17c6d59e305afe69e0ccaa63ce7e820ea4706f3
|
4
|
+
data.tar.gz: 937241dfb4a7628db0a48764b2bb609c076bcb4ee0143da719cc700402f75699
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3bf5018944357811dd3797f13bfdfbb52855dc77cfb3ba588534cc9019b379a439cb7c5091a930d392b4408d332810dbfcffeb6550b4fa7fcc43312ed20b5a5e
|
7
|
+
data.tar.gz: aa11d56d82f401badf4ca0d66fb00b101868e3fd7c8866b0817fbc17b726e2f1fb51e10c50d55e639a58976c194b5d5dd94e7687b40d55028a0c17e80318d5ad
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
module
|
3
|
+
module DeviseGauth
|
4
4
|
module Orm
|
5
5
|
# This module contains handle schema (migrations):
|
6
6
|
#
|
@@ -12,12 +12,11 @@ module DeviseGoogleAuthenticator
|
|
12
12
|
|
13
13
|
module ActiveRecord
|
14
14
|
module Schema
|
15
|
-
include
|
15
|
+
include DeviseGauth::Schema
|
16
16
|
end
|
17
17
|
end
|
18
|
-
|
19
18
|
end
|
20
19
|
end
|
21
20
|
|
22
|
-
ActiveRecord::ConnectionAdapters::Table.send :include,
|
23
|
-
ActiveRecord::ConnectionAdapters::TableDefinition.send :include,
|
21
|
+
ActiveRecord::ConnectionAdapters::Table.send :include, DeviseGauth::Orm::ActiveRecord::Schema
|
22
|
+
ActiveRecord::ConnectionAdapters::TableDefinition.send :include, DeviseGauth::Orm::ActiveRecord::Schema
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
module
|
3
|
+
module DeviseGauth
|
4
4
|
module Patches
|
5
|
-
autoload :DisplayQR, '
|
5
|
+
autoload :DisplayQR, 'devise_gauth/patches/display_qr'
|
6
6
|
|
7
7
|
class << self
|
8
8
|
def apply
|
@@ -1,21 +1,21 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require '
|
3
|
+
require 'devise_gauth/controllers/helpers'
|
4
4
|
|
5
|
-
module
|
5
|
+
module DeviseGauth
|
6
6
|
class Engine < ::Rails::Engine
|
7
7
|
if Rails.version > '5'
|
8
8
|
ActiveSupport::Reloader.to_prepare do
|
9
|
-
|
9
|
+
DeviseGauth::Patches.apply
|
10
10
|
end
|
11
11
|
else
|
12
12
|
ActionDispatch::Callbacks.to_prepare do
|
13
|
-
|
13
|
+
DeviseGauth::Patches.apply
|
14
14
|
end
|
15
15
|
end
|
16
16
|
|
17
17
|
ActiveSupport.on_load(:action_controller) do
|
18
|
-
include
|
18
|
+
include DeviseGauth::Controllers::Helpers
|
19
19
|
end
|
20
20
|
end
|
21
21
|
end
|
@@ -28,17 +28,18 @@ module Devise # :nodoc:
|
|
28
28
|
@@ga_bypass_signup = false
|
29
29
|
end
|
30
30
|
|
31
|
-
|
32
|
-
|
33
|
-
autoload :
|
34
|
-
autoload :Patches, 'devise_google_authenticatable/patches'
|
31
|
+
module DeviseGauth
|
32
|
+
autoload :Schema, 'devise_gauth/schema'
|
33
|
+
autoload :Patches, 'devise_gauth/patches'
|
35
34
|
end
|
36
35
|
|
37
|
-
require '
|
38
|
-
require '
|
39
|
-
require '
|
40
|
-
require '
|
41
|
-
require '
|
42
|
-
ActionView::Base.send :include,
|
36
|
+
require 'devise_gauth/routes'
|
37
|
+
require 'devise_gauth/rails'
|
38
|
+
require 'devise_gauth/orm/active_record'
|
39
|
+
require 'devise_gauth/controllers/helpers'
|
40
|
+
require 'devise_gauth/views/helpers'
|
41
|
+
ActionView::Base.send :include, DeviseGauth::Views::Helpers
|
43
42
|
|
44
|
-
Devise.add_module :google_authenticatable, controller: :google_authenticatable,
|
43
|
+
Devise.add_module :google_authenticatable, controller: :google_authenticatable,
|
44
|
+
model: 'devise_gauth/models/google_authenticatable',
|
45
|
+
route: :displayqr
|
@@ -4,11 +4,11 @@ require 'rails/generators/active_record'
|
|
4
4
|
|
5
5
|
module ActiveRecord
|
6
6
|
module Generators
|
7
|
-
class
|
8
|
-
source_root File.expand_path(
|
7
|
+
class DeviseGauthGenerator < ActiveRecord::Generators::Base
|
8
|
+
source_root File.expand_path('templates', __dir__)
|
9
9
|
|
10
10
|
def copy_devise_migration
|
11
|
-
migration_template
|
11
|
+
migration_template 'migration.rb', "db/migrate/devise_gauth_add_to_#{table_name}.rb"
|
12
12
|
end
|
13
13
|
end
|
14
14
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
class
|
3
|
+
class DeviseGauthAddTo<%= table_name.camelize %> < ActiveRecord::Migration
|
4
4
|
def self.up
|
5
5
|
change_table :<%= table_name %> do |t|
|
6
6
|
t.string :gauth_secret
|
@@ -1,13 +1,13 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
module
|
3
|
+
module DeviseGauth
|
4
4
|
module Generators
|
5
|
-
class
|
6
|
-
namespace '
|
5
|
+
class DeviseGauthGenerator < Rails::Generators::NamedBase
|
6
|
+
namespace 'devise_gauth'
|
7
7
|
|
8
8
|
desc 'Add :google_authenticatable directive in the given model, plus accessors. Also generate migration for ActiveRecord'
|
9
9
|
|
10
|
-
def
|
10
|
+
def inject_devise_gauth_content
|
11
11
|
path = File.join('app', 'models', "#{file_path}.rb")
|
12
12
|
|
13
13
|
return unless File.exist?(path)
|
@@ -1,10 +1,10 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
module
|
3
|
+
module DeviseGauth
|
4
4
|
module Generators
|
5
5
|
# Install Generator
|
6
6
|
class InstallGenerator < Rails::Generators::Base
|
7
|
-
source_root File.expand_path('
|
7
|
+
source_root File.expand_path('../templates', __dir__)
|
8
8
|
|
9
9
|
desc 'Install the devise google authenticator extension'
|
10
10
|
|
@@ -27,7 +27,7 @@ module DeviseGoogleAuthenticator
|
|
27
27
|
end
|
28
28
|
|
29
29
|
def copy_locale
|
30
|
-
copy_file '../../../config/locales/en.yml', 'config/locales/devise.
|
30
|
+
copy_file '../../../config/locales/en.yml', 'config/locales/devise.gauth.en.yml'
|
31
31
|
end
|
32
32
|
end
|
33
33
|
end
|
@@ -5,7 +5,7 @@ require 'generators/devise/orm_helpers'
|
|
5
5
|
|
6
6
|
module Mongoid
|
7
7
|
module Generators
|
8
|
-
class
|
8
|
+
class DeviseGauthGenerator < Rails::Generators::NamedBase
|
9
9
|
include Devise::Generators::OrmHelpers
|
10
10
|
|
11
11
|
def inject_field_types
|
metadata
CHANGED
@@ -1,20 +1,20 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: devise_gauth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pharmony SA
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-01-
|
11
|
+
date: 2024-01-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionmailer
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '4.2'
|
20
20
|
- - "<"
|
@@ -24,7 +24,7 @@ dependencies:
|
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
|
-
- - "
|
27
|
+
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
29
|
version: '4.2'
|
30
30
|
- - "<"
|
@@ -48,7 +48,7 @@ dependencies:
|
|
48
48
|
name: railties
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
50
50
|
requirements:
|
51
|
-
- - "
|
51
|
+
- - ">="
|
52
52
|
- !ruby/object:Gem::Version
|
53
53
|
version: '4.2'
|
54
54
|
- - "<"
|
@@ -58,7 +58,7 @@ dependencies:
|
|
58
58
|
prerelease: false
|
59
59
|
version_requirements: !ruby/object:Gem::Requirement
|
60
60
|
requirements:
|
61
|
-
- - "
|
61
|
+
- - ">="
|
62
62
|
- !ruby/object:Gem::Version
|
63
63
|
version: '4.2'
|
64
64
|
- - "<"
|
@@ -107,23 +107,23 @@ files:
|
|
107
107
|
- app/views/devise/checkga/show.html.erb
|
108
108
|
- app/views/devise/displayqr/show.html.erb
|
109
109
|
- config/locales/en.yml
|
110
|
-
- lib/
|
111
|
-
- lib/
|
112
|
-
- lib/
|
113
|
-
- lib/
|
114
|
-
- lib/
|
115
|
-
- lib/
|
116
|
-
- lib/
|
117
|
-
- lib/
|
118
|
-
- lib/
|
119
|
-
- lib/
|
120
|
-
- lib/
|
121
|
-
- lib/
|
110
|
+
- lib/devise_gauth.rb
|
111
|
+
- lib/devise_gauth/controllers/helpers.rb
|
112
|
+
- lib/devise_gauth/hooks/totp_authenticatable.rb
|
113
|
+
- lib/devise_gauth/models/google_authenticatable.rb
|
114
|
+
- lib/devise_gauth/orm/active_record.rb
|
115
|
+
- lib/devise_gauth/patches.rb
|
116
|
+
- lib/devise_gauth/patches/display_qr.rb
|
117
|
+
- lib/devise_gauth/rails.rb
|
118
|
+
- lib/devise_gauth/routes.rb
|
119
|
+
- lib/devise_gauth/schema.rb
|
120
|
+
- lib/devise_gauth/version.rb
|
121
|
+
- lib/devise_gauth/views/helpers.rb
|
122
122
|
- lib/generators/active_record/devise_google_authenticator_generator.rb
|
123
123
|
- lib/generators/active_record/templates/migration.rb
|
124
|
-
- lib/generators/
|
125
|
-
- lib/generators/
|
126
|
-
- lib/generators/
|
124
|
+
- lib/generators/devise_gauth/devise_gauth_generator.rb
|
125
|
+
- lib/generators/devise_gauth/install_generator.rb
|
126
|
+
- lib/generators/devise_gauth/views_generator.rb
|
127
127
|
- lib/generators/mongoid/devise_google_authenticator_generator.rb
|
128
128
|
homepage: http://github.com/pharmony/devise_gauth
|
129
129
|
licenses:
|
File without changes
|
File without changes
|