devise_security_extension 0.9.2 → 0.10.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +39 -0
  3. data/.rubocop.yml +38 -0
  4. data/Gemfile +1 -5
  5. data/Gemfile.lock +144 -141
  6. data/README.md +37 -11
  7. data/Rakefile +13 -29
  8. data/app/controllers/devise/paranoid_verification_code_controller.rb +42 -0
  9. data/app/controllers/devise/password_expired_controller.rb +16 -7
  10. data/app/views/devise/paranoid_verification_code/show.html.erb +10 -0
  11. data/config/locales/de.yml +2 -0
  12. data/config/locales/en.yml +6 -4
  13. data/config/locales/it.yml +10 -0
  14. data/devise_security_extension.gemspec +24 -104
  15. data/lib/devise_security_extension.rb +18 -8
  16. data/lib/devise_security_extension/controllers/helpers.rb +39 -6
  17. data/lib/devise_security_extension/hooks/paranoid_verification.rb +5 -0
  18. data/lib/devise_security_extension/hooks/session_limitable.rb +1 -0
  19. data/lib/devise_security_extension/models/paranoid_verification.rb +35 -0
  20. data/lib/devise_security_extension/models/password_archivable.rb +3 -7
  21. data/lib/devise_security_extension/models/password_expirable.rb +9 -5
  22. data/lib/devise_security_extension/patches/confirmations_controller_captcha.rb +3 -1
  23. data/lib/devise_security_extension/patches/confirmations_controller_security_question.rb +3 -1
  24. data/lib/devise_security_extension/patches/passwords_controller_captcha.rb +3 -1
  25. data/lib/devise_security_extension/patches/passwords_controller_security_question.rb +3 -1
  26. data/lib/devise_security_extension/patches/registrations_controller_captcha.rb +5 -3
  27. data/lib/devise_security_extension/patches/sessions_controller_captcha.rb +5 -3
  28. data/lib/devise_security_extension/patches/unlocks_controller_captcha.rb +3 -1
  29. data/lib/devise_security_extension/patches/unlocks_controller_security_question.rb +3 -1
  30. data/lib/devise_security_extension/routes.rb +4 -0
  31. data/lib/devise_security_extension/version.rb +3 -0
  32. data/lib/generators/devise_security_extension/install_generator.rb +16 -33
  33. data/lib/generators/templates/devise_security_extension.rb +38 -0
  34. data/test/dummy/Rakefile +6 -0
  35. data/test/dummy/app/controllers/application_controller.rb +2 -0
  36. data/test/dummy/app/controllers/foos_controller.rb +0 -0
  37. data/test/dummy/app/models/user.rb +2 -1
  38. data/test/dummy/app/views/foos/index.html.erb +0 -0
  39. data/test/dummy/config/application.rb +4 -2
  40. data/test/dummy/config/boot.rb +1 -1
  41. data/test/dummy/config/environments/test.rb +4 -2
  42. data/test/dummy/config/initializers/devise.rb +4 -4
  43. data/test/dummy/config/routes.rb +6 -0
  44. data/test/dummy/config/secrets.yml +3 -0
  45. data/test/dummy/db/migrate/20120508165529_create_tables.rb +4 -4
  46. data/test/dummy/db/migrate/20150402165590_add_verification_columns.rb +11 -0
  47. data/test/dummy/db/migrate/20150407162345_add_verification_attempt_column.rb +9 -0
  48. data/test/test_helper.rb +10 -0
  49. data/test/test_install_generator.rb +16 -0
  50. data/test/test_paranoid_verification.rb +124 -0
  51. data/test/test_password_archivable.rb +35 -21
  52. data/test/test_password_expired_controller.rb +24 -0
  53. metadata +104 -34
  54. data/VERSION +0 -1
  55. data/lib/devise_security_extension/models/security_question.rb +0 -3
  56. data/test/helper.rb +0 -22
  57. data/test/test_devise_security_extension.rb +0 -6
data/VERSION DELETED
@@ -1 +0,0 @@
1
- 0.9.2
@@ -1,3 +0,0 @@
1
- class SecurityQuestion < ActiveRecord::Base
2
-
3
- end
@@ -1,22 +0,0 @@
1
- ENV['RAILS_ENV'] ||= 'test'
2
-
3
- require 'rubygems'
4
- require 'bundler'
5
- begin
6
- Bundler.setup(:default, :development)
7
- rescue Bundler::BundlerError => e
8
- $stderr.puts e.message
9
- $stderr.puts "Run `bundle install` to install missing gems"
10
- exit e.status_code
11
- end
12
- require 'test/unit'
13
-
14
- $LOAD_PATH.unshift(File.dirname(__FILE__))
15
- $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
16
- require 'devise_security_extension'
17
-
18
- require_relative 'dummy/config/environment'
19
-
20
- ActiveRecord::Migration.verbose = false
21
- ActiveRecord::Base.logger = Logger.new(nil)
22
- ActiveRecord::Migrator.migrate(File.expand_path('../dummy/db/migrate', __FILE__))
@@ -1,6 +0,0 @@
1
- require 'helper'
2
-
3
- class TestDeviseSecurityExtension < Test::Unit::TestCase
4
- def test_something_for_real
5
- end
6
- end