amazon-ec2 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.txt CHANGED
@@ -1,5 +1,50 @@
1
1
  =CHANGELOG.txt : Amazon Elastic Compute Cloud (EC2) Ruby Gem
2
2
 
3
+ ===0.0.6 (03/02/2007)
4
+ * Patched instances.rb with a bugfix and patch provided by Randy Bias (Thanks Randy!).
5
+ Only minimally tested so please let me know if this causes any problems for anyone.
6
+
7
+ From his notes:
8
+ I wanted to let you know that there appears to be a bug in how user data is passed. In
9
+ instances.rb the line that creates the base64 encoded package of user data is as follows:
10
+
11
+ userData = CGI::escape(Base64.encode64(in_params[:userData]).strip())
12
+
13
+ This may have worked prior, but at least right now the
14
+ CGI::escape appears to cause a breakage. More specifically it
15
+ turns something like this (the actual base64 encoded string):
16
+
17
+ YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFh
18
+ eHh4eHh4eHh4eHh4eHh4eHh4eHgg
19
+
20
+ Into this:
21
+
22
+ YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFh%
23
+ 0AeHh4eHh4eHh4eHh4eHh4eHh4eHgg
24
+
25
+ And it looks like EC2 chokes on the %0, which is CGI::escape's
26
+ way for handling an EOL. Unfortunately, the Base64.encode64 (at
27
+ least in my 1.8.5 version of Ruby) inserts a EOL at every 47 chars,
28
+ no matter what:
29
+
30
+ ---
31
+ [randyb@master randyb] cat /tmp/foo.rb
32
+ #!/usr/bin/env ruby
33
+ #
34
+ require 'rubygems'
35
+ require_gem 'amazon-ec2'
36
+ require 'getoptlong'
37
+ puts Base64.encode64
38
+ ("012345678901234567890123456789012345678901234567890123456789")
39
+
40
+ [randyb@master randyb] /tmp/foo.rb
41
+ MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0
42
+ NTY3ODkwMTIzNDU2Nzg5
43
+ ---
44
+
45
+ The best way to handle this is to strip the CRLFs/EOLs before passing to CGI.escape.
46
+
47
+
3
48
  ===0.0.5 (12/21/2006)
4
49
  * Changes to home page documentation and example files to indicate that you
5
50
  should use 'require_gem' instead of a simple require. Not sure if this
data/lib/EC2/instances.rb CHANGED
@@ -59,7 +59,7 @@ module EC2
59
59
  if in_params[:base64Encoded]
60
60
  userData = in_params[:userData]
61
61
  else
62
- userData = CGI::escape(Base64.encode64(in_params[:userData]).strip())
62
+ userData = CGI::escape(Base64.encode64(in_params[:userData]).gsub(/\n/,"").strip())
63
63
  end
64
64
  else
65
65
  userData = nil
data/lib/EC2/version.rb CHANGED
@@ -2,7 +2,7 @@ module EC2 #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 0
5
- TINY = 5
5
+ TINY = 6
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
metadata CHANGED
@@ -1,10 +1,10 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.9.0
2
+ rubygems_version: 0.9.2
3
3
  specification_version: 1
4
4
  name: amazon-ec2
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.0.5
7
- date: 2007-01-02 00:00:00 -08:00
6
+ version: 0.0.6
7
+ date: 2007-03-02 00:00:00 -08:00
8
8
  summary: An interface library that allows Ruby or Ruby on Rails applications to easily connect to the HTTP 'Query API' for the Amazon Web Services Elastic Compute Cloud (EC2) and manipulate server instances.
9
9
  require_paths:
10
10
  - lib
@@ -77,5 +77,5 @@ dependencies:
77
77
  requirements:
78
78
  - - ">="
79
79
  - !ruby/object:Gem::Version
80
- version: 1.1.6
80
+ version: 1.1.7
81
81
  version: