token_authenticate_me 0.5.7 → 0.6.0
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 335a9e636eed767d73c726efbab33ae3ab92241f
|
4
|
+
data.tar.gz: ff36f8fdd86b29d26a1f8af6213a3ac9d5e9ee14
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bfab316dbc8efa72f6661623262e7c55d983fc27e82010e5e5b8761ebacff19a85f284f92c08bc11bb81f0a69bd0c65a9d8b80ac82f1c615a3fd3a8fc8383620
|
7
|
+
data.tar.gz: 6917cb2e8de37e7530bd5958ac4ea992f24393169ae77b5e8e591b93045a41ac0fe0853c53e9e81b0c59c94ef5f1516767185acba058b190165fedd6e47b79ac
|
@@ -1,10 +1,8 @@
|
|
1
1
|
Hi <%= @email %>
|
2
2
|
=================================
|
3
3
|
|
4
|
-
<p>
|
5
4
|
Someone has requested a link to change your password, but we
|
6
5
|
do not have account associated with this email.
|
7
|
-
</p>
|
8
6
|
|
9
7
|
To create a new account, please go to the url below to create a new account.
|
10
8
|
|
@@ -18,13 +18,17 @@ module TokenAuthenticateMe
|
|
18
18
|
def create
|
19
19
|
@user = User.find_by_email(params[:email])
|
20
20
|
|
21
|
-
if
|
22
|
-
|
21
|
+
if (/@/ =~ params[:email]) == nil
|
22
|
+
render status: 422, json: { errors: { email: ['The email address is invalid'] } }
|
23
23
|
else
|
24
|
-
|
25
|
-
|
24
|
+
if @user
|
25
|
+
send_valid_reset_email(@user)
|
26
|
+
else
|
27
|
+
send_invalid_reset_email(params[:email])
|
28
|
+
end
|
26
29
|
|
27
|
-
|
30
|
+
render status: 204, nothing: true
|
31
|
+
end
|
28
32
|
end
|
29
33
|
|
30
34
|
# Allow user to reset password when the token is valid
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: token_authenticate_me
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Clopton
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-07-
|
12
|
+
date: 2017-07-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|