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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4b2aaa51a97cbcacb8f91e5ee93053a4bbe4e5a1
4
- data.tar.gz: d7b41ccf26d7f5a94562b092f88072bdb5691f75
3
+ metadata.gz: 6d7c8a7236299d04d8b414435631a7e8c166580b
4
+ data.tar.gz: a091fdb0bb8573b040baae2f0b58265bfb1c1349
5
5
  SHA512:
6
- metadata.gz: 2e2d44cc276b8bf74e66148e298f02286241233ed020139c426cb5fc6fd6e0b1b4e3c7f089996903a223df929528c67cba68cb48152a9575ee5eeeca460997e8
7
- data.tar.gz: a565aa6cc4ce556d81cf566c0d14fac90087789495e3ffb383582f84a3afacecf8976938ab8c5c5273f27bb4820b605d72a657329453a97daf14300c9e01b6de
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]]
@@ -1,3 +1,3 @@
1
1
  module Escher
2
- VERSION = '0.3.4'
2
+ VERSION = '0.3.5'
3
3
  end
@@ -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
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-05-04 00:00:00.000000000 Z
11
+ date: 2015-06-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler