amazon-ec2 0.1.0 → 0.2.0
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 +166 -95
- data/License.txt +67 -20
- data/Manifest.txt +17 -6
- data/README.txt +112 -2
- data/Rakefile +15 -5
- data/bin/ec2-gem-example.rb +61 -0
- data/bin/ec2sh +73 -0
- data/bin/setup.rb +19 -0
- data/lib/EC2.rb +142 -61
- data/lib/EC2/console.rb +44 -0
- data/lib/EC2/exceptions.rb +136 -0
- data/lib/EC2/image_attributes.rb +137 -29
- data/lib/EC2/images.rb +120 -73
- data/lib/EC2/instances.rb +168 -98
- data/lib/EC2/keypairs.rb +79 -23
- data/lib/EC2/responses.rb +142 -321
- data/lib/EC2/security_groups.rb +209 -117
- data/lib/EC2/version.rb +11 -2
- data/test/test_EC2.rb +44 -13
- data/test/test_EC2_console.rb +54 -0
- data/test/test_EC2_image_attributes.rb +188 -0
- data/test/test_EC2_images.rb +191 -0
- data/test/test_EC2_instances.rb +303 -0
- data/test/test_EC2_keypairs.rb +123 -0
- data/test/test_EC2_responses.rb +102 -0
- data/test/test_EC2_security_groups.rb +205 -0
- data/test/test_EC2_version.rb +44 -0
- data/test/test_helper.rb +16 -8
- data/website/index.html +378 -86
- data/website/index.txt +339 -88
- data/website/stylesheets/screen.css +8 -8
- metadata +89 -16
- data/examples/ec2-example.rb +0 -48
- data/test/test_responses.rb +0 -17
@@ -1,6 +1,6 @@
|
|
1
1
|
body {
|
2
|
-
background-color: #
|
3
|
-
font-family: "
|
2
|
+
background-color: #FFFFFF;
|
3
|
+
font-family: "Helvetica", sans-serif;
|
4
4
|
font-size: 16px;
|
5
5
|
line-height: 1.6em;
|
6
6
|
padding: 1.6em 0 0 0;
|
@@ -23,8 +23,8 @@ li {
|
|
23
23
|
list-style-type: square;
|
24
24
|
}
|
25
25
|
a {
|
26
|
-
color: #
|
27
|
-
background-color: #
|
26
|
+
color: #000000;
|
27
|
+
background-color: #FFFFCC;
|
28
28
|
font-weight: normal;
|
29
29
|
text-decoration: underline;
|
30
30
|
}
|
@@ -39,7 +39,7 @@ blockquote {
|
|
39
39
|
}
|
40
40
|
|
41
41
|
#main {
|
42
|
-
width:
|
42
|
+
width: 47em;
|
43
43
|
padding: 0;
|
44
44
|
margin: 0 auto;
|
45
45
|
}
|
@@ -79,9 +79,9 @@ td {
|
|
79
79
|
}
|
80
80
|
pre, code {
|
81
81
|
font-family: monospace;
|
82
|
-
font-size:
|
83
|
-
line-height: 1.
|
84
|
-
color: #
|
82
|
+
font-size: 80%;
|
83
|
+
line-height: 1.2em;
|
84
|
+
color: #FFFFFF;
|
85
85
|
background-color: #111;
|
86
86
|
padding: 2px 10px 2px 10px;
|
87
87
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
|
-
rubygems_version: 0.9.
|
2
|
+
rubygems_version: 0.9.4
|
3
3
|
specification_version: 1
|
4
4
|
name: amazon-ec2
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.
|
7
|
-
date: 2007-
|
6
|
+
version: 0.2.0
|
7
|
+
date: 2007-07-03 00:00:00 -07: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
|
11
|
-
email:
|
11
|
+
email: glenn@elasticworkbench.com
|
12
12
|
homepage: http://amazon-ec2.rubyforge.org
|
13
13
|
rubyforge_project: amazon-ec2
|
14
14
|
description: 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.
|
@@ -27,16 +27,15 @@ signing_key:
|
|
27
27
|
cert_chain:
|
28
28
|
post_install_message:
|
29
29
|
authors:
|
30
|
-
- Amazon Web Services LLC
|
31
30
|
- Glenn Rempe
|
32
31
|
files:
|
33
|
-
- examples/ec2-example.rb
|
34
32
|
- History.txt
|
35
|
-
-
|
36
|
-
-
|
37
|
-
-
|
38
|
-
- Rakefile
|
33
|
+
- bin/ec2sh
|
34
|
+
- bin/ec2-gem-example.rb
|
35
|
+
- bin/setup.rb
|
39
36
|
- lib/EC2.rb
|
37
|
+
- lib/EC2/console.rb
|
38
|
+
- lib/EC2/exceptions.rb
|
40
39
|
- lib/EC2/version.rb
|
41
40
|
- lib/EC2/responses.rb
|
42
41
|
- lib/EC2/images.rb
|
@@ -44,11 +43,22 @@ files:
|
|
44
43
|
- lib/EC2/keypairs.rb
|
45
44
|
- lib/EC2/image_attributes.rb
|
46
45
|
- lib/EC2/security_groups.rb
|
46
|
+
- License.txt
|
47
|
+
- Manifest.txt
|
48
|
+
- Rakefile
|
49
|
+
- README.txt
|
47
50
|
- scripts/txt2html
|
48
51
|
- setup.rb
|
49
52
|
- test/test_EC2.rb
|
53
|
+
- test/test_EC2_console.rb
|
54
|
+
- test/test_EC2_image_attributes.rb
|
55
|
+
- test/test_EC2_images.rb
|
56
|
+
- test/test_EC2_instances.rb
|
57
|
+
- test/test_EC2_keypairs.rb
|
58
|
+
- test/test_EC2_responses.rb
|
59
|
+
- test/test_EC2_security_groups.rb
|
60
|
+
- test/test_EC2_version.rb
|
50
61
|
- test/test_helper.rb
|
51
|
-
- test/test_responses.rb
|
52
62
|
- website/index.html
|
53
63
|
- website/index.txt
|
54
64
|
- website/javascripts/rounded_corners_lite.inc.js
|
@@ -56,8 +66,15 @@ files:
|
|
56
66
|
- website/template.rhtml
|
57
67
|
test_files:
|
58
68
|
- test/test_EC2.rb
|
69
|
+
- test/test_EC2_console.rb
|
70
|
+
- test/test_EC2_image_attributes.rb
|
71
|
+
- test/test_EC2_images.rb
|
72
|
+
- test/test_EC2_instances.rb
|
73
|
+
- test/test_EC2_keypairs.rb
|
74
|
+
- test/test_EC2_responses.rb
|
75
|
+
- test/test_EC2_security_groups.rb
|
76
|
+
- test/test_EC2_version.rb
|
59
77
|
- test/test_helper.rb
|
60
|
-
- test/test_responses.rb
|
61
78
|
rdoc_options:
|
62
79
|
- --quiet
|
63
80
|
- --title
|
@@ -71,11 +88,67 @@ rdoc_options:
|
|
71
88
|
extra_rdoc_files:
|
72
89
|
- README.txt
|
73
90
|
- History.txt
|
74
|
-
|
75
|
-
|
91
|
+
- License.txt
|
92
|
+
executables:
|
93
|
+
- ec2sh
|
94
|
+
- ec2-gem-example.rb
|
95
|
+
- setup.rb
|
76
96
|
extensions: []
|
77
97
|
|
78
98
|
requirements: []
|
79
99
|
|
80
|
-
dependencies:
|
81
|
-
|
100
|
+
dependencies:
|
101
|
+
- !ruby/object:Gem::Dependency
|
102
|
+
name: xml-simple
|
103
|
+
version_requirement:
|
104
|
+
version_requirements: !ruby/object:Gem::Version::Requirement
|
105
|
+
requirements:
|
106
|
+
- - ">="
|
107
|
+
- !ruby/object:Gem::Version
|
108
|
+
version: 1.0.11
|
109
|
+
version:
|
110
|
+
- !ruby/object:Gem::Dependency
|
111
|
+
name: mocha
|
112
|
+
version_requirement:
|
113
|
+
version_requirements: !ruby/object:Gem::Version::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: 0.4.0
|
118
|
+
version:
|
119
|
+
- !ruby/object:Gem::Dependency
|
120
|
+
name: test-spec
|
121
|
+
version_requirement:
|
122
|
+
version_requirements: !ruby/object:Gem::Version::Requirement
|
123
|
+
requirements:
|
124
|
+
- - ">="
|
125
|
+
- !ruby/object:Gem::Version
|
126
|
+
version: 0.3.0
|
127
|
+
version:
|
128
|
+
- !ruby/object:Gem::Dependency
|
129
|
+
name: rcov
|
130
|
+
version_requirement:
|
131
|
+
version_requirements: !ruby/object:Gem::Version::Requirement
|
132
|
+
requirements:
|
133
|
+
- - ">="
|
134
|
+
- !ruby/object:Gem::Version
|
135
|
+
version: 0.8.0.2
|
136
|
+
version:
|
137
|
+
- !ruby/object:Gem::Dependency
|
138
|
+
name: syntax
|
139
|
+
version_requirement:
|
140
|
+
version_requirements: !ruby/object:Gem::Version::Requirement
|
141
|
+
requirements:
|
142
|
+
- - ">="
|
143
|
+
- !ruby/object:Gem::Version
|
144
|
+
version: 1.0.0
|
145
|
+
version:
|
146
|
+
- !ruby/object:Gem::Dependency
|
147
|
+
name: RedCloth
|
148
|
+
version_requirement:
|
149
|
+
version_requirements: !ruby/object:Gem::Version::Requirement
|
150
|
+
requirements:
|
151
|
+
- - ">="
|
152
|
+
- !ruby/object:Gem::Version
|
153
|
+
version: 3.0.4
|
154
|
+
version:
|
data/examples/ec2-example.rb
DELETED
@@ -1,48 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
# This software code is made available "AS IS" without warranties of any
|
4
|
-
# kind. You may copy, display, modify and redistribute the software
|
5
|
-
# code either by itself or as incorporated into your code; provided that
|
6
|
-
# you do not remove any proprietary notices. Your use of this software
|
7
|
-
# code is at your own risk and you waive any claim against Amazon Web
|
8
|
-
# Services LLC or its affiliates with respect to your use of this software
|
9
|
-
# code. (c) 2006 Amazon Web Services LLC or its affiliates. All rights
|
10
|
-
# reserved.
|
11
|
-
|
12
|
-
require 'rubygems'
|
13
|
-
require_gem 'amazon-ec2'
|
14
|
-
|
15
|
-
AWS_ACCESS_KEY_ID = '--YOUR AWS ACCESS KEY ID--'
|
16
|
-
AWS_SECRET_ACCESS_KEY = '--YOUR AWS SECRET ACCESS KEY--'
|
17
|
-
|
18
|
-
# remove these next two lines as well, when you've updated your credentials.
|
19
|
-
puts "update #{$0} with your AWS credentials"
|
20
|
-
exit
|
21
|
-
|
22
|
-
SECURITY_GROUP_NAME = "ec2-example-rb-test-group"
|
23
|
-
|
24
|
-
conn = EC2::AWSAuthConnection.new(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY)
|
25
|
-
|
26
|
-
puts "----- GEM Version -----"
|
27
|
-
puts EC2::VERSION::STRING
|
28
|
-
|
29
|
-
puts "----- listing images -----"
|
30
|
-
puts conn.describe_images()
|
31
|
-
|
32
|
-
puts "----- listing instances -----"
|
33
|
-
puts conn.describe_instances()
|
34
|
-
|
35
|
-
puts "----- creating a security group -----"
|
36
|
-
puts conn.create_securitygroup(SECURITY_GROUP_NAME, "ec-example.rb test group")
|
37
|
-
|
38
|
-
puts "----- listing security groups -----"
|
39
|
-
puts conn.describe_securitygroups()
|
40
|
-
|
41
|
-
puts "----- deleting a security group -----"
|
42
|
-
puts conn.delete_securitygroup(SECURITY_GROUP_NAME)
|
43
|
-
|
44
|
-
puts "----- listing keypairs (verbose mode) -----"
|
45
|
-
conn.verbose = true
|
46
|
-
puts conn.describe_keypairs()
|
47
|
-
|
48
|
-
|
data/test/test_responses.rb
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
require "test_helper"
|
2
|
-
|
3
|
-
class TestResetResponse < Test::Unit::TestCase
|
4
|
-
|
5
|
-
def setup
|
6
|
-
body = <<-RESPONSE
|
7
|
-
<RebootInstancesResponse xmlns="http://ec2.amazonaws.com/doc/2007-01-03/">
|
8
|
-
<return>true</return>
|
9
|
-
</RebootInstancesResponse>
|
10
|
-
RESPONSE
|
11
|
-
@response = EC2::ResetInstancesResponse.new(stub(:body => body, :is_a? => true))
|
12
|
-
end
|
13
|
-
|
14
|
-
def test_parse
|
15
|
-
assert_equal true, @response.parse
|
16
|
-
end
|
17
|
-
end
|