amazon-ec2 0.2.7 → 0.2.8

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,6 @@
1
+ === 0.2.8 2008-02-25
2
+ * Change HTTP API requests to use POST instead of GET. Based on patch #18380 from 'anonymous'.
3
+
1
4
  === 0.2.7 2008-02-17
2
5
  * Add support for HTTP Proxy when :proxy_server argument is passed. Based on patch from Mathias Dalheimer.
3
6
 
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
- sigpath = "?" + params.sort_by { |param| param[0].downcase }.collect { |param| param.join("=") }.join("&")
167
+ sigquery = params.sort_by { |param| param[0].downcase }.collect { |param| param.join("=") }.join("&")
168
168
 
169
- sig = get_aws_auth_param(sigpath, @secret_access_key)
169
+ sig = get_aws_auth_param(sigquery, @secret_access_key)
170
170
 
171
- path = "?" + params.sort.collect do |param|
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::Get.new("/#{path}")
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
- #data = nil unless req.request_body_permitted?
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
@@ -12,7 +12,7 @@ module EC2 #:nodoc:
12
12
  module VERSION #:nodoc:
13
13
  MAJOR = 0
14
14
  MINOR = 2
15
- TINY = 7
15
+ TINY = 8
16
16
  STRING = [MAJOR, MINOR, TINY].join('.')
17
17
  end
18
18
  end
@@ -16,7 +16,7 @@ context "The EC2 Gem " do
16
16
  setup do
17
17
  @major = 0
18
18
  @minor = 2
19
- @tiny = 7
19
+ @tiny = 8
20
20
  @string = [@major, @minor, @tiny].join('.')
21
21
  end
22
22
 
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.7</a>
36
+ <a href="http://rubyforge.org/projects/amazon-ec2" class="numbers">0.2.8</a>
37
37
  </div>
38
38
  <h2>&#x2192; &#8216;amazon-ec2&#8217;</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.7
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-17 00:00:00 -08:00
12
+ date: 2008-02-25 00:00:00 -08:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency