amazon-ec2 0.9.8 → 0.9.9
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 +1 -1
- data/amazon-ec2.gemspec +2 -2
- data/lib/AWS.rb +4 -1
- data/test/test_EC2.rb +4 -4
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.9.
|
1
|
+
0.9.9
|
data/amazon-ec2.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{amazon-ec2}
|
8
|
-
s.version = "0.9.
|
8
|
+
s.version = "0.9.9"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Glenn Rempe"]
|
12
|
-
s.date = %q{2010-03-
|
12
|
+
s.date = %q{2010-03-19}
|
13
13
|
s.description = %q{A Ruby library for accessing the Amazon Web Services EC2, ELB, RDS, Cloudwatch, and Autoscaling APIs.}
|
14
14
|
s.email = %q{glenn@rempe.us}
|
15
15
|
s.executables = ["ec2-gem-example.rb", "ec2-gem-profile.rb", "ec2sh", "setup.rb"]
|
data/lib/AWS.rb
CHANGED
@@ -61,7 +61,10 @@ module AWS
|
|
61
61
|
encoded = (CGI::escape(p[0].to_s) +
|
62
62
|
"=" + CGI::escape(p[1].to_s))
|
63
63
|
# Ensure spaces are encoded as '%20', not '+'
|
64
|
-
encoded.gsub('+', '%20')
|
64
|
+
encoded = encoded.gsub('+', '%20')
|
65
|
+
# According to RFC3986 (the scheme for values expected by signing requests), '~'
|
66
|
+
# should not be encoded
|
67
|
+
encoded = encoded.gsub('%7E', '~')
|
65
68
|
end
|
66
69
|
sigquery = encoded_params.join("&")
|
67
70
|
|
data/test/test_EC2.rb
CHANGED
@@ -50,13 +50,13 @@ context "The EC2 method " do
|
|
50
50
|
end
|
51
51
|
|
52
52
|
specify "AWS.canonical_string(path) should conform to Amazon's requirements " do
|
53
|
-
path = {"name1" => "value1", "name2" => "value2", "name3" => "value3"}
|
53
|
+
path = {"name1" => "value1", "name2" => "value2 has spaces", "name3" => "value3~"}
|
54
54
|
if ENV['EC2_URL'].nil? || ENV['EC2_URL'] == 'https://ec2.amazonaws.com'
|
55
|
-
AWS.canonical_string(path, 'ec2.amazonaws.com').should.equal "POST\nec2.amazonaws.com\n/\nname1=value1&name2=value2&name3=value3"
|
55
|
+
AWS.canonical_string(path, 'ec2.amazonaws.com').should.equal "POST\nec2.amazonaws.com\n/\nname1=value1&name2=value2%20has%20spaces&name3=value3~"
|
56
56
|
elsif ENV['EC2_URL'] == 'https://us-east-1.ec2.amazonaws.com'
|
57
|
-
AWS.canonical_string(path, 'ec2.amazonaws.com').should.equal "POST\nus-east-1.ec2.amazonaws.com\n/\nname1=value1&name2=value2&name3=value3"
|
57
|
+
AWS.canonical_string(path, 'ec2.amazonaws.com').should.equal "POST\nus-east-1.ec2.amazonaws.com\n/\nname1=value1&name2=value2%20has%20spaces&name3=value3~"
|
58
58
|
elsif ENV['EC2_URL'] == 'https://eu-west-1.ec2.amazonaws.com'
|
59
|
-
AWS.canonical_string(path, 'ec2.amazonaws.com').should.equal "POST\neu-west-1.ec2.amazonaws.com\n/\nname1=value1&name2=value2&name3=value3"
|
59
|
+
AWS.canonical_string(path, 'ec2.amazonaws.com').should.equal "POST\neu-west-1.ec2.amazonaws.com\n/\nname1=value1&name2=value2%20has%20spaces&name3=value3~"
|
60
60
|
end
|
61
61
|
end
|
62
62
|
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 9
|
8
|
-
-
|
9
|
-
version: 0.9.
|
8
|
+
- 9
|
9
|
+
version: 0.9.9
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Glenn Rempe
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-03-
|
17
|
+
date: 2010-03-19 00:00:00 -07:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|