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.
Files changed (157) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +44 -0
  3. data/CHANGELOG.md +11 -0
  4. data/Gemfile +1 -12
  5. data/README.md +5 -3
  6. data/Rakefile +1 -14
  7. data/devise-authy.gemspec +34 -237
  8. data/lib/devise-authy.rb +1 -0
  9. data/lib/devise-authy/version.rb +5 -0
  10. data/lib/generators/active_record/devise_authy_generator.rb +11 -1
  11. data/lib/generators/active_record/templates/migration.rb +1 -1
  12. metadata +42 -195
  13. data/VERSION +0 -1
  14. data/authy-devise-demo/.gitignore +0 -15
  15. data/authy-devise-demo/Gemfile +0 -51
  16. data/authy-devise-demo/Gemfile.lock +0 -194
  17. data/authy-devise-demo/README.md +0 -64
  18. data/authy-devise-demo/Rakefile +0 -7
  19. data/authy-devise-demo/app/assets/images/rails.png +0 -0
  20. data/authy-devise-demo/app/assets/javascripts/application.js +0 -15
  21. data/authy-devise-demo/app/assets/javascripts/devise_authy.js +0 -12
  22. data/authy-devise-demo/app/assets/javascripts/welcome.js.coffee +0 -3
  23. data/authy-devise-demo/app/assets/stylesheets/application.css +0 -13
  24. data/authy-devise-demo/app/assets/stylesheets/devise_authy.css +0 -26
  25. data/authy-devise-demo/app/assets/stylesheets/welcome.css.scss +0 -3
  26. data/authy-devise-demo/app/controllers/application_controller.rb +0 -3
  27. data/authy-devise-demo/app/controllers/welcome_controller.rb +0 -15
  28. data/authy-devise-demo/app/helpers/application_helper.rb +0 -2
  29. data/authy-devise-demo/app/helpers/welcome_helper.rb +0 -2
  30. data/authy-devise-demo/app/mailers/.gitkeep +0 -0
  31. data/authy-devise-demo/app/models/.gitkeep +0 -0
  32. data/authy-devise-demo/app/models/admin.rb +0 -7
  33. data/authy-devise-demo/app/models/user.rb +0 -7
  34. data/authy-devise-demo/app/views/devise/devise_authy/enable_authy.html.erb +0 -7
  35. data/authy-devise-demo/app/views/devise/devise_authy/verify_authy.html.erb +0 -38
  36. data/authy-devise-demo/app/views/devise/devise_authy/verify_authy_installation.html.erb +0 -10
  37. data/authy-devise-demo/app/views/layouts/application.html.erb +0 -28
  38. data/authy-devise-demo/app/views/welcome/admin_page.html.erb +0 -12
  39. data/authy-devise-demo/app/views/welcome/index.html.erb +0 -5
  40. data/authy-devise-demo/app/views/welcome/user_page.html.erb +0 -5
  41. data/authy-devise-demo/config.ru +0 -4
  42. data/authy-devise-demo/config/application.rb +0 -26
  43. data/authy-devise-demo/config/boot.rb +0 -6
  44. data/authy-devise-demo/config/database.yml +0 -25
  45. data/authy-devise-demo/config/environment.rb +0 -5
  46. data/authy-devise-demo/config/environments/development.rb +0 -43
  47. data/authy-devise-demo/config/environments/production.rb +0 -79
  48. data/authy-devise-demo/config/environments/test.rb +0 -42
  49. data/authy-devise-demo/config/initializers/authy.rb +0 -1
  50. data/authy-devise-demo/config/initializers/backtrace_silencers.rb +0 -7
  51. data/authy-devise-demo/config/initializers/devise.rb +0 -240
  52. data/authy-devise-demo/config/initializers/inflections.rb +0 -15
  53. data/authy-devise-demo/config/initializers/mime_types.rb +0 -5
  54. data/authy-devise-demo/config/initializers/secret_token.rb +0 -7
  55. data/authy-devise-demo/config/initializers/session_store.rb +0 -8
  56. data/authy-devise-demo/config/initializers/wrap_parameters.rb +0 -14
  57. data/authy-devise-demo/config/locales/devise.authy.en.yml +0 -24
  58. data/authy-devise-demo/config/locales/devise.en.yml +0 -58
  59. data/authy-devise-demo/config/locales/en.yml +0 -5
  60. data/authy-devise-demo/config/routes.rb +0 -65
  61. data/authy-devise-demo/config/secrets.yml +0 -22
  62. data/authy-devise-demo/db/migrate/20130409234357_devise_create_users.rb +0 -46
  63. data/authy-devise-demo/db/migrate/20141202000744_devise_create_admins.rb +0 -46
  64. data/authy-devise-demo/db/migrate/20141202004246_devise_authy_add_to_admins.rb +0 -21
  65. data/authy-devise-demo/db/migrate/20160906221739_add_sessions_table.rb +0 -12
  66. data/authy-devise-demo/db/schema.rb +0 -72
  67. data/authy-devise-demo/db/seeds.rb +0 -7
  68. data/authy-devise-demo/lib/assets/.gitkeep +0 -0
  69. data/authy-devise-demo/lib/tasks/.gitkeep +0 -0
  70. data/authy-devise-demo/log/.gitkeep +0 -0
  71. data/authy-devise-demo/public/404.html +0 -26
  72. data/authy-devise-demo/public/422.html +0 -26
  73. data/authy-devise-demo/public/500.html +0 -25
  74. data/authy-devise-demo/public/favicon.ico +0 -0
  75. data/authy-devise-demo/public/robots.txt +0 -5
  76. data/authy-devise-demo/script/rails +0 -6
  77. data/authy-devise-demo/test/fixtures/.gitkeep +0 -0
  78. data/authy-devise-demo/test/fixtures/users.yml +0 -11
  79. data/authy-devise-demo/test/functional/.gitkeep +0 -0
  80. data/authy-devise-demo/test/functional/welcome_controller_test.rb +0 -9
  81. data/authy-devise-demo/test/integration/.gitkeep +0 -0
  82. data/authy-devise-demo/test/performance/browsing_test.rb +0 -12
  83. data/authy-devise-demo/test/test_helper.rb +0 -13
  84. data/authy-devise-demo/test/unit/.gitkeep +0 -0
  85. data/authy-devise-demo/test/unit/helpers/welcome_helper_test.rb +0 -4
  86. data/authy-devise-demo/test/unit/user_test.rb +0 -7
  87. data/authy-devise-demo/vendor/assets/javascripts/.gitkeep +0 -0
  88. data/authy-devise-demo/vendor/assets/stylesheets/.gitkeep +0 -0
  89. data/authy-devise-demo/vendor/plugins/.gitkeep +0 -0
  90. data/spec/controllers/devise_authy_controller_spec.rb +0 -360
  91. data/spec/controllers/passwords_controller_spec.rb +0 -48
  92. data/spec/features/authy_authenticatable_spec.rb +0 -108
  93. data/spec/features/authy_lockable_spec.rb +0 -70
  94. data/spec/generators_spec.rb +0 -32
  95. data/spec/models/authy_authenticatable_spec.rb +0 -17
  96. data/spec/models/authy_lockable_spec.rb +0 -81
  97. data/spec/orm/active_record.rb +0 -4
  98. data/spec/rails-app/Gemfile +0 -10
  99. data/spec/rails-app/Gemfile.lock +0 -141
  100. data/spec/rails-app/Rakefile +0 -7
  101. data/spec/rails-app/app/assets/images/rails.png +0 -0
  102. data/spec/rails-app/app/assets/javascripts/application.js +0 -15
  103. data/spec/rails-app/app/assets/javascripts/devise_authy.js +0 -12
  104. data/spec/rails-app/app/assets/javascripts/welcome.js +0 -2
  105. data/spec/rails-app/app/assets/stylesheets/application.css +0 -13
  106. data/spec/rails-app/app/assets/stylesheets/devise_authy.css +0 -26
  107. data/spec/rails-app/app/assets/stylesheets/welcome.css.scss +0 -3
  108. data/spec/rails-app/app/controllers/application_controller.rb +0 -3
  109. data/spec/rails-app/app/controllers/welcome_controller.rb +0 -13
  110. data/spec/rails-app/app/helpers/application_helper.rb +0 -2
  111. data/spec/rails-app/app/helpers/welcome_helper.rb +0 -2
  112. data/spec/rails-app/app/mailers/.gitkeep +0 -0
  113. data/spec/rails-app/app/models/.gitkeep +0 -0
  114. data/spec/rails-app/app/models/lockable_user.rb +0 -7
  115. data/spec/rails-app/app/models/user.rb +0 -8
  116. data/spec/rails-app/app/views/devise/devise_authy/enable_authy.html.erb +0 -7
  117. data/spec/rails-app/app/views/devise/devise_authy/verify_authy.html.erb +0 -37
  118. data/spec/rails-app/app/views/devise/devise_authy/verify_authy_installation.html.erb +0 -10
  119. data/spec/rails-app/app/views/layouts/application.html.erb +0 -28
  120. data/spec/rails-app/app/views/welcome/index.html.erb +0 -5
  121. data/spec/rails-app/config.ru +0 -4
  122. data/spec/rails-app/config/application.rb +0 -30
  123. data/spec/rails-app/config/boot.rb +0 -6
  124. data/spec/rails-app/config/database.yml +0 -25
  125. data/spec/rails-app/config/environment.rb +0 -5
  126. data/spec/rails-app/config/environments/development.rb +0 -43
  127. data/spec/rails-app/config/environments/production.rb +0 -79
  128. data/spec/rails-app/config/environments/test.rb +0 -44
  129. data/spec/rails-app/config/initializers/authy.rb +0 -2
  130. data/spec/rails-app/config/initializers/backtrace_silencers.rb +0 -7
  131. data/spec/rails-app/config/initializers/devise.rb +0 -256
  132. data/spec/rails-app/config/initializers/inflections.rb +0 -15
  133. data/spec/rails-app/config/initializers/mime_types.rb +0 -5
  134. data/spec/rails-app/config/initializers/secret_token.rb +0 -7
  135. data/spec/rails-app/config/initializers/session_store.rb +0 -8
  136. data/spec/rails-app/config/initializers/wrap_parameters.rb +0 -14
  137. data/spec/rails-app/config/locales/devise.authy.en.yml +0 -24
  138. data/spec/rails-app/config/locales/devise.en.yml +0 -59
  139. data/spec/rails-app/config/locales/en.yml +0 -5
  140. data/spec/rails-app/config/routes.rb +0 -8
  141. data/spec/rails-app/config/secrets.yml +0 -22
  142. data/spec/rails-app/db/development.sqlite3 +0 -0
  143. data/spec/rails-app/db/migrate/20130419164907_devise_create_users.rb +0 -46
  144. data/spec/rails-app/db/migrate/20130419164936_devise_authy_add_to_users.rb +0 -18
  145. data/spec/rails-app/db/schema.rb +0 -41
  146. data/spec/rails-app/db/seeds.rb +0 -7
  147. data/spec/rails-app/lib/assets/.gitkeep +0 -0
  148. data/spec/rails-app/lib/tasks/.gitkeep +0 -0
  149. data/spec/rails-app/public/404.html +0 -26
  150. data/spec/rails-app/public/422.html +0 -26
  151. data/spec/rails-app/public/500.html +0 -25
  152. data/spec/rails-app/public/favicon.ico +0 -0
  153. data/spec/rails-app/public/robots.txt +0 -5
  154. data/spec/rails-app/script/rails +0 -6
  155. data/spec/routing/routes_spec.rb +0 -35
  156. data/spec/spec_helper.rb +0 -46
  157. data/spec/support/helpers.rb +0 -80
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dfe2b507c6ec983ff3cf4cc7d3410eaacb77dc89ec35ae819047155629ce5807
4
- data.tar.gz: c1d8b34ecf10a707e492c06782fa5bd8b75a620d9524f601d9ba7e0baf7e291b
3
+ metadata.gz: a7b900c9c0f1ae4ac68e680d75876c3d4344a11a4f7a36c920f8e8db34e0c2c3
4
+ data.tar.gz: e15c3a8915fc5569e2d9bd1daeef1f915d57f169e06bc6ccc2c9a5c4ed726f92
5
5
  SHA512:
6
- metadata.gz: b81fc8c513a5ffe555baa28535a227ad4e1428ea15e5b5a9bcea461b7c18eb8cd05a8a27d3ee5c30ee04a06f0c5a08c9483e660199ed6123e9f369a16b277bb5
7
- data.tar.gz: a91cb3e6d2c093d9884de68394d1101e036d3a76ab8d54d340037882ab23ae278c8e0dbd2ff773be84ce47299db0629f190eb248e333e6c921f5001274d9f022
6
+ metadata.gz: 92bba7cc98963c1262f74a5f6b6dfe7bc10eb693aee5a933f8b5c923c6cd7eca0de25e9f295fdafcf302e9dbbb76ef12f5859c60c41485cd0f2e9a2d1298eb57
7
+ data.tar.gz: 83fdf26215642c81fe6894788498c7531af62b0fb67c0a76cd856401c1fb9d18dbd363ba505fd16fbf8883392d4b3643c76373e8ae062f835b120f34b4fd5145
@@ -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
@@ -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
- gem 'devise', '>= 3.0.0'
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
- Get an Authy API Key: [https://www.authy.com/signup](https://www.authy.com/signup)
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 [https://www.authy.com/signup](https://www.authy.com/signup). We recommend you store your API key as an environment variable.
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 the OneTouch feature, you need to modify the Devise config file `config/initializers/devise.rb` and add configuration:
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|
@@ -1,243 +1,40 @@
1
- # Generated by jeweler
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
- Gem::Specification.new do |s|
8
- s.name = "devise-authy".freeze
9
- s.version = "1.8.3"
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
- s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
12
- s.require_paths = ["lib".freeze]
13
- s.authors = ["Authy Inc.".freeze]
14
- s.date = "2018-07-05"
15
- s.description = "Authy plugin for Devise".freeze
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
- if s.respond_to? :specification_version then
208
- s.specification_version = 4
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
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
211
- s.add_runtime_dependency(%q<devise>.freeze, [">= 3.0.0"])
212
- s.add_runtime_dependency(%q<authy>.freeze, [">= 2.7.2"])
213
- s.add_development_dependency(%q<rspec>.freeze, ["> 3.0.0"])
214
- s.add_development_dependency(%q<yard>.freeze, ["~> 0.9.11"])
215
- s.add_development_dependency(%q<rdoc>.freeze, [">= 0"])
216
- s.add_development_dependency(%q<bundler>.freeze, [">= 0"])
217
- s.add_development_dependency(%q<jeweler>.freeze, [">= 2.0.1"])
218
- s.add_development_dependency(%q<simplecov>.freeze, [">= 0"])
219
- s.add_development_dependency(%q<byebug>.freeze, [">= 0"])
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
- end
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
@@ -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'
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module DeviseAuthy
4
+ VERSION = '1.9.0'
5
+ end
@@ -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