aws-sdk 1.9.0 → 1.9.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.yardopts +2 -2
- data/lib/aws/auto_scaling/activity.rb +1 -1
- data/lib/aws/auto_scaling/activity_collection.rb +1 -1
- data/lib/aws/auto_scaling/client.rb +1 -1
- data/lib/aws/auto_scaling/group_options.rb +1 -1
- data/lib/aws/auto_scaling/instance.rb +1 -1
- data/lib/aws/auto_scaling/launch_configuration.rb +1 -1
- data/lib/aws/auto_scaling/notification_configuration.rb +2 -2
- data/lib/aws/auto_scaling/notification_configuration_collection.rb +1 -1
- data/lib/aws/auto_scaling/request.rb +1 -1
- data/lib/aws/auto_scaling/scaling_policy.rb +1 -1
- data/lib/aws/auto_scaling/scaling_policy_options.rb +1 -1
- data/lib/aws/auto_scaling/scheduled_action.rb +1 -1
- data/lib/aws/auto_scaling/scheduled_action_collection.rb +1 -1
- data/lib/aws/auto_scaling/tag.rb +1 -1
- data/lib/aws/auto_scaling/tag_collection.rb +1 -1
- data/lib/aws/cloud_formation/client.rb +1 -1
- data/lib/aws/cloud_formation/request.rb +1 -1
- data/lib/aws/cloud_formation/stack.rb +1 -1
- data/lib/aws/cloud_formation/stack_collection.rb +1 -1
- data/lib/aws/cloud_formation/stack_event.rb +1 -1
- data/lib/aws/cloud_formation/stack_options.rb +1 -1
- data/lib/aws/cloud_formation/stack_output.rb +1 -1
- data/lib/aws/cloud_formation/stack_resource.rb +1 -1
- data/lib/aws/cloud_formation/stack_summary_collection.rb +1 -1
- data/lib/aws/cloud_front/client.rb +1 -1
- data/lib/aws/cloud_front/request.rb +1 -1
- data/lib/aws/cloud_search/client.rb +1 -1
- data/lib/aws/cloud_search/request.rb +1 -1
- data/lib/aws/cloud_watch/alarm.rb +1 -1
- data/lib/aws/cloud_watch/alarm_history_item.rb +1 -1
- data/lib/aws/cloud_watch/alarm_history_item_collection.rb +1 -1
- data/lib/aws/cloud_watch/client.rb +1 -1
- data/lib/aws/cloud_watch/metric_alarm_collection.rb +1 -1
- data/lib/aws/cloud_watch/metric_collection.rb +1 -1
- data/lib/aws/cloud_watch/request.rb +1 -1
- data/lib/aws/core.rb +5 -5
- data/lib/aws/core/cacheable.rb +5 -5
- data/lib/aws/core/client.rb +11 -11
- data/lib/aws/core/configuration.rb +4 -4
- data/lib/aws/core/credential_providers.rb +3 -3
- data/lib/aws/core/data.rb +4 -4
- data/lib/aws/core/http/connection_pool.rb +6 -5
- data/lib/aws/core/http/curb_handler.rb +1 -1
- data/lib/aws/core/http/handler.rb +1 -1
- data/lib/aws/core/http/net_http_handler.rb +3 -2
- data/lib/aws/core/http/patch.rb +2 -2
- data/lib/aws/core/http/request.rb +8 -8
- data/lib/aws/core/indifferent_hash.rb +1 -1
- data/lib/aws/core/inflection.rb +1 -1
- data/lib/aws/core/json_parser.rb +1 -1
- data/lib/aws/core/json_request_builder.rb +1 -1
- data/lib/aws/core/json_response_parser.rb +1 -1
- data/lib/aws/core/lazy_error_classes.rb +1 -1
- data/lib/aws/core/log_formatter.rb +1 -1
- data/lib/aws/core/managed_file.rb +1 -1
- data/lib/aws/core/meta_utils.rb +1 -1
- data/lib/aws/core/model.rb +2 -2
- data/lib/aws/core/naming.rb +1 -1
- data/lib/aws/core/option_grammar.rb +17 -17
- data/lib/aws/core/policy.rb +32 -32
- data/lib/aws/core/query_error_parser.rb +1 -1
- data/lib/aws/core/query_request_builder.rb +1 -1
- data/lib/aws/core/query_response_parser.rb +1 -1
- data/lib/aws/core/region_collection.rb +3 -3
- data/lib/aws/core/resource.rb +25 -25
- data/lib/aws/core/resource_cache.rb +1 -1
- data/lib/aws/core/response.rb +4 -4
- data/lib/aws/core/response_cache.rb +1 -1
- data/lib/aws/core/rest_error_parser.rb +1 -1
- data/lib/aws/core/rest_request_builder.rb +1 -1
- data/lib/aws/core/rest_response_parser.rb +1 -1
- data/lib/aws/core/service_interface.rb +2 -2
- data/lib/aws/core/xml/frame_stack.rb +1 -1
- data/lib/aws/data_pipeline/client.rb +1 -1
- data/lib/aws/data_pipeline/request.rb +1 -1
- data/lib/aws/direct_connect/client.rb +1 -1
- data/lib/aws/direct_connect/errors.rb +1 -1
- data/lib/aws/direct_connect/request.rb +1 -1
- data/lib/aws/dynamo_db/attribute_collection.rb +3 -3
- data/lib/aws/dynamo_db/item.rb +2 -2
- data/lib/aws/dynamo_db/item_collection.rb +5 -5
- data/lib/aws/dynamo_db/keys.rb +1 -1
- data/lib/aws/dynamo_db/request.rb +1 -1
- data/lib/aws/dynamo_db/resource.rb +1 -1
- data/lib/aws/dynamo_db/table.rb +1 -1
- data/lib/aws/dynamo_db/table_collection.rb +1 -1
- data/lib/aws/dynamo_db/types.rb +1 -1
- data/lib/aws/ec2/attachment.rb +1 -1
- data/lib/aws/ec2/attachment_collection.rb +1 -1
- data/lib/aws/ec2/availability_zone_collection.rb +1 -1
- data/lib/aws/ec2/block_device_mappings.rb +2 -2
- data/lib/aws/ec2/client.rb +1 -1
- data/lib/aws/ec2/config_transform.rb +1 -1
- data/lib/aws/ec2/customer_gateway.rb +1 -1
- data/lib/aws/ec2/dhcp_options.rb +1 -1
- data/lib/aws/ec2/elastic_ip.rb +4 -4
- data/lib/aws/ec2/errors.rb +1 -1
- data/lib/aws/ec2/export_task.rb +1 -1
- data/lib/aws/ec2/filtered_collection.rb +3 -3
- data/lib/aws/ec2/image.rb +1 -1
- data/lib/aws/ec2/image_collection.rb +3 -3
- data/lib/aws/ec2/instance.rb +7 -7
- data/lib/aws/ec2/instance_collection.rb +3 -3
- data/lib/aws/ec2/internet_gateway/attachment.rb +1 -1
- data/lib/aws/ec2/key_pair_collection.rb +2 -2
- data/lib/aws/ec2/permission_collection.rb +10 -10
- data/lib/aws/ec2/region_collection.rb +1 -1
- data/lib/aws/ec2/request.rb +1 -1
- data/lib/aws/ec2/resource.rb +3 -3
- data/lib/aws/ec2/resource_tag_collection.rb +1 -1
- data/lib/aws/ec2/route_table/association.rb +1 -1
- data/lib/aws/ec2/security_group.rb +9 -9
- data/lib/aws/ec2/snapshot.rb +2 -2
- data/lib/aws/ec2/snapshot_collection.rb +3 -3
- data/lib/aws/ec2/tag.rb +2 -2
- data/lib/aws/ec2/tag_collection.rb +3 -3
- data/lib/aws/ec2/tagged_item.rb +2 -2
- data/lib/aws/ec2/volume.rb +1 -1
- data/lib/aws/ec2/volume_collection.rb +1 -1
- data/lib/aws/ec2/vpn_connection.rb +1 -1
- data/lib/aws/ec2/vpn_gateway/attachment.rb +1 -1
- data/lib/aws/elastic_beanstalk/client.rb +1 -1
- data/lib/aws/elastic_beanstalk/request.rb +1 -1
- data/lib/aws/elastic_transcoder/client.rb +2 -2
- data/lib/aws/elastic_transcoder/request.rb +1 -1
- data/lib/aws/elasticache/client.rb +1 -1
- data/lib/aws/elasticache/request.rb +1 -1
- data/lib/aws/elb/client.rb +1 -1
- data/lib/aws/elb/listener.rb +2 -2
- data/lib/aws/elb/listener_opts.rb +1 -1
- data/lib/aws/elb/load_balancer_policy.rb +1 -1
- data/lib/aws/elb/request.rb +1 -1
- data/lib/aws/emr/client.rb +1 -1
- data/lib/aws/emr/instance_group.rb +1 -1
- data/lib/aws/emr/instance_group_collection.rb +1 -1
- data/lib/aws/emr/job_flow.rb +1 -1
- data/lib/aws/emr/job_flow_collection.rb +1 -1
- data/lib/aws/emr/request.rb +1 -1
- data/lib/aws/errors.rb +1 -1
- data/lib/aws/glacier/client.rb +1 -1
- data/lib/aws/glacier/request.rb +1 -1
- data/lib/aws/glacier/resource.rb +1 -1
- data/lib/aws/iam.rb +1 -1
- data/lib/aws/iam/access_key.rb +3 -3
- data/lib/aws/iam/access_key_collection.rb +2 -2
- data/lib/aws/iam/account_alias_collection.rb +3 -3
- data/lib/aws/iam/client.rb +1 -1
- data/lib/aws/iam/collection.rb +1 -1
- data/lib/aws/iam/group.rb +2 -2
- data/lib/aws/iam/group_collection.rb +1 -1
- data/lib/aws/iam/group_policy_collection.rb +1 -1
- data/lib/aws/iam/group_user_collection.rb +2 -2
- data/lib/aws/iam/login_profile.rb +1 -1
- data/lib/aws/iam/mfa_device_collection.rb +1 -1
- data/lib/aws/iam/request.rb +1 -1
- data/lib/aws/iam/resource.rb +2 -2
- data/lib/aws/iam/server_certificate.rb +2 -2
- data/lib/aws/iam/server_certificate_collection.rb +1 -1
- data/lib/aws/iam/signing_certificate.rb +3 -3
- data/lib/aws/iam/signing_certificate_collection.rb +2 -2
- data/lib/aws/iam/user.rb +1 -1
- data/lib/aws/iam/user_collection.rb +1 -1
- data/lib/aws/iam/user_group_collection.rb +3 -3
- data/lib/aws/iam/user_policy.rb +1 -1
- data/lib/aws/iam/virtual_mfa_device.rb +1 -1
- data/lib/aws/import_export/client.rb +1 -1
- data/lib/aws/import_export/request.rb +1 -1
- data/lib/aws/ops_works/client.rb +1 -1
- data/lib/aws/ops_works/request.rb +1 -1
- data/lib/aws/rails.rb +4 -4
- data/lib/aws/rds/client.rb +1 -1
- data/lib/aws/rds/db_snapshot_collection.rb +1 -1
- data/lib/aws/rds/request.rb +1 -1
- data/lib/aws/record.rb +3 -3
- data/lib/aws/record/abstract_base.rb +4 -4
- data/lib/aws/record/attributes.rb +7 -7
- data/lib/aws/record/conversion.rb +4 -4
- data/lib/aws/record/dirty_tracking.rb +5 -5
- data/lib/aws/record/exceptions.rb +3 -3
- data/lib/aws/record/hash_model.rb +2 -2
- data/lib/aws/record/model.rb +6 -6
- data/lib/aws/record/model/scope.rb +5 -5
- data/lib/aws/record/naming.rb +2 -2
- data/lib/aws/record/scope.rb +7 -7
- data/lib/aws/record/validations.rb +1 -1
- data/lib/aws/record/validator.rb +14 -14
- data/lib/aws/record/validators/acceptance.rb +1 -1
- data/lib/aws/record/validators/block.rb +1 -1
- data/lib/aws/record/validators/confirmation.rb +1 -1
- data/lib/aws/record/validators/count.rb +4 -4
- data/lib/aws/record/validators/exclusion.rb +1 -1
- data/lib/aws/record/validators/format.rb +1 -1
- data/lib/aws/record/validators/inclusion.rb +1 -1
- data/lib/aws/record/validators/length.rb +4 -4
- data/lib/aws/record/validators/method.rb +1 -1
- data/lib/aws/record/validators/numericality.rb +1 -1
- data/lib/aws/record/validators/presence.rb +1 -1
- data/lib/aws/redshift/client.rb +1 -1
- data/lib/aws/redshift/request.rb +1 -1
- data/lib/aws/route_53/change_batch.rb +2 -2
- data/lib/aws/route_53/change_info.rb +1 -1
- data/lib/aws/route_53/client.rb +1 -1
- data/lib/aws/route_53/hosted_zone.rb +1 -1
- data/lib/aws/route_53/hosted_zone_collection.rb +1 -1
- data/lib/aws/route_53/request.rb +1 -1
- data/lib/aws/route_53/resource_record_set.rb +1 -1
- data/lib/aws/route_53/resource_record_set_collection.rb +1 -1
- data/lib/aws/s3/access_control_list.rb +7 -7
- data/lib/aws/s3/acl_object.rb +6 -6
- data/lib/aws/s3/acl_options.rb +1 -1
- data/lib/aws/s3/bucket.rb +3 -3
- data/lib/aws/s3/bucket_collection.rb +1 -1
- data/lib/aws/s3/bucket_lifecycle_configuration.rb +3 -3
- data/lib/aws/s3/bucket_tag_collection.rb +1 -1
- data/lib/aws/s3/bucket_version_collection.rb +4 -4
- data/lib/aws/s3/cipher_io.rb +1 -1
- data/lib/aws/s3/client.rb +2 -2
- data/lib/aws/s3/client/xml.rb +1 -1
- data/lib/aws/s3/data_options.rb +2 -2
- data/lib/aws/s3/encryption_utils.rb +1 -1
- data/lib/aws/s3/errors.rb +1 -1
- data/lib/aws/s3/multipart_upload.rb +5 -5
- data/lib/aws/s3/multipart_upload_collection.rb +1 -1
- data/lib/aws/s3/object_collection.rb +5 -5
- data/lib/aws/s3/object_upload_collection.rb +1 -1
- data/lib/aws/s3/object_version.rb +1 -1
- data/lib/aws/s3/paginated_collection.rb +1 -1
- data/lib/aws/s3/prefix_and_delimiter_collection.rb +3 -3
- data/lib/aws/s3/prefixed_collection.rb +2 -2
- data/lib/aws/s3/presigned_post.rb +18 -18
- data/lib/aws/s3/request.rb +2 -2
- data/lib/aws/s3/s3_object.rb +3 -3
- data/lib/aws/s3/tree/branch_node.rb +1 -1
- data/lib/aws/s3/tree/child_collection.rb +1 -1
- data/lib/aws/s3/tree/leaf_node.rb +1 -1
- data/lib/aws/s3/tree/node.rb +1 -1
- data/lib/aws/s3/tree/parent.rb +1 -1
- data/lib/aws/s3/uploaded_part.rb +2 -2
- data/lib/aws/s3/uploaded_part_collection.rb +6 -6
- data/lib/aws/s3/website_configuration.rb +4 -4
- data/lib/aws/simple_db.rb +2 -2
- data/lib/aws/simple_db/attribute.rb +2 -2
- data/lib/aws/simple_db/client.rb +6 -6
- data/lib/aws/simple_db/consistent_read_option.rb +1 -1
- data/lib/aws/simple_db/delete_attributes.rb +3 -3
- data/lib/aws/simple_db/domain.rb +2 -2
- data/lib/aws/simple_db/domain_metadata.rb +1 -1
- data/lib/aws/simple_db/errors.rb +2 -2
- data/lib/aws/simple_db/expect_condition_option.rb +2 -2
- data/lib/aws/simple_db/item_collection.rb +17 -17
- data/lib/aws/simple_db/item_data.rb +1 -1
- data/lib/aws/simple_db/put_attributes.rb +3 -3
- data/lib/aws/simple_db/request.rb +1 -1
- data/lib/aws/simple_email_service.rb +3 -3
- data/lib/aws/simple_email_service/client.rb +1 -1
- data/lib/aws/simple_email_service/identity.rb +1 -1
- data/lib/aws/simple_email_service/identity_collection.rb +1 -1
- data/lib/aws/simple_email_service/quotas.rb +1 -1
- data/lib/aws/simple_email_service/request.rb +1 -1
- data/lib/aws/simple_workflow/activity_task.rb +1 -1
- data/lib/aws/simple_workflow/activity_task_collection.rb +1 -1
- data/lib/aws/simple_workflow/client.rb +1 -1
- data/lib/aws/simple_workflow/count.rb +1 -1
- data/lib/aws/simple_workflow/decision_task.rb +1 -1
- data/lib/aws/simple_workflow/decision_task_collection.rb +1 -1
- data/lib/aws/simple_workflow/domain.rb +1 -1
- data/lib/aws/simple_workflow/history_event.rb +3 -3
- data/lib/aws/simple_workflow/option_formatters.rb +1 -1
- data/lib/aws/simple_workflow/request.rb +1 -1
- data/lib/aws/simple_workflow/resource.rb +8 -8
- data/lib/aws/simple_workflow/type_collection.rb +1 -1
- data/lib/aws/simple_workflow/workflow_execution_collection.rb +2 -2
- data/lib/aws/sns/client.rb +1 -1
- data/lib/aws/sns/request.rb +1 -1
- data/lib/aws/sns/subscription.rb +2 -2
- data/lib/aws/sns/topic.rb +3 -3
- data/lib/aws/sns/topic_subscription_collection.rb +1 -1
- data/lib/aws/sqs/client.rb +1 -1
- data/lib/aws/sqs/errors.rb +1 -1
- data/lib/aws/sqs/queue.rb +8 -8
- data/lib/aws/sqs/queue_collection.rb +1 -1
- data/lib/aws/sqs/received_message.rb +3 -3
- data/lib/aws/sqs/request.rb +1 -1
- data/lib/aws/storage_gateway/client.rb +1 -1
- data/lib/aws/storage_gateway/request.rb +1 -1
- data/lib/aws/sts/client.rb +1 -1
- data/lib/aws/sts/federated_session.rb +1 -1
- data/lib/aws/sts/request.rb +1 -1
- data/lib/aws/sts/session.rb +1 -1
- data/lib/aws/version.rb +1 -1
- metadata +16 -8
- checksums.yaml +0 -7
@@ -24,7 +24,7 @@ module AWS
|
|
24
24
|
|
25
25
|
prefix_update_attributes
|
26
26
|
|
27
|
-
# @private
|
27
|
+
# @api private
|
28
28
|
def initialize(name, opts={})
|
29
29
|
opts[:name] = name
|
30
30
|
super(opts)
|
@@ -117,7 +117,7 @@ module AWS
|
|
117
117
|
nil
|
118
118
|
end
|
119
119
|
|
120
|
-
# @private
|
120
|
+
# @api private
|
121
121
|
protected
|
122
122
|
def resource_identifiers
|
123
123
|
[[:server_certificate_name, name]]
|
@@ -137,7 +137,7 @@ module AWS
|
|
137
137
|
nil
|
138
138
|
end
|
139
139
|
|
140
|
-
# @private
|
140
|
+
# @api private
|
141
141
|
protected
|
142
142
|
def resource_identifiers
|
143
143
|
identifiers = []
|
@@ -150,14 +150,14 @@ module AWS
|
|
150
150
|
# Also note, we do not page the response. This is because
|
151
151
|
# restrictions on how many certificates an account / user may
|
152
152
|
# have is fewer than one page of results.
|
153
|
-
# @private
|
153
|
+
# @api private
|
154
154
|
protected
|
155
155
|
def get_resource attribute
|
156
156
|
options = user ? { :user_name => user.name } : {}
|
157
157
|
client.list_signing_certificates(options)
|
158
158
|
end
|
159
159
|
|
160
|
-
# @private
|
160
|
+
# @api private
|
161
161
|
protected
|
162
162
|
def matches_response_object? obj
|
163
163
|
user_name = obj.respond_to?(:user_name) ? obj.user_name : nil
|
@@ -107,7 +107,7 @@ module AWS
|
|
107
107
|
super(each_options, &block)
|
108
108
|
end
|
109
109
|
|
110
|
-
# @private
|
110
|
+
# @api private
|
111
111
|
protected
|
112
112
|
def each_item response, &block
|
113
113
|
response.certificates.each do |item|
|
@@ -120,7 +120,7 @@ module AWS
|
|
120
120
|
end
|
121
121
|
end
|
122
122
|
|
123
|
-
# @private
|
123
|
+
# @api private
|
124
124
|
protected
|
125
125
|
def new_options
|
126
126
|
user ? { :user => user } : { :config => config }
|
data/lib/aws/iam/user.rb
CHANGED
@@ -28,7 +28,7 @@ module AWS
|
|
28
28
|
# @attr_reader [User] The user.
|
29
29
|
attr_reader :user
|
30
30
|
|
31
|
-
# @private
|
31
|
+
# @api private
|
32
32
|
def initialize(user, opts = {})
|
33
33
|
@user = user
|
34
34
|
super
|
@@ -77,13 +77,13 @@ module AWS
|
|
77
77
|
super(options.merge(:user_name => user.name), &block)
|
78
78
|
end
|
79
79
|
|
80
|
-
# @private
|
80
|
+
# @api private
|
81
81
|
protected
|
82
82
|
def request_method
|
83
83
|
:list_groups_for_user
|
84
84
|
end
|
85
85
|
|
86
|
-
# @private
|
86
|
+
# @api private
|
87
87
|
protected
|
88
88
|
def each_item response
|
89
89
|
response.groups.each do |g|
|
data/lib/aws/iam/user_policy.rb
CHANGED
data/lib/aws/ops_works/client.rb
CHANGED
data/lib/aws/rails.rb
CHANGED
@@ -17,7 +17,7 @@ module AWS
|
|
17
17
|
|
18
18
|
if Object.const_defined?(:Rails) and Rails.const_defined?(:Railtie)
|
19
19
|
|
20
|
-
# @private
|
20
|
+
# @api private
|
21
21
|
class Railtie < Rails::Railtie
|
22
22
|
|
23
23
|
# configure our plugin on boot. other extension points such
|
@@ -173,19 +173,19 @@ module AWS
|
|
173
173
|
nil
|
174
174
|
end
|
175
175
|
|
176
|
-
# @private
|
176
|
+
# @api private
|
177
177
|
protected
|
178
178
|
def self.rails_env
|
179
179
|
::Rails.respond_to?(:env) ? ::Rails.env : RAILS_ENV
|
180
180
|
end
|
181
181
|
|
182
|
-
# @private
|
182
|
+
# @api private
|
183
183
|
protected
|
184
184
|
def self.rails_root
|
185
185
|
::Rails.respond_to?(:root) ? ::Rails.root.to_s : RAILS_ROOT
|
186
186
|
end
|
187
187
|
|
188
|
-
# @private
|
188
|
+
# @api private
|
189
189
|
protected
|
190
190
|
def self.rails_logger
|
191
191
|
::Rails.respond_to?(:logger) ? ::Rails.logger : ::RAILS_DEFAULT_LOGGER
|
data/lib/aws/rds/client.rb
CHANGED
data/lib/aws/rds/request.rb
CHANGED
data/lib/aws/record.rb
CHANGED
@@ -50,7 +50,7 @@ module AWS
|
|
50
50
|
autoload :PresenceValidator, 'aws/record/validators/presence'
|
51
51
|
autoload :Validator, 'aws/record/validator'
|
52
52
|
|
53
|
-
# @private
|
53
|
+
# @api private
|
54
54
|
class RecordNotFound < StandardError; end
|
55
55
|
|
56
56
|
# Sets a prefix to be applied to all SimpleDB domains associated with
|
@@ -113,7 +113,7 @@ module AWS
|
|
113
113
|
#
|
114
114
|
# @param [Object] value
|
115
115
|
# @return [Array] The value cast into an array
|
116
|
-
# @private
|
116
|
+
# @api private
|
117
117
|
def self.as_array value
|
118
118
|
case value
|
119
119
|
when nil then []
|
@@ -130,7 +130,7 @@ module AWS
|
|
130
130
|
#
|
131
131
|
# @param [Object] value
|
132
132
|
# @return [Set] The value cast into a Set.
|
133
|
-
# @private
|
133
|
+
# @api private
|
134
134
|
def self.as_set value
|
135
135
|
case value
|
136
136
|
when Set then value
|
@@ -448,7 +448,7 @@ module AWS
|
|
448
448
|
end
|
449
449
|
end
|
450
450
|
|
451
|
-
# @private
|
451
|
+
# @api private
|
452
452
|
protected
|
453
453
|
def hydrate id, data
|
454
454
|
|
@@ -592,7 +592,7 @@ module AWS
|
|
592
592
|
create_impl(attributes, :create!, :save!)
|
593
593
|
end
|
594
594
|
|
595
|
-
# @private
|
595
|
+
# @api private
|
596
596
|
def new_scope
|
597
597
|
self::Scope.new(self)
|
598
598
|
end
|
@@ -619,7 +619,7 @@ module AWS
|
|
619
619
|
@attributes ||= {}
|
620
620
|
end
|
621
621
|
|
622
|
-
# @private
|
622
|
+
# @api private
|
623
623
|
def attribute_for attribute_name, &block
|
624
624
|
unless attribute = attributes[attribute_name.to_s]
|
625
625
|
raise UndefinedAttributeError.new(attribute_name.to_s)
|
@@ -627,7 +627,7 @@ module AWS
|
|
627
627
|
block_given? ? yield(attribute) : attribute
|
628
628
|
end
|
629
629
|
|
630
|
-
# @private
|
630
|
+
# @api private
|
631
631
|
def add_attribute attribute
|
632
632
|
|
633
633
|
attr_name = attribute.name
|
@@ -91,7 +91,7 @@ module AWS
|
|
91
91
|
raise NotImplementedError
|
92
92
|
end
|
93
93
|
|
94
|
-
# @private
|
94
|
+
# @api private
|
95
95
|
protected
|
96
96
|
def self.expect klass, value, &block
|
97
97
|
unless value.is_a?(klass)
|
@@ -143,7 +143,7 @@ module AWS
|
|
143
143
|
string
|
144
144
|
end
|
145
145
|
|
146
|
-
# @private
|
146
|
+
# @api private
|
147
147
|
def self.allow_set?
|
148
148
|
true
|
149
149
|
end
|
@@ -171,7 +171,7 @@ module AWS
|
|
171
171
|
end
|
172
172
|
end
|
173
173
|
|
174
|
-
# @private
|
174
|
+
# @api private
|
175
175
|
def self.allow_set?
|
176
176
|
false
|
177
177
|
end
|
@@ -216,7 +216,7 @@ module AWS
|
|
216
216
|
expect(Integer, integer) { integer }
|
217
217
|
end
|
218
218
|
|
219
|
-
# @private
|
219
|
+
# @api private
|
220
220
|
def self.allow_set?
|
221
221
|
true
|
222
222
|
end
|
@@ -241,7 +241,7 @@ module AWS
|
|
241
241
|
expect(Float, float) { float }
|
242
242
|
end
|
243
243
|
|
244
|
-
# @private
|
244
|
+
# @api private
|
245
245
|
def self.allow_set?
|
246
246
|
true
|
247
247
|
end
|
@@ -308,7 +308,7 @@ module AWS
|
|
308
308
|
date.strftime('%Y-%m-%d')
|
309
309
|
end
|
310
310
|
|
311
|
-
# @private
|
311
|
+
# @api private
|
312
312
|
def self.allow_set?
|
313
313
|
true
|
314
314
|
end
|
@@ -373,7 +373,7 @@ module AWS
|
|
373
373
|
datetime.strftime('%Y-%m-%dT%H:%M:%S%Z')
|
374
374
|
end
|
375
375
|
|
376
|
-
# @private
|
376
|
+
# @api private
|
377
377
|
def self.allow_set?
|
378
378
|
true
|
379
379
|
end
|
@@ -14,20 +14,20 @@
|
|
14
14
|
module AWS
|
15
15
|
module Record
|
16
16
|
|
17
|
-
# @private
|
17
|
+
# @api private
|
18
18
|
module Conversion
|
19
19
|
|
20
|
-
# @private
|
20
|
+
# @api private
|
21
21
|
def to_model
|
22
22
|
self
|
23
23
|
end
|
24
24
|
|
25
|
-
# @private
|
25
|
+
# @api private
|
26
26
|
def to_key
|
27
27
|
persisted? ? [id] : nil
|
28
28
|
end
|
29
29
|
|
30
|
-
# @private
|
30
|
+
# @api private
|
31
31
|
def to_param
|
32
32
|
persisted? ? to_key.join('-') : nil
|
33
33
|
end
|
@@ -140,7 +140,7 @@ module AWS
|
|
140
140
|
#
|
141
141
|
# @return [Boolean] Returns true if the named attribute
|
142
142
|
# has unsaved changes.
|
143
|
-
# @private
|
143
|
+
# @api private
|
144
144
|
private
|
145
145
|
def attribute_changed? attribute_name
|
146
146
|
orig_values.keys.include?(attribute_name)
|
@@ -175,7 +175,7 @@ module AWS
|
|
175
175
|
# a change for.
|
176
176
|
# @return [Boolean] Returns true if the named attribute
|
177
177
|
# has unsaved changes.
|
178
|
-
# @private
|
178
|
+
# @api private
|
179
179
|
private
|
180
180
|
def attribute_change attribute_name
|
181
181
|
self.class.attribute_for(attribute_name) do |attribute|
|
@@ -209,7 +209,7 @@ module AWS
|
|
209
209
|
#
|
210
210
|
# @return Returns the previous value for changed attributes
|
211
211
|
# or the current value for unchanged attributes.
|
212
|
-
# @private
|
212
|
+
# @api private
|
213
213
|
private
|
214
214
|
def attribute_was attribute_name
|
215
215
|
self.class.attribute_for(attribute_name) do |attribute|
|
@@ -221,7 +221,7 @@ module AWS
|
|
221
221
|
# Reverts any changes to the attribute, restoring its original value.
|
222
222
|
# @param [String] attribute_name Name of the attribute to reset.
|
223
223
|
# @return [nil]
|
224
|
-
# @private
|
224
|
+
# @api private
|
225
225
|
private
|
226
226
|
def reset_attribute! attribute_name
|
227
227
|
__send__("#{attribute_name}=", attribute_was(attribute_name))
|
@@ -233,7 +233,7 @@ module AWS
|
|
233
233
|
# @param [String] attribute_name Name of the attribute that will
|
234
234
|
# be changed.
|
235
235
|
# @return [nil]
|
236
|
-
# @private
|
236
|
+
# @api private
|
237
237
|
private
|
238
238
|
def attribute_will_change! attribute_name
|
239
239
|
self.class.attribute_for(attribute_name) do |attribute|
|
@@ -15,7 +15,7 @@ module AWS
|
|
15
15
|
module Record
|
16
16
|
|
17
17
|
# Raised when trying to access an attribute that does not exist.
|
18
|
-
# @private
|
18
|
+
# @api private
|
19
19
|
class UndefinedAttributeError < StandardError
|
20
20
|
def initalize attribute_name
|
21
21
|
super("undefined attribute `#{attribute_name}`")
|
@@ -24,7 +24,7 @@ module AWS
|
|
24
24
|
|
25
25
|
# Raised when calling #save!, #create! or #update_attributes! on a record that
|
26
26
|
# has validation errors.
|
27
|
-
# @private
|
27
|
+
# @api private
|
28
28
|
class InvalidRecordError < StandardError
|
29
29
|
def initialize record
|
30
30
|
@record = record
|
@@ -35,7 +35,7 @@ module AWS
|
|
35
35
|
|
36
36
|
# Raised when trying to persist a record that has no attribute values
|
37
37
|
# to persist.
|
38
|
-
# @private
|
38
|
+
# @api private
|
39
39
|
class EmptyRecordError < StandardError
|
40
40
|
def initialize record
|
41
41
|
@record = record
|