dbalatero-fpswax 0.0.3 → 0.0.4
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.
- data/VERSION.yml +1 -1
- data/lib/fpswax.rb +1 -0
- data/lib/fpswax/multi_use_pipeline_request.rb +1 -1
- data/spec/fpswax/multi_use_pipeline_request_spec.rb +14 -2
- metadata +2 -2
data/VERSION.yml
CHANGED
data/lib/fpswax.rb
CHANGED
@@ -34,7 +34,7 @@ module Fpswax
|
|
34
34
|
|
35
35
|
def create_url!
|
36
36
|
@url = "" << cbui_url << "?awsSignature=#{@signature}&"
|
37
|
-
@url << @params.keys.map { |key| "#{key}=#{@params[key]}" }.join('&')
|
37
|
+
@url << @params.keys.map { |key| "#{key}=#{CGI.escape(@params[key].to_s)}" }.join('&')
|
38
38
|
end
|
39
39
|
end
|
40
40
|
end
|
@@ -12,7 +12,7 @@ describe Fpswax::MultiUsePipelineRequest do
|
|
12
12
|
|
13
13
|
|
14
14
|
it "should add the access key" do
|
15
|
-
@request.url.should =~ /callerKey=my
|
15
|
+
@request.url.should =~ /callerKey=my\+access\+key/
|
16
16
|
end
|
17
17
|
|
18
18
|
it "should calculate an HMAC signature" do
|
@@ -28,7 +28,19 @@ describe Fpswax::MultiUsePipelineRequest do
|
|
28
28
|
end
|
29
29
|
|
30
30
|
it "should contain any parameters passed in" do
|
31
|
-
@request.url.should =~ /&returnURL=http
|
31
|
+
@request.url.should =~ /&returnURL=http%3A%2F%2Freturn_url/
|
32
|
+
end
|
33
|
+
|
34
|
+
it "should urlencode every parameter" do
|
35
|
+
request = Fpswax::MultiUsePipelineRequest.new(
|
36
|
+
'foo',
|
37
|
+
'bar',
|
38
|
+
:var1 => "ok let's do this",
|
39
|
+
:var2 => "ok here+ is more### stuff ://"
|
40
|
+
)
|
41
|
+
|
42
|
+
request.url.should =~ /var1=ok\+let%27s\+do\+this/
|
43
|
+
request.url.should =~ /var2=ok\+here%2B\+is\+more%23%23%23\+stuff\+%3A%2F%2F/
|
32
44
|
end
|
33
45
|
end
|
34
46
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dbalatero-fpswax
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Balatero
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-05-
|
12
|
+
date: 2009-05-28 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|