rails_jwt_auth 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a5288fa0196f845970d373d2052b248c3ce4b6b1
4
- data.tar.gz: 1c2b2389f9f5505e9752f405e6a474e13ff561e9
3
+ metadata.gz: 9589fdf911fced81b12de566e8f9927bdc12ce9d
4
+ data.tar.gz: a4be03afd54584155a7f0d5a99ac818abb0b83cb
5
5
  SHA512:
6
- metadata.gz: 8ca458720a5fa7f3f61ded128e6e88e2970ce07ad4c1e74c9a2512f638516eee6084db1901e9329400f5004803dca6e5c098227d562885ca4213d440b30ab52a
7
- data.tar.gz: 408539140efb35dc7282567d9736eea1bdd5d5134542d0616b84b0c86c143f9f4710d2bb2c3849437a776dd2eea47dccc7fcaa7a42819db2f3a044757644705e
6
+ metadata.gz: 208a716cd5ca4cb040e4d05d90ddd98135c0911be40ba7745a7e1be595ed86ee99766209d318f42277911506bed667d6c9fef60cd32677cec0a45ee3bd433d7c
7
+ data.tar.gz: bc03c6fe5c4209dce482f26c3fe400d6720f2057592bb0c78b944212ea69e6165a4422ca7240cc99b65512323c981a2e1f90a182441879546d14d37e70eb18e6
data/README.md CHANGED
@@ -294,7 +294,7 @@ Password api is defined by RailsJwtAuth::PasswordsController.
294
294
 
295
295
  ```js
296
296
  {
297
- url: host/confirmation,
297
+ url: host/password,
298
298
  method: POST,
299
299
  data: {
300
300
  email: "user@example.com"
@@ -306,7 +306,7 @@ Password api is defined by RailsJwtAuth::PasswordsController.
306
306
 
307
307
  ```js
308
308
  {
309
- url: host/confirmation,
309
+ url: host/password,
310
310
  method: PUT,
311
311
  data: {
312
312
  reset_password_token: "token",
@@ -7,9 +7,11 @@ if defined?(ActionMailer)
7
7
  @user = user
8
8
 
9
9
  if RailsJwtAuth.confirmation_url
10
- url = URI.parse(RailsJwtAuth.confirmation_url)
11
- url.query = [url.query, "confirmation_token=#{@user.confirmation_token}"].compact.join('&')
12
- @confirmation_url = url.to_s
10
+ url, params = RailsJwtAuth.confirmation_url.split('?')
11
+ params = params ? params.split('&') : []
12
+ params.push("confirmation_token=#{@user.confirmation_token}")
13
+
14
+ @confirmation_url = "#{url}?#{params.join('&')}"
13
15
  else
14
16
  @confirmation_url = confirmation_url(confirmation_token: @user.confirmation_token)
15
17
  end
@@ -23,9 +25,11 @@ if defined?(ActionMailer)
23
25
  @user = user
24
26
 
25
27
  if RailsJwtAuth.reset_password_url
26
- url = URI.parse(RailsJwtAuth.reset_password_url)
27
- url.query = [url.query, "reset_password_token=#{@user.reset_password_token}"].compact.join('&')
28
- @reset_password_url = url.to_s
28
+ url, params = RailsJwtAuth.reset_password_url.split('?')
29
+ params = params ? params.split('&') : []
30
+ params.push("reset_password_token=#{@user.reset_password_token}")
31
+
32
+ @reset_password_url = "#{url}?#{params.join('&')}"
29
33
  else
30
34
  @reset_password_url = password_url(reset_password_token: @user.reset_password_token)
31
35
  end
@@ -2,4 +2,4 @@
2
2
 
3
3
  <p>You can confirm your account email through the link below:</p>
4
4
 
5
- <p><%= link_to 'Confirm my account', @confirmation_url %></p>
5
+ <p><%= link_to 'Confirm my account', @confirmation_url.html_safe %></p>
@@ -2,7 +2,7 @@
2
2
 
3
3
  <p>Someone has requested a link to change your password. You can do this through the link below.</p>
4
4
 
5
- <p><%= link_to 'Change my password', @reset_password_url %></p>
5
+ <p><%= link_to 'Change my password', @reset_password_url.html_safe %></p>
6
6
 
7
7
  <p>If you didn't request this, please ignore this email.</p>
8
8
  <p>Your password won't change until you access the link above and create a new one.</p>
@@ -1,3 +1,3 @@
1
1
  module RailsJwtAuth
2
- VERSION = '0.2.0'
2
+ VERSION = '0.2.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_jwt_auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - rjurado
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-23 00:00:00.000000000 Z
11
+ date: 2017-02-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails