devise-authy 1.8.3 → 1.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +44 -0
- data/CHANGELOG.md +11 -0
- data/Gemfile +1 -12
- data/README.md +5 -3
- data/Rakefile +1 -14
- data/devise-authy.gemspec +34 -237
- data/lib/devise-authy.rb +1 -0
- data/lib/devise-authy/version.rb +5 -0
- data/lib/generators/active_record/devise_authy_generator.rb +11 -1
- data/lib/generators/active_record/templates/migration.rb +1 -1
- metadata +42 -195
- data/VERSION +0 -1
- data/authy-devise-demo/.gitignore +0 -15
- data/authy-devise-demo/Gemfile +0 -51
- data/authy-devise-demo/Gemfile.lock +0 -194
- data/authy-devise-demo/README.md +0 -64
- data/authy-devise-demo/Rakefile +0 -7
- data/authy-devise-demo/app/assets/images/rails.png +0 -0
- data/authy-devise-demo/app/assets/javascripts/application.js +0 -15
- data/authy-devise-demo/app/assets/javascripts/devise_authy.js +0 -12
- data/authy-devise-demo/app/assets/javascripts/welcome.js.coffee +0 -3
- data/authy-devise-demo/app/assets/stylesheets/application.css +0 -13
- data/authy-devise-demo/app/assets/stylesheets/devise_authy.css +0 -26
- data/authy-devise-demo/app/assets/stylesheets/welcome.css.scss +0 -3
- data/authy-devise-demo/app/controllers/application_controller.rb +0 -3
- data/authy-devise-demo/app/controllers/welcome_controller.rb +0 -15
- data/authy-devise-demo/app/helpers/application_helper.rb +0 -2
- data/authy-devise-demo/app/helpers/welcome_helper.rb +0 -2
- data/authy-devise-demo/app/mailers/.gitkeep +0 -0
- data/authy-devise-demo/app/models/.gitkeep +0 -0
- data/authy-devise-demo/app/models/admin.rb +0 -7
- data/authy-devise-demo/app/models/user.rb +0 -7
- data/authy-devise-demo/app/views/devise/devise_authy/enable_authy.html.erb +0 -7
- data/authy-devise-demo/app/views/devise/devise_authy/verify_authy.html.erb +0 -38
- data/authy-devise-demo/app/views/devise/devise_authy/verify_authy_installation.html.erb +0 -10
- data/authy-devise-demo/app/views/layouts/application.html.erb +0 -28
- data/authy-devise-demo/app/views/welcome/admin_page.html.erb +0 -12
- data/authy-devise-demo/app/views/welcome/index.html.erb +0 -5
- data/authy-devise-demo/app/views/welcome/user_page.html.erb +0 -5
- data/authy-devise-demo/config.ru +0 -4
- data/authy-devise-demo/config/application.rb +0 -26
- data/authy-devise-demo/config/boot.rb +0 -6
- data/authy-devise-demo/config/database.yml +0 -25
- data/authy-devise-demo/config/environment.rb +0 -5
- data/authy-devise-demo/config/environments/development.rb +0 -43
- data/authy-devise-demo/config/environments/production.rb +0 -79
- data/authy-devise-demo/config/environments/test.rb +0 -42
- data/authy-devise-demo/config/initializers/authy.rb +0 -1
- data/authy-devise-demo/config/initializers/backtrace_silencers.rb +0 -7
- data/authy-devise-demo/config/initializers/devise.rb +0 -240
- data/authy-devise-demo/config/initializers/inflections.rb +0 -15
- data/authy-devise-demo/config/initializers/mime_types.rb +0 -5
- data/authy-devise-demo/config/initializers/secret_token.rb +0 -7
- data/authy-devise-demo/config/initializers/session_store.rb +0 -8
- data/authy-devise-demo/config/initializers/wrap_parameters.rb +0 -14
- data/authy-devise-demo/config/locales/devise.authy.en.yml +0 -24
- data/authy-devise-demo/config/locales/devise.en.yml +0 -58
- data/authy-devise-demo/config/locales/en.yml +0 -5
- data/authy-devise-demo/config/routes.rb +0 -65
- data/authy-devise-demo/config/secrets.yml +0 -22
- data/authy-devise-demo/db/migrate/20130409234357_devise_create_users.rb +0 -46
- data/authy-devise-demo/db/migrate/20141202000744_devise_create_admins.rb +0 -46
- data/authy-devise-demo/db/migrate/20141202004246_devise_authy_add_to_admins.rb +0 -21
- data/authy-devise-demo/db/migrate/20160906221739_add_sessions_table.rb +0 -12
- data/authy-devise-demo/db/schema.rb +0 -72
- data/authy-devise-demo/db/seeds.rb +0 -7
- data/authy-devise-demo/lib/assets/.gitkeep +0 -0
- data/authy-devise-demo/lib/tasks/.gitkeep +0 -0
- data/authy-devise-demo/log/.gitkeep +0 -0
- data/authy-devise-demo/public/404.html +0 -26
- data/authy-devise-demo/public/422.html +0 -26
- data/authy-devise-demo/public/500.html +0 -25
- data/authy-devise-demo/public/favicon.ico +0 -0
- data/authy-devise-demo/public/robots.txt +0 -5
- data/authy-devise-demo/script/rails +0 -6
- data/authy-devise-demo/test/fixtures/.gitkeep +0 -0
- data/authy-devise-demo/test/fixtures/users.yml +0 -11
- data/authy-devise-demo/test/functional/.gitkeep +0 -0
- data/authy-devise-demo/test/functional/welcome_controller_test.rb +0 -9
- data/authy-devise-demo/test/integration/.gitkeep +0 -0
- data/authy-devise-demo/test/performance/browsing_test.rb +0 -12
- data/authy-devise-demo/test/test_helper.rb +0 -13
- data/authy-devise-demo/test/unit/.gitkeep +0 -0
- data/authy-devise-demo/test/unit/helpers/welcome_helper_test.rb +0 -4
- data/authy-devise-demo/test/unit/user_test.rb +0 -7
- data/authy-devise-demo/vendor/assets/javascripts/.gitkeep +0 -0
- data/authy-devise-demo/vendor/assets/stylesheets/.gitkeep +0 -0
- data/authy-devise-demo/vendor/plugins/.gitkeep +0 -0
- data/spec/controllers/devise_authy_controller_spec.rb +0 -360
- data/spec/controllers/passwords_controller_spec.rb +0 -48
- data/spec/features/authy_authenticatable_spec.rb +0 -108
- data/spec/features/authy_lockable_spec.rb +0 -70
- data/spec/generators_spec.rb +0 -32
- data/spec/models/authy_authenticatable_spec.rb +0 -17
- data/spec/models/authy_lockable_spec.rb +0 -81
- data/spec/orm/active_record.rb +0 -4
- data/spec/rails-app/Gemfile +0 -10
- data/spec/rails-app/Gemfile.lock +0 -141
- data/spec/rails-app/Rakefile +0 -7
- data/spec/rails-app/app/assets/images/rails.png +0 -0
- data/spec/rails-app/app/assets/javascripts/application.js +0 -15
- data/spec/rails-app/app/assets/javascripts/devise_authy.js +0 -12
- data/spec/rails-app/app/assets/javascripts/welcome.js +0 -2
- data/spec/rails-app/app/assets/stylesheets/application.css +0 -13
- data/spec/rails-app/app/assets/stylesheets/devise_authy.css +0 -26
- data/spec/rails-app/app/assets/stylesheets/welcome.css.scss +0 -3
- data/spec/rails-app/app/controllers/application_controller.rb +0 -3
- data/spec/rails-app/app/controllers/welcome_controller.rb +0 -13
- data/spec/rails-app/app/helpers/application_helper.rb +0 -2
- data/spec/rails-app/app/helpers/welcome_helper.rb +0 -2
- data/spec/rails-app/app/mailers/.gitkeep +0 -0
- data/spec/rails-app/app/models/.gitkeep +0 -0
- data/spec/rails-app/app/models/lockable_user.rb +0 -7
- data/spec/rails-app/app/models/user.rb +0 -8
- data/spec/rails-app/app/views/devise/devise_authy/enable_authy.html.erb +0 -7
- data/spec/rails-app/app/views/devise/devise_authy/verify_authy.html.erb +0 -37
- data/spec/rails-app/app/views/devise/devise_authy/verify_authy_installation.html.erb +0 -10
- data/spec/rails-app/app/views/layouts/application.html.erb +0 -28
- data/spec/rails-app/app/views/welcome/index.html.erb +0 -5
- data/spec/rails-app/config.ru +0 -4
- data/spec/rails-app/config/application.rb +0 -30
- data/spec/rails-app/config/boot.rb +0 -6
- data/spec/rails-app/config/database.yml +0 -25
- data/spec/rails-app/config/environment.rb +0 -5
- data/spec/rails-app/config/environments/development.rb +0 -43
- data/spec/rails-app/config/environments/production.rb +0 -79
- data/spec/rails-app/config/environments/test.rb +0 -44
- data/spec/rails-app/config/initializers/authy.rb +0 -2
- data/spec/rails-app/config/initializers/backtrace_silencers.rb +0 -7
- data/spec/rails-app/config/initializers/devise.rb +0 -256
- data/spec/rails-app/config/initializers/inflections.rb +0 -15
- data/spec/rails-app/config/initializers/mime_types.rb +0 -5
- data/spec/rails-app/config/initializers/secret_token.rb +0 -7
- data/spec/rails-app/config/initializers/session_store.rb +0 -8
- data/spec/rails-app/config/initializers/wrap_parameters.rb +0 -14
- data/spec/rails-app/config/locales/devise.authy.en.yml +0 -24
- data/spec/rails-app/config/locales/devise.en.yml +0 -59
- data/spec/rails-app/config/locales/en.yml +0 -5
- data/spec/rails-app/config/routes.rb +0 -8
- data/spec/rails-app/config/secrets.yml +0 -22
- data/spec/rails-app/db/development.sqlite3 +0 -0
- data/spec/rails-app/db/migrate/20130419164907_devise_create_users.rb +0 -46
- data/spec/rails-app/db/migrate/20130419164936_devise_authy_add_to_users.rb +0 -18
- data/spec/rails-app/db/schema.rb +0 -41
- data/spec/rails-app/db/seeds.rb +0 -7
- data/spec/rails-app/lib/assets/.gitkeep +0 -0
- data/spec/rails-app/lib/tasks/.gitkeep +0 -0
- data/spec/rails-app/public/404.html +0 -26
- data/spec/rails-app/public/422.html +0 -26
- data/spec/rails-app/public/500.html +0 -25
- data/spec/rails-app/public/favicon.ico +0 -0
- data/spec/rails-app/public/robots.txt +0 -5
- data/spec/rails-app/script/rails +0 -6
- data/spec/routing/routes_spec.rb +0 -35
- data/spec/spec_helper.rb +0 -46
- data/spec/support/helpers.rb +0 -80
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a7b900c9c0f1ae4ac68e680d75876c3d4344a11a4f7a36c920f8e8db34e0c2c3
|
4
|
+
data.tar.gz: e15c3a8915fc5569e2d9bd1daeef1f915d57f169e06bc6ccc2c9a5c4ed726f92
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 92bba7cc98963c1262f74a5f6b6dfe7bc10eb693aee5a933f8b5c923c6cd7eca0de25e9f295fdafcf302e9dbbb76ef12f5859c60c41485cd0f2e9a2d1298eb57
|
7
|
+
data.tar.gz: 83fdf26215642c81fe6894788498c7531af62b0fb67c0a76cd856401c1fb9d18dbd363ba505fd16fbf8883392d4b3643c76373e8ae062f835b120f34b4fd5145
|
data/.gitignore
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
*.gem
|
2
|
+
*.rbc
|
3
|
+
/.config
|
4
|
+
/coverage/
|
5
|
+
/InstalledFiles
|
6
|
+
/pkg/
|
7
|
+
/spec/reports/
|
8
|
+
/spec/examples.txt
|
9
|
+
/test/tmp/
|
10
|
+
/test/version_tmp/
|
11
|
+
/tmp/
|
12
|
+
|
13
|
+
## Specific to RubyMotion:
|
14
|
+
.dat*
|
15
|
+
.repl_history
|
16
|
+
build/
|
17
|
+
|
18
|
+
## Documentation cache and generated files:
|
19
|
+
/.yardoc/
|
20
|
+
/_yardoc/
|
21
|
+
/doc/
|
22
|
+
/rdoc/
|
23
|
+
|
24
|
+
## Environment normalization:
|
25
|
+
/.bundle/
|
26
|
+
/vendor/bundle
|
27
|
+
/lib/bundler/man/
|
28
|
+
|
29
|
+
# for a library or gem, you might want to ignore these files since the code is
|
30
|
+
# intended to run in multiple environments; otherwise, check them in:
|
31
|
+
Gemfile.lock
|
32
|
+
.ruby-version
|
33
|
+
.ruby-gemset
|
34
|
+
|
35
|
+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
36
|
+
.rvmrc
|
37
|
+
|
38
|
+
spec/rails-app/tmp
|
39
|
+
spec/rails-app/db
|
40
|
+
spec/rails-app/log
|
41
|
+
*.sqlite3DS_Store
|
42
|
+
|
43
|
+
initializers/authy.rb
|
44
|
+
.byebug_history
|
data/CHANGELOG.md
CHANGED
@@ -7,6 +7,17 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
7
7
|
|
8
8
|
## [Unreleased]
|
9
9
|
|
10
|
+
...
|
11
|
+
|
12
|
+
## [1.9.0] - 2018-09-04
|
13
|
+
|
14
|
+
### Fixed
|
15
|
+
- Generated migration now includes version number for Rails 5
|
16
|
+
|
17
|
+
### Changed
|
18
|
+
- Removes Jeweler in favour of administering the gemspec by hand
|
19
|
+
- Removes demo app files from gem package
|
20
|
+
|
10
21
|
## [1.8.3] - 2018-07-05
|
11
22
|
### Fixed
|
12
23
|
- Fixes Ruby interpolation in HAML for onetouch (thanks @muan)
|
data/Gemfile
CHANGED
@@ -1,17 +1,6 @@
|
|
1
1
|
source 'https://rubygems.org'
|
2
2
|
|
3
|
-
|
4
|
-
gem 'authy', ">= 2.7.2"
|
5
|
-
|
6
|
-
group :development do
|
7
|
-
gem 'rspec', '> 3.0.0'
|
8
|
-
gem 'yard', "~> 0.9.11"
|
9
|
-
gem 'rdoc'
|
10
|
-
gem 'bundler'
|
11
|
-
gem 'jeweler', '>= 2.0.1'
|
12
|
-
gem 'simplecov'
|
13
|
-
gem 'byebug'
|
14
|
-
end
|
3
|
+
gemspec
|
15
4
|
|
16
5
|
group :test do
|
17
6
|
gem 'rails', '~> 4.2.7'
|
data/README.md
CHANGED
@@ -5,7 +5,9 @@ This is a [Devise](https://github.com/plataformatec/devise) extension to add Two
|
|
5
5
|
|
6
6
|
## Pre-requisites
|
7
7
|
|
8
|
-
|
8
|
+
To use the Authy API you will need a Twilio Account, [sign up for a free account here](https://www.twilio.com/try-twilio).
|
9
|
+
|
10
|
+
Create an [Authy Application in the Twilio console](https://www.twilio.com/console/authy/applications) and take note of the API key.
|
9
11
|
|
10
12
|
## Demo
|
11
13
|
|
@@ -13,7 +15,7 @@ See [https://github.com/authy/authy-devise/tree/master/authy-devise-demo](https:
|
|
13
15
|
|
14
16
|
## Getting started
|
15
17
|
|
16
|
-
First get your Authy API key from [
|
18
|
+
First get your Authy API key from [the Twilio console](https://www.twilio.com/console/authy/applications). We recommend you store your API key as an environment variable.
|
17
19
|
|
18
20
|
```bash
|
19
21
|
$ export AUTHY_API_KEY=YOUR_AUTHY_API_KEY
|
@@ -139,7 +141,7 @@ session["user_authy_token_checked"]
|
|
139
141
|
|
140
142
|
## OneTouch support
|
141
143
|
|
142
|
-
To enable
|
144
|
+
To enable [Authy push authentication](https://www.twilio.com/authy/features/push), you need to modify the Devise config file `config/initializers/devise.rb` and add configuration:
|
143
145
|
|
144
146
|
```
|
145
147
|
config.authy_enable_onetouch = true
|
data/Rakefile
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
require 'rubygems'
|
4
4
|
require 'bundler'
|
5
|
+
require 'bundler/gem_tasks'
|
5
6
|
begin
|
6
7
|
Bundler.setup(:default, :development)
|
7
8
|
rescue Bundler::BundlerError => e
|
@@ -11,20 +12,6 @@ rescue Bundler::BundlerError => e
|
|
11
12
|
end
|
12
13
|
require 'rake'
|
13
14
|
|
14
|
-
require 'jeweler'
|
15
|
-
Jeweler::Tasks.new do |gem|
|
16
|
-
# gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
|
17
|
-
gem.name = "devise-authy"
|
18
|
-
gem.homepage = "https://github.com/authy/authy-devise"
|
19
|
-
gem.license = "MIT"
|
20
|
-
gem.summary = %Q{Authy plugin for Devise}
|
21
|
-
gem.description = %Q{Authy plugin for Devise}
|
22
|
-
gem.email = "support@authy.com"
|
23
|
-
gem.authors = ["Authy Inc."]
|
24
|
-
# dependencies defined in Gemfile
|
25
|
-
end
|
26
|
-
Jeweler::RubygemsDotOrgTasks.new
|
27
|
-
|
28
15
|
require 'rspec/core'
|
29
16
|
require 'rspec/core/rake_task'
|
30
17
|
RSpec::Core::RakeTask.new(:spec) do |spec|
|
data/devise-authy.gemspec
CHANGED
@@ -1,243 +1,40 @@
|
|
1
|
-
#
|
2
|
-
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
-
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: devise-authy 1.8.3 ruby lib
|
1
|
+
# frozen_string_literal: true
|
6
2
|
|
7
|
-
|
8
|
-
|
9
|
-
|
3
|
+
lib = File.expand_path("../lib", __FILE__)
|
4
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
+
require "devise-authy/version"
|
10
6
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
s.email = "support@authy.com".freeze
|
17
|
-
s.extra_rdoc_files = [
|
18
|
-
"LICENSE.txt",
|
19
|
-
"README.md"
|
20
|
-
]
|
21
|
-
s.files = [
|
22
|
-
".document",
|
23
|
-
".rspec",
|
24
|
-
".travis.yml",
|
25
|
-
"CHANGELOG.md",
|
26
|
-
"Gemfile",
|
27
|
-
"LICENSE.txt",
|
28
|
-
"README.md",
|
29
|
-
"Rakefile",
|
30
|
-
"VERSION",
|
31
|
-
"app/assets/javascripts/devise_authy.js",
|
32
|
-
"app/assets/stylesheets/devise_authy.css",
|
33
|
-
"app/assets/stylesheets/devise_authy.sass",
|
34
|
-
"app/controllers/devise/devise_authy_controller.rb",
|
35
|
-
"app/controllers/devise_authy/passwords_controller.rb",
|
36
|
-
"app/views/devise/enable_authy.html.erb",
|
37
|
-
"app/views/devise/enable_authy.html.haml",
|
38
|
-
"app/views/devise/verify_authy.html.erb",
|
39
|
-
"app/views/devise/verify_authy.html.haml",
|
40
|
-
"app/views/devise/verify_authy_installation.html.erb",
|
41
|
-
"app/views/devise/verify_authy_installation.html.haml",
|
42
|
-
"authy-devise-demo/.gitignore",
|
43
|
-
"authy-devise-demo/Gemfile",
|
44
|
-
"authy-devise-demo/Gemfile.lock",
|
45
|
-
"authy-devise-demo/README.md",
|
46
|
-
"authy-devise-demo/Rakefile",
|
47
|
-
"authy-devise-demo/app/assets/images/rails.png",
|
48
|
-
"authy-devise-demo/app/assets/javascripts/application.js",
|
49
|
-
"authy-devise-demo/app/assets/javascripts/devise_authy.js",
|
50
|
-
"authy-devise-demo/app/assets/javascripts/welcome.js.coffee",
|
51
|
-
"authy-devise-demo/app/assets/stylesheets/application.css",
|
52
|
-
"authy-devise-demo/app/assets/stylesheets/devise_authy.css",
|
53
|
-
"authy-devise-demo/app/assets/stylesheets/welcome.css.scss",
|
54
|
-
"authy-devise-demo/app/controllers/application_controller.rb",
|
55
|
-
"authy-devise-demo/app/controllers/welcome_controller.rb",
|
56
|
-
"authy-devise-demo/app/helpers/application_helper.rb",
|
57
|
-
"authy-devise-demo/app/helpers/welcome_helper.rb",
|
58
|
-
"authy-devise-demo/app/mailers/.gitkeep",
|
59
|
-
"authy-devise-demo/app/models/.gitkeep",
|
60
|
-
"authy-devise-demo/app/models/admin.rb",
|
61
|
-
"authy-devise-demo/app/models/user.rb",
|
62
|
-
"authy-devise-demo/app/views/devise/devise_authy/enable_authy.html.erb",
|
63
|
-
"authy-devise-demo/app/views/devise/devise_authy/verify_authy.html.erb",
|
64
|
-
"authy-devise-demo/app/views/devise/devise_authy/verify_authy_installation.html.erb",
|
65
|
-
"authy-devise-demo/app/views/layouts/application.html.erb",
|
66
|
-
"authy-devise-demo/app/views/welcome/admin_page.html.erb",
|
67
|
-
"authy-devise-demo/app/views/welcome/index.html.erb",
|
68
|
-
"authy-devise-demo/app/views/welcome/user_page.html.erb",
|
69
|
-
"authy-devise-demo/config.ru",
|
70
|
-
"authy-devise-demo/config/application.rb",
|
71
|
-
"authy-devise-demo/config/boot.rb",
|
72
|
-
"authy-devise-demo/config/database.yml",
|
73
|
-
"authy-devise-demo/config/environment.rb",
|
74
|
-
"authy-devise-demo/config/environments/development.rb",
|
75
|
-
"authy-devise-demo/config/environments/production.rb",
|
76
|
-
"authy-devise-demo/config/environments/test.rb",
|
77
|
-
"authy-devise-demo/config/initializers/authy.rb",
|
78
|
-
"authy-devise-demo/config/initializers/backtrace_silencers.rb",
|
79
|
-
"authy-devise-demo/config/initializers/devise.rb",
|
80
|
-
"authy-devise-demo/config/initializers/inflections.rb",
|
81
|
-
"authy-devise-demo/config/initializers/mime_types.rb",
|
82
|
-
"authy-devise-demo/config/initializers/secret_token.rb",
|
83
|
-
"authy-devise-demo/config/initializers/session_store.rb",
|
84
|
-
"authy-devise-demo/config/initializers/wrap_parameters.rb",
|
85
|
-
"authy-devise-demo/config/locales/devise.authy.en.yml",
|
86
|
-
"authy-devise-demo/config/locales/devise.en.yml",
|
87
|
-
"authy-devise-demo/config/locales/en.yml",
|
88
|
-
"authy-devise-demo/config/routes.rb",
|
89
|
-
"authy-devise-demo/config/secrets.yml",
|
90
|
-
"authy-devise-demo/db/migrate/20130409234357_devise_create_users.rb",
|
91
|
-
"authy-devise-demo/db/migrate/20141202000744_devise_create_admins.rb",
|
92
|
-
"authy-devise-demo/db/migrate/20141202004246_devise_authy_add_to_admins.rb",
|
93
|
-
"authy-devise-demo/db/migrate/20160906221739_add_sessions_table.rb",
|
94
|
-
"authy-devise-demo/db/schema.rb",
|
95
|
-
"authy-devise-demo/db/seeds.rb",
|
96
|
-
"authy-devise-demo/lib/assets/.gitkeep",
|
97
|
-
"authy-devise-demo/lib/tasks/.gitkeep",
|
98
|
-
"authy-devise-demo/log/.gitkeep",
|
99
|
-
"authy-devise-demo/public/404.html",
|
100
|
-
"authy-devise-demo/public/422.html",
|
101
|
-
"authy-devise-demo/public/500.html",
|
102
|
-
"authy-devise-demo/public/favicon.ico",
|
103
|
-
"authy-devise-demo/public/robots.txt",
|
104
|
-
"authy-devise-demo/script/rails",
|
105
|
-
"authy-devise-demo/test/fixtures/.gitkeep",
|
106
|
-
"authy-devise-demo/test/fixtures/users.yml",
|
107
|
-
"authy-devise-demo/test/functional/.gitkeep",
|
108
|
-
"authy-devise-demo/test/functional/welcome_controller_test.rb",
|
109
|
-
"authy-devise-demo/test/integration/.gitkeep",
|
110
|
-
"authy-devise-demo/test/performance/browsing_test.rb",
|
111
|
-
"authy-devise-demo/test/test_helper.rb",
|
112
|
-
"authy-devise-demo/test/unit/.gitkeep",
|
113
|
-
"authy-devise-demo/test/unit/helpers/welcome_helper_test.rb",
|
114
|
-
"authy-devise-demo/test/unit/user_test.rb",
|
115
|
-
"authy-devise-demo/vendor/assets/javascripts/.gitkeep",
|
116
|
-
"authy-devise-demo/vendor/assets/stylesheets/.gitkeep",
|
117
|
-
"authy-devise-demo/vendor/plugins/.gitkeep",
|
118
|
-
"config/locales/en.yml",
|
119
|
-
"devise-authy.gemspec",
|
120
|
-
"lib/devise-authy.rb",
|
121
|
-
"lib/devise-authy/controllers/helpers.rb",
|
122
|
-
"lib/devise-authy/controllers/view_helpers.rb",
|
123
|
-
"lib/devise-authy/hooks/authy_authenticatable.rb",
|
124
|
-
"lib/devise-authy/mapping.rb",
|
125
|
-
"lib/devise-authy/models/authy_authenticatable.rb",
|
126
|
-
"lib/devise-authy/models/authy_lockable.rb",
|
127
|
-
"lib/devise-authy/rails.rb",
|
128
|
-
"lib/devise-authy/routes.rb",
|
129
|
-
"lib/generators/active_record/devise_authy_generator.rb",
|
130
|
-
"lib/generators/active_record/templates/migration.rb",
|
131
|
-
"lib/generators/devise_authy/devise_authy_generator.rb",
|
132
|
-
"lib/generators/devise_authy/install_generator.rb",
|
133
|
-
"spec/controllers/devise_authy_controller_spec.rb",
|
134
|
-
"spec/controllers/passwords_controller_spec.rb",
|
135
|
-
"spec/features/authy_authenticatable_spec.rb",
|
136
|
-
"spec/features/authy_lockable_spec.rb",
|
137
|
-
"spec/generators_spec.rb",
|
138
|
-
"spec/models/authy_authenticatable_spec.rb",
|
139
|
-
"spec/models/authy_lockable_spec.rb",
|
140
|
-
"spec/orm/active_record.rb",
|
141
|
-
"spec/rails-app/Gemfile",
|
142
|
-
"spec/rails-app/Gemfile.lock",
|
143
|
-
"spec/rails-app/Rakefile",
|
144
|
-
"spec/rails-app/app/assets/images/rails.png",
|
145
|
-
"spec/rails-app/app/assets/javascripts/application.js",
|
146
|
-
"spec/rails-app/app/assets/javascripts/devise_authy.js",
|
147
|
-
"spec/rails-app/app/assets/javascripts/welcome.js",
|
148
|
-
"spec/rails-app/app/assets/stylesheets/application.css",
|
149
|
-
"spec/rails-app/app/assets/stylesheets/devise_authy.css",
|
150
|
-
"spec/rails-app/app/assets/stylesheets/welcome.css.scss",
|
151
|
-
"spec/rails-app/app/controllers/application_controller.rb",
|
152
|
-
"spec/rails-app/app/controllers/welcome_controller.rb",
|
153
|
-
"spec/rails-app/app/helpers/application_helper.rb",
|
154
|
-
"spec/rails-app/app/helpers/welcome_helper.rb",
|
155
|
-
"spec/rails-app/app/mailers/.gitkeep",
|
156
|
-
"spec/rails-app/app/models/.gitkeep",
|
157
|
-
"spec/rails-app/app/models/lockable_user.rb",
|
158
|
-
"spec/rails-app/app/models/user.rb",
|
159
|
-
"spec/rails-app/app/views/devise/devise_authy/enable_authy.html.erb",
|
160
|
-
"spec/rails-app/app/views/devise/devise_authy/verify_authy.html.erb",
|
161
|
-
"spec/rails-app/app/views/devise/devise_authy/verify_authy_installation.html.erb",
|
162
|
-
"spec/rails-app/app/views/layouts/application.html.erb",
|
163
|
-
"spec/rails-app/app/views/welcome/index.html.erb",
|
164
|
-
"spec/rails-app/config.ru",
|
165
|
-
"spec/rails-app/config/application.rb",
|
166
|
-
"spec/rails-app/config/boot.rb",
|
167
|
-
"spec/rails-app/config/database.yml",
|
168
|
-
"spec/rails-app/config/environment.rb",
|
169
|
-
"spec/rails-app/config/environments/development.rb",
|
170
|
-
"spec/rails-app/config/environments/production.rb",
|
171
|
-
"spec/rails-app/config/environments/test.rb",
|
172
|
-
"spec/rails-app/config/initializers/authy.rb",
|
173
|
-
"spec/rails-app/config/initializers/backtrace_silencers.rb",
|
174
|
-
"spec/rails-app/config/initializers/devise.rb",
|
175
|
-
"spec/rails-app/config/initializers/inflections.rb",
|
176
|
-
"spec/rails-app/config/initializers/mime_types.rb",
|
177
|
-
"spec/rails-app/config/initializers/secret_token.rb",
|
178
|
-
"spec/rails-app/config/initializers/session_store.rb",
|
179
|
-
"spec/rails-app/config/initializers/wrap_parameters.rb",
|
180
|
-
"spec/rails-app/config/locales/devise.authy.en.yml",
|
181
|
-
"spec/rails-app/config/locales/devise.en.yml",
|
182
|
-
"spec/rails-app/config/locales/en.yml",
|
183
|
-
"spec/rails-app/config/routes.rb",
|
184
|
-
"spec/rails-app/config/secrets.yml",
|
185
|
-
"spec/rails-app/db/development.sqlite3",
|
186
|
-
"spec/rails-app/db/migrate/20130419164907_devise_create_users.rb",
|
187
|
-
"spec/rails-app/db/migrate/20130419164936_devise_authy_add_to_users.rb",
|
188
|
-
"spec/rails-app/db/schema.rb",
|
189
|
-
"spec/rails-app/db/seeds.rb",
|
190
|
-
"spec/rails-app/lib/assets/.gitkeep",
|
191
|
-
"spec/rails-app/lib/tasks/.gitkeep",
|
192
|
-
"spec/rails-app/public/404.html",
|
193
|
-
"spec/rails-app/public/422.html",
|
194
|
-
"spec/rails-app/public/500.html",
|
195
|
-
"spec/rails-app/public/favicon.ico",
|
196
|
-
"spec/rails-app/public/robots.txt",
|
197
|
-
"spec/rails-app/script/rails",
|
198
|
-
"spec/routing/routes_spec.rb",
|
199
|
-
"spec/spec_helper.rb",
|
200
|
-
"spec/support/helpers.rb"
|
201
|
-
]
|
202
|
-
s.homepage = "https://github.com/authy/authy-devise".freeze
|
203
|
-
s.licenses = ["MIT".freeze]
|
204
|
-
s.rubygems_version = "2.7.6".freeze
|
205
|
-
s.summary = "Authy plugin for Devise".freeze
|
7
|
+
Gem::Specification.new do |spec|
|
8
|
+
spec.name = "devise-authy"
|
9
|
+
spec.version = DeviseAuthy::VERSION
|
10
|
+
spec.authors = ["Authy Inc."]
|
11
|
+
spec.email = ["support@authy.com"]
|
206
12
|
|
207
|
-
|
208
|
-
|
13
|
+
spec.summary = %q{Authy plugin for Devise.}
|
14
|
+
spec.description = %q{Authy plugin to add two factor authentication to Devise.}
|
15
|
+
spec.homepage = "https://github.com/authy/authy-devise"
|
16
|
+
spec.license = "MIT"
|
209
17
|
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
else
|
221
|
-
s.add_dependency(%q<devise>.freeze, [">= 3.0.0"])
|
222
|
-
s.add_dependency(%q<authy>.freeze, [">= 2.7.2"])
|
223
|
-
s.add_dependency(%q<rspec>.freeze, ["> 3.0.0"])
|
224
|
-
s.add_dependency(%q<yard>.freeze, ["~> 0.9.11"])
|
225
|
-
s.add_dependency(%q<rdoc>.freeze, [">= 0"])
|
226
|
-
s.add_dependency(%q<bundler>.freeze, [">= 0"])
|
227
|
-
s.add_dependency(%q<jeweler>.freeze, [">= 2.0.1"])
|
228
|
-
s.add_dependency(%q<simplecov>.freeze, [">= 0"])
|
229
|
-
s.add_dependency(%q<byebug>.freeze, [">= 0"])
|
230
|
-
end
|
231
|
-
else
|
232
|
-
s.add_dependency(%q<devise>.freeze, [">= 3.0.0"])
|
233
|
-
s.add_dependency(%q<authy>.freeze, [">= 2.7.2"])
|
234
|
-
s.add_dependency(%q<rspec>.freeze, ["> 3.0.0"])
|
235
|
-
s.add_dependency(%q<yard>.freeze, ["~> 0.9.11"])
|
236
|
-
s.add_dependency(%q<rdoc>.freeze, [">= 0"])
|
237
|
-
s.add_dependency(%q<bundler>.freeze, [">= 0"])
|
238
|
-
s.add_dependency(%q<jeweler>.freeze, [">= 2.0.1"])
|
239
|
-
s.add_dependency(%q<simplecov>.freeze, [">= 0"])
|
240
|
-
s.add_dependency(%q<byebug>.freeze, [">= 0"])
|
18
|
+
spec.metadata = {
|
19
|
+
"bug_tracker_uri" => "https://github.com/authy/authy-devise/issues",
|
20
|
+
"change_log_uri" => "https://github.com/authy/authy-devise/blob/master/CHANGELOG.md",
|
21
|
+
"documentation_uri" => "https://github.com/authy/authy-devise",
|
22
|
+
"homepage_uri" => "https://github.com/authy/authy-devise",
|
23
|
+
"source_code_uri" => "https://github.com/authy/authy-devise"
|
24
|
+
}
|
25
|
+
|
26
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
27
|
+
f.match(%r{^(test|spec|features|authy-devise-demo)/})
|
241
28
|
end
|
242
|
-
|
29
|
+
spec.require_paths = ["lib"]
|
243
30
|
|
31
|
+
spec.add_dependency "devise", ">= 3.0.0"
|
32
|
+
spec.add_dependency "authy", ">= 2.7.2"
|
33
|
+
|
34
|
+
spec.add_development_dependency "bundler", "~> 1.16"
|
35
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
36
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
37
|
+
spec.add_development_dependency "yard", "~> 0.9.11"
|
38
|
+
spec.add_development_dependency "rdoc", "~> 4.3.0"
|
39
|
+
spec.add_development_dependency "simplecov", "~> 0.16.1"
|
40
|
+
end
|
data/lib/devise-authy.rb
CHANGED
@@ -26,6 +26,7 @@ require 'devise-authy/routes'
|
|
26
26
|
require 'devise-authy/rails'
|
27
27
|
require 'devise-authy/models/authy_authenticatable'
|
28
28
|
require 'devise-authy/models/authy_lockable'
|
29
|
+
require 'devise-authy/version'
|
29
30
|
|
30
31
|
Devise.add_module :authy_authenticatable, :model => 'devise-authy/models/authy_authenticatable', :controller => :devise_authy, :route => :authy
|
31
32
|
Devise.add_module :authy_lockable, :model => 'devise-authy/models/authy_lockable'
|
@@ -6,7 +6,17 @@ module ActiveRecord
|
|
6
6
|
source_root File.expand_path("../templates", __FILE__)
|
7
7
|
|
8
8
|
def copy_devise_migration
|
9
|
-
migration_template "migration.rb", "db/migrate/devise_authy_add_to_#{table_name}.rb"
|
9
|
+
migration_template "migration.rb", "db/migrate/devise_authy_add_to_#{table_name}.rb", migration_version: migration_version
|
10
|
+
end
|
11
|
+
|
12
|
+
private
|
13
|
+
|
14
|
+
def rails5?
|
15
|
+
Rails.version.start_with? '5'
|
16
|
+
end
|
17
|
+
|
18
|
+
def migration_version
|
19
|
+
"[#{Rails::VERSION::MAJOR}.#{Rails::VERSION::MINOR}]" if rails5?
|
10
20
|
end
|
11
21
|
end
|
12
22
|
end
|