escher 0.3.4 → 0.3.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/escher/auth.rb +1 -0
- data/lib/escher/version.rb +1 -1
- data/spec/escher/auth_spec.rb +16 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6d7c8a7236299d04d8b414435631a7e8c166580b
|
4
|
+
data.tar.gz: a091fdb0bb8573b040baae2f0b58265bfb1c1349
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 660597e1a9c2cf47a9fe57545ac30e126b028c6f1012e90207b2346cdd67a347d2dee4a9f0443af34d82d75c163a33ee1f6f29a5911918680af008c0e00c9fb9
|
7
|
+
data.tar.gz: fbe5c0eda83ea7b74bc8123e6812a845e6d55fe4a6a7fe2f96c8b9de533727555d68d0ae5c7e51299588443014e57ed3110d83c7587a732788d711af76568d63
|
data/lib/escher/auth.rb
CHANGED
@@ -118,6 +118,7 @@ module Escher
|
|
118
118
|
.split('&', -1)
|
119
119
|
.map { |pair| pair.split('=', -1) }
|
120
120
|
.map { |k, v| (k.include? ' ') ? [k.str(/\S+/), ''] : [k, v] }
|
121
|
+
.map { |k, v| [uri_decode(k), uri_decode(v)] }
|
121
122
|
fragment = uri.fragment
|
122
123
|
|
123
124
|
headers = [['host', host]]
|
data/lib/escher/version.rb
CHANGED
data/spec/escher/auth_spec.rb
CHANGED
@@ -189,6 +189,22 @@ module Escher
|
|
189
189
|
end
|
190
190
|
|
191
191
|
|
192
|
+
it 'should generate presigned url with URL encoded array parameters' do
|
193
|
+
escher = described_class.new('us-east-1/host/aws4_request', ESCHER_MIXED_OPTIONS.merge(current_time: Time.parse('2011/05/11 12:00:00 UTC')))
|
194
|
+
expected_url =
|
195
|
+
'http://example.com/something?arr%5B%5C=apple&' + 'arr%5B%5C=pear&' +
|
196
|
+
'X-EMS-Algorithm=EMS-HMAC-SHA256&' +
|
197
|
+
'X-EMS-Credentials=th3K3y%2F20110511%2Fus-east-1%2Fhost%2Faws4_request&' +
|
198
|
+
'X-EMS-Date=20110511T120000Z&' +
|
199
|
+
'X-EMS-Expires=123456&' +
|
200
|
+
'X-EMS-SignedHeaders=host&' +
|
201
|
+
'X-EMS-Signature=4d874d872a1df27f05d810592f98a3020ddfb92627043ebf255c86058fa1b93a'
|
202
|
+
|
203
|
+
client = {:api_key_id => 'th3K3y', :api_secret => 'very_secure'}
|
204
|
+
expect(escher.generate_signed_url('http://example.com/something?arr%5B%5C=apple&arr%5B%5C=pear', client, 123456)).to eq expected_url
|
205
|
+
end
|
206
|
+
|
207
|
+
|
192
208
|
[
|
193
209
|
['http://iam.amazonaws.com:5000/', 'iam.amazonaws.com:5000'],
|
194
210
|
['https://iam.amazonaws.com:5000/', 'iam.amazonaws.com:5000'],
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: escher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andras Barthazi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-06-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|