snuffleupagus 0.3.1 → 0.3.2

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: 5957f8d5f4266cf8deb1c61844e41cc7eee15a01c3862a1eadd469ad086b42fe
4
- data.tar.gz: 44393351bab201dd827bca9a7eeacc93f5b8556f9106862f2fed857602024c54
3
+ metadata.gz: f0f98ff72084d4ba25ea4bfa6c54b116f164e288c85f078bba36c7184edb99ce
4
+ data.tar.gz: f6b5e1e61fa86ec5e283d0816a08de1863e57b1035b390969102380cd980d039
5
5
  SHA512:
6
- metadata.gz: 00e18b5e37abb306f1dd63887ef990e04797992af401cfe6d0df5a35c881137ff4f2605d92a7ad863be198a629055de92df83e261f4934e3cbdaa7cf662134be
7
- data.tar.gz: f3e583a9c052e5d7c0e63e0b0af46e36a43dc9035ffce822dca264c4a9f697bd67cced68d7e1b93c37c5a5156cb3ef898959a9cfaac5b336f11aee62876b0a23
6
+ metadata.gz: 19c93b218f0a606a9f2b4fdc46b5b480782cf31bb38f7f0ce017669de6667a8e0ff2788f3d33369131b0c064e070195c135d3fe4fad8d594d078233da8bb1135
7
+ data.tar.gz: 79beadaf365531b40d51b771f1bfb910f561a679ff1f6a786a67fe17040ce99c6972376b5c45a93e96a3d0b999cd5e71bdedfbd65af5964c40417cd459af53f8
@@ -11,7 +11,7 @@ jobs:
11
11
  runs-on: ubuntu-latest
12
12
  strategy:
13
13
  matrix:
14
- ruby-version: ['2.6', '2.7', '3.0', '3.1']
14
+ ruby-version: ['3.0', '3.1', '3.2', '3.3']
15
15
 
16
16
  steps:
17
17
  - uses: actions/checkout@v2
data/.rubocop.yml CHANGED
@@ -1,10 +1,14 @@
1
+ require:
2
+ - rubocop-rake
3
+ - rubocop-rspec
4
+
1
5
  AllCops:
2
6
  NewCops: enable
3
- TargetRubyVersion: 2.6
7
+ TargetRubyVersion: 3.0
4
8
 
5
9
  Metrics/BlockLength:
6
10
  Exclude:
7
11
  - 'spec/**/*'
8
12
 
9
- Metrics/LineLength:
10
- IgnoredPatterns: ['\A +#']
13
+ RSpec/NestedGroups:
14
+ Max: 4
data/CHANGELOG.md CHANGED
@@ -3,6 +3,10 @@
3
3
  ## Unreleased
4
4
  - none
5
5
 
6
+ ## [0.3.2](releases/tag/v0.3.2) - 2024-04-28
7
+ ### Added
8
+ - Add support for Ruby 3.2 and 3.3 (#4)
9
+
6
10
  ## [0.3.1](releases/tag/v0.3.1) - 2022-08-19
7
11
  ### Added
8
12
  - Add support for Ruby 3.1 (#3)
data/Gemfile CHANGED
@@ -2,3 +2,10 @@
2
2
 
3
3
  source 'http://rubygems.org'
4
4
  gemspec
5
+
6
+ gem 'rake', '~> 12.3', '>= 12.3.3'
7
+ gem 'rspec', '~> 3'
8
+ gem 'rubocop', '~> 1.26'
9
+ gem 'rubocop-rake', '~> 0.6'
10
+ gem 'rubocop-rspec', '~> 2.9'
11
+ gem 'timecop', '~> 0'
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Snuffleupagus
4
- VERSION = '0.3.1'
4
+ VERSION = '0.3.2'
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 = ['>= 2.6.0', '< 3.2.0']
16
+ s.required_ruby_version = ['>= 3.0.0', '< 3.4.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.
@@ -22,13 +22,6 @@ Gem::Specification.new do |s|
22
22
  s.metadata['allowed_push_host'] = 'https://rubygems.org'
23
23
  s.metadata['rubygems_mfa_required'] = 'true'
24
24
 
25
- s.add_development_dependency 'rake', '~> 12.3', '>= 12.3.3'
26
- s.add_development_dependency 'rspec', '~> 3'
27
- s.add_development_dependency 'rubocop', '~> 1.26'
28
- s.add_development_dependency 'rubocop-rake', '~> 0.6'
29
- s.add_development_dependency 'rubocop-rspec', '~> 2.9'
30
- s.add_development_dependency 'timecop', '~> 0'
31
-
32
25
  s.files = `git ls-files`.split($OUTPUT_RECORD_SEPARATOR)
33
26
  s.executables = `git ls-files`.split("\n").map do |f|
34
27
  f =~ %r{^bin/(.*)} ? Regexp.last_match(1) : nil
@@ -4,18 +4,18 @@ require './lib/snuffleupagus'
4
4
  require 'timecop'
5
5
 
6
6
  describe Snuffleupagus::AuthToken do
7
- let(:snuffy) { Snuffleupagus::AuthToken.new('sup3r4w3s0m3p4ssw0rd') }
7
+ let(:snuffy) { described_class.new('sup3r4w3s0m3p4ssw0rd') }
8
8
 
9
9
  describe '#create_token' do
10
- subject { snuffy.create_token context: 'my-context' }
10
+ subject(:create_token) { snuffy.create_token context: 'my-context' }
11
11
 
12
12
  it { is_expected.to be_a String }
13
- it { expect(subject.length).to eq 96 }
13
+ it { expect(create_token.length).to eq 96 }
14
14
  it { is_expected.to match(/\A[a-f0-9]{96}\z/) }
15
15
  end
16
16
 
17
17
  describe '#token_valid?' do
18
- subject { snuffy.token_valid?(token: token, context: 'my-context') }
18
+ subject(:token_valid?) { snuffy.token_valid?(token: token, context: 'my-context') }
19
19
 
20
20
  context 'with a valid token' do
21
21
  let(:token) { snuffy.create_token context: 'my-context' }
@@ -47,31 +47,31 @@ describe Snuffleupagus::AuthToken do
47
47
  it { is_expected.to be_falsey }
48
48
  end
49
49
 
50
- context 'testing expired tokens' do
50
+ context 'with an expired token' do
51
51
  let(:token) { snuffy.create_token context: 'my-context' }
52
52
 
53
53
  before { token } # pre-load the token
54
54
  after { Timecop.return }
55
55
 
56
- context 'just inside the time difference (expired token)' do
56
+ context 'when just inside the time difference (expired token)' do
57
57
  before { Timecop.freeze Time.now - 119 }
58
58
 
59
59
  it { is_expected.to be_truthy }
60
60
  end
61
61
 
62
- context 'just outside the time difference (expired token)' do
62
+ context 'when just outside the time difference (expired token)' do
63
63
  before { Timecop.freeze Time.now - 120 }
64
64
 
65
65
  it { is_expected.to be_falsey }
66
66
  end
67
67
 
68
- context 'just inside the time difference (future token)' do
68
+ context 'when just inside the time difference (future token)' do
69
69
  before { Timecop.freeze Time.now + 119 }
70
70
 
71
71
  it { is_expected.to be_truthy }
72
72
  end
73
73
 
74
- context 'just outside the time difference (future token)' do
74
+ context 'when just outside the time difference (future token)' do
75
75
  before { Timecop.freeze Time.now + 120 }
76
76
 
77
77
  it { is_expected.to be_falsey }
metadata CHANGED
@@ -1,105 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: snuffleupagus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Bromwich
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-08-19 00:00:00.000000000 Z
12
- dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: rake
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '12.3'
20
- - - ">="
21
- - !ruby/object:Gem::Version
22
- version: 12.3.3
23
- type: :development
24
- prerelease: false
25
- version_requirements: !ruby/object:Gem::Requirement
26
- requirements:
27
- - - "~>"
28
- - !ruby/object:Gem::Version
29
- version: '12.3'
30
- - - ">="
31
- - !ruby/object:Gem::Version
32
- version: 12.3.3
33
- - !ruby/object:Gem::Dependency
34
- name: rspec
35
- requirement: !ruby/object:Gem::Requirement
36
- requirements:
37
- - - "~>"
38
- - !ruby/object:Gem::Version
39
- version: '3'
40
- type: :development
41
- prerelease: false
42
- version_requirements: !ruby/object:Gem::Requirement
43
- requirements:
44
- - - "~>"
45
- - !ruby/object:Gem::Version
46
- version: '3'
47
- - !ruby/object:Gem::Dependency
48
- name: rubocop
49
- requirement: !ruby/object:Gem::Requirement
50
- requirements:
51
- - - "~>"
52
- - !ruby/object:Gem::Version
53
- version: '1.26'
54
- type: :development
55
- prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
57
- requirements:
58
- - - "~>"
59
- - !ruby/object:Gem::Version
60
- version: '1.26'
61
- - !ruby/object:Gem::Dependency
62
- name: rubocop-rake
63
- requirement: !ruby/object:Gem::Requirement
64
- requirements:
65
- - - "~>"
66
- - !ruby/object:Gem::Version
67
- version: '0.6'
68
- type: :development
69
- prerelease: false
70
- version_requirements: !ruby/object:Gem::Requirement
71
- requirements:
72
- - - "~>"
73
- - !ruby/object:Gem::Version
74
- version: '0.6'
75
- - !ruby/object:Gem::Dependency
76
- name: rubocop-rspec
77
- requirement: !ruby/object:Gem::Requirement
78
- requirements:
79
- - - "~>"
80
- - !ruby/object:Gem::Version
81
- version: '2.9'
82
- type: :development
83
- prerelease: false
84
- version_requirements: !ruby/object:Gem::Requirement
85
- requirements:
86
- - - "~>"
87
- - !ruby/object:Gem::Version
88
- version: '2.9'
89
- - !ruby/object:Gem::Dependency
90
- name: timecop
91
- requirement: !ruby/object:Gem::Requirement
92
- requirements:
93
- - - "~>"
94
- - !ruby/object:Gem::Version
95
- version: '0'
96
- type: :development
97
- prerelease: false
98
- version_requirements: !ruby/object:Gem::Requirement
99
- requirements:
100
- - - "~>"
101
- - !ruby/object:Gem::Version
102
- version: '0'
11
+ date: 2024-04-28 00:00:00.000000000 Z
12
+ dependencies: []
103
13
  description: Simple auth token generator/validator
104
14
  email:
105
15
  - abromwich@studiosity.com
@@ -120,7 +30,7 @@ files:
120
30
  - lib/snuffleupagus/auth_token.rb
121
31
  - lib/snuffleupagus/version.rb
122
32
  - snuffleupagus.gemspec
123
- - spec/snuffleupagus_spec.rb
33
+ - spec/snuffleupagus/auth_token_spec.rb
124
34
  homepage: https://github.com/Studiosity/snuffleupagus
125
35
  licenses:
126
36
  - MIT
@@ -135,10 +45,10 @@ required_ruby_version: !ruby/object:Gem::Requirement
135
45
  requirements:
136
46
  - - ">="
137
47
  - !ruby/object:Gem::Version
138
- version: 2.6.0
48
+ version: 3.0.0
139
49
  - - "<"
140
50
  - !ruby/object:Gem::Version
141
- version: 3.2.0
51
+ version: 3.4.0
142
52
  required_rubygems_version: !ruby/object:Gem::Requirement
143
53
  requirements:
144
54
  - - ">"
@@ -148,5 +58,5 @@ requirements: []
148
58
  rubygems_version: 3.3.7
149
59
  signing_key:
150
60
  specification_version: 4
151
- summary: snuffleupagus-0.3.1
61
+ summary: snuffleupagus-0.3.2
152
62
  test_files: []