fog 0.3.13 → 0.3.14
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/fog.gemspec +26 -20
- data/lib/fog.rb +1 -11
- data/lib/fog/aws.rb +5 -0
- data/lib/fog/aws/bin.rb +5 -1
- data/lib/fog/aws/cdn.rb +98 -0
- data/lib/fog/aws/iam.rb +86 -0
- data/lib/fog/aws/models/compute/volume.rb +10 -0
- data/lib/fog/aws/models/storage/directory.rb +11 -0
- data/lib/fog/aws/models/storage/file.rb +9 -11
- data/lib/fog/aws/parsers/cdn/distribution.rb +44 -0
- data/lib/fog/aws/parsers/cdn/get_distribution_list.rb +48 -0
- data/lib/fog/aws/parsers/cdn/post_invalidation.rb +28 -0
- data/lib/fog/aws/parsers/iam/basic.rb +19 -0
- data/lib/fog/aws/parsers/iam/create_group.rb +26 -0
- data/lib/fog/aws/parsers/iam/list_groups.rb +32 -0
- data/lib/fog/aws/requests/cdn/delete_distribution.rb +36 -0
- data/lib/fog/aws/requests/cdn/get_distribution.rb +55 -0
- data/lib/fog/aws/requests/cdn/get_distribution_list.rb +59 -0
- data/lib/fog/aws/requests/cdn/post_distribution.rb +88 -0
- data/lib/fog/aws/requests/cdn/post_invalidation.rb +59 -0
- data/lib/fog/aws/requests/compute/create_volume.rb +1 -0
- data/lib/fog/aws/requests/compute/describe_snapshots.rb +3 -0
- data/lib/fog/aws/requests/iam/create_group.rb +43 -0
- data/lib/fog/aws/requests/iam/delete_group.rb +36 -0
- data/lib/fog/aws/requests/iam/list_groups.rb +45 -0
- data/lib/fog/aws/requests/storage/copy_object.rb +4 -1
- data/lib/fog/aws/requests/storage/delete_bucket.rb +5 -1
- data/lib/fog/aws/requests/storage/delete_object.rb +5 -1
- data/lib/fog/aws/requests/storage/get_bucket.rb +4 -1
- data/lib/fog/aws/requests/storage/get_bucket_acl.rb +4 -1
- data/lib/fog/aws/requests/storage/get_bucket_location.rb +5 -1
- data/lib/fog/aws/requests/storage/get_bucket_logging.rb +4 -1
- data/lib/fog/aws/requests/storage/get_bucket_object_versions.rb +4 -1
- data/lib/fog/aws/requests/storage/get_bucket_versioning.rb +4 -1
- data/lib/fog/aws/requests/storage/get_object.rb +4 -1
- data/lib/fog/aws/requests/storage/get_object_acl.rb +4 -1
- data/lib/fog/aws/requests/storage/get_object_torrent.rb +4 -1
- data/lib/fog/aws/requests/storage/get_object_url.rb +4 -1
- data/lib/fog/aws/requests/storage/get_request_payment.rb +5 -1
- data/lib/fog/aws/requests/storage/get_service.rb +5 -1
- data/lib/fog/aws/requests/storage/head_object.rb +5 -1
- data/lib/fog/aws/requests/storage/post_object_hidden_fields.rb +4 -3
- data/lib/fog/aws/requests/storage/put_bucket.rb +11 -6
- data/lib/fog/aws/requests/storage/put_bucket_acl.rb +5 -1
- data/lib/fog/aws/requests/storage/put_bucket_logging.rb +5 -1
- data/lib/fog/aws/requests/storage/put_bucket_versioning.rb +5 -1
- data/lib/fog/aws/requests/storage/put_object.rb +5 -1
- data/lib/fog/aws/requests/storage/put_object_url.rb +4 -1
- data/lib/fog/aws/requests/storage/put_request_payment.rb +5 -1
- data/lib/fog/aws/storage.rb +2 -0
- data/lib/fog/bluebox/compute.rb +1 -0
- data/lib/fog/core.rb +4 -2
- data/lib/fog/core/attributes.rb +9 -5
- data/lib/fog/core/compute.rb +33 -0
- data/lib/fog/core/credentials.rb +0 -1
- data/lib/fog/core/model.rb +2 -11
- data/lib/fog/core/ssh.rb +1 -0
- data/lib/fog/core/storage.rb +24 -0
- data/lib/fog/go_grid/compute.rb +2 -0
- data/lib/fog/google.rb +3 -0
- data/lib/fog/google/models/storage/directory.rb +11 -0
- data/lib/fog/google/models/storage/file.rb +19 -10
- data/lib/fog/google/requests/storage/put_bucket.rb +5 -4
- data/lib/fog/google/storage.rb +2 -0
- data/lib/fog/linode/compute.rb +1 -0
- data/lib/fog/new_servers.rb +3 -0
- data/lib/fog/rackspace.rb +1 -0
- data/lib/fog/rackspace/bin.rb +3 -1
- data/lib/fog/rackspace/cdn.rb +81 -0
- data/lib/fog/rackspace/compute.rb +1 -0
- data/lib/fog/rackspace/models/storage/file.rb +2 -2
- data/lib/fog/rackspace/requests/{storage → cdn}/get_cdn_containers.rb +1 -1
- data/lib/fog/rackspace/requests/{storage → cdn}/head_cdn_container.rb +1 -1
- data/lib/fog/rackspace/requests/{storage → cdn}/put_cdn_container.rb +1 -1
- data/lib/fog/rackspace/requests/storage/delete_container.rb +1 -1
- data/lib/fog/rackspace/requests/storage/delete_object.rb +1 -1
- data/lib/fog/rackspace/requests/storage/get_container.rb +1 -1
- data/lib/fog/rackspace/requests/storage/get_containers.rb +1 -1
- data/lib/fog/rackspace/requests/storage/get_object.rb +1 -1
- data/lib/fog/rackspace/requests/storage/head_container.rb +1 -1
- data/lib/fog/rackspace/requests/storage/head_containers.rb +1 -1
- data/lib/fog/rackspace/requests/storage/head_object.rb +1 -1
- data/lib/fog/rackspace/requests/storage/put_container.rb +1 -1
- data/lib/fog/rackspace/requests/storage/put_object.rb +1 -1
- data/lib/fog/rackspace/storage.rb +13 -47
- data/lib/fog/slicehost.rb +4 -1
- data/lib/fog/terremark.rb +3 -0
- data/lib/fog/vcloud.rb +3 -0
- data/spec/aws/models/storage/directory_spec.rb +1 -0
- data/spec/bluebox/models/compute/flavors_spec.rb +5 -2
- data/spec/bluebox/models/compute/server_spec.rb +5 -1
- data/spec/bluebox/models/compute/servers_spec.rb +5 -1
- data/spec/google/models/storage/files_spec.rb +1 -2
- data/spec/rackspace/models/compute/flavors_spec.rb +5 -1
- data/spec/rackspace/models/compute/server_spec.rb +5 -1
- data/spec/slicehost/models/compute/flavors_spec.rb +5 -1
- data/spec/slicehost/models/compute/server_spec.rb +5 -1
- data/spec/slicehost/models/compute/servers_spec.rb +5 -1
- data/tests/aws/requests/compute/volume_tests.rb +8 -7
- data/tests/aws/requests/storage/bucket_tests.rb +55 -0
- data/tests/aws/requests/storage/object_tests.rb +18 -0
- data/tests/rackspace/requests/storage/container_tests.rb +64 -0
- data/tests/rackspace/requests/storage/object_tests.rb +69 -0
- metadata +27 -21
- data/spec/aws/requests/storage/copy_object_spec.rb +0 -61
- data/spec/aws/requests/storage/get_bucket_location_spec.rb +0 -30
- data/spec/aws/requests/storage/get_bucket_spec.rb +0 -114
- data/spec/aws/requests/storage/get_request_payment_spec.rb +0 -30
- data/spec/aws/requests/storage/put_request_payment_spec.rb +0 -29
- data/spec/rackspace/requests/storage/delete_container_spec.rb +0 -24
- data/spec/rackspace/requests/storage/delete_object_spec.rb +0 -37
- data/spec/rackspace/requests/storage/get_container_spec.rb +0 -35
- data/spec/rackspace/requests/storage/get_containers_spec.rb +0 -22
- data/spec/rackspace/requests/storage/get_object_spec.rb +0 -21
- data/spec/rackspace/requests/storage/head_container_spec.rb +0 -30
- data/spec/rackspace/requests/storage/head_containers_spec.rb +0 -19
- data/spec/rackspace/requests/storage/head_object_spec.rb +0 -21
- data/spec/rackspace/requests/storage/put_container_spec.rb +0 -15
- data/spec/rackspace/requests/storage/put_object_spec.rb +0 -20
@@ -0,0 +1,59 @@
|
|
1
|
+
module Fog
|
2
|
+
module AWS
|
3
|
+
class CDN
|
4
|
+
class Real
|
5
|
+
|
6
|
+
require 'fog/aws/parsers/cdn/post_invalidation'
|
7
|
+
|
8
|
+
# List information about distributions in CloudFront
|
9
|
+
#
|
10
|
+
# ==== Parameters
|
11
|
+
# * distribution_id<~String> - Id of distribution for invalidations
|
12
|
+
# * paths<~Array> - Array of string paths to objects to invalidate
|
13
|
+
# * caller_reference<~String> - Used to prevent replay, defaults to Time.now.to_i.to_s
|
14
|
+
#
|
15
|
+
#
|
16
|
+
# ==== Returns
|
17
|
+
# * response<~Excon::Response>:
|
18
|
+
# * body<~Hash>:
|
19
|
+
# * 'Id'<~String> - Id of invalidation
|
20
|
+
# * 'Status'<~String> - Status of invalidation
|
21
|
+
# * 'CreateTime'<~Integer> - Time of invalidation creation
|
22
|
+
# * 'InvalidationBatch'<~Array>:
|
23
|
+
# * 'Path'<~Array> - Array of strings of objects to invalidate
|
24
|
+
# * 'CallerReference'<~String> - Used to prevent replay, defaults to Time.now.to_i.to_s
|
25
|
+
#
|
26
|
+
# ==== See Also
|
27
|
+
# http://docs.amazonwebservices.com/AmazonCloudFront/latest/APIReference/CreateInvalidation.html
|
28
|
+
|
29
|
+
def post_invalidation(distribution_id, paths, caller_reference = Time.now.to_i.to_s)
|
30
|
+
body = '<?xml version="1.0" encoding="UTF-8"?>'
|
31
|
+
body << "<InvalidationBatch>"
|
32
|
+
for path in [*paths]
|
33
|
+
body << "<Path>" << path << "</Path>"
|
34
|
+
end
|
35
|
+
body << "<CallerReference>" << caller_reference << "</CallerReference>"
|
36
|
+
body << "</InvalidationBatch>"
|
37
|
+
request({
|
38
|
+
:body => body,
|
39
|
+
:expects => 201,
|
40
|
+
:headers => {'Content-Type' => 'text/xml'},
|
41
|
+
:idempotent => true,
|
42
|
+
:method => 'POST',
|
43
|
+
:parser => Fog::Parsers::AWS::CDN::PostInvalidation.new,
|
44
|
+
:path => "/distribution/#{distribution_id}/invalidation"
|
45
|
+
})
|
46
|
+
end
|
47
|
+
|
48
|
+
end
|
49
|
+
|
50
|
+
class Mock # :nodoc:all
|
51
|
+
|
52
|
+
def post_invalidation(distribution_id, paths, caller_reference = Time.now.to_i.to_s)
|
53
|
+
Fog::Mock.not_implemented
|
54
|
+
end
|
55
|
+
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
@@ -71,6 +71,9 @@ module Fog
|
|
71
71
|
if filters.delete('owner-alias')
|
72
72
|
Formatador.display_line("[yellow][WARN] describe_snapshots with owner-alias is not mocked[/] [light_black](#{caller.first})[/]")
|
73
73
|
end
|
74
|
+
if filters.delete('RestorableBy')
|
75
|
+
Formatador.display_line("[yellow][WARN] describe_snapshots with RestorableBy is not mocked[/] [light_black](#{caller.first})[/]")
|
76
|
+
end
|
74
77
|
|
75
78
|
aliases = {
|
76
79
|
'description' => 'description',
|
@@ -0,0 +1,43 @@
|
|
1
|
+
module Fog
|
2
|
+
module AWS
|
3
|
+
class IAM
|
4
|
+
class Real
|
5
|
+
|
6
|
+
require 'fog/aws/parsers/iam/create_group'
|
7
|
+
|
8
|
+
# Create a new group
|
9
|
+
#
|
10
|
+
# ==== Parameters
|
11
|
+
# * 'GroupName'<~String>: name of the group to create (do not include path)
|
12
|
+
# * 'Path'<~String>: optional path to group, defaults to '/'
|
13
|
+
#
|
14
|
+
# ==== Returns
|
15
|
+
# * response<~Excon::Response>:
|
16
|
+
# * body<~Hash>:
|
17
|
+
# * 'Group'<~Hash>:
|
18
|
+
# * Arn<~String> -
|
19
|
+
# * GroupId<~String> -
|
20
|
+
# * GroupName<~String> -
|
21
|
+
# * Path<~String> -
|
22
|
+
# * 'RequestId'<~String> - Id of the request
|
23
|
+
def create_group(group_name, path = '/')
|
24
|
+
request(
|
25
|
+
'Action' => 'CreateGroup',
|
26
|
+
'GroupName' => group_name,
|
27
|
+
'Path' => path,
|
28
|
+
:parser => Fog::Parsers::AWS::IAM::CreateGroups.new
|
29
|
+
)
|
30
|
+
end
|
31
|
+
|
32
|
+
end
|
33
|
+
|
34
|
+
class Mock
|
35
|
+
|
36
|
+
def create_group(group_name, path = '/')
|
37
|
+
Fog::Mock.not_implemented
|
38
|
+
end
|
39
|
+
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
module Fog
|
2
|
+
module AWS
|
3
|
+
class IAM
|
4
|
+
class Real
|
5
|
+
|
6
|
+
require 'fog/aws/parsers/iam/basic'
|
7
|
+
|
8
|
+
# Delete a group
|
9
|
+
#
|
10
|
+
# ==== Parameters
|
11
|
+
# * 'GroupName'<~String>: name of the group to delete
|
12
|
+
#
|
13
|
+
# ==== Returns
|
14
|
+
# * response<~Excon::Response>:
|
15
|
+
# * body<~Hash>:
|
16
|
+
# * 'RequestId'<~String> - Id of the request
|
17
|
+
def delete_group(group_name)
|
18
|
+
request(
|
19
|
+
'Action' => 'DeleteGroup',
|
20
|
+
'GroupName' => group_name,
|
21
|
+
:parser => Fog::Parsers::AWS::IAM::Basic.new
|
22
|
+
)
|
23
|
+
end
|
24
|
+
|
25
|
+
end
|
26
|
+
|
27
|
+
class Mock
|
28
|
+
|
29
|
+
def delete_group(group_name)
|
30
|
+
Fog::Mock.not_implemented
|
31
|
+
end
|
32
|
+
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
module Fog
|
2
|
+
module AWS
|
3
|
+
class IAM
|
4
|
+
class Real
|
5
|
+
|
6
|
+
require 'fog/aws/parsers/iam/list_groups'
|
7
|
+
|
8
|
+
# List groups
|
9
|
+
#
|
10
|
+
# ==== Parameters
|
11
|
+
# * options<~Hash>:
|
12
|
+
# * 'Marker'<~String>: used to paginate subsequent requests
|
13
|
+
# * 'MaxItems'<~Integer>: limit results to this number per page
|
14
|
+
# * 'PathPrefix'<~String>: prefix for filtering results
|
15
|
+
#
|
16
|
+
# ==== Returns
|
17
|
+
# * response<~Excon::Response>:
|
18
|
+
# * body<~Hash>:
|
19
|
+
# * 'Groups'<~Array> - Matching groups
|
20
|
+
# * group<~Hash>:
|
21
|
+
# * Arn<~String> -
|
22
|
+
# * GroupId<~String> -
|
23
|
+
# * GroupName<~String> -
|
24
|
+
# * Path<~String> -
|
25
|
+
# * 'IsTruncated<~Boolean> - Whether or not results were truncated
|
26
|
+
# * 'RequestId'<~String> - Id of the request
|
27
|
+
def list_groups
|
28
|
+
request(
|
29
|
+
'Action' => 'ListGroups',
|
30
|
+
:parser => Fog::Parsers::AWS::IAM::ListGroups.new
|
31
|
+
)
|
32
|
+
end
|
33
|
+
|
34
|
+
end
|
35
|
+
|
36
|
+
class Mock
|
37
|
+
|
38
|
+
def list_groups
|
39
|
+
Fog::Mock.not_implemented
|
40
|
+
end
|
41
|
+
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
@@ -25,6 +25,9 @@ module Fog
|
|
25
25
|
# * 'ETag'<~String> - etag of new object
|
26
26
|
# * 'LastModified'<~Time> - date object was last modified
|
27
27
|
#
|
28
|
+
# ==== See Also
|
29
|
+
# http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTObjectCOPY.html
|
30
|
+
|
28
31
|
def copy_object(source_bucket_name, source_object_name, target_bucket_name, target_object_name, options = {})
|
29
32
|
headers = { 'x-amz-copy-source' => "/#{source_bucket_name}/#{source_object_name}" }.merge!(options)
|
30
33
|
request({
|
@@ -39,7 +42,7 @@ module Fog
|
|
39
42
|
|
40
43
|
end
|
41
44
|
|
42
|
-
class Mock
|
45
|
+
class Mock # :nodoc:all
|
43
46
|
|
44
47
|
def copy_object(source_bucket_name, source_object_name, target_bucket_name, target_object_name, options = {})
|
45
48
|
response = Excon::Response.new
|
@@ -11,6 +11,10 @@ module Fog
|
|
11
11
|
# ==== Returns
|
12
12
|
# * response<~Excon::Response>:
|
13
13
|
# * status<~Integer> - 204
|
14
|
+
#
|
15
|
+
# ==== See Also
|
16
|
+
# http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketDELETE.html
|
17
|
+
|
14
18
|
def delete_bucket(bucket_name)
|
15
19
|
request({
|
16
20
|
:expects => 204,
|
@@ -22,7 +26,7 @@ module Fog
|
|
22
26
|
|
23
27
|
end
|
24
28
|
|
25
|
-
class Mock
|
29
|
+
class Mock # :nodoc:all
|
26
30
|
|
27
31
|
def delete_bucket(bucket_name)
|
28
32
|
response = Excon::Response.new
|
@@ -12,6 +12,10 @@ module Fog
|
|
12
12
|
# ==== Returns
|
13
13
|
# * response<~Excon::Response>:
|
14
14
|
# * status<~Integer> - 204
|
15
|
+
#
|
16
|
+
# ==== See Also
|
17
|
+
# http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTObjectDELETE.html
|
18
|
+
|
15
19
|
def delete_object(bucket_name, object_name)
|
16
20
|
request({
|
17
21
|
:expects => 204,
|
@@ -25,7 +29,7 @@ module Fog
|
|
25
29
|
|
26
30
|
end
|
27
31
|
|
28
|
-
class Mock
|
32
|
+
class Mock # :nodoc:all
|
29
33
|
|
30
34
|
def delete_object(bucket_name, object_name)
|
31
35
|
response = Excon::Response.new
|
@@ -36,6 +36,9 @@ module Fog
|
|
36
36
|
# * 'Size'<~Integer> - Size of object
|
37
37
|
# * 'StorageClass'<~String> - Storage class of object
|
38
38
|
#
|
39
|
+
# ==== See Also
|
40
|
+
# http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketGET.html
|
41
|
+
|
39
42
|
def get_bucket(bucket_name, options = {})
|
40
43
|
unless bucket_name
|
41
44
|
raise ArgumentError.new('bucket_name is required')
|
@@ -53,7 +56,7 @@ module Fog
|
|
53
56
|
|
54
57
|
end
|
55
58
|
|
56
|
-
class Mock
|
59
|
+
class Mock # :nodoc:all
|
57
60
|
|
58
61
|
def get_bucket(bucket_name, options = {})
|
59
62
|
unless bucket_name
|
@@ -26,6 +26,9 @@ module Fog
|
|
26
26
|
# * 'URI'<~String> - URI of group to grant access for
|
27
27
|
# * 'Permission'<~String> - Permission, in [FULL_CONTROL, WRITE, WRITE_ACP, READ, READ_ACP]
|
28
28
|
#
|
29
|
+
# ==== See Also
|
30
|
+
# http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketGETacl.html
|
31
|
+
|
29
32
|
def get_bucket_acl(bucket_name)
|
30
33
|
unless bucket_name
|
31
34
|
raise ArgumentError.new('bucket_name is required')
|
@@ -43,7 +46,7 @@ module Fog
|
|
43
46
|
|
44
47
|
end
|
45
48
|
|
46
|
-
class Mock
|
49
|
+
class Mock # :nodoc:all
|
47
50
|
|
48
51
|
def get_bucket_acl(bucket_name)
|
49
52
|
Fog::Mock.not_implemented
|
@@ -14,6 +14,10 @@ module Fog
|
|
14
14
|
# * response<~Excon::Response>:
|
15
15
|
# * body<~Hash>:
|
16
16
|
# * 'LocationConstraint'<~String> - Location constraint of the bucket
|
17
|
+
#
|
18
|
+
# ==== See Also
|
19
|
+
# http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketGETlocation.html
|
20
|
+
|
17
21
|
def get_bucket_location(bucket_name)
|
18
22
|
request({
|
19
23
|
:expects => 200,
|
@@ -28,7 +32,7 @@ module Fog
|
|
28
32
|
|
29
33
|
end
|
30
34
|
|
31
|
-
class Mock
|
35
|
+
class Mock # :nodoc:all
|
32
36
|
|
33
37
|
def get_bucket_location(bucket_name)
|
34
38
|
response = Excon::Response.new
|
@@ -26,6 +26,9 @@ module Fog
|
|
26
26
|
# * 'URI'<~String> - URI of group to grant access for
|
27
27
|
# * 'Permission'<~String> - Permission, in [FULL_CONTROL, WRITE, WRITE_ACP, READ, READ_ACP]
|
28
28
|
#
|
29
|
+
# ==== See Also
|
30
|
+
# http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketGETlogging.html
|
31
|
+
|
29
32
|
def get_bucket_logging(bucket_name)
|
30
33
|
unless bucket_name
|
31
34
|
raise ArgumentError.new('bucket_name is required')
|
@@ -43,7 +46,7 @@ module Fog
|
|
43
46
|
|
44
47
|
end
|
45
48
|
|
46
|
-
class Mock
|
49
|
+
class Mock # :nodoc:all
|
47
50
|
|
48
51
|
def get_bucket_logging(bucket_name)
|
49
52
|
Fog::Mock.not_implemented
|
@@ -51,6 +51,9 @@ module Fog
|
|
51
51
|
# * 'StorageClass'<~String> - Storage class of object
|
52
52
|
# * 'VersionId'<~String> - The id of this version
|
53
53
|
#
|
54
|
+
# ==== See Also
|
55
|
+
# http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketGETVersion.html
|
56
|
+
|
54
57
|
def get_bucket_object_versions(bucket_name, options = {})
|
55
58
|
unless bucket_name
|
56
59
|
raise ArgumentError.new('bucket_name is required')
|
@@ -68,7 +71,7 @@ module Fog
|
|
68
71
|
|
69
72
|
end
|
70
73
|
|
71
|
-
class Mock
|
74
|
+
class Mock # :nodoc:all
|
72
75
|
|
73
76
|
def get_bucket_object_versions(bucket_name, options = {})
|
74
77
|
Fog::Mock.not_implemented
|
@@ -16,6 +16,9 @@ module Fog
|
|
16
16
|
# * 'VersioningConfiguration'<~Hash>
|
17
17
|
# * Status<~String>: Versioning status in ['Enabled', 'Suspended', nil]
|
18
18
|
#
|
19
|
+
# ==== See Also
|
20
|
+
# http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketGETversioningStatus.html
|
21
|
+
|
19
22
|
def get_bucket_versioning(bucket_name)
|
20
23
|
unless bucket_name
|
21
24
|
raise ArgumentError.new('bucket_name is required')
|
@@ -33,7 +36,7 @@ module Fog
|
|
33
36
|
|
34
37
|
end
|
35
38
|
|
36
|
-
class Mock
|
39
|
+
class Mock # :nodoc:all
|
37
40
|
|
38
41
|
def get_bucket_versioning(bucket_name)
|
39
42
|
Fog::Mock.not_implemented
|
@@ -25,6 +25,9 @@ module Fog
|
|
25
25
|
# * 'ETag'<~String> - Etag of object
|
26
26
|
# * 'Last-Modified'<~String> - Last modified timestamp for object
|
27
27
|
#
|
28
|
+
# ==== See Also
|
29
|
+
# http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTObjectGET.html
|
30
|
+
|
28
31
|
def get_object(bucket_name, object_name, options = {}, &block)
|
29
32
|
unless bucket_name
|
30
33
|
raise ArgumentError.new('bucket_name is required')
|
@@ -52,7 +55,7 @@ module Fog
|
|
52
55
|
|
53
56
|
end
|
54
57
|
|
55
|
-
class Mock
|
58
|
+
class Mock # :nodoc:all
|
56
59
|
|
57
60
|
def get_object(bucket_name, object_name, options = {}, &block)
|
58
61
|
unless bucket_name
|
@@ -29,6 +29,9 @@ module Fog
|
|
29
29
|
# * 'URI'<~String> - URI of group to grant access for
|
30
30
|
# * 'Permission'<~String> - Permission, in [FULL_CONTROL, WRITE, WRITE_ACP, READ, READ_ACP]
|
31
31
|
#
|
32
|
+
# ==== See Also
|
33
|
+
# http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTObjectGETacl.html
|
34
|
+
|
32
35
|
def get_object_acl(bucket_name, object_name, options = {})
|
33
36
|
unless bucket_name
|
34
37
|
raise ArgumentError.new('bucket_name is required')
|
@@ -54,7 +57,7 @@ module Fog
|
|
54
57
|
|
55
58
|
end
|
56
59
|
|
57
|
-
class Mock
|
60
|
+
class Mock # :nodoc:all
|
58
61
|
|
59
62
|
def get_object_acl(bucket_name, object_name)
|
60
63
|
Fog::Mock.not_implemented
|
@@ -23,6 +23,9 @@ module Fog
|
|
23
23
|
# * 'ID'<~String> - Id of grantee
|
24
24
|
# * 'Permission'<~String> - Permission, in [FULL_CONTROL, WRITE, WRITE_ACP, READ, READ_ACP]
|
25
25
|
#
|
26
|
+
# ==== See Also
|
27
|
+
# http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTObjectGETtorrent.html
|
28
|
+
|
26
29
|
def get_object_torrent(bucket_name, object_name)
|
27
30
|
unless bucket_name
|
28
31
|
raise ArgumentError.new('bucket_name is required')
|
@@ -43,7 +46,7 @@ module Fog
|
|
43
46
|
|
44
47
|
end
|
45
48
|
|
46
|
-
class Mock
|
49
|
+
class Mock # :nodoc:all
|
47
50
|
|
48
51
|
def get_object_object(bucket_name, object_name)
|
49
52
|
Fog::Mock.not_implemented
|
@@ -14,6 +14,9 @@ module Fog
|
|
14
14
|
# * response<~Excon::Response>:
|
15
15
|
# * body<~String> - url for object
|
16
16
|
#
|
17
|
+
# ==== See Also
|
18
|
+
# http://docs.amazonwebservices.com/AmazonS3/latest/dev/S3_QSAuth.html
|
19
|
+
|
17
20
|
def get_object_url(bucket_name, object_name, expires)
|
18
21
|
unless bucket_name
|
19
22
|
raise ArgumentError.new('bucket_name is required')
|
@@ -31,7 +34,7 @@ module Fog
|
|
31
34
|
|
32
35
|
end
|
33
36
|
|
34
|
-
class Mock
|
37
|
+
class Mock # :nodoc:all
|
35
38
|
|
36
39
|
def get_object_url(bucket_name, object_name, expires)
|
37
40
|
unless bucket_name
|