amazon-ec2 0.2.7 → 0.2.8
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/History.txt +3 -0
- data/lib/EC2.rb +6 -12
- data/lib/EC2/version.rb +1 -1
- data/test/test_EC2_version.rb +1 -1
- data/website/index.html +1 -1
- metadata +2 -2
data/History.txt
CHANGED
data/lib/EC2.rb
CHANGED
@@ -164,25 +164,19 @@ module EC2
|
|
164
164
|
"Version" => API_VERSION,
|
165
165
|
"Timestamp"=>Time.now.getutc.iso8601} )
|
166
166
|
|
167
|
-
|
167
|
+
sigquery = params.sort_by { |param| param[0].downcase }.collect { |param| param.join("=") }.join("&")
|
168
168
|
|
169
|
-
sig = get_aws_auth_param(
|
169
|
+
sig = get_aws_auth_param(sigquery, @secret_access_key)
|
170
170
|
|
171
|
-
|
171
|
+
query = params.sort.collect do |param|
|
172
172
|
CGI::escape(param[0]) + "=" + CGI::escape(param[1])
|
173
173
|
end.join("&") + "&Signature=" + sig
|
174
174
|
|
175
|
-
req = Net::HTTP::
|
176
|
-
|
177
|
-
# Ruby will automatically add a random content-type on some verbs, so
|
178
|
-
# here we add a dummy one to 'supress' it. Change this logic if having
|
179
|
-
# an empty content-type header becomes semantically meaningful for any
|
180
|
-
# other verb.
|
181
|
-
req['Content-Type'] ||= ''
|
175
|
+
req = Net::HTTP::Post.new("/")
|
176
|
+
req.content_type = 'application/x-www-form-urlencoded'
|
182
177
|
req['User-Agent'] = "rubyforge-amazon-ec2-ruby-gem-query-api v-#{RELEASE_VERSION}"
|
183
178
|
|
184
|
-
|
185
|
-
response = @http.request(req, nil)
|
179
|
+
response = @http.request(req, query)
|
186
180
|
|
187
181
|
# Make a call to see if we need to throw an error based on the response given by EC2
|
188
182
|
# All error classes are defined in EC2/exceptions.rb
|
data/lib/EC2/version.rb
CHANGED
data/test/test_EC2_version.rb
CHANGED
data/website/index.html
CHANGED
@@ -33,7 +33,7 @@
|
|
33
33
|
<h1>Amazon Web Services EC2 Ruby Gem</h1>
|
34
34
|
<div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/amazon-ec2"; return false'>
|
35
35
|
<p>Get Version</p>
|
36
|
-
<a href="http://rubyforge.org/projects/amazon-ec2" class="numbers">0.2.
|
36
|
+
<a href="http://rubyforge.org/projects/amazon-ec2" class="numbers">0.2.8</a>
|
37
37
|
</div>
|
38
38
|
<h2>→ ‘amazon-ec2’</h2>
|
39
39
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: amazon-ec2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Glenn Rempe
|
@@ -9,7 +9,7 @@ autorequire: EC2
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-02-
|
12
|
+
date: 2008-02-25 00:00:00 -08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|