fog 0.0.9 → 0.0.10
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/README.rdoc +79 -2
- data/VERSION +1 -1
- data/fog.gemspec +28 -6
- data/lib/fog.rb +10 -7
- data/lib/fog/aws.rb +35 -9
- data/lib/fog/aws/ec2.rb +82 -69
- data/lib/fog/aws/models/ec2/address.rb +23 -1
- data/lib/fog/aws/models/ec2/addresses.rb +26 -2
- data/lib/fog/aws/models/ec2/instance.rb +135 -0
- data/lib/fog/aws/models/ec2/instances.rb +56 -0
- data/lib/fog/aws/models/ec2/key_pair.rb +17 -2
- data/lib/fog/aws/models/ec2/key_pairs.rb +29 -3
- data/lib/fog/aws/models/ec2/security_group.rb +41 -0
- data/lib/fog/aws/models/ec2/security_groups.rb +62 -0
- data/lib/fog/aws/models/ec2/snapshot.rb +12 -12
- data/lib/fog/aws/models/ec2/snapshots.rb +43 -21
- data/lib/fog/aws/models/ec2/volume.rb +21 -10
- data/lib/fog/aws/models/ec2/volumes.rb +30 -4
- data/lib/fog/aws/models/s3/buckets.rb +5 -8
- data/lib/fog/aws/models/s3/objects.rb +4 -7
- data/lib/fog/aws/requests/ec2/authorize_security_group_ingress.rb +63 -27
- data/lib/fog/aws/requests/ec2/create_security_group.rb +3 -3
- data/lib/fog/aws/requests/ec2/describe_images.rb +65 -35
- data/lib/fog/aws/requests/ec2/describe_instances.rb +2 -0
- data/lib/fog/aws/requests/ec2/get_console_output.rb +52 -21
- data/lib/fog/aws/requests/ec2/reboot_instances.rb +52 -19
- data/lib/fog/aws/requests/ec2/revoke_security_group_ingress.rb +63 -27
- data/lib/fog/aws/requests/ec2/run_instances.rb +1 -1
- data/lib/fog/aws/requests/ec2/terminate_instances.rb +14 -10
- data/lib/fog/aws/s3.rb +31 -35
- data/lib/fog/aws/simpledb.rb +19 -22
- data/lib/fog/collection.rb +3 -3
- data/lib/fog/connection.rb +2 -2
- data/lib/fog/errors.rb +1 -1
- data/lib/fog/model.rb +3 -3
- data/spec/aws/models/ec2/address_spec.rb +84 -0
- data/spec/aws/models/ec2/addresses_spec.rb +70 -0
- data/spec/aws/models/ec2/key_pair_spec.rb +84 -0
- data/spec/aws/models/ec2/key_pairs_spec.rb +71 -0
- data/spec/aws/models/ec2/security_group_spec.rb +84 -0
- data/spec/aws/models/ec2/security_groups_spec.rb +71 -0
- data/spec/aws/models/ec2/snapshot_spec.rb +93 -0
- data/spec/aws/models/ec2/snapshots_spec.rb +74 -0
- data/spec/aws/models/ec2/volume_spec.rb +84 -0
- data/spec/aws/models/ec2/volumes_spec.rb +70 -0
- data/spec/aws/models/s3/bucket_spec.rb +0 -1
- data/spec/aws/models/s3/buckets_spec.rb +2 -11
- data/spec/aws/requests/ec2/describe_security_groups_spec.rb +1 -1
- data/spec/aws/requests/ec2/get_console_output_spec.rb +9 -0
- data/spec/aws/requests/ec2/reboot_instances_spec.rb +11 -2
- data/spec/aws/requests/ec2/run_instances_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- metadata +26 -4
- data/LICENSE +0 -20
@@ -8,14 +8,23 @@ describe 'EC2.reboot_instances' do
|
|
8
8
|
end
|
9
9
|
|
10
10
|
after(:each) do
|
11
|
-
ec2.terminate_instances(
|
11
|
+
ec2.terminate_instances(@instance_id)
|
12
12
|
end
|
13
13
|
|
14
14
|
it "should return proper attributes" do
|
15
|
-
actual = ec2.reboot_instances(
|
15
|
+
actual = ec2.reboot_instances(@instance_id)
|
16
16
|
actual.body['requestId'].should be_a(String)
|
17
17
|
[false, true].should include(actual.body['return'])
|
18
18
|
end
|
19
19
|
|
20
20
|
end
|
21
|
+
describe 'failure' do
|
22
|
+
|
23
|
+
it "should raise a BadRequest error if the instance does not exist" do
|
24
|
+
lambda {
|
25
|
+
ec2.reboot_instances('i-00000000')
|
26
|
+
}.should raise_error(Fog::Errors::BadRequest)
|
27
|
+
end
|
28
|
+
|
29
|
+
end
|
21
30
|
end
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fog
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Wesley Beary
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-09-
|
12
|
+
date: 2009-09-30 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -49,12 +49,10 @@ executables: []
|
|
49
49
|
extensions: []
|
50
50
|
|
51
51
|
extra_rdoc_files:
|
52
|
-
- LICENSE
|
53
52
|
- README.rdoc
|
54
53
|
files:
|
55
54
|
- .document
|
56
55
|
- .gitignore
|
57
|
-
- LICENSE
|
58
56
|
- README.rdoc
|
59
57
|
- Rakefile
|
60
58
|
- VERSION
|
@@ -69,8 +67,12 @@ files:
|
|
69
67
|
- lib/fog/aws/ec2.rb
|
70
68
|
- lib/fog/aws/models/ec2/address.rb
|
71
69
|
- lib/fog/aws/models/ec2/addresses.rb
|
70
|
+
- lib/fog/aws/models/ec2/instance.rb
|
71
|
+
- lib/fog/aws/models/ec2/instances.rb
|
72
72
|
- lib/fog/aws/models/ec2/key_pair.rb
|
73
73
|
- lib/fog/aws/models/ec2/key_pairs.rb
|
74
|
+
- lib/fog/aws/models/ec2/security_group.rb
|
75
|
+
- lib/fog/aws/models/ec2/security_groups.rb
|
74
76
|
- lib/fog/aws/models/ec2/snapshot.rb
|
75
77
|
- lib/fog/aws/models/ec2/snapshots.rb
|
76
78
|
- lib/fog/aws/models/ec2/volume.rb
|
@@ -167,6 +169,16 @@ files:
|
|
167
169
|
- lib/fog/model.rb
|
168
170
|
- lib/fog/parser.rb
|
169
171
|
- lib/fog/response.rb
|
172
|
+
- spec/aws/models/ec2/address_spec.rb
|
173
|
+
- spec/aws/models/ec2/addresses_spec.rb
|
174
|
+
- spec/aws/models/ec2/key_pair_spec.rb
|
175
|
+
- spec/aws/models/ec2/key_pairs_spec.rb
|
176
|
+
- spec/aws/models/ec2/security_group_spec.rb
|
177
|
+
- spec/aws/models/ec2/security_groups_spec.rb
|
178
|
+
- spec/aws/models/ec2/snapshot_spec.rb
|
179
|
+
- spec/aws/models/ec2/snapshots_spec.rb
|
180
|
+
- spec/aws/models/ec2/volume_spec.rb
|
181
|
+
- spec/aws/models/ec2/volumes_spec.rb
|
170
182
|
- spec/aws/models/s3/bucket_spec.rb
|
171
183
|
- spec/aws/models/s3/buckets_spec.rb
|
172
184
|
- spec/aws/models/s3/object_spec.rb
|
@@ -254,6 +266,16 @@ signing_key:
|
|
254
266
|
specification_version: 3
|
255
267
|
summary: fog = clouds + you
|
256
268
|
test_files:
|
269
|
+
- spec/aws/models/ec2/address_spec.rb
|
270
|
+
- spec/aws/models/ec2/addresses_spec.rb
|
271
|
+
- spec/aws/models/ec2/key_pair_spec.rb
|
272
|
+
- spec/aws/models/ec2/key_pairs_spec.rb
|
273
|
+
- spec/aws/models/ec2/security_group_spec.rb
|
274
|
+
- spec/aws/models/ec2/security_groups_spec.rb
|
275
|
+
- spec/aws/models/ec2/snapshot_spec.rb
|
276
|
+
- spec/aws/models/ec2/snapshots_spec.rb
|
277
|
+
- spec/aws/models/ec2/volume_spec.rb
|
278
|
+
- spec/aws/models/ec2/volumes_spec.rb
|
257
279
|
- spec/aws/models/s3/bucket_spec.rb
|
258
280
|
- spec/aws/models/s3/buckets_spec.rb
|
259
281
|
- spec/aws/models/s3/object_spec.rb
|
data/LICENSE
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
Copyright (c) 2009 Wesley Beary
|
2
|
-
|
3
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
-
a copy of this software and associated documentation files (the
|
5
|
-
"Software"), to deal in the Software without restriction, including
|
6
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
-
permit persons to whom the Software is furnished to do so, subject to
|
9
|
-
the following conditions:
|
10
|
-
|
11
|
-
The above copyright notice and this permission notice shall be
|
12
|
-
included in all copies or substantial portions of the Software.
|
13
|
-
|
14
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|