snuffleupagus 0.3.3 → 0.4.1
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 +4 -4
- data/.github/workflows/test.yml +1 -1
- data/.rubocop.yml +2 -2
- data/CHANGELOG.md +4 -0
- data/Gemfile +1 -0
- data/lib/snuffleupagus/auth_token.rb +4 -3
- data/lib/snuffleupagus/version.rb +1 -1
- data/snuffleupagus.gemspec +1 -1
- metadata +6 -9
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3552471357753a34328d351900148c7ef44d89799d4024d1c4ffebf898e7f7b3
|
|
4
|
+
data.tar.gz: 3c212b0a7711de58af1770e90894305f0bf6ee0b19142b6dc128710b70cc5a51
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 43bbd89fa6cd557915e3b4ea1a5a9d2c02d1ac69dceb0973389f8f5ce9d0c117f04155438ea18f033256b1e371399d97da3b47c8ed2ca1b1cd851ae53bc817d9
|
|
7
|
+
data.tar.gz: 95bde22a42221719cc3a4506635b68779ea131b98a13ac9ee3607747efb20a1254c2c5e4d2c6fe3b6c66a1b218d55abcce955bb4f483cd332f32fb71a24013d2
|
data/.github/workflows/test.yml
CHANGED
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
|
@@ -22,6 +22,10 @@ module Snuffleupagus
|
|
|
22
22
|
# #=> true
|
|
23
23
|
#
|
|
24
24
|
class AuthToken
|
|
25
|
+
CONSTANT = 'date:'
|
|
26
|
+
MAX_VALID_TIME_DIFFERENCE = 120 # tokens are only valid for 2 minutes
|
|
27
|
+
private_constant :CONSTANT, :MAX_VALID_TIME_DIFFERENCE
|
|
28
|
+
|
|
25
29
|
def initialize(key)
|
|
26
30
|
@key = key
|
|
27
31
|
@cipher = OpenSSL::Cipher.new('aes-256-cbc')
|
|
@@ -45,9 +49,6 @@ module Snuffleupagus
|
|
|
45
49
|
|
|
46
50
|
private
|
|
47
51
|
|
|
48
|
-
CONSTANT = 'date:'
|
|
49
|
-
MAX_VALID_TIME_DIFFERENCE = 120 # tokens are only valid for 2 minutes
|
|
50
|
-
|
|
51
52
|
attr_reader :cipher
|
|
52
53
|
|
|
53
54
|
def encrypt(data)
|
data/snuffleupagus.gemspec
CHANGED
|
@@ -13,7 +13,7 @@ Gem::Specification.new do |s|
|
|
|
13
13
|
s.description = 'Simple auth token generator/validator'
|
|
14
14
|
s.summary = "snuffleupagus-#{s.version}"
|
|
15
15
|
s.required_rubygems_version = '> 1.3.6'
|
|
16
|
-
s.required_ruby_version = ['>= 3.
|
|
16
|
+
s.required_ruby_version = ['>= 3.2.0', '< 4.1.0']
|
|
17
17
|
|
|
18
18
|
# Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or
|
|
19
19
|
# delete this section to allow pushing this gem to any host.
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: snuffleupagus
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.4.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Andrew Bromwich
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies: []
|
|
13
12
|
description: Simple auth token generator/validator
|
|
14
13
|
email:
|
|
@@ -37,7 +36,6 @@ licenses:
|
|
|
37
36
|
metadata:
|
|
38
37
|
allowed_push_host: https://rubygems.org
|
|
39
38
|
rubygems_mfa_required: 'true'
|
|
40
|
-
post_install_message:
|
|
41
39
|
rdoc_options: []
|
|
42
40
|
require_paths:
|
|
43
41
|
- lib
|
|
@@ -45,18 +43,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
45
43
|
requirements:
|
|
46
44
|
- - ">="
|
|
47
45
|
- !ruby/object:Gem::Version
|
|
48
|
-
version: 3.
|
|
46
|
+
version: 3.2.0
|
|
49
47
|
- - "<"
|
|
50
48
|
- !ruby/object:Gem::Version
|
|
51
|
-
version:
|
|
49
|
+
version: 4.1.0
|
|
52
50
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
53
51
|
requirements:
|
|
54
52
|
- - ">"
|
|
55
53
|
- !ruby/object:Gem::Version
|
|
56
54
|
version: 1.3.6
|
|
57
55
|
requirements: []
|
|
58
|
-
rubygems_version:
|
|
59
|
-
signing_key:
|
|
56
|
+
rubygems_version: 4.0.6
|
|
60
57
|
specification_version: 4
|
|
61
|
-
summary: snuffleupagus-0.
|
|
58
|
+
summary: snuffleupagus-0.4.1
|
|
62
59
|
test_files: []
|