google-directions 0.0.4 → 0.0.5
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b3cc9444114e0235196e702ac297e8e254229281
|
4
|
+
data.tar.gz: dfa1cd670fd9e1a3d20b7e82f503ba45aedf27cc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 261c60490773bb9310a141981842d81b131d1709fd3e101e7af59d9cf5aa8a72c1832ab6ff04b8c1636d4cb4bb19570a10e3870f3fb095571a111dece79515d3
|
7
|
+
data.tar.gz: 1120128e7c52f814889c017e7ee0fc45e87bd9889fe0a3209541b0e64417aa4bf0dc55b494baa90f4c17f2b78e06940e11128e38d6d286c396fc63ba388d35b9
|
@@ -15,7 +15,7 @@ module Google
|
|
15
15
|
binary_key = Base64.decode64(private_key.tr('-_','+/'))
|
16
16
|
digest = OpenSSL::Digest.new('sha1')
|
17
17
|
signature = OpenSSL::HMAC.digest(digest, binary_key, uri_with_params)
|
18
|
-
signature = Base64.encode64(signature.tr('+/','-_')
|
18
|
+
signature = Base64.encode64(signature).tr('+/','-_').tr("\n", '')
|
19
19
|
|
20
20
|
"#{uri_with_params}&signature=#{signature}"
|
21
21
|
end
|
@@ -8,7 +8,7 @@ describe Google::Directions::Encoder do
|
|
8
8
|
subject { described_class.new(uri_with_params, private_key).encode }
|
9
9
|
|
10
10
|
it 'creates signature from path and query' do
|
11
|
-
expect(subject).to eq("#{uri_with_params}&signature=
|
11
|
+
expect(subject).to eq("#{uri_with_params}&signature=VqUOoDBw__HLG5g76wWQLSg0_mw=")
|
12
12
|
end
|
13
13
|
end
|
14
14
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-directions
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Parafuzo Core Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-10-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|