distack-urlsign 0.3.0 → 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
  SHA1:
3
- metadata.gz: dc58ae17f2443ff15708829cfb9c6f9ca3c14533
4
- data.tar.gz: 6f26d565eaab0e7c9219e26ad40f75d4fc06522b
3
+ metadata.gz: 745e324c38d3c2c0fafb181c84ed5749e6863bda
4
+ data.tar.gz: fc92d7917e73f06cf2bd6d04f1ebb31483d801dc
5
5
  SHA512:
6
- metadata.gz: 0de42d39cda52754c89f97690da64b7754f168b4e1f9e5eda878ef4e60b9af2f5ae5e9c2c885f6eb1f28951beb61cbc35daff9e30dba624408e3e2646c527e5c
7
- data.tar.gz: 52b92b7cf65281d71d27dda60416f31405edc73f479cf8f1146109010a003079d0f045c3d03cc5b91f6dcfaf623440f024086b0a7feff8892d21522629776a0e
6
+ metadata.gz: aba5d78de6da6c8c2bf3c5a8b6ef591f4354a3a1738122b89ab44c6b1eef16d0fabc2d70223a3339dad9e5a74dfbe5814064a631ca9f1be8f1a4f84c54db035f
7
+ data.tar.gz: b03b1a4ad561ead878ac870a4e693c3347c16c7412a34f0a2dbd1f1767971dd955bfc9f66d215426cea629b3d8eaac7be796397f8ca412505b001e626092420d
@@ -17,7 +17,8 @@ module Distack::URLSign
17
17
  raise "can't sign opaque URL"
18
18
  end
19
19
 
20
- chunks = [url.scheme, "#{url.host}:#{url.port}", url.path, url.query, url.userinfo].compact
20
+ host_with_port = url.port == url.default_port ? url.host : "#{url.host}:#{url.port}"
21
+ chunks = [url.scheme, host_with_port, url.path, url.query, url.userinfo].compact
21
22
  digest = OpenSSL::Digest.new("sha512")
22
23
 
23
24
  rawsig = OpenSSL::HMAC.digest(digest, @key, chunks.join)
@@ -1,5 +1,5 @@
1
1
  module Distack
2
2
  module URLSign
3
- VERSION = "0.3.0"
3
+ VERSION = "0.3.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: distack-urlsign
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rodrigo Kochenburger
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-04-14 00:00:00.000000000 Z
11
+ date: 2016-06-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack
@@ -107,8 +107,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
107
107
  version: '0'
108
108
  requirements: []
109
109
  rubyforge_project:
110
- rubygems_version: 2.4.5
110
+ rubygems_version: 2.4.5.1
111
111
  signing_key:
112
112
  specification_version: 4
113
113
  summary: urlsign is a simple HMAC-based implementation for URL signing and verification
114
114
  test_files: []
115
+ has_rdoc: