url_signature 0.0.2 → 0.0.3

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: 28eb510b8d3f69206776772eb78bca149e5118d4e0c05f7a33e60abee6a46e6f
4
- data.tar.gz: 36c435b613159f5f97f3d10d71dd57b2b556e9da04ea001a0c86ea9e35b041ad
3
+ metadata.gz: 0f8e7a493e109af4c7514cd86ae15d205262c93f4a11aa81b4f8c9b6adf7897d
4
+ data.tar.gz: d101c591b29090ee928178bdb8c343cf76d71a2735475dbda7e6f72f6b58bbcc
5
5
  SHA512:
6
- metadata.gz: 57db4831d7a9c8100efe175825e6aa2fb367cb1a42c37bc851318b47cadfee22f2a797c357eb4aca46fa70f1b26b3849e200dedcc626785f33d9ee442a3b0e0e
7
- data.tar.gz: de3b6114aced1d7f0ded1ec5d637b08f18f837348d8fa754a52c0c679ff71d09ec1ad688624bcdb6055df285cbca6baecd5d446d3fa6d4860769bd54b9cbac53
6
+ metadata.gz: c52cef371511617e11e12ac72c9d5a405abaed1d7954925c7d2148518fbee9a0ab8272f67baecc4ea7db2a7a8155ac943e5ebfa2adf281d65b757537c78c4a11
7
+ data.tar.gz: 479dbd35067a5cce1818a5e504d507dae8ba8b8eb8639773cc830b81f098d123a8523ee04fd0ddf7a85c50b36e44f8ece2d5aa90d49b318683c932358a849f16
@@ -1,15 +1,11 @@
1
+ ---
1
2
  name: Tests
2
3
 
3
4
  on:
4
5
  pull_request:
5
- branches:
6
- - main
7
6
  push:
8
- branches:
9
- - main
10
-
11
- schedule:
12
- - cron: "0 10 * * *"
7
+ workflow_dispatch:
8
+ inputs: {}
13
9
 
14
10
  jobs:
15
11
  build:
@@ -18,23 +14,25 @@ jobs:
18
14
  strategy:
19
15
  fail-fast: false
20
16
  matrix:
21
- ruby: [2.6.x, 2.7.x]
17
+ ruby: ["3.3", "3.4"]
22
18
  gemfile:
23
19
  - Gemfile
24
20
 
25
21
  steps:
26
- - uses: actions/checkout@v2.3.4
22
+ - uses: actions/checkout@v4
27
23
 
28
- - uses: actions/cache@v2
24
+ - uses: actions/cache@v4
29
25
  with:
30
26
  path: vendor/bundle
31
27
  key: >
32
- ${{ runner.os }}-${{ matrix.ruby }}-gems-${{ hashFiles(matrix.gemfile) }}
28
+ ${{ runner.os }}-${{ matrix.ruby }}-gems-${{
29
+ hashFiles(matrix.gemfile) }}
33
30
  restore-keys: >
34
- ${{ runner.os }}-${{ matrix.ruby }}-gems-${{ hashFiles(matrix.gemfile) }}
31
+ ${{ runner.os }}-${{ matrix.ruby }}-gems-${{
32
+ hashFiles(matrix.gemfile) }}
35
33
 
36
34
  - name: Set up Ruby
37
- uses: actions/setup-ruby@v1
35
+ uses: ruby/setup-ruby@v1
38
36
  with:
39
37
  ruby-version: ${{ matrix.ruby }}
40
38
 
data/.rubocop.yml CHANGED
@@ -3,11 +3,5 @@ inherit_gem:
3
3
  rubocop-fnando: .rubocop.yml
4
4
 
5
5
  AllCops:
6
- TargetRubyVersion: 2.6
6
+ TargetRubyVersion: 3.3
7
7
  NewCops: enable
8
-
9
- Metrics/ParameterLists:
10
- Enabled: false
11
-
12
- Metrics/AbcSize:
13
- Enabled: false
data/README.md CHANGED
@@ -10,7 +10,6 @@
10
10
 
11
11
  <p align="center">
12
12
  <a href="https://github.com/fnando/url_signature"><img src="https://github.com/fnando/url_signature/workflows/Tests/badge.svg" alt="Tests"></a>
13
- <a href="https://codeclimate.com/github/fnando/url_signature"><img src="https://codeclimate.com/github/fnando/url_signature/badges/gpa.svg" alt="Code Climate"></a>
14
13
  <a href="https://rubygems.org/gems/url_signature"><img src="https://img.shields.io/gem/v/url_signature.svg" alt="Version"></a>
15
14
  <a href="https://rubygems.org/gems/url_signature"><img src="https://img.shields.io/gem/dt/url_signature.svg" alt="Downloads"></a>
16
15
  </p>
@@ -71,7 +71,7 @@ module URLSignature
71
71
  end
72
72
 
73
73
  private def parse_query(query)
74
- Hash[CGI.parse(query.to_s).to_a]
74
+ CGI.parse(query.to_s)
75
75
  end
76
76
 
77
77
  private def parse_url(url)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module URLSignature
4
- VERSION = "0.0.2"
4
+ VERSION = "0.0.3"
5
5
  end
data/lib/url_signature.rb CHANGED
@@ -56,7 +56,7 @@ module URLSignature
56
56
  false
57
57
  end
58
58
 
59
- def self.verify!( # rubocop:disable Metrics/MethodLength
59
+ def self.verify!(
60
60
  url,
61
61
  key:,
62
62
  hmac_proc: HMAC_PROC,
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "./lib/url_signature/version"
3
+ require_relative "lib/url_signature/version"
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "url_signature"
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
11
11
  spec.summary = "Create and verify signed urls. Supports expiration time."
12
12
  spec.description = spec.summary
13
13
  spec.license = "MIT"
14
- spec.required_ruby_version = Gem::Requirement.new(">= 2.6.0")
14
+ spec.required_ruby_version = Gem::Requirement.new(">= 3.3.0")
15
15
 
16
16
  github_url = "https://github.com/fnando/url_signature"
17
17
  github_tree_url = "#{github_url}/tree/v#{spec.version}"
@@ -23,6 +23,7 @@ Gem::Specification.new do |spec|
23
23
  spec.metadata["changelog_uri"] = "#{github_tree_url}/CHANGELOG.md"
24
24
  spec.metadata["documentation_uri"] = "#{github_tree_url}/README.md"
25
25
  spec.metadata["license_uri"] = "#{github_tree_url}/LICENSE.md"
26
+ spec.metadata["rubygems_mfa_required"] = "true"
26
27
 
27
28
  spec.files = Dir.chdir(File.expand_path(__dir__)) do
28
29
  `git ls-files -z`
@@ -34,6 +35,7 @@ Gem::Specification.new do |spec|
34
35
  spec.executables = spec.files.grep(%r{^exe/}) {|f| File.basename(f) }
35
36
  spec.require_paths = ["lib"]
36
37
 
38
+ spec.add_dependency "base64"
37
39
  spec.add_development_dependency "minitest"
38
40
  spec.add_development_dependency "minitest-utils"
39
41
  spec.add_development_dependency "pry-meta"
metadata CHANGED
@@ -1,15 +1,28 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: url_signature
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nando Vieira
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2020-11-05 00:00:00.000000000 Z
10
+ date: 2025-03-21 00:00:00.000000000 Z
12
11
  dependencies:
12
+ - !ruby/object:Gem::Dependency
13
+ name: base64
14
+ requirement: !ruby/object:Gem::Requirement
15
+ requirements:
16
+ - - ">="
17
+ - !ruby/object:Gem::Version
18
+ version: '0'
19
+ type: :runtime
20
+ prerelease: false
21
+ version_requirements: !ruby/object:Gem::Requirement
22
+ requirements:
23
+ - - ">="
24
+ - !ruby/object:Gem::Version
25
+ version: '0'
13
26
  - !ruby/object:Gem::Dependency
14
27
  name: minitest
15
28
  requirement: !ruby/object:Gem::Requirement
@@ -143,11 +156,11 @@ licenses:
143
156
  metadata:
144
157
  homepage_uri: https://github.com/fnando/url_signature
145
158
  bug_tracker_uri: https://github.com/fnando/url_signature/issues
146
- source_code_uri: https://github.com/fnando/url_signature/tree/v0.0.2
147
- changelog_uri: https://github.com/fnando/url_signature/tree/v0.0.2/CHANGELOG.md
148
- documentation_uri: https://github.com/fnando/url_signature/tree/v0.0.2/README.md
149
- license_uri: https://github.com/fnando/url_signature/tree/v0.0.2/LICENSE.md
150
- post_install_message:
159
+ source_code_uri: https://github.com/fnando/url_signature/tree/v0.0.3
160
+ changelog_uri: https://github.com/fnando/url_signature/tree/v0.0.3/CHANGELOG.md
161
+ documentation_uri: https://github.com/fnando/url_signature/tree/v0.0.3/README.md
162
+ license_uri: https://github.com/fnando/url_signature/tree/v0.0.3/LICENSE.md
163
+ rubygems_mfa_required: 'true'
151
164
  rdoc_options: []
152
165
  require_paths:
153
166
  - lib
@@ -155,15 +168,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
155
168
  requirements:
156
169
  - - ">="
157
170
  - !ruby/object:Gem::Version
158
- version: 2.6.0
171
+ version: 3.3.0
159
172
  required_rubygems_version: !ruby/object:Gem::Requirement
160
173
  requirements:
161
174
  - - ">="
162
175
  - !ruby/object:Gem::Version
163
176
  version: '0'
164
177
  requirements: []
165
- rubygems_version: 3.1.4
166
- signing_key:
178
+ rubygems_version: 3.6.6
167
179
  specification_version: 4
168
180
  summary: Create and verify signed urls. Supports expiration time.
169
181
  test_files: []