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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 255f3673179956438387ee6ae72852caa863993dfbca57ded1d3c73aeb302e6c
4
- data.tar.gz: 262aaa05f92bb77b391125cbe29ff15d7b9e048d0d2378e5e4f63577a7c17a43
3
+ metadata.gz: 3552471357753a34328d351900148c7ef44d89799d4024d1c4ffebf898e7f7b3
4
+ data.tar.gz: 3c212b0a7711de58af1770e90894305f0bf6ee0b19142b6dc128710b70cc5a51
5
5
  SHA512:
6
- metadata.gz: 884d5cb5d81cf9b51153f9c5278448a712f684077bf36456dd804189284252672dc3ac6d312e87143d5686350a555d8f10a4c6811e2579dd2b8bedf153f3cae1
7
- data.tar.gz: 438a4e9737f044f6bb3e901d1f60ebce5007554fae9303445490134f17d6e79b8ddd2b1a6890d6bf7673285ec9bb84f24d29d6e863ff4883642263f373445899
6
+ metadata.gz: 43bbd89fa6cd557915e3b4ea1a5a9d2c02d1ac69dceb0973389f8f5ce9d0c117f04155438ea18f033256b1e371399d97da3b47c8ed2ca1b1cd851ae53bc817d9
7
+ data.tar.gz: 95bde22a42221719cc3a4506635b68779ea131b98a13ac9ee3607747efb20a1254c2c5e4d2c6fe3b6c66a1b218d55abcce955bb4f483cd332f32fb71a24013d2
@@ -11,7 +11,7 @@ jobs:
11
11
  runs-on: ubuntu-latest
12
12
  strategy:
13
13
  matrix:
14
- ruby-version: ['3.0', '3.1', '3.2', '3.3', '3.4']
14
+ ruby-version: ['3.2', '3.3', '3.4', '4.0']
15
15
 
16
16
  steps:
17
17
  - uses: actions/checkout@v2
data/.rubocop.yml CHANGED
@@ -1,10 +1,10 @@
1
- require:
1
+ plugins:
2
2
  - rubocop-rake
3
3
  - rubocop-rspec
4
4
 
5
5
  AllCops:
6
6
  NewCops: enable
7
- TargetRubyVersion: 3.0
7
+ TargetRubyVersion: 3.2
8
8
 
9
9
  Metrics/BlockLength:
10
10
  Exclude:
data/CHANGELOG.md CHANGED
@@ -3,6 +3,10 @@
3
3
  ## Unreleased
4
4
  - none
5
5
 
6
+ ## [0.4.1](releases/tag/v0.4.1) - 2026-04-16
7
+ ### Added
8
+ - Add support for Ruby 4.0 (#6)
9
+
6
10
  ## [0.3.3](releases/tag/v0.3.3) - 2025-01-14
7
11
  ### Added
8
12
  - Add support for Ruby 3.4 (#5)
data/Gemfile CHANGED
@@ -3,6 +3,7 @@
3
3
  source 'http://rubygems.org'
4
4
  gemspec
5
5
 
6
+ gem 'ostruct'
6
7
  gem 'rake', '~> 12.3', '>= 12.3.3'
7
8
  gem 'rspec', '~> 3'
8
9
  gem 'rubocop', '~> 1.70'
@@ -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)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Snuffleupagus
4
- VERSION = '0.3.3'
4
+ VERSION = '0.4.1'
5
5
  end
@@ -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.0.0', '< 3.5.0']
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.3.3
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: 2025-01-13 00:00:00.000000000 Z
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.0.0
46
+ version: 3.2.0
49
47
  - - "<"
50
48
  - !ruby/object:Gem::Version
51
- version: 3.5.0
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: 3.3.7
59
- signing_key:
56
+ rubygems_version: 4.0.6
60
57
  specification_version: 4
61
- summary: snuffleupagus-0.3.3
58
+ summary: snuffleupagus-0.4.1
62
59
  test_files: []