snuffleupagus 0.2.2 → 0.3.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: 81c2fe0d377038f07a9bcead3e719634ed5ab03708f32d0e057ad7e79aab2cf7
4
- data.tar.gz: 8502a478b9e5eacebf04968d7a7c3205677893264ac8402545c029d7e43c44a2
3
+ metadata.gz: 5957f8d5f4266cf8deb1c61844e41cc7eee15a01c3862a1eadd469ad086b42fe
4
+ data.tar.gz: 44393351bab201dd827bca9a7eeacc93f5b8556f9106862f2fed857602024c54
5
5
  SHA512:
6
- metadata.gz: efd8380cac1395bb7c8d5c87e76c954ce82d710305095b2300879c6bdc9376d031370ec53566b6dfda0218856d3972c8953b8b0722abcb2748b672cfa89cfb38
7
- data.tar.gz: 7ed16f47b22a43b1bfc06716f865f1ea7a9914071f93c27f5ecca7109e63b8fabd5b69c0d4f0256367b1a84bc0d5c9986d872adf1745b50af90783b48966602e
6
+ metadata.gz: 00e18b5e37abb306f1dd63887ef990e04797992af401cfe6d0df5a35c881137ff4f2605d92a7ad863be198a629055de92df83e261f4934e3cbdaa7cf662134be
7
+ data.tar.gz: f3e583a9c052e5d7c0e63e0b0af46e36a43dc9035ffce822dca264c4a9f697bd67cced68d7e1b93c37c5a5156cb3ef898959a9cfaac5b336f11aee62876b0a23
@@ -0,0 +1,29 @@
1
+ name: Test Snuffleupagus Ruby gem
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ jobs:
10
+ test:
11
+ runs-on: ubuntu-latest
12
+ strategy:
13
+ matrix:
14
+ ruby-version: ['2.6', '2.7', '3.0', '3.1']
15
+
16
+ steps:
17
+ - uses: actions/checkout@v2
18
+
19
+ - name: Set up Ruby
20
+ uses: ruby/setup-ruby@v1
21
+ with:
22
+ ruby-version: ${{ matrix.ruby-version }}
23
+ bundler-cache: true
24
+
25
+ - name: Lint code - Rubocop
26
+ run: bundle exec rubocop
27
+
28
+ - name: Run tests
29
+ run: bundle exec rake
data/.rubocop.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  AllCops:
2
2
  NewCops: enable
3
- TargetRubyVersion: 2.5
3
+ TargetRubyVersion: 2.6
4
4
 
5
5
  Metrics/BlockLength:
6
6
  Exclude:
data/CHANGELOG.md CHANGED
@@ -3,6 +3,16 @@
3
3
  ## Unreleased
4
4
  - none
5
5
 
6
+ ## [0.3.1](releases/tag/v0.3.1) - 2022-08-19
7
+ ### Added
8
+ - Add support for Ruby 3.1 (#3)
9
+ ### Updated
10
+ - Use Github actions in favour of Travis CI (#3)
11
+
12
+ ## [0.2.2](releases/tag/v0.2.2) - 2021-12-22
13
+ ### Added
14
+ - Add support for Ruby 3.0 (#2)
15
+
6
16
  ## [0.1.1](releases/tag/v0.1.1) - 2020-10-21
7
17
  ### Updated
8
18
  - Use named parameters when creating and validating tokens
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022 Studiosity
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -61,7 +61,7 @@ module Snuffleupagus
61
61
  raise ArgumentError, 'Data is too short' unless data.length >= 16
62
62
 
63
63
  salt = data[8..15]
64
- data = data[16..-1]
64
+ data = data[16..]
65
65
  setup_cipher(:decrypt, salt)
66
66
  cipher.update(data) + cipher.final
67
67
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Snuffleupagus
4
- VERSION = '0.2.2'
4
+ VERSION = '0.3.1'
5
5
  end
@@ -9,14 +9,24 @@ Gem::Specification.new do |s|
9
9
  s.authors = ['Andrew Bromwich']
10
10
  s.email = ['abromwich@studiosity.com']
11
11
  s.homepage = 'https://github.com/Studiosity/snuffleupagus'
12
+ s.license = 'MIT'
12
13
  s.description = 'Simple auth token generator/validator'
13
14
  s.summary = "snuffleupagus-#{s.version}"
14
15
  s.required_rubygems_version = '> 1.3.6'
15
- s.required_ruby_version = ['>= 2.5.0', '< 3.1.0']
16
+ s.required_ruby_version = ['>= 2.6.0', '< 3.2.0']
17
+
18
+ # Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or
19
+ # delete this section to allow pushing this gem to any host.
20
+ raise 'RubyGems 2.0 or newer is required to protect against public gem pushes.' unless s.respond_to?(:metadata)
21
+
22
+ s.metadata['allowed_push_host'] = 'https://rubygems.org'
23
+ s.metadata['rubygems_mfa_required'] = 'true'
16
24
 
17
25
  s.add_development_dependency 'rake', '~> 12.3', '>= 12.3.3'
18
26
  s.add_development_dependency 'rspec', '~> 3'
19
- s.add_development_dependency 'rubocop', '~> 0.49'
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'
20
30
  s.add_development_dependency 'timecop', '~> 0'
21
31
 
22
32
  s.files = `git ls-files`.split($OUTPUT_RECORD_SEPARATOR)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: snuffleupagus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Bromwich
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-12-22 00:00:00.000000000 Z
11
+ date: 2022-08-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -50,14 +50,42 @@ dependencies:
50
50
  requirements:
51
51
  - - "~>"
52
52
  - !ruby/object:Gem::Version
53
- version: '0.49'
53
+ version: '1.26'
54
54
  type: :development
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
58
  - - "~>"
59
59
  - !ruby/object:Gem::Version
60
- version: '0.49'
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'
61
89
  - !ruby/object:Gem::Dependency
62
90
  name: timecop
63
91
  requirement: !ruby/object:Gem::Requirement
@@ -79,11 +107,12 @@ executables: []
79
107
  extensions: []
80
108
  extra_rdoc_files: []
81
109
  files:
110
+ - ".github/workflows/test.yml"
82
111
  - ".gitignore"
83
112
  - ".rubocop.yml"
84
- - ".travis.yml"
85
113
  - CHANGELOG.md
86
114
  - Gemfile
115
+ - LICENSE
87
116
  - README.md
88
117
  - Rakefile
89
118
  - Snuffy.png
@@ -93,8 +122,11 @@ files:
93
122
  - snuffleupagus.gemspec
94
123
  - spec/snuffleupagus_spec.rb
95
124
  homepage: https://github.com/Studiosity/snuffleupagus
96
- licenses: []
97
- metadata: {}
125
+ licenses:
126
+ - MIT
127
+ metadata:
128
+ allowed_push_host: https://rubygems.org
129
+ rubygems_mfa_required: 'true'
98
130
  post_install_message:
99
131
  rdoc_options: []
100
132
  require_paths:
@@ -103,18 +135,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
103
135
  requirements:
104
136
  - - ">="
105
137
  - !ruby/object:Gem::Version
106
- version: 2.5.0
138
+ version: 2.6.0
107
139
  - - "<"
108
140
  - !ruby/object:Gem::Version
109
- version: 3.1.0
141
+ version: 3.2.0
110
142
  required_rubygems_version: !ruby/object:Gem::Requirement
111
143
  requirements:
112
144
  - - ">"
113
145
  - !ruby/object:Gem::Version
114
146
  version: 1.3.6
115
147
  requirements: []
116
- rubygems_version: 3.0.9
148
+ rubygems_version: 3.3.7
117
149
  signing_key:
118
150
  specification_version: 4
119
- summary: snuffleupagus-0.2.2
151
+ summary: snuffleupagus-0.3.1
120
152
  test_files: []
data/.travis.yml DELETED
@@ -1,14 +0,0 @@
1
- language: ruby
2
-
3
- rvm:
4
- - 2.5
5
- - 2.6
6
- - 2.7
7
- - 3.0
8
-
9
- install:
10
- - bundle install --retry=3
11
-
12
- script:
13
- - bundle exec rubocop
14
- - bundle exec rake