fog 0.0.31 → 0.0.32
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +0 -2
- data/Rakefile +12 -7
- data/VERSION +1 -1
- data/bin/fog +16 -18
- data/fog.gemspec +34 -8
- data/lib/fog.rb +11 -0
- data/lib/fog/aws/models/ec2/address.rb +4 -0
- data/lib/fog/aws/models/ec2/instance.rb +17 -0
- data/lib/fog/aws/models/ec2/key_pair.rb +4 -0
- data/lib/fog/aws/models/ec2/security_group.rb +8 -0
- data/lib/fog/aws/models/ec2/snapshot.rb +7 -1
- data/lib/fog/aws/models/ec2/volume.rb +9 -1
- data/lib/fog/aws/models/s3/bucket.rb +10 -0
- data/lib/fog/aws/models/s3/buckets.rb +10 -4
- data/lib/fog/aws/models/s3/object.rb +5 -0
- data/lib/fog/aws/requests/ec2/allocate_address.rb +1 -1
- data/lib/fog/aws/requests/ec2/associate_address.rb +2 -2
- data/lib/fog/aws/requests/ec2/attach_volume.rb +2 -2
- data/lib/fog/aws/requests/ec2/authorize_security_group_ingress.rb +1 -1
- data/lib/fog/aws/requests/ec2/create_key_pair.rb +2 -2
- data/lib/fog/aws/requests/ec2/create_security_group.rb +2 -2
- data/lib/fog/aws/requests/ec2/create_snapshot.rb +2 -2
- data/lib/fog/aws/requests/ec2/create_volume.rb +1 -1
- data/lib/fog/aws/requests/ec2/delete_key_pair.rb +1 -1
- data/lib/fog/aws/requests/ec2/delete_security_group.rb +2 -2
- data/lib/fog/aws/requests/ec2/delete_snapshot.rb +2 -2
- data/lib/fog/aws/requests/ec2/delete_volume.rb +2 -2
- data/lib/fog/aws/requests/ec2/describe_addresses.rb +2 -2
- data/lib/fog/aws/requests/ec2/describe_availability_zones.rb +1 -1
- data/lib/fog/aws/requests/ec2/describe_images.rb +1 -1
- data/lib/fog/aws/requests/ec2/describe_instances.rb +2 -2
- data/lib/fog/aws/requests/ec2/describe_key_pairs.rb +2 -2
- data/lib/fog/aws/requests/ec2/describe_regions.rb +1 -1
- data/lib/fog/aws/requests/ec2/describe_security_groups.rb +2 -2
- data/lib/fog/aws/requests/ec2/describe_snapshots.rb +2 -2
- data/lib/fog/aws/requests/ec2/describe_volumes.rb +2 -2
- data/lib/fog/aws/requests/ec2/detach_volume.rb +2 -2
- data/lib/fog/aws/requests/ec2/disassociate_address.rb +2 -2
- data/lib/fog/aws/requests/ec2/get_console_output.rb +2 -2
- data/lib/fog/aws/requests/ec2/reboot_instances.rb +2 -2
- data/lib/fog/aws/requests/ec2/release_address.rb +2 -2
- data/lib/fog/aws/requests/ec2/revoke_security_group_ingress.rb +1 -1
- data/lib/fog/aws/requests/ec2/run_instances.rb +1 -1
- data/lib/fog/aws/requests/ec2/terminate_instances.rb +2 -2
- data/lib/fog/aws/requests/s3/copy_object.rb +2 -2
- data/lib/fog/aws/requests/s3/delete_bucket.rb +3 -3
- data/lib/fog/aws/requests/s3/delete_object.rb +8 -7
- data/lib/fog/aws/requests/s3/get_bucket.rb +2 -2
- data/lib/fog/aws/requests/s3/get_bucket_location.rb +2 -2
- data/lib/fog/aws/requests/s3/get_object.rb +2 -2
- data/lib/fog/aws/requests/s3/get_request_payment.rb +2 -2
- data/lib/fog/aws/requests/s3/get_service.rb +1 -1
- data/lib/fog/aws/requests/s3/put_bucket.rb +8 -6
- data/lib/fog/aws/requests/s3/put_object.rb +9 -9
- data/lib/fog/aws/requests/s3/put_request_payment.rb +2 -2
- data/lib/fog/aws/requests/simpledb/batch_put_attributes.rb +2 -2
- data/lib/fog/aws/requests/simpledb/create_domain.rb +1 -1
- data/lib/fog/aws/requests/simpledb/delete_attributes.rb +2 -2
- data/lib/fog/aws/requests/simpledb/delete_domain.rb +1 -1
- data/lib/fog/aws/requests/simpledb/domain_metadata.rb +2 -2
- data/lib/fog/aws/requests/simpledb/get_attributes.rb +2 -2
- data/lib/fog/aws/requests/simpledb/list_domains.rb +1 -1
- data/lib/fog/aws/s3.rb +1 -12
- data/lib/fog/collection.rb +16 -8
- data/lib/fog/model.rb +36 -14
- data/lib/fog/rackspace/models/servers/image.rb +40 -0
- data/lib/fog/rackspace/models/servers/images.rb +50 -0
- data/lib/fog/rackspace/models/servers/server.rb +18 -2
- data/lib/fog/rackspace/requests/servers/create_image.rb +18 -1
- data/lib/fog/rackspace/requests/servers/create_server.rb +5 -5
- data/lib/fog/rackspace/requests/servers/delete_image.rb +16 -1
- data/lib/fog/rackspace/requests/servers/delete_server.rb +4 -4
- data/lib/fog/rackspace/requests/servers/get_server_details.rb +2 -2
- data/lib/fog/rackspace/requests/servers/list_addresses.rb +2 -2
- data/lib/fog/rackspace/requests/servers/list_images.rb +10 -0
- data/lib/fog/rackspace/requests/servers/list_images_detail.rb +16 -1
- data/lib/fog/rackspace/requests/servers/list_private_addresses.rb +2 -2
- data/lib/fog/rackspace/requests/servers/list_public_addresses.rb +2 -2
- data/lib/fog/rackspace/requests/servers/list_servers.rb +1 -1
- data/lib/fog/rackspace/requests/servers/list_servers_detail.rb +2 -2
- data/lib/fog/rackspace/requests/servers/update_server.rb +2 -2
- data/lib/fog/rackspace/servers.rb +8 -2
- data/lib/fog/slicehost.rb +66 -0
- data/lib/fog/slicehost/parsers/create_slice.rb +29 -0
- data/lib/fog/slicehost/parsers/get_backups.rb +30 -0
- data/lib/fog/slicehost/parsers/get_flavors.rb +28 -0
- data/lib/fog/slicehost/parsers/get_images.rb +28 -0
- data/lib/fog/slicehost/parsers/get_slices.rb +33 -0
- data/lib/fog/slicehost/requests/create_slice.rb +50 -0
- data/lib/fog/slicehost/requests/delete_slice.rb +48 -0
- data/lib/fog/slicehost/requests/get_backups.rb +38 -0
- data/lib/fog/slicehost/requests/get_flavors.rb +38 -0
- data/lib/fog/slicehost/requests/get_images.rb +36 -0
- data/lib/fog/slicehost/requests/get_slices.rb +44 -0
- data/spec/aws/requests/s3/put_object_spec.rb +8 -0
- data/spec/rackspace/requests/servers/create_image_spec.rb +1 -1
- data/spec/rackspace/requests/servers/create_server_spec.rb +1 -1
- data/spec/rackspace/requests/servers/delete_image_spec.rb +7 -5
- data/spec/rackspace/requests/servers/delete_server_spec.rb +1 -1
- data/spec/rackspace/requests/servers/get_server_details_spec.rb +1 -1
- data/spec/rackspace/requests/servers/list_addresses_spec.rb +1 -1
- data/spec/rackspace/requests/servers/list_private_addresses_spec.rb +1 -1
- data/spec/rackspace/requests/servers/list_public_addresses_spec.rb +1 -1
- data/spec/rackspace/requests/servers/list_servers_detail_spec.rb +1 -1
- data/spec/rackspace/requests/servers/list_servers_spec.rb +1 -1
- data/spec/rackspace/requests/servers/reboot_server_spec.rb +1 -1
- data/spec/rackspace/requests/servers/update_server_spec.rb +1 -1
- data/spec/slicehost/requests/create_slice_spec.rb +29 -0
- data/spec/slicehost/requests/delete_slice_spec.rb +18 -0
- data/spec/slicehost/requests/get_backups_spec.rb +17 -0
- data/spec/slicehost/requests/get_flavors_spec.rb +17 -0
- data/spec/slicehost/requests/get_images_spec.rb +15 -0
- data/spec/slicehost/requests/get_slices_spec.rb +23 -0
- data/spec/spec_helper.rb +20 -22
- metadata +29 -4
- data/lib/fog/aws/models/s3/owner.rb +0 -18
@@ -32,7 +32,7 @@ else
|
|
32
32
|
class EC2
|
33
33
|
|
34
34
|
def reboot_instances(instance_id = [])
|
35
|
-
response =
|
35
|
+
response = Excon::Response.new
|
36
36
|
instance_id = [*instance_id]
|
37
37
|
if (Fog::AWS::EC2.data[:instances].keys & instance_id).length == instance_id.length
|
38
38
|
for instance_id in instance_id
|
@@ -45,7 +45,7 @@ else
|
|
45
45
|
}
|
46
46
|
else
|
47
47
|
response.status = 400
|
48
|
-
raise(Excon::Errors.status_error(200,
|
48
|
+
raise(Excon::Errors.status_error({:expects => 200}, response))
|
49
49
|
end
|
50
50
|
response
|
51
51
|
end
|
@@ -29,7 +29,7 @@ else
|
|
29
29
|
class EC2
|
30
30
|
|
31
31
|
def release_address(public_ip)
|
32
|
-
response =
|
32
|
+
response = Excon::Response.new
|
33
33
|
if (address = Fog::AWS::EC2.data[:addresses].delete(public_ip))
|
34
34
|
response.status = 200
|
35
35
|
response.body = {
|
@@ -38,7 +38,7 @@ else
|
|
38
38
|
}
|
39
39
|
else
|
40
40
|
response.status = 400
|
41
|
-
raise(Excon::Errors.status_error(200,
|
41
|
+
raise(Excon::Errors.status_error({:expects => 200}, response))
|
42
42
|
end
|
43
43
|
response
|
44
44
|
end
|
@@ -41,7 +41,7 @@ else
|
|
41
41
|
|
42
42
|
# TODO: handle the GroupName/Source/Source case
|
43
43
|
def revoke_security_group_ingress(options = {})
|
44
|
-
response =
|
44
|
+
response = Excon::Response.new
|
45
45
|
group = Fog::AWS::EC2.data[:security_groups][options['GroupName']]
|
46
46
|
|
47
47
|
ingress = group['ipPermissions'].select {|permission|
|
@@ -39,7 +39,7 @@ else
|
|
39
39
|
class EC2
|
40
40
|
|
41
41
|
def terminate_instances(instance_id)
|
42
|
-
response =
|
42
|
+
response = Excon::Response.new
|
43
43
|
instance_id = [*instance_id]
|
44
44
|
if (Fog::AWS::EC2.data[:instances].keys & instance_id).length == instance_id.length
|
45
45
|
for instance_id in instance_id
|
@@ -72,7 +72,7 @@ else
|
|
72
72
|
end
|
73
73
|
else
|
74
74
|
response.status = 400
|
75
|
-
raise(Excon::Errors.status_error(200,
|
75
|
+
raise(Excon::Errors.status_error({:expects => 200}, response))
|
76
76
|
end
|
77
77
|
response
|
78
78
|
end
|
@@ -48,7 +48,7 @@ else
|
|
48
48
|
class S3
|
49
49
|
|
50
50
|
def copy_object(source_bucket_name, source_object_name, target_bucket_name, target_object_name, options = {})
|
51
|
-
response =
|
51
|
+
response = Excon::Response.new
|
52
52
|
source_bucket = Fog::AWS::S3.data[:buckets][source_bucket_name]
|
53
53
|
source_object = source_bucket && source_bucket[:objects][source_object_name]
|
54
54
|
target_bucket = Fog::AWS::S3.data[:buckets][target_bucket_name]
|
@@ -66,7 +66,7 @@ else
|
|
66
66
|
}
|
67
67
|
else
|
68
68
|
response.status = 404
|
69
|
-
raise(Excon::Errors.status_error(200,
|
69
|
+
raise(Excon::Errors.status_error({:expects => 200}, response))
|
70
70
|
end
|
71
71
|
|
72
72
|
response
|
@@ -32,13 +32,13 @@ else
|
|
32
32
|
class S3
|
33
33
|
|
34
34
|
def delete_bucket(bucket_name)
|
35
|
-
response =
|
35
|
+
response = Excon::Response.new
|
36
36
|
if Fog::AWS::S3.data[:buckets][bucket_name].nil?
|
37
37
|
response.status = 404
|
38
|
-
raise(Excon::Errors.status_error(204,
|
38
|
+
raise(Excon::Errors.status_error({:expects => 204}, response))
|
39
39
|
elsif Fog::AWS::S3.data[:buckets][bucket_name] && !Fog::AWS::S3.data[:buckets][bucket_name][:objects].empty?
|
40
40
|
response.status = 409
|
41
|
-
raise(Excon::Errors.status_error(204,
|
41
|
+
raise(Excon::Errors.status_error({:expects => 204}, response))
|
42
42
|
else
|
43
43
|
Fog::AWS::S3.data[:buckets].delete(bucket_name)
|
44
44
|
response.status = 204
|
@@ -15,11 +15,12 @@ unless Fog.mocking?
|
|
15
15
|
# * status<~Integer> - 204
|
16
16
|
def delete_object(bucket_name, object_name)
|
17
17
|
request({
|
18
|
-
:expects
|
19
|
-
:headers
|
20
|
-
:host
|
21
|
-
:
|
22
|
-
:
|
18
|
+
:expects => 204,
|
19
|
+
:headers => {},
|
20
|
+
:host => "#{bucket_name}.#{@host}",
|
21
|
+
:idempotent => true,
|
22
|
+
:method => 'DELETE',
|
23
|
+
:path => CGI.escape(object_name)
|
23
24
|
})
|
24
25
|
end
|
25
26
|
|
@@ -34,13 +35,13 @@ else
|
|
34
35
|
class S3
|
35
36
|
|
36
37
|
def delete_object(bucket_name, object_name)
|
37
|
-
response =
|
38
|
+
response = Excon::Response.new
|
38
39
|
if bucket = Fog::AWS::S3.data[:buckets][bucket_name]
|
39
40
|
response.status = 204
|
40
41
|
bucket[:objects].delete(object_name)
|
41
42
|
else
|
42
43
|
response.status = 404
|
43
|
-
raise(Excon::Errors.status_error(204,
|
44
|
+
raise(Excon::Errors.status_error({:expects => 204}, response))
|
44
45
|
end
|
45
46
|
response
|
46
47
|
end
|
@@ -67,7 +67,7 @@ else
|
|
67
67
|
unless bucket_name
|
68
68
|
raise ArgumentError.new('bucket_name is required')
|
69
69
|
end
|
70
|
-
response =
|
70
|
+
response = Excon::Response.new
|
71
71
|
if bucket = Fog::AWS::S3.data[:buckets][bucket_name]
|
72
72
|
response.status = 200
|
73
73
|
response.body = {
|
@@ -94,7 +94,7 @@ else
|
|
94
94
|
end
|
95
95
|
else
|
96
96
|
response.status = 404
|
97
|
-
raise(Excon::Errors.status_error(200,
|
97
|
+
raise(Excon::Errors.status_error({:expects => 200}, response))
|
98
98
|
end
|
99
99
|
response
|
100
100
|
end
|
@@ -35,13 +35,13 @@ else
|
|
35
35
|
class S3
|
36
36
|
|
37
37
|
def get_bucket_location(bucket_name)
|
38
|
-
response =
|
38
|
+
response = Excon::Response.new
|
39
39
|
if bucket = Fog::AWS::S3.data[:buckets][bucket_name]
|
40
40
|
response.status = 200
|
41
41
|
response.body = {'LocationConstraint' => bucket['LocationConstraint'] }
|
42
42
|
else
|
43
43
|
response.status = 404
|
44
|
-
raise(Excon::Errors.status_error(200,
|
44
|
+
raise(Excon::Errors.status_error({:expects => 200}, response))
|
45
45
|
end
|
46
46
|
response
|
47
47
|
end
|
@@ -76,7 +76,7 @@ else
|
|
76
76
|
unless object_name
|
77
77
|
raise ArgumentError.new('object_name is required')
|
78
78
|
end
|
79
|
-
response =
|
79
|
+
response = Excon::Response.new
|
80
80
|
if (bucket = Fog::AWS::S3.data[:buckets][bucket_name]) && (object = bucket[:objects][object_name])
|
81
81
|
if options['If-Match'] && options['If-Match'] != object['ETag']
|
82
82
|
response.status = 412
|
@@ -108,7 +108,7 @@ else
|
|
108
108
|
end
|
109
109
|
else
|
110
110
|
response.status = 404
|
111
|
-
raise(Excon::Errors.status_error(200,
|
111
|
+
raise(Excon::Errors.status_error({:expects => 200}, response))
|
112
112
|
end
|
113
113
|
response
|
114
114
|
end
|
@@ -35,13 +35,13 @@ else
|
|
35
35
|
class S3
|
36
36
|
|
37
37
|
def get_request_payment(bucket_name)
|
38
|
-
response =
|
38
|
+
response = Excon::Response.new
|
39
39
|
if bucket = Fog::AWS::S3.data[:buckets][bucket_name]
|
40
40
|
response.status = 200
|
41
41
|
response.body = { 'Payer' => bucket['Payer'] }
|
42
42
|
else
|
43
43
|
response.status = 404
|
44
|
-
raise(Excon::Errors.status_error(200,
|
44
|
+
raise(Excon::Errors.status_error({:expects => 200}, response))
|
45
45
|
end
|
46
46
|
response
|
47
47
|
end
|
@@ -26,11 +26,12 @@ unless Fog.mocking?
|
|
26
26
|
data = nil
|
27
27
|
end
|
28
28
|
request({
|
29
|
-
:expects
|
30
|
-
:body
|
31
|
-
:headers
|
32
|
-
:
|
33
|
-
:
|
29
|
+
:expects => 200,
|
30
|
+
:body => data,
|
31
|
+
:headers => {},
|
32
|
+
:idempotent => true,
|
33
|
+
:host => "#{bucket_name}.#{@host}",
|
34
|
+
:method => 'PUT'
|
34
35
|
})
|
35
36
|
end
|
36
37
|
|
@@ -45,12 +46,13 @@ else
|
|
45
46
|
class S3
|
46
47
|
|
47
48
|
def put_bucket(bucket_name, options = {})
|
48
|
-
response =
|
49
|
+
response = Excon::Response.new
|
49
50
|
response.status = 200
|
50
51
|
bucket = {
|
51
52
|
:objects => {},
|
52
53
|
'Name' => bucket_name,
|
53
54
|
'CreationDate' => Time.now,
|
55
|
+
'Owner' => { 'DisplayName' => 'owner', 'ID' => 'some_id'},
|
54
56
|
'Payer' => 'BucketOwner'
|
55
57
|
}
|
56
58
|
if options['LocationConstraint']
|
@@ -28,12 +28,13 @@ unless Fog.mocking?
|
|
28
28
|
data = parse_data(data)
|
29
29
|
headers = data[:headers].merge!(options)
|
30
30
|
request({
|
31
|
-
:body
|
32
|
-
:expects
|
33
|
-
:headers
|
34
|
-
:host
|
35
|
-
:
|
36
|
-
:
|
31
|
+
:body => data[:body],
|
32
|
+
:expects => 200,
|
33
|
+
:headers => headers,
|
34
|
+
:host => "#{bucket_name}.#{@host}",
|
35
|
+
:idempotent => true,
|
36
|
+
:method => 'PUT',
|
37
|
+
:path => CGI.escape(object_name)
|
37
38
|
})
|
38
39
|
end
|
39
40
|
|
@@ -49,7 +50,7 @@ else
|
|
49
50
|
|
50
51
|
def put_object(bucket_name, object_name, data, options = {})
|
51
52
|
data = parse_data(data)
|
52
|
-
response =
|
53
|
+
response = Excon::Response.new
|
53
54
|
if (bucket = Fog::AWS::S3.data[:buckets][bucket_name])
|
54
55
|
response.status = 200
|
55
56
|
bucket[:objects][object_name] = {
|
@@ -57,14 +58,13 @@ else
|
|
57
58
|
'ETag' => Fog::AWS::Mock.etag,
|
58
59
|
'Key' => object_name,
|
59
60
|
'LastModified' => Time.now.utc.strftime("%a, %d %b %Y %H:%M:%S +0000"),
|
60
|
-
'Owner' => { 'DisplayName' => 'owner', 'ID' => 'some_id'},
|
61
61
|
'Size' => data[:headers]['Content-Length'],
|
62
62
|
'StorageClass' => 'STANDARD'
|
63
63
|
}
|
64
64
|
bucket[:objects][object_name]['Content-Type'] = data[:headers]['Content-Type']
|
65
65
|
else
|
66
66
|
response.status = 404
|
67
|
-
raise(Excon::Errors.status_error(200,
|
67
|
+
raise(Excon::Errors.status_error({:expects => 200}, response))
|
68
68
|
end
|
69
69
|
response
|
70
70
|
end
|
@@ -37,13 +37,13 @@ else
|
|
37
37
|
class S3
|
38
38
|
|
39
39
|
def put_request_payment(bucket_name, payer)
|
40
|
-
response =
|
40
|
+
response = Excon::Response.new
|
41
41
|
if bucket = Fog::AWS::S3.data[:buckets][bucket_name]
|
42
42
|
response.status = 200
|
43
43
|
bucket['Payer'] = payer
|
44
44
|
else
|
45
45
|
response.status = 404
|
46
|
-
raise(Excon::Errors.status_error(200,
|
46
|
+
raise(Excon::Errors.status_error({:expects => 200}, response))
|
47
47
|
end
|
48
48
|
response
|
49
49
|
end
|
@@ -39,7 +39,7 @@ else
|
|
39
39
|
class SimpleDB
|
40
40
|
|
41
41
|
def batch_put_attributes(domain_name, items, replace_attributes = Hash.new([]))
|
42
|
-
response =
|
42
|
+
response = Excon::Response.new
|
43
43
|
if Fog::AWS::SimpleDB.data[:domains][domain_name]
|
44
44
|
for item_name, attributes in items do
|
45
45
|
for key, value in attributes do
|
@@ -59,7 +59,7 @@ else
|
|
59
59
|
}
|
60
60
|
else
|
61
61
|
response.status = 400
|
62
|
-
raise(Excon::Errors.status_error(200,
|
62
|
+
raise(Excon::Errors.status_error({:expects => 200}, response))
|
63
63
|
end
|
64
64
|
response
|
65
65
|
end
|
@@ -42,7 +42,7 @@ else
|
|
42
42
|
class SimpleDB
|
43
43
|
|
44
44
|
def delete_attributes(domain_name, item_name, attributes = nil)
|
45
|
-
response =
|
45
|
+
response = Excon::Response.new
|
46
46
|
if Fog::AWS::SimpleDB.data[:domains][domain_name]
|
47
47
|
if attributes
|
48
48
|
for key, value in attributes
|
@@ -60,7 +60,7 @@ else
|
|
60
60
|
}
|
61
61
|
else
|
62
62
|
response.status = 400
|
63
|
-
raise(Excon::Errors.status_error(200,
|
63
|
+
raise(Excon::Errors.status_error({:expects => 200}, response))
|
64
64
|
end
|
65
65
|
response
|
66
66
|
end
|
@@ -40,7 +40,7 @@ else
|
|
40
40
|
class SimpleDB
|
41
41
|
|
42
42
|
def domain_metadata(domain_name)
|
43
|
-
response =
|
43
|
+
response = Excon::Response.new
|
44
44
|
if domain = Fog::AWS::SimpleDB.data[:domains][domain_name]
|
45
45
|
response.status = 200
|
46
46
|
|
@@ -68,7 +68,7 @@ else
|
|
68
68
|
}
|
69
69
|
else
|
70
70
|
response.status = 400
|
71
|
-
raise(Excon::Errors.status_error(200,
|
71
|
+
raise(Excon::Errors.status_error({:expects => 200}, response))
|
72
72
|
end
|
73
73
|
response
|
74
74
|
end
|
@@ -43,7 +43,7 @@ else
|
|
43
43
|
class SimpleDB
|
44
44
|
|
45
45
|
def get_attributes(domain_name, item_name, attributes = nil)
|
46
|
-
response =
|
46
|
+
response = Excon::Response.new
|
47
47
|
if Fog::AWS::SimpleDB.data[:domains][domain_name]
|
48
48
|
object = {}
|
49
49
|
if attributes
|
@@ -63,7 +63,7 @@ else
|
|
63
63
|
}
|
64
64
|
else
|
65
65
|
response.status = 400
|
66
|
-
raise(Excon::Errors.status_error(200,
|
66
|
+
raise(Excon::Errors.status_error({:expects => 200}, response))
|
67
67
|
end
|
68
68
|
response
|
69
69
|
end
|
@@ -36,7 +36,7 @@ else
|
|
36
36
|
class SimpleDB
|
37
37
|
|
38
38
|
def list_domains(options = {})
|
39
|
-
response =
|
39
|
+
response = Excon::Response.new
|
40
40
|
keys = Fog::AWS::SimpleDB.data[:domains].keys
|
41
41
|
max = options['MaxNumberOfDomains'] || keys.size
|
42
42
|
offset = options['NextToken'] || 0
|
data/lib/fog/aws/s3.rb
CHANGED
@@ -16,7 +16,6 @@ module Fog
|
|
16
16
|
load "fog/aws/models/s3/buckets.rb"
|
17
17
|
load "fog/aws/models/s3/object.rb"
|
18
18
|
load "fog/aws/models/s3/objects.rb"
|
19
|
-
load "fog/aws/models/s3/owner.rb"
|
20
19
|
|
21
20
|
load "fog/aws/parsers/s3/copy_object.rb"
|
22
21
|
load "fog/aws/parsers/s3/get_bucket.rb"
|
@@ -96,17 +95,7 @@ module Fog
|
|
96
95
|
params[:headers]['Date'] = Time.now.utc.strftime("%a, %d %b %Y %H:%M:%S +0000")
|
97
96
|
params[:headers]['Authorization'] = "AWS #{@aws_access_key_id}:#{signature(params)}"
|
98
97
|
|
99
|
-
response = @connection.request(
|
100
|
-
:block => params[:block],
|
101
|
-
:body => params[:body],
|
102
|
-
:expects => params[:expects],
|
103
|
-
:headers => params[:headers],
|
104
|
-
:host => params[:host],
|
105
|
-
:method => params[:method],
|
106
|
-
:parser => params[:parser],
|
107
|
-
:path => params[:path],
|
108
|
-
:query => params[:query]
|
109
|
-
})
|
98
|
+
response = @connection.request(params)
|
110
99
|
|
111
100
|
response
|
112
101
|
end
|