mirror of
https://github.com/heartcombo/devise.git
synced 2026-01-09 23:58:06 -05:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e55c9caa05 | ||
|
|
0f8695dd4b | ||
|
|
d9deeba582 | ||
|
|
d1948b79d3 | ||
|
|
371d657e35 | ||
|
|
82087ce211 | ||
|
|
463351922f |
@@ -1,5 +1,12 @@
|
||||
### Unreleased
|
||||
|
||||
### 4.4.1 - 2018-01-23
|
||||
|
||||
* bug fixes
|
||||
* Ensure Gemspec is loaded as utf-8. (by @segiddins)
|
||||
* Fix `ActiveRecord` check on `Confirmable`. (by @tegon)
|
||||
* Fix `signed_in?` docs without running auth hooks. by (@machty)
|
||||
|
||||
### 4.4.0 - 2017-12-29
|
||||
|
||||
* enhancements
|
||||
|
||||
@@ -10,7 +10,7 @@ GIT
|
||||
PATH
|
||||
remote: .
|
||||
specs:
|
||||
devise (4.4.0)
|
||||
devise (4.4.1)
|
||||
bcrypt (~> 3.0)
|
||||
orm_adapter (~> 0.1)
|
||||
railties (>= 4.1.0, < 5.2)
|
||||
@@ -190,4 +190,4 @@ DEPENDENCIES
|
||||
webrat (= 0.7.3)
|
||||
|
||||
BUNDLED WITH
|
||||
1.15.3
|
||||
1.16.0
|
||||
|
||||
@@ -674,6 +674,6 @@ https://github.com/plataformatec/devise/graphs/contributors
|
||||
|
||||
## License
|
||||
|
||||
MIT License. Copyright 2009-2017 Plataformatec. http://plataformatec.com.br
|
||||
MIT License. Copyright 2009-2018 Plataformatec. http://plataformatec.com.br
|
||||
|
||||
You are not granted rights or licenses to the trademarks of Plataformatec, including without limitation the Devise name or logo.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
# frozen_string_literal: true
|
||||
|
||||
# -*- encoding: utf-8 -*-
|
||||
$:.push File.expand_path("../lib", __FILE__)
|
||||
require "devise/version"
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ GIT
|
||||
PATH
|
||||
remote: ..
|
||||
specs:
|
||||
devise (4.4.0)
|
||||
devise (4.4.1)
|
||||
bcrypt (~> 3.0)
|
||||
orm_adapter (~> 0.1)
|
||||
railties (>= 4.1.0, < 5.2)
|
||||
@@ -168,4 +168,4 @@ DEPENDENCIES
|
||||
webrat (= 0.7.3)
|
||||
|
||||
BUNDLED WITH
|
||||
1.15.3
|
||||
1.16.0
|
||||
|
||||
@@ -57,7 +57,7 @@ GIT
|
||||
PATH
|
||||
remote: ..
|
||||
specs:
|
||||
devise (4.4.0)
|
||||
devise (4.4.1)
|
||||
bcrypt (~> 3.0)
|
||||
orm_adapter (~> 0.1)
|
||||
railties (>= 4.1.0, < 5.2)
|
||||
@@ -189,4 +189,4 @@ DEPENDENCIES
|
||||
webrat (= 0.7.3)
|
||||
|
||||
BUNDLED WITH
|
||||
1.15.3
|
||||
1.16.0
|
||||
|
||||
@@ -10,7 +10,7 @@ GIT
|
||||
PATH
|
||||
remote: ..
|
||||
specs:
|
||||
devise (4.4.0)
|
||||
devise (4.4.1)
|
||||
bcrypt (~> 3.0)
|
||||
orm_adapter (~> 0.1)
|
||||
railties (>= 4.1.0, < 5.2)
|
||||
@@ -189,4 +189,4 @@ DEPENDENCIES
|
||||
webrat (= 0.7.3)
|
||||
|
||||
BUNDLED WITH
|
||||
1.15.3
|
||||
1.16.0
|
||||
|
||||
@@ -6,7 +6,10 @@ module Devise
|
||||
# Included by default in all controllers.
|
||||
module SignInOut
|
||||
# Return true if the given scope is signed in session. If no scope given, return
|
||||
# true if any scope is signed in. Does not run authentication hooks.
|
||||
# true if any scope is signed in. This will run authentication hooks, which may
|
||||
# cause exceptions to be thrown from this method; if you simply want to check
|
||||
# if a scope has already previously been authenticated without running
|
||||
# authentication hooks, you can directly call `warden.authenticated?(scope: scope)`
|
||||
def signed_in?(scope=nil)
|
||||
[scope || Devise.mappings.keys].flatten.any? do |_scope|
|
||||
warden.authenticate?(scope: _scope)
|
||||
|
||||
@@ -48,7 +48,7 @@ module Devise
|
||||
included do
|
||||
before_create :generate_confirmation_token, if: :confirmation_required?
|
||||
after_create :skip_reconfirmation_in_callback!, if: :send_confirmation_notification?
|
||||
if defined?(ActiveRecord) && self.is_a?(ActiveRecord::Base) # ActiveRecord
|
||||
if defined?(ActiveRecord) && self < ActiveRecord::Base # ActiveRecord
|
||||
after_commit :send_on_create_confirmation_instructions, on: :create, if: :send_confirmation_notification?
|
||||
after_commit :send_reconfirmation_instructions, on: :update, if: :reconfirmation_required?
|
||||
else # Mongoid
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Devise
|
||||
VERSION = "4.4.0".freeze
|
||||
VERSION = "4.4.1".freeze
|
||||
end
|
||||
|
||||
@@ -8,6 +8,17 @@ class ConfirmableTest < ActiveSupport::TestCase
|
||||
setup_mailer
|
||||
end
|
||||
|
||||
test 'should set callbacks to send the mail' do
|
||||
if DEVISE_ORM == :active_record
|
||||
defined_callbacks = User._commit_callbacks.map(&:filter)
|
||||
assert_includes defined_callbacks, :send_on_create_confirmation_instructions
|
||||
assert_includes defined_callbacks, :send_reconfirmation_instructions
|
||||
elsif DEVISE_ORM == :mongoid
|
||||
assert_includes User._create_callbacks.map(&:filter), :send_on_create_confirmation_instructions
|
||||
assert_includes User._update_callbacks.map(&:filter), :send_reconfirmation_instructions
|
||||
end
|
||||
end
|
||||
|
||||
test 'should generate confirmation token after creating a record' do
|
||||
assert_nil new_user.confirmation_token
|
||||
assert_not_nil create_user.confirmation_token
|
||||
|
||||
Reference in New Issue
Block a user