has_more_secure_token 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -6
- data/lib/has_more_secure_token/version.rb +1 -1
- data/lib/has_more_secure_token.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7143feae905e92eeb181a6eeb47ab280daf148c5e2e0f39b3b3aa9b7129d1b57
|
4
|
+
data.tar.gz: a68832fb4205238450a2c3fe19f96cbc13a2797ad7ab493e39e4d1aadcb98a7d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fe01eff667be0a0ee783eb09c4c1ba952e26dfd8848f4f6165735a3a22509276f80363be0a29eeeb8d0ca50ca108be10799f94884fc4942efea9cd15d202c416
|
7
|
+
data.tar.gz: d2f73e58007f3b0bbacbbd0982515dbbadd3f50518c7f58e08da69474a07c8c4c4b464e8fed635007f6fb7da58f59923451751f94983eaa398c7d56322162d61
|
data/README.md
CHANGED
@@ -1,13 +1,9 @@
|
|
1
|
-
#
|
1
|
+
# Has More Secure Token
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/has_more_secure_token`. To experiment with that code, run `bin/console` for an interactive prompt.
|
3
|
+
Find-by-digest extensions for ActiveRecord's `has_secure_token`.
|
6
4
|
|
7
5
|
## Installation
|
8
6
|
|
9
|
-
TODO: Replace `has_more_secure_token` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
|
10
|
-
|
11
7
|
Install the gem and add to the application's Gemfile by executing:
|
12
8
|
|
13
9
|
$ bundle add has_more_secure_token
|
@@ -27,7 +27,7 @@ module HasMoreSecureToken
|
|
27
27
|
openssl_digest = OpenSSL::Digest.new(digest)
|
28
28
|
|
29
29
|
# An arel node that matches the format of the digest in the index.
|
30
|
-
token_arel = arel_token_digest(attribute,
|
30
|
+
token_arel = arel_token_digest(attribute, digest)
|
31
31
|
|
32
32
|
define_singleton_method(:"find_by_#{attribute}") do |token|
|
33
33
|
# Short-circuit to avoid the database query if the token is obviously invalid.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: has_more_secure_token
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Minty Fresh
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-09-
|
11
|
+
date: 2023-09-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -161,7 +161,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
161
161
|
- !ruby/object:Gem::Version
|
162
162
|
version: '0'
|
163
163
|
requirements: []
|
164
|
-
rubygems_version: 3.4.
|
164
|
+
rubygems_version: 3.4.12
|
165
165
|
signing_key:
|
166
166
|
specification_version: 4
|
167
167
|
summary: Time-safe finders for ActiveRecord's has_secure_token.
|