aws-sdk 1.1.3 → 1.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/ca-bundle.crt +2 -348
- data/lib/aws.rb +24 -49
- data/lib/aws/{common.rb → core.rb} +120 -9
- data/lib/aws/{api_config.rb → core/api_config.rb} +19 -20
- data/lib/aws/core/api_config_transform.rb +36 -0
- data/lib/aws/core/async_handle.rb +91 -0
- data/lib/aws/core/authorize_v2.rb +39 -0
- data/lib/aws/{authorize_v3.rb → core/authorize_v3.rb} +16 -15
- data/lib/aws/{api_config_transform.rb → core/authorize_with_session_token.rb} +9 -12
- data/lib/aws/core/autoloader.rb +64 -0
- data/lib/aws/core/cacheable.rb +78 -0
- data/lib/aws/core/client.rb +471 -0
- data/lib/aws/core/client_logging.rb +125 -0
- data/lib/aws/core/collections.rb +229 -0
- data/lib/aws/core/configuration.rb +358 -0
- data/lib/aws/core/configured_client_methods.rb +76 -0
- data/lib/aws/core/configured_grammars.rb +63 -0
- data/lib/aws/{configured_option_grammars.rb → core/configured_option_grammars.rb} +18 -20
- data/lib/aws/{configured_xml_grammars.rb → core/configured_xml_grammars.rb} +19 -21
- data/lib/aws/core/default_signer.rb +67 -0
- data/lib/aws/core/http/curb_handler.rb +129 -0
- data/lib/aws/core/http/handler.rb +77 -0
- data/lib/aws/core/http/httparty_handler.rb +113 -0
- data/lib/aws/core/http/net_http_handler.rb +124 -0
- data/lib/aws/core/http/request.rb +207 -0
- data/lib/aws/core/http/response.rb +73 -0
- data/lib/aws/{ignore_result_element.rb → core/ignore_result_element.rb} +14 -18
- data/lib/aws/core/indifferent_hash.rb +88 -0
- data/lib/aws/core/inflection.rb +47 -0
- data/lib/aws/core/lazy_error_classes.rb +62 -0
- data/lib/aws/{uri_escape.rb → core/meta_utils.rb} +24 -23
- data/lib/aws/core/model.rb +57 -0
- data/lib/aws/{authorize_with_session_token.rb → core/naming.rb} +9 -8
- data/lib/aws/core/option_grammar.rb +562 -0
- data/lib/aws/core/policy.rb +914 -0
- data/lib/aws/core/resource.rb +380 -0
- data/lib/aws/core/resource_cache.rb +40 -0
- data/lib/aws/core/response.rb +125 -0
- data/lib/aws/core/response_cache.rb +50 -0
- data/lib/aws/core/service_interface.rb +60 -0
- data/lib/aws/core/uri_escape.rb +46 -0
- data/lib/aws/core/xml_grammar.rb +926 -0
- data/lib/aws/ec2.rb +47 -16
- data/lib/aws/ec2/attachment.rb +0 -2
- data/lib/aws/ec2/attachment_collection.rb +1 -6
- data/lib/aws/ec2/availability_zone.rb +0 -2
- data/lib/aws/ec2/availability_zone_collection.rb +0 -3
- data/lib/aws/ec2/client.rb +6 -9
- data/lib/aws/ec2/client/xml.rb +3 -6
- data/lib/aws/ec2/collection.rb +1 -4
- data/lib/aws/ec2/config.rb +18 -0
- data/lib/aws/ec2/elastic_ip.rb +0 -2
- data/lib/aws/ec2/elastic_ip_collection.rb +0 -4
- data/lib/aws/ec2/errors.rb +1 -4
- data/lib/aws/ec2/has_permissions.rb +0 -2
- data/lib/aws/ec2/image.rb +0 -5
- data/lib/aws/ec2/image_collection.rb +0 -6
- data/lib/aws/ec2/instance.rb +23 -9
- data/lib/aws/ec2/instance_collection.rb +85 -22
- data/lib/aws/ec2/key_pair.rb +0 -2
- data/lib/aws/ec2/key_pair_collection.rb +1 -4
- data/lib/aws/ec2/permission_collection.rb +2 -5
- data/lib/aws/ec2/region.rb +0 -2
- data/lib/aws/ec2/region_collection.rb +0 -4
- data/lib/aws/ec2/request.rb +4 -9
- data/lib/aws/ec2/reserved_instances.rb +0 -3
- data/lib/aws/ec2/reserved_instances_collection.rb +0 -4
- data/lib/aws/ec2/reserved_instances_offering.rb +0 -3
- data/lib/aws/ec2/reserved_instances_offering_collection.rb +0 -4
- data/lib/aws/ec2/resource.rb +3 -5
- data/lib/aws/ec2/resource_tag_collection.rb +1 -6
- data/lib/aws/ec2/security_group.rb +204 -72
- data/lib/aws/ec2/security_group/egress_ip_permission_collection.rb +53 -0
- data/lib/aws/ec2/security_group/ip_permission.rb +92 -10
- data/lib/aws/ec2/security_group/ip_permission_collection.rb +14 -15
- data/lib/aws/ec2/security_group_collection.rb +11 -8
- data/lib/aws/ec2/snapshot.rb +0 -4
- data/lib/aws/ec2/snapshot_collection.rb +0 -4
- data/lib/aws/ec2/tag.rb +0 -3
- data/lib/aws/ec2/tag_collection.rb +1 -8
- data/lib/aws/ec2/tagged_item.rb +1 -3
- data/lib/aws/ec2/volume.rb +0 -6
- data/lib/aws/ec2/volume_collection.rb +0 -4
- data/lib/aws/errors.rb +0 -3
- data/lib/aws/iam.rb +33 -12
- data/lib/aws/iam/access_key.rb +0 -3
- data/lib/aws/iam/access_key_collection.rb +0 -3
- data/lib/aws/iam/account_alias_collection.rb +0 -2
- data/lib/aws/iam/client.rb +6 -8
- data/lib/aws/iam/client/xml.rb +4 -8
- data/lib/aws/iam/collection.rb +2 -5
- data/lib/aws/iam/config.rb +18 -0
- data/lib/aws/iam/errors.rb +2 -4
- data/lib/aws/iam/group.rb +0 -5
- data/lib/aws/iam/group_collection.rb +0 -3
- data/lib/aws/iam/group_policy_collection.rb +0 -2
- data/lib/aws/iam/group_user_collection.rb +1 -4
- data/lib/aws/iam/login_profile.rb +0 -2
- data/lib/aws/iam/mfa_device.rb +1 -3
- data/lib/aws/iam/mfa_device_collection.rb +0 -3
- data/lib/aws/iam/policy.rb +2 -4
- data/lib/aws/iam/policy_collection.rb +0 -3
- data/lib/aws/iam/request.rb +3 -7
- data/lib/aws/iam/resource.rb +1 -4
- data/lib/aws/iam/server_certificate.rb +0 -2
- data/lib/aws/iam/server_certificate_collection.rb +0 -3
- data/lib/aws/iam/signing_certificate.rb +0 -2
- data/lib/aws/iam/signing_certificate_collection.rb +0 -3
- data/lib/aws/iam/user.rb +0 -7
- data/lib/aws/iam/user_collection.rb +0 -3
- data/lib/aws/iam/user_group_collection.rb +0 -3
- data/lib/aws/iam/user_policy.rb +0 -2
- data/lib/aws/iam/user_policy_collection.rb +0 -3
- data/lib/aws/rails.rb +5 -4
- data/lib/aws/record.rb +4 -1
- data/lib/aws/record/base.rb +3 -2
- data/lib/aws/record/errors.rb +1 -3
- data/lib/aws/s3.rb +31 -6
- data/lib/aws/s3/access_control_list.rb +0 -2
- data/lib/aws/s3/acl_object.rb +10 -12
- data/lib/aws/s3/bucket.rb +1 -9
- data/lib/aws/s3/bucket_collection.rb +2 -5
- data/lib/aws/s3/bucket_version_collection.rb +1 -5
- data/lib/aws/s3/client.rb +34 -37
- data/lib/aws/s3/client/xml.rb +11 -14
- data/lib/aws/{resource_cache.rb → s3/config.rb} +6 -20
- data/lib/aws/s3/errors.rb +6 -7
- data/lib/aws/s3/multipart_upload.rb +1 -4
- data/lib/aws/s3/multipart_upload_collection.rb +1 -6
- data/lib/aws/s3/object_collection.rb +1 -5
- data/lib/aws/s3/object_metadata.rb +1 -3
- data/lib/aws/s3/object_upload_collection.rb +1 -7
- data/lib/aws/s3/object_version.rb +1 -4
- data/lib/aws/s3/object_version_collection.rb +1 -4
- data/lib/aws/s3/policy.rb +3 -5
- data/lib/aws/s3/prefix_and_delimiter_collection.rb +0 -2
- data/lib/aws/s3/prefixed_collection.rb +0 -2
- data/lib/aws/s3/presigned_post.rb +1 -3
- data/lib/aws/s3/request.rb +2 -5
- data/lib/aws/s3/s3_object.rb +1 -8
- data/lib/aws/s3/tree.rb +8 -6
- data/lib/aws/s3/tree/branch_node.rb +0 -3
- data/lib/aws/s3/tree/child_collection.rb +1 -5
- data/lib/aws/s3/tree/leaf_node.rb +0 -5
- data/lib/aws/s3/tree/parent.rb +1 -4
- data/lib/aws/s3/uploaded_part.rb +1 -3
- data/lib/aws/s3/uploaded_part_collection.rb +1 -5
- data/lib/aws/simple_db.rb +21 -6
- data/lib/aws/simple_db/attribute.rb +1 -6
- data/lib/aws/simple_db/attribute_collection.rb +1 -7
- data/lib/aws/simple_db/client.rb +7 -9
- data/lib/aws/simple_db/client/options.rb +2 -4
- data/lib/aws/simple_db/client/xml.rb +5 -10
- data/lib/aws/{naming.rb → simple_db/config.rb} +3 -14
- data/lib/aws/simple_db/delete_attributes.rb +0 -2
- data/lib/aws/simple_db/domain.rb +1 -6
- data/lib/aws/simple_db/domain_collection.rb +1 -4
- data/lib/aws/simple_db/domain_metadata.rb +1 -3
- data/lib/aws/simple_db/errors.rb +1 -4
- data/lib/aws/simple_db/item.rb +1 -7
- data/lib/aws/simple_db/item_collection.rb +22 -23
- data/lib/aws/simple_db/put_attributes.rb +0 -2
- data/lib/aws/simple_db/request.rb +3 -7
- data/lib/aws/simple_email_service.rb +11 -6
- data/lib/aws/simple_email_service/client.rb +7 -9
- data/lib/aws/simple_email_service/client/options.rb +3 -6
- data/lib/aws/simple_email_service/client/xml.rb +4 -8
- data/lib/aws/simple_email_service/config.rb +19 -0
- data/lib/aws/simple_email_service/email_address_collection.rb +1 -3
- data/lib/aws/simple_email_service/errors.rb +1 -4
- data/lib/aws/simple_email_service/quotas.rb +1 -3
- data/lib/aws/simple_email_service/request.rb +3 -7
- data/lib/aws/sns.rb +15 -8
- data/lib/aws/sns/client.rb +7 -8
- data/lib/aws/sns/client/options.rb +3 -6
- data/lib/aws/sns/client/xml.rb +4 -8
- data/lib/aws/sns/config.rb +18 -0
- data/lib/aws/sns/errors.rb +1 -4
- data/lib/aws/sns/policy.rb +3 -5
- data/lib/aws/sns/request.rb +4 -9
- data/lib/aws/sns/subscription.rb +1 -5
- data/lib/aws/sns/subscription_collection.rb +1 -5
- data/lib/aws/sns/topic.rb +1 -6
- data/lib/aws/sns/topic_collection.rb +1 -4
- data/lib/aws/sns/topic_subscription_collection.rb +1 -4
- data/lib/aws/sqs.rb +14 -5
- data/lib/aws/sqs/client.rb +6 -9
- data/lib/aws/sqs/client/xml.rb +4 -7
- data/lib/aws/sqs/config.rb +18 -0
- data/lib/aws/sqs/errors.rb +1 -4
- data/lib/aws/sqs/policy.rb +3 -5
- data/lib/aws/sqs/queue.rb +2 -7
- data/lib/aws/sqs/queue_collection.rb +4 -5
- data/lib/aws/sqs/received_message.rb +1 -3
- data/lib/aws/sqs/received_sns_message.rb +2 -2
- data/lib/aws/sqs/request.rb +4 -7
- data/lib/aws/sts.rb +12 -6
- data/lib/aws/sts/client.rb +6 -8
- data/lib/aws/sts/client/xml.rb +4 -8
- data/lib/aws/sts/config.rb +18 -0
- data/lib/aws/sts/errors.rb +1 -4
- data/lib/aws/sts/federated_session.rb +0 -2
- data/lib/aws/sts/policy.rb +3 -5
- data/lib/aws/sts/request.rb +3 -7
- metadata +60 -50
- data/lib/aws/async_handle.rb +0 -90
- data/lib/aws/authorize_v2.rb +0 -37
- data/lib/aws/base_client.rb +0 -488
- data/lib/aws/cacheable.rb +0 -79
- data/lib/aws/client_logging.rb +0 -122
- data/lib/aws/collections.rb +0 -230
- data/lib/aws/configuration.rb +0 -357
- data/lib/aws/configured_client_methods.rb +0 -81
- data/lib/aws/configured_grammars.rb +0 -65
- data/lib/aws/default_signer.rb +0 -65
- data/lib/aws/http/curb_handler.rb +0 -127
- data/lib/aws/http/handler.rb +0 -77
- data/lib/aws/http/httparty_handler.rb +0 -103
- data/lib/aws/http/request.rb +0 -165
- data/lib/aws/http/request_param.rb +0 -64
- data/lib/aws/http/response.rb +0 -72
- data/lib/aws/indifferent_hash.rb +0 -86
- data/lib/aws/inflection.rb +0 -46
- data/lib/aws/lazy_error_classes.rb +0 -64
- data/lib/aws/meta_utils.rb +0 -43
- data/lib/aws/model.rb +0 -57
- data/lib/aws/option_grammar.rb +0 -565
- data/lib/aws/policy.rb +0 -914
- data/lib/aws/resource.rb +0 -381
- data/lib/aws/response.rb +0 -125
- data/lib/aws/response_cache.rb +0 -50
- data/lib/aws/service_interface.rb +0 -60
- data/lib/aws/xml_grammar.rb +0 -925
data/lib/aws/s3/client/xml.rb
CHANGED
@@ -11,17 +11,14 @@
|
|
11
11
|
# ANY KIND, either express or implied. See the License for the specific
|
12
12
|
# language governing permissions and limitations under the License.
|
13
13
|
|
14
|
-
require 'aws/xml_grammar'
|
15
|
-
require 'aws/base_client'
|
16
|
-
|
17
14
|
module AWS
|
18
15
|
class S3
|
19
|
-
class Client <
|
16
|
+
class Client < Core::Client
|
20
17
|
|
21
18
|
# @private
|
22
19
|
module XML
|
23
20
|
|
24
|
-
Error = XmlGrammar.customize { }
|
21
|
+
Error = Core::XmlGrammar.customize { }
|
25
22
|
|
26
23
|
module HasCommonPrefixes
|
27
24
|
|
@@ -36,7 +33,7 @@ module AWS
|
|
36
33
|
|
37
34
|
end
|
38
35
|
|
39
|
-
ListBuckets = XmlGrammar.customize do
|
36
|
+
ListBuckets = Core::XmlGrammar.customize do
|
40
37
|
element "Buckets" do
|
41
38
|
element "Bucket" do
|
42
39
|
collect_values
|
@@ -45,7 +42,7 @@ module AWS
|
|
45
42
|
end
|
46
43
|
end
|
47
44
|
|
48
|
-
GetBucketAcl = GetObjectAcl = XmlGrammar.customize do
|
45
|
+
GetBucketAcl = GetObjectAcl = Core::XmlGrammar.customize do
|
49
46
|
wrapper(:acl,
|
50
47
|
:for => ["Owner",
|
51
48
|
"AccessControlList"]) do
|
@@ -79,7 +76,7 @@ module AWS
|
|
79
76
|
end
|
80
77
|
end
|
81
78
|
|
82
|
-
ListObjects = XmlGrammar.customize do
|
79
|
+
ListObjects = Core::XmlGrammar.customize do
|
83
80
|
|
84
81
|
element("Name") { rename "bucket_name" }
|
85
82
|
element("MaxKeys") { integer_value }
|
@@ -105,7 +102,7 @@ module AWS
|
|
105
102
|
|
106
103
|
end
|
107
104
|
|
108
|
-
GetBucketVersioning = XmlGrammar.customize do
|
105
|
+
GetBucketVersioning = Core::XmlGrammar.customize do
|
109
106
|
element("Status") do
|
110
107
|
symbol_value
|
111
108
|
format_value {|value| super(value) || :unversioned }
|
@@ -113,7 +110,7 @@ module AWS
|
|
113
110
|
end
|
114
111
|
end
|
115
112
|
|
116
|
-
ListObjectVersions = XmlGrammar.customize do
|
113
|
+
ListObjectVersions = Core::XmlGrammar.customize do
|
117
114
|
|
118
115
|
element("MaxKeys") { integer_value }
|
119
116
|
element("IsTruncated") { rename "Truncated"; boolean_value }
|
@@ -147,11 +144,11 @@ module AWS
|
|
147
144
|
end
|
148
145
|
|
149
146
|
# default behavior is good enough
|
150
|
-
InitiateMultipartUpload = XmlGrammar.customize do
|
147
|
+
InitiateMultipartUpload = Core::XmlGrammar.customize do
|
151
148
|
element("UploadId") { force }
|
152
149
|
end
|
153
150
|
|
154
|
-
ListMultipartUploads = XmlGrammar.customize do
|
151
|
+
ListMultipartUploads = Core::XmlGrammar.customize do
|
155
152
|
element("IsTruncated") { rename "Truncated"; boolean_value }
|
156
153
|
element("MaxUploads") { integer_value }
|
157
154
|
element("NextKeyMarker") { force }
|
@@ -167,9 +164,9 @@ module AWS
|
|
167
164
|
end
|
168
165
|
|
169
166
|
# keep default behavior
|
170
|
-
CompleteMultipartUpload = XmlGrammar.customize
|
167
|
+
CompleteMultipartUpload = Core::XmlGrammar.customize
|
171
168
|
|
172
|
-
ListParts = XmlGrammar.customize do
|
169
|
+
ListParts = Core::XmlGrammar.customize do
|
173
170
|
element("StorageClass") { symbol_value }
|
174
171
|
element("IsTruncated") { rename "Truncated"; boolean_value }
|
175
172
|
element("MaxParts") { integer_value }
|
@@ -11,28 +11,14 @@
|
|
11
11
|
# ANY KIND, either express or implied. See the License for the specific
|
12
12
|
# language governing permissions and limitations under the License.
|
13
13
|
|
14
|
-
|
14
|
+
AWS::Core::Configuration.module_eval do
|
15
15
|
|
16
|
-
|
17
|
-
class ResourceCache
|
16
|
+
add_service 'S3', 's3', 's3.amazonaws.com'
|
18
17
|
|
19
|
-
|
20
|
-
@cache = {}
|
21
|
-
end
|
18
|
+
add_option :s3_multipart_threshold, 16 * 1024 * 1024
|
22
19
|
|
23
|
-
|
24
|
-
(@cache[key] ||= {}).merge!(attributes)
|
25
|
-
end
|
20
|
+
add_option :s3_multipart_min_part_size, 5 * 1024 * 1024
|
26
21
|
|
27
|
-
|
28
|
-
|
29
|
-
end
|
30
|
-
|
31
|
-
def get(key, attribute)
|
32
|
-
raise "No cached value for attribute :#{attribute} of #{key}" unless
|
33
|
-
cached?(key, attribute)
|
34
|
-
@cache[key][attribute]
|
35
|
-
end
|
36
|
-
|
37
|
-
end
|
22
|
+
add_option :s3_multipart_max_parts, 10000
|
23
|
+
|
38
24
|
end
|
data/lib/aws/s3/errors.rb
CHANGED
@@ -11,9 +11,6 @@
|
|
11
11
|
# ANY KIND, either express or implied. See the License for the specific
|
12
12
|
# language governing permissions and limitations under the License.
|
13
13
|
|
14
|
-
require 'aws/lazy_error_classes'
|
15
|
-
require 'aws/s3/client/xml'
|
16
|
-
|
17
14
|
module AWS
|
18
15
|
class S3
|
19
16
|
|
@@ -34,14 +31,11 @@ module AWS
|
|
34
31
|
# @private
|
35
32
|
module Errors
|
36
33
|
|
37
|
-
BASE_ERROR_GRAMMAR = Client::XML::Error
|
38
|
-
|
39
|
-
include LazyErrorClasses
|
40
|
-
|
41
34
|
# This error is special, because S3 does not (and must not
|
42
35
|
# according to RFC 2616) return a body with the HTTP response.
|
43
36
|
# The interface is the same as for any other client error.
|
44
37
|
class NotModified < AWS::Errors::Base
|
38
|
+
|
45
39
|
include AWS::Errors::ClientError
|
46
40
|
|
47
41
|
def code; "NotModified"; end
|
@@ -56,6 +50,7 @@ module AWS
|
|
56
50
|
# the HTTP response. The interface is the same as for any other
|
57
51
|
# client error.
|
58
52
|
class NoSuchKey < AWS::Errors::Base
|
53
|
+
|
59
54
|
include AWS::Errors::ClientError
|
60
55
|
|
61
56
|
def code; "NoSuchKey"; end
|
@@ -66,6 +61,10 @@ module AWS
|
|
66
61
|
|
67
62
|
end
|
68
63
|
|
64
|
+
BASE_ERROR_GRAMMAR = Client::XML::Error
|
65
|
+
|
66
|
+
include Core::LazyErrorClasses
|
67
|
+
|
69
68
|
end
|
70
69
|
end
|
71
70
|
end
|
@@ -11,9 +11,6 @@
|
|
11
11
|
# ANY KIND, either express or implied. See the License for the specific
|
12
12
|
# language governing permissions and limitations under the License.
|
13
13
|
|
14
|
-
require 'aws/model'
|
15
|
-
require 'aws/s3/uploaded_part'
|
16
|
-
require 'aws/s3/uploaded_part_collection'
|
17
14
|
require 'thread'
|
18
15
|
|
19
16
|
module AWS
|
@@ -24,7 +21,7 @@ module AWS
|
|
24
21
|
# multipart upload.
|
25
22
|
class MultipartUpload
|
26
23
|
|
27
|
-
include Model
|
24
|
+
include Core::Model
|
28
25
|
|
29
26
|
# @private
|
30
27
|
def initialize(object, id, options = {})
|
@@ -11,11 +11,6 @@
|
|
11
11
|
# ANY KIND, either express or implied. See the License for the specific
|
12
12
|
# language governing permissions and limitations under the License.
|
13
13
|
|
14
|
-
require 'aws/model'
|
15
|
-
require 'aws/s3/prefix_and_delimiter_collection'
|
16
|
-
require 'aws/s3/multipart_upload'
|
17
|
-
require 'aws/s3/s3_object'
|
18
|
-
|
19
14
|
module AWS
|
20
15
|
class S3
|
21
16
|
|
@@ -35,7 +30,7 @@ module AWS
|
|
35
30
|
class MultipartUploadCollection
|
36
31
|
|
37
32
|
include Enumerable
|
38
|
-
include Model
|
33
|
+
include Core::Model
|
39
34
|
include PrefixAndDelimiterCollection
|
40
35
|
|
41
36
|
# @return [Bucket] The bucket in which the uploads are taking
|
@@ -11,10 +11,6 @@
|
|
11
11
|
# ANY KIND, either express or implied. See the License for the specific
|
12
12
|
# language governing permissions and limitations under the License.
|
13
13
|
|
14
|
-
require 'aws/model'
|
15
|
-
require 'aws/s3/s3_object'
|
16
|
-
require 'aws/s3/prefix_and_delimiter_collection'
|
17
|
-
|
18
14
|
module AWS
|
19
15
|
class S3
|
20
16
|
|
@@ -62,7 +58,7 @@ module AWS
|
|
62
58
|
#
|
63
59
|
class ObjectCollection
|
64
60
|
|
65
|
-
include Model
|
61
|
+
include Core::Model
|
66
62
|
include Enumerable
|
67
63
|
include PrefixAndDelimiterCollection
|
68
64
|
|
@@ -11,15 +11,13 @@
|
|
11
11
|
# ANY KIND, either express or implied. See the License for the specific
|
12
12
|
# language governing permissions and limitations under the License.
|
13
13
|
|
14
|
-
require 'aws/model'
|
15
|
-
|
16
14
|
module AWS
|
17
15
|
class S3
|
18
16
|
|
19
17
|
# Returns an object that represents the metadata for an S3 object.
|
20
18
|
class ObjectMetadata
|
21
19
|
|
22
|
-
include Model
|
20
|
+
include Core::Model
|
23
21
|
|
24
22
|
# @param [S3Object]
|
25
23
|
# @param [Hash] options
|
@@ -11,12 +11,6 @@
|
|
11
11
|
# ANY KIND, either express or implied. See the License for the specific
|
12
12
|
# language governing permissions and limitations under the License.
|
13
13
|
|
14
|
-
require 'aws/model'
|
15
|
-
require 'aws/s3/paginated_collection'
|
16
|
-
require 'aws/s3/multipart_upload'
|
17
|
-
require 'aws/s3/multipart_upload_collection'
|
18
|
-
require 'aws/s3/s3_object'
|
19
|
-
|
20
14
|
module AWS
|
21
15
|
class S3
|
22
16
|
|
@@ -30,7 +24,7 @@ module AWS
|
|
30
24
|
class ObjectUploadCollection
|
31
25
|
|
32
26
|
include Enumerable
|
33
|
-
include Model
|
27
|
+
include Core::Model
|
34
28
|
|
35
29
|
# @return [S3Object] The object to which the uploads belong.
|
36
30
|
attr_reader :object
|
@@ -11,9 +11,6 @@
|
|
11
11
|
# ANY KIND, either express or implied. See the License for the specific
|
12
12
|
# language governing permissions and limitations under the License.
|
13
13
|
|
14
|
-
require 'aws/model'
|
15
|
-
require 'aws/errors'
|
16
|
-
|
17
14
|
module AWS
|
18
15
|
class S3
|
19
16
|
|
@@ -24,7 +21,7 @@ module AWS
|
|
24
21
|
# object.
|
25
22
|
class ObjectVersion
|
26
23
|
|
27
|
-
include Model
|
24
|
+
include Core::Model
|
28
25
|
|
29
26
|
# @param [S3Object] object The object this is a version of.
|
30
27
|
# @param [String] version_id The unique id for this version.
|
@@ -11,9 +11,6 @@
|
|
11
11
|
# ANY KIND, either express or implied. See the License for the specific
|
12
12
|
# language governing permissions and limitations under the License.
|
13
13
|
|
14
|
-
require 'aws/model'
|
15
|
-
require 'aws/s3/object_version'
|
16
|
-
|
17
14
|
module AWS
|
18
15
|
class S3
|
19
16
|
|
@@ -34,7 +31,7 @@ module AWS
|
|
34
31
|
#
|
35
32
|
class ObjectVersionCollection
|
36
33
|
|
37
|
-
include Model
|
34
|
+
include Core::Model
|
38
35
|
include Enumerable
|
39
36
|
|
40
37
|
# @return [S3Object] The object this collection belongs to.
|
data/lib/aws/s3/policy.rb
CHANGED
@@ -11,15 +11,13 @@
|
|
11
11
|
# ANY KIND, either express or implied. See the License for the specific
|
12
12
|
# language governing permissions and limitations under the License.
|
13
13
|
|
14
|
-
require 'aws/policy'
|
15
|
-
|
16
14
|
module AWS
|
17
15
|
class S3
|
18
16
|
|
19
|
-
# @see
|
20
|
-
class Policy <
|
17
|
+
# @see Core::Policy
|
18
|
+
class Policy < Core::Policy
|
21
19
|
|
22
|
-
class Statement <
|
20
|
+
class Statement < Core::Policy::Statement
|
23
21
|
|
24
22
|
ACTION_MAPPING = {
|
25
23
|
:list_buckets => "s3:ListAllMyBuckets",
|
@@ -11,8 +11,6 @@
|
|
11
11
|
# ANY KIND, either express or implied. See the License for the specific
|
12
12
|
# language governing permissions and limitations under the License.
|
13
13
|
|
14
|
-
require 'aws/model'
|
15
|
-
require 'aws/s3/request'
|
16
14
|
require 'uri'
|
17
15
|
require 'base64'
|
18
16
|
require 'time'
|
@@ -52,7 +50,7 @@ module AWS
|
|
52
50
|
# bucket.presigned_post.where(:key).starts_with("photos/")
|
53
51
|
class PresignedPost
|
54
52
|
|
55
|
-
include Model
|
53
|
+
include Core::Model
|
56
54
|
|
57
55
|
# @return [Bucket] The bucket to which data can be uploaded
|
58
56
|
# using the form fields
|
data/lib/aws/s3/request.rb
CHANGED
@@ -11,9 +11,6 @@
|
|
11
11
|
# ANY KIND, either express or implied. See the License for the specific
|
12
12
|
# language governing permissions and limitations under the License.
|
13
13
|
|
14
|
-
require 'aws/http/request'
|
15
|
-
require 'aws/base_client'
|
16
|
-
require 'aws/uri_escape'
|
17
14
|
require 'uri'
|
18
15
|
require 'time'
|
19
16
|
|
@@ -21,9 +18,9 @@ module AWS
|
|
21
18
|
class S3
|
22
19
|
|
23
20
|
# @private
|
24
|
-
class Request <
|
21
|
+
class Request < Core::Http::Request
|
25
22
|
|
26
|
-
include UriEscape
|
23
|
+
include Core::UriEscape
|
27
24
|
|
28
25
|
# @param [bucket] S3 bucket name
|
29
26
|
attr_accessor :bucket
|
data/lib/aws/s3/s3_object.rb
CHANGED
@@ -11,13 +11,6 @@
|
|
11
11
|
# ANY KIND, either express or implied. See the License for the specific
|
12
12
|
# language governing permissions and limitations under the License.
|
13
13
|
|
14
|
-
require 'aws/model'
|
15
|
-
require 'aws/s3/request'
|
16
|
-
require 'aws/s3/object_metadata'
|
17
|
-
require 'aws/s3/multipart_upload'
|
18
|
-
require 'aws/s3/object_upload_collection'
|
19
|
-
require 'aws/s3/presigned_post'
|
20
|
-
require 'aws/s3/data_options'
|
21
14
|
require 'uri'
|
22
15
|
|
23
16
|
module AWS
|
@@ -44,7 +37,7 @@ module AWS
|
|
44
37
|
#
|
45
38
|
class S3Object
|
46
39
|
|
47
|
-
include Model
|
40
|
+
include Core::Model
|
48
41
|
include DataOptions
|
49
42
|
|
50
43
|
# @param [Bucket] bucket The bucket this object belongs to.
|
data/lib/aws/s3/tree.rb
CHANGED
@@ -11,12 +11,6 @@
|
|
11
11
|
# ANY KIND, either express or implied. See the License for the specific
|
12
12
|
# language governing permissions and limitations under the License.
|
13
13
|
|
14
|
-
require 'aws/model'
|
15
|
-
require 'aws/s3/tree/parent'
|
16
|
-
require 'aws/s3/tree/leaf_node'
|
17
|
-
require 'aws/s3/tree/branch_node'
|
18
|
-
require 'aws/s3/tree/child_collection'
|
19
|
-
|
20
14
|
module AWS
|
21
15
|
class S3
|
22
16
|
|
@@ -83,6 +77,14 @@ module AWS
|
|
83
77
|
# using.
|
84
78
|
class Tree
|
85
79
|
|
80
|
+
AWS.register_autoloads(self) do
|
81
|
+
autoload :BranchNode, 'branch_node'
|
82
|
+
autoload :ChildCollection, 'child_collection'
|
83
|
+
autoload :LeafNode, 'leaf_node'
|
84
|
+
autoload :Node, 'node'
|
85
|
+
autoload :Parent, 'parent'
|
86
|
+
end
|
87
|
+
|
86
88
|
include Parent
|
87
89
|
|
88
90
|
# @param [ObjectCollection, BucketVersionCollection,
|