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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 54e34de9390dbf1565102871c5e30612cbd57203415b267a52dff7cc3facb56f
4
- data.tar.gz: 6164572a64e581f39dffa0109019afcc6c5c0e31d98c661431b588750550b38c
3
+ metadata.gz: 7143feae905e92eeb181a6eeb47ab280daf148c5e2e0f39b3b3aa9b7129d1b57
4
+ data.tar.gz: a68832fb4205238450a2c3fe19f96cbc13a2797ad7ab493e39e4d1aadcb98a7d
5
5
  SHA512:
6
- metadata.gz: 8b0c9801b204fa69d5251e9804b69349ff3bcc10596851567d6ed5881a41f899f76a4f3be2e3c282cf1a540f75ccd3350e606fdd2f002520da7f78c268b34036
7
- data.tar.gz: acc4980052214b93b6f19de44050efdfd89527a00353a9019737c9ffa66c29d67af805dd7e4dbc0beae11881194d1bdc0f2922afe6bfa7f0e85c3d1030af653f
6
+ metadata.gz: fe01eff667be0a0ee783eb09c4c1ba952e26dfd8848f4f6165735a3a22509276f80363be0a29eeeb8d0ca50ca108be10799f94884fc4942efea9cd15d202c416
7
+ data.tar.gz: d2f73e58007f3b0bbacbbd0982515dbbadd3f50518c7f58e08da69474a07c8c4c4b464e8fed635007f6fb7da58f59923451751f94983eaa398c7d56322162d61
data/README.md CHANGED
@@ -1,13 +1,9 @@
1
- # HasMoreSecureToken
1
+ # Has More Secure Token
2
2
 
3
- TODO: Delete this and the text below, and describe your gem
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module HasMoreSecureToken
4
- VERSION = '0.1.0'
4
+ VERSION = '0.1.1'
5
5
  end
@@ -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, openssl_digest.name)
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.0
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-01 00:00:00.000000000 Z
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.13
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.