alexa 0.6.0 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/lib/alexa/connection.rb +1 -1
- data/lib/alexa/version.rb +1 -1
- data/test/connection_test.rb +9 -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: 852cb7e1c9c682c411c798266bf3b628fb70521d
|
|
4
|
+
data.tar.gz: d68ec2bc5ad52c9a0cab3ae77fa55f8d651506e7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
|
data/lib/alexa/connection.rb
CHANGED
|
@@ -72,7 +72,7 @@ module Alexa
|
|
|
72
72
|
end
|
|
73
73
|
|
|
74
74
|
def query
|
|
75
|
-
default_params.merge(params).map { |key, value| "#{key}=#{
|
|
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
|
data/lib/alexa/version.rb
CHANGED
data/test/connection_test.rb
CHANGED
|
@@ -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.
|
|
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-
|
|
11
|
+
date: 2013-08-28 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: multi_xml
|