devise-multi_email 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +2 -1
- data/CHANGELOG.md +10 -0
- data/lib/devise/multi_email/models/authenticatable.rb +6 -5
- data/lib/devise/multi_email/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f0b7c3b802e2dbf7c076558cf966374bdefb51cf
|
4
|
+
data.tar.gz: 74bd4841d305d4ac830b92d7ad36006c1bb0cd7e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 271667919496037df8803fb80cb7850bc8c47c73f4b7824c9c5656d2ea1d2b7162b28c806df2d5180dc22a9fc2cb20f12e5e7d98f8817cac898b2e9a18f7d002
|
7
|
+
data.tar.gz: a0ea91f8e15f85a0152cec8b00a3d4679268148f87824137d05d71529eed5f2c2d4a8106900a6887853af78f1759b39ec4327716785865792f1a5330436bb10a
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
### 1.0.4 - 2016-08-13
|
2
|
+
* Bug fix: Case-insentive configuration of email is ignored (#1). Thanks to [@fonglh](https://github.com/fonglh).
|
3
|
+
|
4
|
+
### 1.0.3 - 2016-02-18
|
5
|
+
|
6
|
+
* Bug fix: Fix a wrong error message which shows "Email can't be blank" when email does not exist.
|
7
|
+
|
8
|
+
### 1.0.2 - 2016-01-12
|
9
|
+
|
10
|
+
First stable release.
|
@@ -59,11 +59,12 @@ module Devise
|
|
59
59
|
|
60
60
|
module ClassMethods
|
61
61
|
def find_first_by_auth_conditions(tainted_conditions, opts = {})
|
62
|
-
|
63
|
-
email =
|
62
|
+
filtered_conditions = devise_parameter_filter.filter(tainted_conditions.dup)
|
63
|
+
email = filtered_conditions.delete(:email)
|
64
|
+
|
64
65
|
if email && email.is_a?(String)
|
65
|
-
conditions =
|
66
|
-
|
66
|
+
conditions = filtered_conditions.to_h.merge(opts).
|
67
|
+
reverse_merge(emails: { email: email })
|
67
68
|
|
68
69
|
resource = joins(:emails).find_by(conditions)
|
69
70
|
resource.current_login_email = email if resource.respond_to?(:current_login_email=)
|
@@ -84,4 +85,4 @@ module Devise
|
|
84
85
|
end
|
85
86
|
end
|
86
87
|
end
|
87
|
-
end
|
88
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: devise-multi_email
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ALLEN WANG QIANG
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-08-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: devise
|
@@ -63,6 +63,7 @@ files:
|
|
63
63
|
- ".rspec"
|
64
64
|
- ".simplecov"
|
65
65
|
- ".travis.yml"
|
66
|
+
- CHANGELOG.md
|
66
67
|
- CODE_OF_CONDUCT.md
|
67
68
|
- Gemfile
|
68
69
|
- LICENSE.txt
|