devise 4.3.0 → 4.4.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of devise might be problematic. Click here for more details.

Files changed (215) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +10 -5
  3. data/CHANGELOG.md +20 -0
  4. data/Gemfile +2 -3
  5. data/Gemfile.lock +2 -3
  6. data/ISSUE_TEMPLATE.md +19 -0
  7. data/README.md +66 -2
  8. data/Rakefile +1 -0
  9. data/app/controllers/devise/confirmations_controller.rb +2 -0
  10. data/app/controllers/devise/omniauth_callbacks_controller.rb +3 -1
  11. data/app/controllers/devise/passwords_controller.rb +2 -0
  12. data/app/controllers/devise/registrations_controller.rb +5 -3
  13. data/app/controllers/devise/sessions_controller.rb +3 -1
  14. data/app/controllers/devise/unlocks_controller.rb +2 -0
  15. data/app/controllers/devise_controller.rb +2 -0
  16. data/app/helpers/devise_helper.rb +2 -0
  17. data/app/mailers/devise/mailer.rb +2 -0
  18. data/app/views/devise/confirmations/new.html.erb +1 -1
  19. data/app/views/devise/passwords/new.html.erb +1 -1
  20. data/app/views/devise/registrations/edit.html.erb +1 -1
  21. data/app/views/devise/registrations/new.html.erb +1 -1
  22. data/app/views/devise/sessions/new.html.erb +1 -1
  23. data/app/views/devise/unlocks/new.html.erb +1 -1
  24. data/devise.gemspec +2 -0
  25. data/gemfiles/Gemfile.rails-4.1-stable +3 -1
  26. data/gemfiles/Gemfile.rails-4.1-stable.lock +3 -3
  27. data/gemfiles/Gemfile.rails-4.2-stable +3 -1
  28. data/gemfiles/Gemfile.rails-4.2-stable.lock +3 -3
  29. data/gemfiles/Gemfile.rails-5.0-stable +2 -3
  30. data/gemfiles/Gemfile.rails-5.0-stable.lock +2 -3
  31. data/guides/bug_report_templates/integration_test.rb +2 -0
  32. data/lib/devise.rb +3 -1
  33. data/lib/devise/controllers/helpers.rb +7 -5
  34. data/lib/devise/controllers/rememberable.rb +2 -0
  35. data/lib/devise/controllers/scoped_views.rb +2 -0
  36. data/lib/devise/controllers/sign_in_out.rb +2 -0
  37. data/lib/devise/controllers/store_location.rb +24 -6
  38. data/lib/devise/controllers/url_helpers.rb +2 -0
  39. data/lib/devise/delegator.rb +2 -0
  40. data/lib/devise/encryptor.rb +2 -0
  41. data/lib/devise/failure_app.rb +2 -0
  42. data/lib/devise/hooks/activatable.rb +2 -0
  43. data/lib/devise/hooks/csrf_cleaner.rb +2 -0
  44. data/lib/devise/hooks/forgetable.rb +2 -0
  45. data/lib/devise/hooks/lockable.rb +2 -0
  46. data/lib/devise/hooks/proxy.rb +2 -0
  47. data/lib/devise/hooks/rememberable.rb +2 -0
  48. data/lib/devise/hooks/timeoutable.rb +2 -0
  49. data/lib/devise/hooks/trackable.rb +2 -0
  50. data/lib/devise/mailers/helpers.rb +2 -0
  51. data/lib/devise/mapping.rb +2 -0
  52. data/lib/devise/models.rb +2 -0
  53. data/lib/devise/models/authenticatable.rb +4 -2
  54. data/lib/devise/models/confirmable.rb +3 -1
  55. data/lib/devise/models/database_authenticatable.rb +3 -1
  56. data/lib/devise/models/lockable.rb +8 -2
  57. data/lib/devise/models/omniauthable.rb +2 -0
  58. data/lib/devise/models/recoverable.rb +2 -0
  59. data/lib/devise/models/registerable.rb +2 -0
  60. data/lib/devise/models/rememberable.rb +3 -1
  61. data/lib/devise/models/timeoutable.rb +2 -0
  62. data/lib/devise/models/trackable.rb +3 -1
  63. data/lib/devise/models/validatable.rb +3 -1
  64. data/lib/devise/modules.rb +2 -0
  65. data/lib/devise/omniauth.rb +2 -0
  66. data/lib/devise/omniauth/config.rb +2 -0
  67. data/lib/devise/omniauth/url_helpers.rb +2 -0
  68. data/lib/devise/orm/active_record.rb +2 -0
  69. data/lib/devise/orm/mongoid.rb +2 -0
  70. data/lib/devise/parameter_filter.rb +2 -0
  71. data/lib/devise/parameter_sanitizer.rb +2 -0
  72. data/lib/devise/rails.rb +2 -0
  73. data/lib/devise/rails/routes.rb +2 -0
  74. data/lib/devise/rails/warden_compat.rb +2 -0
  75. data/lib/devise/strategies/authenticatable.rb +2 -0
  76. data/lib/devise/strategies/base.rb +2 -0
  77. data/lib/devise/strategies/database_authenticatable.rb +2 -0
  78. data/lib/devise/strategies/rememberable.rb +2 -0
  79. data/lib/devise/test/controller_helpers.rb +2 -0
  80. data/lib/devise/test/integration_helpers.rb +2 -0
  81. data/lib/devise/test_helpers.rb +2 -0
  82. data/lib/devise/time_inflector.rb +2 -0
  83. data/lib/devise/token_generator.rb +2 -0
  84. data/lib/devise/version.rb +3 -1
  85. data/lib/generators/active_record/devise_generator.rb +15 -2
  86. data/lib/generators/active_record/templates/migration.rb +3 -1
  87. data/lib/generators/active_record/templates/migration_existing.rb +2 -0
  88. data/lib/generators/devise/controllers_generator.rb +2 -0
  89. data/lib/generators/devise/devise_generator.rb +4 -2
  90. data/lib/generators/devise/install_generator.rb +2 -0
  91. data/lib/generators/devise/orm_helpers.rb +7 -1
  92. data/lib/generators/devise/views_generator.rb +7 -8
  93. data/lib/generators/mongoid/devise_generator.rb +2 -0
  94. data/lib/generators/templates/controllers/confirmations_controller.rb +2 -0
  95. data/lib/generators/templates/controllers/omniauth_callbacks_controller.rb +2 -0
  96. data/lib/generators/templates/controllers/passwords_controller.rb +2 -0
  97. data/lib/generators/templates/controllers/registrations_controller.rb +2 -0
  98. data/lib/generators/templates/controllers/sessions_controller.rb +2 -0
  99. data/lib/generators/templates/controllers/unlocks_controller.rb +2 -0
  100. data/lib/generators/templates/devise.rb +2 -0
  101. data/test/controllers/custom_registrations_controller_test.rb +2 -0
  102. data/test/controllers/custom_strategy_test.rb +2 -0
  103. data/test/controllers/helper_methods_test.rb +2 -0
  104. data/test/controllers/helpers_test.rb +2 -0
  105. data/test/controllers/inherited_controller_i18n_messages_test.rb +2 -0
  106. data/test/controllers/internal_helpers_test.rb +2 -0
  107. data/test/controllers/load_hooks_controller_test.rb +2 -0
  108. data/test/controllers/passwords_controller_test.rb +2 -0
  109. data/test/controllers/sessions_controller_test.rb +2 -0
  110. data/test/controllers/url_helpers_test.rb +2 -0
  111. data/test/delegator_test.rb +2 -0
  112. data/test/devise_test.rb +2 -0
  113. data/test/failure_app_test.rb +2 -0
  114. data/test/generators/active_record_generator_test.rb +47 -0
  115. data/test/generators/controllers_generator_test.rb +2 -0
  116. data/test/generators/devise_generator_test.rb +2 -0
  117. data/test/generators/install_generator_test.rb +2 -0
  118. data/test/generators/mongoid_generator_test.rb +2 -0
  119. data/test/generators/views_generator_test.rb +2 -0
  120. data/test/helpers/devise_helper_test.rb +2 -0
  121. data/test/integration/authenticatable_test.rb +15 -1
  122. data/test/integration/confirmable_test.rb +2 -0
  123. data/test/integration/database_authenticatable_test.rb +2 -0
  124. data/test/integration/http_authenticatable_test.rb +2 -0
  125. data/test/integration/lockable_test.rb +5 -3
  126. data/test/integration/mounted_engine_test.rb +2 -0
  127. data/test/integration/omniauthable_test.rb +2 -0
  128. data/test/integration/recoverable_test.rb +2 -0
  129. data/test/integration/registerable_test.rb +2 -0
  130. data/test/integration/rememberable_test.rb +2 -0
  131. data/test/integration/timeoutable_test.rb +2 -0
  132. data/test/integration/trackable_test.rb +2 -0
  133. data/test/mailers/confirmation_instructions_test.rb +2 -0
  134. data/test/mailers/email_changed_test.rb +2 -0
  135. data/test/mailers/mailer_test.rb +2 -0
  136. data/test/mailers/reset_password_instructions_test.rb +2 -0
  137. data/test/mailers/unlock_instructions_test.rb +2 -0
  138. data/test/mapping_test.rb +2 -0
  139. data/test/models/authenticatable_test.rb +2 -0
  140. data/test/models/confirmable_test.rb +2 -0
  141. data/test/models/database_authenticatable_test.rb +2 -0
  142. data/test/models/lockable_test.rb +2 -0
  143. data/test/models/omniauthable_test.rb +2 -0
  144. data/test/models/recoverable_test.rb +2 -0
  145. data/test/models/registerable_test.rb +2 -0
  146. data/test/models/rememberable_test.rb +2 -0
  147. data/test/models/serializable_test.rb +6 -0
  148. data/test/models/timeoutable_test.rb +2 -0
  149. data/test/models/trackable_test.rb +11 -0
  150. data/test/models/validatable_test.rb +4 -2
  151. data/test/models_test.rb +2 -0
  152. data/test/omniauth/config_test.rb +2 -0
  153. data/test/omniauth/url_helpers_test.rb +2 -0
  154. data/test/orm/active_record.rb +2 -0
  155. data/test/orm/mongoid.rb +3 -1
  156. data/test/parameter_sanitizer_test.rb +2 -0
  157. data/test/rails_app/app/active_record/admin.rb +2 -0
  158. data/test/rails_app/app/active_record/shim.rb +2 -0
  159. data/test/rails_app/app/active_record/user.rb +4 -0
  160. data/test/rails_app/app/active_record/user_on_engine.rb +2 -0
  161. data/test/rails_app/app/active_record/user_on_main_app.rb +2 -0
  162. data/test/rails_app/app/active_record/user_with_validations.rb +12 -0
  163. data/test/rails_app/app/active_record/user_without_email.rb +2 -0
  164. data/test/rails_app/app/controllers/admins/sessions_controller.rb +2 -0
  165. data/test/rails_app/app/controllers/admins_controller.rb +2 -0
  166. data/test/rails_app/app/controllers/application_controller.rb +2 -0
  167. data/test/rails_app/app/controllers/application_with_fake_engine.rb +2 -0
  168. data/test/rails_app/app/controllers/custom/registrations_controller.rb +2 -0
  169. data/test/rails_app/app/controllers/home_controller.rb +2 -0
  170. data/test/rails_app/app/controllers/publisher/registrations_controller.rb +2 -0
  171. data/test/rails_app/app/controllers/publisher/sessions_controller.rb +2 -0
  172. data/test/rails_app/app/controllers/users/omniauth_callbacks_controller.rb +2 -0
  173. data/test/rails_app/app/controllers/users_controller.rb +2 -0
  174. data/test/rails_app/app/helpers/application_helper.rb +2 -0
  175. data/test/rails_app/app/mailers/users/from_proc_mailer.rb +2 -0
  176. data/test/rails_app/app/mailers/users/mailer.rb +2 -0
  177. data/test/rails_app/app/mailers/users/reply_to_mailer.rb +2 -0
  178. data/test/rails_app/app/mongoid/admin.rb +2 -0
  179. data/test/rails_app/app/mongoid/shim.rb +2 -0
  180. data/test/rails_app/app/mongoid/user.rb +2 -0
  181. data/test/rails_app/app/mongoid/user_on_engine.rb +2 -0
  182. data/test/rails_app/app/mongoid/user_on_main_app.rb +2 -0
  183. data/test/rails_app/app/mongoid/user_with_validations.rb +37 -0
  184. data/test/rails_app/app/mongoid/user_without_email.rb +2 -0
  185. data/test/rails_app/config/application.rb +2 -0
  186. data/test/rails_app/config/boot.rb +2 -0
  187. data/test/rails_app/config/environment.rb +2 -0
  188. data/test/rails_app/config/environments/development.rb +2 -0
  189. data/test/rails_app/config/environments/production.rb +2 -0
  190. data/test/rails_app/config/environments/test.rb +2 -0
  191. data/test/rails_app/config/initializers/backtrace_silencers.rb +2 -0
  192. data/test/rails_app/config/initializers/devise.rb +2 -0
  193. data/test/rails_app/config/initializers/inflections.rb +2 -0
  194. data/test/rails_app/config/initializers/secret_token.rb +2 -0
  195. data/test/rails_app/config/initializers/session_store.rb +2 -0
  196. data/test/rails_app/config/routes.rb +2 -0
  197. data/test/rails_app/db/migrate/20100401102949_create_tables.rb +2 -0
  198. data/test/rails_app/db/schema.rb +2 -0
  199. data/test/rails_app/lib/shared_admin.rb +2 -0
  200. data/test/rails_app/lib/shared_user.rb +2 -0
  201. data/test/rails_app/lib/shared_user_without_email.rb +2 -0
  202. data/test/rails_app/lib/shared_user_without_omniauth.rb +2 -0
  203. data/test/rails_test.rb +2 -0
  204. data/test/routes_test.rb +2 -0
  205. data/test/support/action_controller/record_identifier.rb +2 -0
  206. data/test/support/assertions.rb +2 -0
  207. data/test/support/helpers.rb +6 -0
  208. data/test/support/http_method_compatibility.rb +2 -0
  209. data/test/support/integration.rb +2 -0
  210. data/test/support/webrat/integrations/rails.rb +2 -0
  211. data/test/test/controller_helpers_test.rb +2 -0
  212. data/test/test/integration_helpers_test.rb +2 -0
  213. data/test/test_helper.rb +2 -0
  214. data/test/test_models.rb +2 -0
  215. metadata +8 -3
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "shared_user_without_email"
2
4
 
3
5
  class UserWithoutEmail < ActiveRecord::Base
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class Admins::SessionsController < Devise::SessionsController
2
4
  def new
3
5
  flash[:special] = "Welcome to #{controller_path.inspect} controller!"
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class AdminsController < ApplicationController
2
4
  before_action :authenticate_admin!
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Filters added to this controller apply to all controllers in the application.
2
4
  # Likewise, all the methods added will be available for all controllers.
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class ApplicationWithFakeEngine < ApplicationController
2
4
  private
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class Custom::RegistrationsController < Devise::RegistrationsController
2
4
  def new
3
5
  super do |resource|
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class HomeController < ApplicationController
2
4
  def index
3
5
  end
@@ -1,2 +1,4 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class Publisher::RegistrationsController < ApplicationController
2
4
  end
@@ -1,2 +1,4 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class Publisher::SessionsController < ApplicationController
2
4
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController
2
4
  def facebook
3
5
  data = request.respond_to?(:get_header) ? request.get_header("omniauth.auth") : request.env["omniauth.auth"]
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class UsersController < ApplicationController
2
4
  prepend_before_action :current_user, only: :exhibit
3
5
  before_action :authenticate_user!, except: [:accept, :exhibit]
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Methods added to this helper will be available to all templates in the application.
2
4
  module ApplicationHelper
3
5
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class Users::FromProcMailer < Devise::Mailer
2
4
  default from: proc { 'custom@example.com' }
3
5
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class Users::Mailer < Devise::Mailer
2
4
  default from: 'custom@example.com'
3
5
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class Users::ReplyToMailer < Devise::Mailer
2
4
  default from: 'custom@example.com'
3
5
  default reply_to: 'custom_reply_to@example.com'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'shared_admin'
2
4
 
3
5
  class Admin
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Shim
2
4
  extend ::ActiveSupport::Concern
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'shared_user'
2
4
 
3
5
  class User
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'shared_user_without_omniauth'
2
4
 
3
5
  class UserOnEngine
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'shared_user_without_omniauth'
2
4
 
3
5
  class UserOnMainApp
@@ -0,0 +1,37 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "shared_user"
4
+
5
+ class UserWithValidations
6
+ include Mongoid::Document
7
+ include Shim
8
+ include SharedUser
9
+
10
+ field :username, type: String
11
+ field :facebook_token, type: String
12
+
13
+ ## Database authenticatable
14
+ field :email, type: String, default: ""
15
+ field :encrypted_password, type: String, default: ""
16
+
17
+ ## Recoverable
18
+ field :reset_password_token, type: String
19
+ field :reset_password_sent_at, type: Time
20
+
21
+ ## Rememberable
22
+ field :remember_created_at, type: Time
23
+
24
+ ## Trackable
25
+ field :sign_in_count, type: Integer, default: 0
26
+ field :current_sign_in_at, type: Time
27
+ field :last_sign_in_at, type: Time
28
+ field :current_sign_in_ip, type: String
29
+ field :last_sign_in_ip, type: String
30
+
31
+ ## Lockable
32
+ field :failed_attempts, type: Integer, default: 0 # Only if lock strategy is :failed_attempts
33
+ field :unlock_token, type: String # Only if unlock strategy is :email or :both
34
+ field :locked_at, type: Time
35
+
36
+ validates :email, presence: true
37
+ end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "shared_user_without_email"
2
4
 
3
5
  class UserWithoutEmail
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require File.expand_path('../boot', __FILE__)
2
4
 
3
5
  require "action_controller/railtie"
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  unless defined?(DEVISE_ORM)
2
4
  DEVISE_ORM = (ENV["DEVISE_ORM"] || :active_record).to_sym
3
5
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Load the rails application.
2
4
  require File.expand_path('../application', __FILE__)
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  RailsApp::Application.configure do
2
4
  # Settings specified here will take precedence over those in config/application.rb.
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  RailsApp::Application.configure do
2
4
  # Settings specified here will take precedence over those in config/application.rb.
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  RailsApp::Application.configure do
2
4
  # Settings specified here will take precedence over those in config/application.rb.
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Be sure to restart your server when you modify this file.
2
4
 
3
5
  # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "omniauth-facebook"
2
4
  require "omniauth-openid"
3
5
 
@@ -1,2 +1,4 @@
1
+ # frozen_string_literal: true
2
+
1
3
  ActiveSupport::Inflector.inflections do |inflect|
2
4
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  config = Rails.application.config
2
4
 
3
5
  config.secret_key_base = 'd588e99efff13a86461fd6ab82327823ad2f8feb5dc217ce652cdd9f0dfc5eb4b5a62a92d24d2574d7d51dfb1ea8dd453ea54e00cf672159a13104a135422a10'
@@ -1 +1,3 @@
1
+ # frozen_string_literal: true
2
+
1
3
  RailsApp::Application.config.session_store :cookie_store, key: '_rails_app_session'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  Rails.application.routes.draw do
2
4
  # Resources for testing
3
5
  resources :users, only: [:index] do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  superclass = ActiveRecord::Migration
2
4
  # TODO: Inherit from the 5.0 Migration class directly when we drop support for Rails 4.
3
5
  superclass = ActiveRecord::Migration[5.0] if superclass.respond_to?(:[])
@@ -1,4 +1,6 @@
1
1
  # encoding: UTF-8
2
+ # frozen_string_literal: true
3
+
2
4
  # This file is auto-generated from the current state of the database. Instead
3
5
  # of editing this file, please use the migrations feature of Active Record to
4
6
  # incrementally modify your database, and then regenerate this schema definition.
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module SharedAdmin
2
4
  extend ActiveSupport::Concern
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module SharedUser
2
4
  extend ActiveSupport::Concern
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module SharedUserWithoutEmail
2
4
  extend ActiveSupport::Concern
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module SharedUserWithoutOmniauth
2
4
  extend ActiveSupport::Concern
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'test_helper'
2
4
 
3
5
  class RailsTest < ActiveSupport::TestCase
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'test_helper'
2
4
 
3
5
  ExpectedRoutingError = MiniTest::Assertion
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Since webrat uses ActionController::RecordIdentifier class that was moved to
2
4
  # ActionView namespace in Rails 4.1+
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'active_support/test_case'
2
4
 
3
5
  class ActiveSupport::TestCase
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'active_support/test_case'
2
4
 
3
5
  class ActiveSupport::TestCase
@@ -50,6 +52,10 @@ class ActiveSupport::TestCase
50
52
  UserWithoutEmail.create!(valid_attributes(attributes))
51
53
  end
52
54
 
55
+ def create_user_with_validations(attributes={})
56
+ UserWithValidations.create!(valid_attributes(attributes))
57
+ end
58
+
53
59
  # Execute the block setting the given values and restoring old values after
54
60
  # the block is executed.
55
61
  def swap(object, new_values)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Devise
2
4
  class IntegrationTest < ActionDispatch::IntegrationTest
3
5
  # %w( get post patch put head delete xml_http_request
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'action_dispatch/testing/integration'
2
4
 
3
5
  class ActionDispatch::IntegrationTest
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'webrat/core/elements/form'
2
4
  require 'action_dispatch/testing/integration'
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'test_helper'
2
4
 
3
5
  class TestControllerHelpersTest < Devise::ControllerTestCase
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'test_helper'
2
4
 
3
5
  class TestIntegrationsHelpersTest < Devise::IntegrationTest
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  ENV["RAILS_ENV"] = "test"
2
4
  DEVISE_ORM = (ENV["DEVISE_ORM"] || :active_record).to_sym
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class Configurable < User
2
4
  devise :database_authenticatable, :confirmable, :rememberable, :timeoutable, :lockable,
3
5
  stretches: 15, pepper: 'abcdef', allow_unconfirmed_access_for: 5.days,
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: devise
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.3.0
4
+ version: 4.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - José Valim
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-05-15 00:00:00.000000000 Z
12
+ date: 2017-12-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: warden
@@ -101,6 +101,7 @@ files:
101
101
  - CONTRIBUTING.md
102
102
  - Gemfile
103
103
  - Gemfile.lock
104
+ - ISSUE_TEMPLATE.md
104
105
  - MIT-LICENSE
105
106
  - README.md
106
107
  - Rakefile
@@ -282,6 +283,7 @@ files:
282
283
  - test/rails_app/app/active_record/user.rb
283
284
  - test/rails_app/app/active_record/user_on_engine.rb
284
285
  - test/rails_app/app/active_record/user_on_main_app.rb
286
+ - test/rails_app/app/active_record/user_with_validations.rb
285
287
  - test/rails_app/app/active_record/user_without_email.rb
286
288
  - test/rails_app/app/controllers/admins/sessions_controller.rb
287
289
  - test/rails_app/app/controllers/admins_controller.rb
@@ -302,6 +304,7 @@ files:
302
304
  - test/rails_app/app/mongoid/user.rb
303
305
  - test/rails_app/app/mongoid/user_on_engine.rb
304
306
  - test/rails_app/app/mongoid/user_on_main_app.rb
307
+ - test/rails_app/app/mongoid/user_with_validations.rb
305
308
  - test/rails_app/app/mongoid/user_without_email.rb
306
309
  - test/rails_app/app/views/admins/index.html.erb
307
310
  - test/rails_app/app/views/admins/sessions/new.html.erb
@@ -376,7 +379,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
376
379
  version: '0'
377
380
  requirements: []
378
381
  rubyforge_project:
379
- rubygems_version: 2.6.10
382
+ rubygems_version: 2.6.8
380
383
  signing_key:
381
384
  specification_version: 4
382
385
  summary: Flexible authentication solution for Rails with Warden
@@ -443,6 +446,7 @@ test_files:
443
446
  - test/rails_app/app/active_record/user.rb
444
447
  - test/rails_app/app/active_record/user_on_engine.rb
445
448
  - test/rails_app/app/active_record/user_on_main_app.rb
449
+ - test/rails_app/app/active_record/user_with_validations.rb
446
450
  - test/rails_app/app/active_record/user_without_email.rb
447
451
  - test/rails_app/app/controllers/admins/sessions_controller.rb
448
452
  - test/rails_app/app/controllers/admins_controller.rb
@@ -463,6 +467,7 @@ test_files:
463
467
  - test/rails_app/app/mongoid/user.rb
464
468
  - test/rails_app/app/mongoid/user_on_engine.rb
465
469
  - test/rails_app/app/mongoid/user_on_main_app.rb
470
+ - test/rails_app/app/mongoid/user_with_validations.rb
466
471
  - test/rails_app/app/mongoid/user_without_email.rb
467
472
  - test/rails_app/app/views/admins/index.html.erb
468
473
  - test/rails_app/app/views/admins/sessions/new.html.erb