tachiban 0.7.0 → 0.8.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
  SHA256:
3
- metadata.gz: 6a4772cbc2387fbc462f6fd7f0bb3e1738521e1ede9a4d8b02e6cda05ab9ffc1
4
- data.tar.gz: 16069ee6e897992462ce538ec514fdeef1c2798014f573265e293e15603f8b42
3
+ metadata.gz: d18cad68d32567d0d583c417d817bd6980861ad662a505afd97cdfefe1c71f09
4
+ data.tar.gz: 720f7cb6014086b2de126283248ed728fabf003a9aa76772798b4e9ee3fbef33
5
5
  SHA512:
6
- metadata.gz: d8d446ac3dd3f8762154859b8a32369d2e92a8eeb570a05bffdb8bc9674ed1676d288c8e71a1666887beda650e91db0c98becf306db4f097ff9ff00f1defac60
7
- data.tar.gz: 4745b414ecf91bb84564b54febbab5febcd1c40d0e0df454140286b454b9af5938546a91da8f3f17ae7612a598eeada823f5e8616d8fc8377a90383089c36db6
6
+ metadata.gz: bb298b0167b10f277c44ef4383c5d28e2e231e1a3ea731aca592c662afca362a42bbc25e55a854c1c330fef750b9d641ec26031a5a8cc412e312168f02ca86c1
7
+ data.tar.gz: cde4bc49bbef7f438732aff48502daabd750862a8fcf9d1feea9b5495e49e0f45b09952a292ef0ac105467981ec207ea186e3e36728be509528a271ad905718e
data/README.md CHANGED
@@ -176,13 +176,18 @@ by the link validity: `Time.now > @user.password_reset_sent_at + link_validity`
176
176
  password_reset_url_valid?(link_validity)
177
177
  ```
178
178
 
179
+ ### Example of use in an application
180
+ [Using Tachiban with a Hanami app](https://sebastjan-hribar.github.io/programming/2021/09/03/tachiban-with-hanami.html)
179
181
 
180
- ### ToDo
181
-
182
- - Add full Hanami app for testing purposes.
183
182
 
184
183
  ### Changelog
185
184
 
185
+ #### 0.8.0
186
+
187
+ Bug fix for determining the validity of the password update linke. Greater than instead of less than was used
188
+ to compare the time of the reset link email and the time when the user tries to update the password.
189
+
190
+
186
191
  #### 0.7.0
187
192
 
188
193
  Authorization was moved to a separate gem [Rokku](https://github.com/sebastjan-hribar/rokku).
@@ -1,3 +1,3 @@
1
1
  module Tachiban
2
- VERSION = "0.7.0"
2
+ VERSION = "0.8.0"
3
3
  end
data/lib/tachiban.rb CHANGED
@@ -133,7 +133,7 @@ private
133
133
 
134
134
  # State the link_validity in seconds.
135
135
  def password_reset_url_valid?(link_validity)
136
- Time.now > @user.password_reset_sent_at + link_validity
136
+ Time.now < @user.password_reset_sent_at + link_validity
137
137
  end
138
138
  end
139
139
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tachiban
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sebastjan Hribar
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-02-02 00:00:00.000000000 Z
11
+ date: 2021-09-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler