url_signature 0.0.3 → 0.0.4

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: 0f8e7a493e109af4c7514cd86ae15d205262c93f4a11aa81b4f8c9b6adf7897d
4
- data.tar.gz: d101c591b29090ee928178bdb8c343cf76d71a2735475dbda7e6f72f6b58bbcc
3
+ metadata.gz: a2a1f9c8492b528cd95e5420c783723592a2648545ea819346c6141ed3827b85
4
+ data.tar.gz: eb043f0451f6b0de96aebb01454ff19e1df9f1927d7438b11c245f25e8a585af
5
5
  SHA512:
6
- metadata.gz: c52cef371511617e11e12ac72c9d5a405abaed1d7954925c7d2148518fbee9a0ab8272f67baecc4ea7db2a7a8155ac943e5ebfa2adf281d65b757537c78c4a11
7
- data.tar.gz: 479dbd35067a5cce1818a5e504d507dae8ba8b8eb8639773cc830b81f098d123a8523ee04fd0ddf7a85c50b36e44f8ece2d5aa90d49b318683c932358a849f16
6
+ metadata.gz: d3ac5ae54d931d5d277b0e7a3811d2d477cf5591ceac2d2af3a0bc91fea1d07ef51045b94120731518bf010bf2254c42f1bda5382e6467a99c0bc027068c3ac5
7
+ data.tar.gz: c6f3f69483ebcf84ed553d4a4a9f76e15043ed38f70da68767baea6aa72f759e13a137af0afc243ff82ff25c99bfafb9ef73b195393564011fe4b2b22f9c4dd2
data/.gitignore CHANGED
@@ -9,3 +9,4 @@
9
9
  /vendor/
10
10
  *.log
11
11
  *.lock
12
+ .minitestfailures
@@ -57,17 +57,18 @@ module URLSignature
57
57
  end
58
58
 
59
59
  def to_s
60
- [
61
- "#{scheme}://#{host}",
62
- port ? ":#{port}" : nil,
63
- path,
64
- query ? "?#{query}" : nil,
65
- fragment ? "##{fragment}" : nil
66
- ].compact.join
60
+ uri = URI.parse("/")
61
+ uri.scheme = scheme
62
+ uri.host = host
63
+ uri.port = port
64
+ uri.path = path
65
+ uri.query = query
66
+ uri.fragment = fragment
67
+ uri.to_s
67
68
  end
68
69
 
69
70
  private def encode(value)
70
- CGI.escape(value).gsub("+", "%20")
71
+ CGI.escape(value.to_s).gsub("+", "%20")
71
72
  end
72
73
 
73
74
  private def parse_query(query)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module URLSignature
4
- VERSION = "0.0.3"
4
+ VERSION = "0.0.4"
5
5
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: url_signature
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nando Vieira
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 2025-03-21 00:00:00.000000000 Z
10
+ date: 2025-03-22 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: base64
@@ -156,10 +156,10 @@ licenses:
156
156
  metadata:
157
157
  homepage_uri: https://github.com/fnando/url_signature
158
158
  bug_tracker_uri: https://github.com/fnando/url_signature/issues
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
159
+ source_code_uri: https://github.com/fnando/url_signature/tree/v0.0.4
160
+ changelog_uri: https://github.com/fnando/url_signature/tree/v0.0.4/CHANGELOG.md
161
+ documentation_uri: https://github.com/fnando/url_signature/tree/v0.0.4/README.md
162
+ license_uri: https://github.com/fnando/url_signature/tree/v0.0.4/LICENSE.md
163
163
  rubygems_mfa_required: 'true'
164
164
  rdoc_options: []
165
165
  require_paths:
@@ -175,7 +175,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
175
175
  - !ruby/object:Gem::Version
176
176
  version: '0'
177
177
  requirements: []
178
- rubygems_version: 3.6.6
178
+ rubygems_version: 3.6.2
179
179
  specification_version: 4
180
180
  summary: Create and verify signed urls. Supports expiration time.
181
181
  test_files: []