alexa 0.6.0 → 0.6.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: 9ccd86a3ae85e39d31ce8b02c7f8b7c0d645b697
4
- data.tar.gz: cdfa14a65ba9bd1b4c066c9d1cce1901ccfb1553
3
+ metadata.gz: 852cb7e1c9c682c411c798266bf3b628fb70521d
4
+ data.tar.gz: d68ec2bc5ad52c9a0cab3ae77fa55f8d651506e7
5
5
  SHA512:
6
- metadata.gz: 27929e6136ee233327a47816df60c8cf4115bde6ef326166a27b25ee7ba89a3efb460a08bc38e0d693cf19121b37a3772eeb0d3e5fae665af8d8a3cf3650def8
7
- data.tar.gz: ec692b05fd2904518bebbcb9a25e0f70f01e41dd0eed65223ac093e8ab3559158566ff2ad28cfdef607febb5e4db47b1349e696c72c4351bb1f7dfedfcd12f5e
6
+ metadata.gz: 301ae67beecce760d8a1c1e0e0d7e037b2db13d7eb5e89d24aa36182ececd2fc54ee80f2902fc66830a8e1e513cd2c794d1f35696c18b1c6b6b43f163b7e3112
7
+ data.tar.gz: 4197c0fae4b6e2019778e24f2d633e0e658f0de91ec9772409dd3bed0d9d50ad80935f2664045e40e1a153d1cdc3633d646aa8b68340e072c3ec064e69a8c431
data/README.md CHANGED
@@ -146,6 +146,7 @@ Currently alexa will not work with `ox` gem
146
146
  * [rmoriz](https://github.com/rmoriz)
147
147
  * [jasongill](https://github.com/jasongill)
148
148
  * [sporkmonger](https://github.com/sporkmonger)
149
+ * [pelf](https://github.com/pelf)
149
150
 
150
151
  ## Continuous Integration
151
152
 
@@ -72,7 +72,7 @@ module Alexa
72
72
  end
73
73
 
74
74
  def query
75
- default_params.merge(params).map { |key, value| "#{key}=#{CGI::escape(value.to_s)}" }.sort.join("&")
75
+ default_params.merge(params).map { |key, value| "#{key}=#{URI.escape(value.to_s, Regexp.new("[^#{URI::PATTERN::UNRESERVED}]"))}" }.sort.join("&")
76
76
  end
77
77
  end
78
78
  end
@@ -1,3 +1,3 @@
1
1
  module Alexa
2
- VERSION = "0.6.0"
2
+ VERSION = "0.6.1"
3
3
  end
@@ -17,6 +17,15 @@ describe Alexa::Connection do
17
17
  assert_equal expected, connection.query
18
18
  end
19
19
 
20
+ it "encodes space character" do
21
+ connection = Alexa::Connection.new(:access_key_id => "fake", :secret_access_key => "fake")
22
+ connection.stubs(:timestamp).returns("2012-08-08T20:58:32.000Z")
23
+ connection.params = {:custom_value => "two beers"}
24
+
25
+ expected = "AWSAccessKeyId=fake&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2012-08-08T20%3A58%3A32.000Z&Version=2005-07-11&custom_value=two%20beers"
26
+ assert_equal expected, connection.query
27
+ end
28
+
20
29
  it "raises error when unathorized" do
21
30
  stub_request(:get, %r{http://awis.amazonaws.com}).to_return(fixture("unathorized.txt"))
22
31
  connection = Alexa::Connection.new(:access_key_id => "wrong", :secret_access_key => "wrong")
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alexa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wojciech Wnętrzak
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-06 00:00:00.000000000 Z
11
+ date: 2013-08-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: multi_xml