aws-sdk-core 2.0.0.rc12 → 2.0.0
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.
- checksums.yaml +4 -4
- data/apis/AutoScaling.api.json +1943 -0
- data/apis/CloudFormation.api.json +785 -0
- data/apis/CloudFront.api.json +2581 -0
- data/apis/CloudFront.paginators.json +32 -0
- data/apis/CloudSearch.api.json +1955 -0
- data/apis/CloudSearchDomain.api.json +349 -0
- data/apis/CloudTrail.api.json +559 -0
- data/apis/CloudWatch.api.json +917 -0
- data/apis/CloudWatchLogs.api.json +816 -0
- data/apis/CognitoIdentity.api.json +631 -0
- data/apis/CognitoSync.api.json +721 -0
- data/apis/DataPipeline.api.json +940 -0
- data/apis/DirectConnect.api.json +833 -0
- data/apis/DynamoDB.api.json +1210 -0
- data/apis/{dynamodb-2011-12-05.paginators.json → DynamoDB.paginators.json} +1 -3
- data/apis/EC2.api.json +9914 -0
- data/apis/{ec2-2014-06-15.resources.json → EC2.resources.json} +16 -0
- data/apis/EMR.api.json +1339 -0
- data/apis/ElastiCache.api.json +3410 -0
- data/apis/ElasticBeanstalk.api.json +1543 -0
- data/apis/ElasticLoadBalancing.api.json +2131 -0
- data/apis/ElasticTranscoder.api.json +1647 -0
- data/apis/Glacier.api.json +1456 -0
- data/apis/{glacier-2012-06-01.resources.json → Glacier.resources.json} +5 -9
- data/apis/IAM.api.json +4033 -0
- data/apis/{iam-2010-05-08.resources.json → IAM.resources.json} +1 -1
- data/apis/ImportExport.api.json +515 -0
- data/apis/Kinesis.api.json +706 -0
- data/apis/{kinesis-2013-12-02.paginators.json → Kinesis.paginators.json} +0 -6
- data/apis/OpsWorks.api.json +2555 -0
- data/apis/OpsWorks.resources.json +181 -0
- data/apis/RDS.api.json +4473 -0
- data/apis/Redshift.api.json +4482 -0
- data/apis/Route53.api.json +1935 -0
- data/apis/Route53Domains.api.json +1129 -0
- data/apis/{s3-2006-03-01.api.json → S3.api.json} +377 -972
- data/apis/{s3-2006-03-01.paginators.json → S3.paginators.json} +1 -1
- data/apis/{s3-2006-03-01.resources.json → S3.resources.json} +13 -2
- data/apis/SES.api.json +644 -0
- data/apis/SNS.api.json +1760 -0
- data/apis/SQS.api.json +1113 -0
- data/apis/{sqs-2012-11-05.resources.json → SQS.resources.json} +0 -10
- data/apis/STS.api.json +594 -0
- data/apis/SWF.api.json +2656 -0
- data/apis/SimpleDB.api.json +954 -0
- data/apis/StorageGateway.api.json +2311 -0
- data/apis/Support.api.json +869 -0
- data/bin/aws.rb +19 -1
- data/endpoints.json +77 -0
- data/lib/aws-sdk-core/api/docstrings.rb +35 -0
- data/lib/aws-sdk-core/api/documenter.rb +241 -0
- data/lib/{aws/api/documentor.rb → aws-sdk-core/api/operation_documenter.rb} +39 -28
- data/lib/{aws/api/doc_example.rb → aws-sdk-core/api/operation_example.rb} +31 -22
- data/lib/{aws → aws-sdk-core}/api/service_customizations.rb +5 -1
- data/lib/aws-sdk-core/autoscaling.rb +5 -0
- data/lib/aws-sdk-core/client.rb +121 -0
- data/lib/aws-sdk-core/cloudformation.rb +5 -0
- data/lib/aws-sdk-core/cloudfront.rb +6 -0
- data/lib/aws-sdk-core/cloudsearch.rb +5 -0
- data/lib/aws-sdk-core/cloudsearchdomain.rb +4 -0
- data/lib/aws-sdk-core/cloudtrail.rb +5 -0
- data/lib/aws-sdk-core/cloudwatch.rb +5 -0
- data/lib/aws-sdk-core/cloudwatchlogs.rb +5 -0
- data/lib/aws-sdk-core/cognitoidentity.rb +4 -0
- data/lib/aws-sdk-core/cognitosync.rb +4 -0
- data/lib/{aws → aws-sdk-core}/credential_provider_chain.rb +4 -1
- data/lib/aws-sdk-core/datapipeline.rb +5 -0
- data/lib/aws-sdk-core/directconnect.rb +5 -0
- data/lib/aws-sdk-core/dynamodb/attribute_value.rb +87 -0
- data/lib/aws-sdk-core/dynamodb.rb +12 -0
- data/lib/aws-sdk-core/ec2.rb +7 -0
- data/lib/aws-sdk-core/elasticache.rb +5 -0
- data/lib/aws-sdk-core/elasticbeanstalk.rb +5 -0
- data/lib/aws-sdk-core/elasticloadbalancing.rb +5 -0
- data/lib/aws-sdk-core/elastictranscoder.rb +5 -0
- data/lib/{aws → aws-sdk-core}/empty_structure.rb +4 -3
- data/lib/aws-sdk-core/emr.rb +5 -0
- data/lib/aws-sdk-core/endpoint_provider.rb +97 -0
- data/lib/{aws → aws-sdk-core}/errors.rb +27 -8
- data/lib/aws-sdk-core/glacier.rb +7 -0
- data/lib/aws-sdk-core/iam.rb +6 -0
- data/lib/aws-sdk-core/importexport.rb +5 -0
- data/lib/{aws → aws-sdk-core}/instance_profile_credentials.rb +13 -9
- data/lib/aws-sdk-core/kinesis.rb +5 -0
- data/lib/aws-sdk-core/opsworks.rb +6 -0
- data/lib/{aws → aws-sdk-core}/pageable_response.rb +1 -1
- data/lib/aws-sdk-core/plugins/csd_conditional_signing.rb +37 -0
- data/lib/aws-sdk-core/plugins/dynamodb_simple_attributes.rb +179 -0
- data/lib/{aws → aws-sdk-core}/plugins/global_configuration.rb +14 -7
- data/lib/{aws → aws-sdk-core}/plugins/protocols/json_rpc.rb +9 -7
- data/lib/{aws → aws-sdk-core}/plugins/regional_endpoint.rb +2 -4
- data/lib/{aws → aws-sdk-core}/plugins/request_signer.rb +18 -8
- data/lib/aws-sdk-core/plugins/response_paging.rb +25 -0
- data/lib/{aws → aws-sdk-core}/plugins/retry_errors.rb +11 -1
- data/lib/aws-sdk-core/plugins/route_53_id_fix.rb +55 -0
- data/lib/aws-sdk-core/plugins/s3_expect_100_continue.rb +27 -0
- data/lib/aws-sdk-core/plugins/s3_sse_cpk.rb +63 -0
- data/lib/aws-sdk-core/plugins/s3_url_encoded_keys.rb +92 -0
- data/lib/{aws → aws-sdk-core}/plugins/user_agent.rb +1 -2
- data/lib/{aws → aws-sdk-core}/query/handler.rb +4 -5
- data/lib/aws-sdk-core/rds.rb +6 -0
- data/lib/aws-sdk-core/redshift.rb +6 -0
- data/lib/aws-sdk-core/route53.rb +5 -0
- data/lib/aws-sdk-core/route53domains.rb +4 -0
- data/lib/aws-sdk-core/s3/presigner.rb +64 -0
- data/lib/aws-sdk-core/s3.rb +13 -0
- data/lib/aws-sdk-core/service.rb +4 -0
- data/lib/aws-sdk-core/ses.rb +6 -0
- data/lib/{aws → aws-sdk-core}/signers/v4.rb +6 -5
- data/lib/aws-sdk-core/simpledb.rb +5 -0
- data/lib/aws-sdk-core/sns.rb +6 -0
- data/lib/aws-sdk-core/sqs.rb +6 -0
- data/lib/aws-sdk-core/storagegateway.rb +5 -0
- data/lib/{aws → aws-sdk-core}/structure.rb +60 -4
- data/lib/aws-sdk-core/sts.rb +4 -0
- data/lib/aws-sdk-core/support.rb +5 -0
- data/lib/aws-sdk-core/swf.rb +5 -0
- data/lib/aws-sdk-core/version.rb +3 -0
- data/lib/aws-sdk-core/waiters/errors.rb +30 -0
- data/lib/aws-sdk-core/waiters/null_provider.rb +12 -0
- data/lib/aws-sdk-core/waiters/provider.rb +54 -0
- data/lib/aws-sdk-core/waiters/waiter.rb +194 -0
- data/lib/{aws → aws-sdk-core}/xml/builder.rb +4 -3
- data/lib/aws-sdk-core/xml/default_list.rb +10 -0
- data/lib/{aws → aws-sdk-core}/xml/parser.rb +6 -1
- data/lib/aws-sdk-core.rb +288 -1
- data/{vendor/seahorse/lib → lib}/seahorse/client/base.rb +45 -20
- data/{vendor/seahorse/lib → lib}/seahorse/client/handler_list.rb +17 -3
- data/{vendor/seahorse/lib → lib}/seahorse/client/http/error.rb +2 -2
- data/{vendor/seahorse/lib → lib}/seahorse/client/http/request.rb +1 -9
- data/{vendor/seahorse/lib → lib}/seahorse/client/net_http/connection_pool.rb +2 -0
- data/{vendor/seahorse/lib → lib}/seahorse/client/net_http/handler.rb +13 -1
- data/lib/seahorse/client/net_http/patches.rb +97 -0
- data/{vendor/seahorse/lib → lib}/seahorse/client/param_converter.rb +2 -2
- data/{vendor/seahorse/lib → lib}/seahorse/client/plugins/endpoint.rb +24 -15
- data/{vendor/seahorse/lib → lib}/seahorse/client/plugins/restful_bindings.rb +1 -1
- data/{vendor/seahorse/lib → lib}/seahorse/client/request.rb +1 -1
- data/{vendor/seahorse/lib → lib}/seahorse/client/response.rb +0 -2
- data/{vendor/seahorse/lib → lib}/seahorse/client/xml/builder.rb +0 -1
- data/{vendor/seahorse/lib → lib}/seahorse/model/shape_map.rb +1 -0
- data/{vendor/seahorse/lib → lib}/seahorse/model/shapes.rb +13 -4
- data/{vendor/seahorse/lib → lib}/seahorse.rb +3 -3
- metadata +257 -593
- data/.gitignore +0 -8
- data/.simplecov +0 -6
- data/.travis.yml +0 -20
- data/.yardopts +0 -11
- data/Gemfile +0 -26
- data/LICENSE.txt +0 -12
- data/README.md +0 -250
- data/Rakefile +0 -17
- data/apis/autoscaling-2011-01-01.api.json +0 -2602
- data/apis/cloudformation-2010-05-15.api.json +0 -1306
- data/apis/cloudfront-2014-01-31.api.json +0 -3478
- data/apis/cloudfront-2014-01-31.paginators.json +0 -32
- data/apis/cloudfront-2014-05-31.api.json +0 -3540
- data/apis/cloudfront-2014-05-31.paginators.json +0 -32
- data/apis/cloudfront-2014-05-31.waiters.json +0 -29
- data/apis/cloudsearch-2011-02-01.api.json +0 -2093
- data/apis/cloudsearch-2011-02-01.paginators.json +0 -13
- data/apis/cloudsearch-2013-01-01.api.json +0 -2655
- data/apis/cloudsearchdomain-2013-01-01.api.json +0 -508
- data/apis/cloudtrail-2013-11-01.api.json +0 -773
- data/apis/cognito-identity-2014-06-30.api.json +0 -884
- data/apis/cognito-sync-2014-06-30.api.json +0 -1029
- data/apis/datapipeline-2012-10-29.api.json +0 -1432
- data/apis/directconnect-2012-10-25.api.json +0 -1174
- data/apis/dynamodb-2011-12-05.api.json +0 -1208
- data/apis/dynamodb-2011-12-05.waiters.json +0 -27
- data/apis/dynamodb-2012-08-10.api.json +0 -1857
- data/apis/dynamodb-2012-08-10.paginators.json +0 -27
- data/apis/ec2-2014-06-15.api.json +0 -11661
- data/apis/elasticache-2014-03-24.api.json +0 -4789
- data/apis/elasticbeanstalk-2010-12-01.api.json +0 -2442
- data/apis/elasticloadbalancing-2012-06-01.api.json +0 -2576
- data/apis/elasticmapreduce-2009-03-31.api.json +0 -2282
- data/apis/elastictranscoder-2012-09-25.api.json +0 -2478
- data/apis/email-2010-12-01.api.json +0 -954
- data/apis/endpoints.json +0 -98
- data/apis/glacier-2012-06-01.api.json +0 -2012
- data/apis/iam-2010-05-08.api.json +0 -5046
- data/apis/importexport-2010-06-01.api.json +0 -687
- data/apis/kinesis-2013-12-02.api.json +0 -769
- data/apis/logs-2014-03-28.api.json +0 -942
- data/apis/manifest.json +0 -250
- data/apis/monitoring-2010-08-01.api.json +0 -1338
- data/apis/opsworks-2013-02-18.api.json +0 -4348
- data/apis/rds-2013-01-10.api.json +0 -6074
- data/apis/rds-2013-02-12.api.json +0 -6392
- data/apis/rds-2013-02-12.paginators.json +0 -110
- data/apis/rds-2013-09-09.api.json +0 -6564
- data/apis/rds-2013-09-09.paginators.json +0 -110
- data/apis/redshift-2012-12-01.api.json +0 -6318
- data/apis/route53-2013-04-01.api.json +0 -1927
- data/apis/sdb-2009-04-15.api.json +0 -1178
- data/apis/sns-2010-03-31.api.json +0 -2275
- data/apis/sqs-2012-11-05.api.json +0 -1438
- data/apis/storagegateway-2013-06-30.api.json +0 -3153
- data/apis/sts-2011-06-15.api.json +0 -786
- data/apis/support-2013-04-15.api.json +0 -1115
- data/apis/swf-2012-01-25.api.json +0 -4463
- data/aws-sdk-core.gemspec +0 -22
- data/doc-src/images/lastnode.png +0 -0
- data/doc-src/images/node.png +0 -0
- data/doc-src/images/vline.png +0 -0
- data/doc-src/plugins/apis.rb +0 -260
- data/doc-src/plugins/stability.rb +0 -1
- data/doc-src/services/CloudSearchDomain/client.md +0 -8
- data/doc-src/services/CloudSearchDomain/service.md +0 -0
- data/doc-src/services/default/client.md +0 -84
- data/doc-src/services/default/errors.md +0 -45
- data/doc-src/services/default/service.md +0 -28
- data/doc-src/templates/default/fulldoc/html/css/common.css +0 -90
- data/doc-src/templates/default/fulldoc/html/js/tabs.js +0 -21
- data/doc-src/templates/default/fulldoc/html/setup.rb +0 -66
- data/doc-src/templates/default/layout/html/footer.erb +0 -29
- data/doc-src/templates/default/layout/html/layout.erb +0 -37
- data/doc-src/templates/default/layout/html/setup.rb +0 -3
- data/features/autoscaling/client.feature +0 -18
- data/features/autoscaling/step_definitions.rb +0 -6
- data/features/cloudformation/client.feature +0 -17
- data/features/cloudformation/step_definitions.rb +0 -6
- data/features/cloudfront/client.feature +0 -17
- data/features/cloudfront/step_definitions.rb +0 -6
- data/features/cloudsearch/client.feature +0 -16
- data/features/cloudsearch/step_definitions.rb +0 -6
- data/features/cloudtrail/client.feature +0 -16
- data/features/cloudtrail/step_definitions.rb +0 -6
- data/features/cloudwatch/client.feature +0 -19
- data/features/cloudwatch/step_definitions.rb +0 -6
- data/features/cloudwatchlogs/client.feature +0 -17
- data/features/cloudwatchlogs/step_definitions.rb +0 -6
- data/features/cognitoidentity/client.feature +0 -17
- data/features/cognitoidentity/step_definitions.rb +0 -6
- data/features/cognitosync/client.feature +0 -16
- data/features/cognitosync/step_definitions.rb +0 -6
- data/features/datapipeline/client.feature +0 -16
- data/features/datapipeline/step_definitions.rb +0 -6
- data/features/directconnect/client.feature +0 -16
- data/features/directconnect/step_definitions.rb +0 -6
- data/features/dynamodb/client.feature +0 -17
- data/features/dynamodb/simplified.feature +0 -32
- data/features/dynamodb/step_definitions.rb +0 -11
- data/features/ec2/client.feature +0 -16
- data/features/ec2/step_definitions.rb +0 -6
- data/features/elasticache/client.feature +0 -16
- data/features/elasticache/step_definitions.rb +0 -6
- data/features/elasticbeanstalk/client.feature +0 -16
- data/features/elasticbeanstalk/step_definitions.rb +0 -6
- data/features/elasticloadbalancing/client.feature +0 -16
- data/features/elasticloadbalancing/step_definitions.rb +0 -6
- data/features/elastictranscoder/client.feature +0 -16
- data/features/elastictranscoder/step_definitions.rb +0 -6
- data/features/emr/client.feature +0 -16
- data/features/emr/step_definitions.rb +0 -6
- data/features/env.rb +0 -23
- data/features/glacier/client.feature +0 -17
- data/features/glacier/step_definitions.rb +0 -93
- data/features/glacier/upload.feature +0 -27
- data/features/iam/client.feature +0 -16
- data/features/iam/step_definitions.rb +0 -6
- data/features/importexport/client.feature +0 -16
- data/features/importexport/step_definitions.rb +0 -6
- data/features/kinesis/client.feature +0 -16
- data/features/kinesis/step_definitions.rb +0 -6
- data/features/opsworks/client.feature +0 -16
- data/features/opsworks/step_definitions.rb +0 -6
- data/features/rds/client.feature +0 -16
- data/features/rds/step_definitions.rb +0 -6
- data/features/redshift/client.feature +0 -16
- data/features/redshift/step_definitions.rb +0 -6
- data/features/route53/client.feature +0 -16
- data/features/route53/step_definitions.rb +0 -6
- data/features/s3/buckets.feature +0 -40
- data/features/s3/objects.feature +0 -37
- data/features/s3/step_definitions.rb +0 -165
- data/features/s3/test.png +0 -0
- data/features/ses/client.feature +0 -16
- data/features/ses/step_definitions.rb +0 -6
- data/features/simpledb/client.feature +0 -16
- data/features/simpledb/step_definitions.rb +0 -6
- data/features/sns/client.feature +0 -17
- data/features/sns/step_definitions.rb +0 -6
- data/features/sqs/client.feature +0 -21
- data/features/sqs/step_definitions.rb +0 -29
- data/features/step_definitions.rb +0 -94
- data/features/storagegateway/client.feature +0 -16
- data/features/storagegateway/step_definitions.rb +0 -6
- data/features/sts/client.feature +0 -17
- data/features/sts/step_definitions.rb +0 -6
- data/features/swf/client.feature +0 -17
- data/features/swf/step_definitions.rb +0 -6
- data/integration-test-config.json.sample +0 -3
- data/lib/aws/api/manifest.rb +0 -29
- data/lib/aws/api/manifest_builder.rb +0 -57
- data/lib/aws/client.rb +0 -241
- data/lib/aws/endpoint_provider.rb +0 -165
- data/lib/aws/plugins/response_paging.rb +0 -20
- data/lib/aws/plugins/s3_sse_cpk.rb +0 -42
- data/lib/aws/response_handler.rb +0 -38
- data/lib/aws/service.rb +0 -32
- data/lib/aws/signers/v4.rb.orig +0 -243
- data/lib/aws/version.rb +0 -3
- data/lib/aws/version.rb.orig +0 -7
- data/lib/aws.rb +0 -208
- data/lib/aws.rb.orig +0 -218
- data/spec/aws/client_spec.rb +0 -269
- data/spec/aws/credential_provider_chain_spec.rb +0 -120
- data/spec/aws/credentials_spec.rb +0 -47
- data/spec/aws/errors_spec.rb +0 -39
- data/spec/aws/iam_spec.rb +0 -17
- data/spec/aws/instance_profile_credentials_spec.rb +0 -94
- data/spec/aws/json/builder_spec.rb +0 -188
- data/spec/aws/json/parser_spec.rb +0 -214
- data/spec/aws/operations_spec.rb +0 -145
- data/spec/aws/pageable_response_spec.rb +0 -171
- data/spec/aws/plugins/global_configuration_spec.rb +0 -58
- data/spec/aws/plugins/region_endpoint_spec.rb +0 -86
- data/spec/aws/plugins/request_signer_spec.rb +0 -88
- data/spec/aws/plugins/retry_errors_spec.rb +0 -266
- data/spec/aws/plugins/s3_md5s_spec.rb +0 -84
- data/spec/aws/plugins/sqs_queue_urls_spec.rb +0 -42
- data/spec/aws/query/param_builder_spec.rb +0 -362
- data/spec/aws/query/param_list_spec.rb +0 -80
- data/spec/aws/query/param_spec.rb +0 -64
- data/spec/aws/s3_spec.rb +0 -79
- data/spec/aws/shared_credentials_spec.rb +0 -68
- data/spec/aws/signers/v4_spec.rb +0 -141
- data/spec/aws/structure_spec.rb +0 -166
- data/spec/aws/util_spec.rb +0 -60
- data/spec/aws/xml/builder_spec.rb +0 -412
- data/spec/aws/xml/parser_spec.rb +0 -723
- data/spec/aws_spec.rb +0 -94
- data/spec/fixtures/api/swf.json +0 -100
- data/spec/fixtures/credentials/mock_shared_credentials +0 -14
- data/spec/fixtures/operations/cloudfront/list_distributions.yml +0 -199
- data/spec/fixtures/operations/cloudfront/max_items.yml +0 -11
- data/spec/fixtures/operations/dynamodb/error_parsing.yml +0 -13
- data/spec/fixtures/operations/glacier/account_id_param.yml +0 -13
- data/spec/fixtures/operations/glacier/custom_account_id.yml +0 -11
- data/spec/fixtures/operations/glacier/default_account_id.yml +0 -10
- data/spec/fixtures/operations/glacier/error_parsing.yml +0 -10
- data/spec/fixtures/operations/glacier/get_job_output.yml +0 -23
- data/spec/fixtures/operations/glacier/list_vaults.yml +0 -24
- data/spec/fixtures/operations/iam/result_wrapped_elements.yml +0 -31
- data/spec/fixtures/operations/route53/change_resource_record_sets.yml +0 -18
- data/spec/fixtures/operations/s3/304_response.yml +0 -12
- data/spec/fixtures/operations/s3/400_response.yml +0 -12
- data/spec/fixtures/operations/s3/403_response.yml +0 -12
- data/spec/fixtures/operations/s3/404_response.yml +0 -12
- data/spec/fixtures/operations/s3/412_response_head.yml +0 -10
- data/spec/fixtures/operations/s3/comlete_multipart_upload_error.yml +0 -18
- data/spec/fixtures/operations/s3/content_type_header.yml +0 -12
- data/spec/fixtures/operations/s3/create_bucket_with_implied_location_constraint.yml +0 -23
- data/spec/fixtures/operations/s3/create_bucket_with_location_constraint.yml +0 -25
- data/spec/fixtures/operations/s3/create_bucket_without_location_constraint.yml +0 -9
- data/spec/fixtures/operations/s3/delete_objects.yml +0 -54
- data/spec/fixtures/operations/s3/error_parsing.yml +0 -17
- data/spec/fixtures/operations/s3/get_bucket_location.yml +0 -17
- data/spec/fixtures/operations/s3/get_bucket_location_classic.yml +0 -17
- data/spec/fixtures/operations/s3/get_bucket_policy.yml +0 -8
- data/spec/fixtures/operations/s3/head_bucket_with_dns_incompatible_name.yml +0 -12
- data/spec/fixtures/operations/s3/head_object.yml +0 -50
- data/spec/fixtures/operations/s3/list_buckets.yml +0 -41
- data/spec/fixtures/operations/s3/md5_checksum_disabled.yml +0 -10
- data/spec/fixtures/operations/s3/md5_checksum_enabled.yml +0 -8
- data/spec/fixtures/operations/swf/list_domains.yml +0 -20
- data/spec/fixtures/protocols/input/ec2.json +0 -383
- data/spec/fixtures/protocols/input/json.json +0 -47
- data/spec/fixtures/protocols/input/query.json +0 -335
- data/spec/fixtures/protocols/input/rest-json.json +0 -365
- data/spec/fixtures/protocols/input/rest-xml.json +0 -818
- data/spec/fixtures/protocols/output/ec2.json +0 -381
- data/spec/fixtures/protocols/output/json.json +0 -313
- data/spec/fixtures/protocols/output/query.json +0 -424
- data/spec/fixtures/protocols/output/rest-json.json +0 -486
- data/spec/fixtures/protocols/output/rest-xml.json +0 -486
- data/spec/protocols_spec.rb +0 -186
- data/spec/spec_helper.rb +0 -66
- data/tasks/docs.rake +0 -61
- data/tasks/handlers.rake +0 -98
- data/tasks/manifest.rake +0 -9
- data/tasks/test.rake +0 -30
- data/vendor/seahorse/.gitignore +0 -5
- data/vendor/seahorse/.simplecov +0 -4
- data/vendor/seahorse/.yardopts +0 -10
- data/vendor/seahorse/Gemfile +0 -17
- data/vendor/seahorse/LICENSE.txt +0 -12
- data/vendor/seahorse/README.md +0 -129
- data/vendor/seahorse/Rakefile +0 -7
- data/vendor/seahorse/lib/seahorse/client/plugins/api.rb +0 -11
- data/vendor/seahorse/seahorse.gemspec +0 -20
- data/vendor/seahorse/spec/fixtures/plugin.rb +0 -4
- data/vendor/seahorse/spec/seahorse/client/base_spec.rb +0 -299
- data/vendor/seahorse/spec/seahorse/client/configuration_spec.rb +0 -122
- data/vendor/seahorse/spec/seahorse/client/handler_builder_spec.rb +0 -159
- data/vendor/seahorse/spec/seahorse/client/handler_list_spec.rb +0 -232
- data/vendor/seahorse/spec/seahorse/client/handler_spec.rb +0 -40
- data/vendor/seahorse/spec/seahorse/client/http/headers_spec.rb +0 -213
- data/vendor/seahorse/spec/seahorse/client/http/request_spec.rb +0 -121
- data/vendor/seahorse/spec/seahorse/client/http/response_spec.rb +0 -77
- data/vendor/seahorse/spec/seahorse/client/logging/formatter_spec.rb +0 -185
- data/vendor/seahorse/spec/seahorse/client/logging/handler_spec.rb +0 -63
- data/vendor/seahorse/spec/seahorse/client/net_http/connection_pool_spec.rb +0 -10
- data/vendor/seahorse/spec/seahorse/client/net_http/handler_spec.rb +0 -242
- data/vendor/seahorse/spec/seahorse/client/param_converter_spec.rb +0 -308
- data/vendor/seahorse/spec/seahorse/client/param_validator_spec.rb +0 -275
- data/vendor/seahorse/spec/seahorse/client/plugin_list_spec.rb +0 -166
- data/vendor/seahorse/spec/seahorse/client/plugin_spec.rb +0 -118
- data/vendor/seahorse/spec/seahorse/client/plugins/content_length_spec.rb +0 -19
- data/vendor/seahorse/spec/seahorse/client/plugins/endpoint_spec.rb +0 -33
- data/vendor/seahorse/spec/seahorse/client/plugins/logging_spec.rb +0 -46
- data/vendor/seahorse/spec/seahorse/client/plugins/net_http_spec.rb +0 -70
- data/vendor/seahorse/spec/seahorse/client/plugins/operation_methods_spec.rb +0 -76
- data/vendor/seahorse/spec/seahorse/client/request_context_spec.rb +0 -105
- data/vendor/seahorse/spec/seahorse/client/request_spec.rb +0 -152
- data/vendor/seahorse/spec/seahorse/client/response_spec.rb +0 -95
- data/vendor/seahorse/spec/seahorse/client/xml/builder/xml_doc_spec.rb +0 -142
- data/vendor/seahorse/spec/seahorse/client/xml/builder_spec.rb +0 -10
- data/vendor/seahorse/spec/seahorse/model/api_spec.rb +0 -154
- data/vendor/seahorse/spec/seahorse/model/operation_spec.rb +0 -162
- data/vendor/seahorse/spec/seahorse/model/shape_map_spec.rb +0 -84
- data/vendor/seahorse/spec/seahorse/model/shapes_spec.rb +0 -522
- data/vendor/seahorse/spec/seahorse/util_spec.rb +0 -54
- data/vendor/seahorse/spec/seahorse/version_spec.rb +0 -11
- data/vendor/seahorse/spec/spec_helper.rb +0 -34
- data/vendor/seahorse/tasks/docs.rake +0 -11
- data/vendor/seahorse/tasks/test.rake +0 -15
- /data/apis/{autoscaling-2011-01-01.paginators.json → AutoScaling.paginators.json} +0 -0
- /data/apis/{cloudformation-2010-05-15.paginators.json → CloudFormation.paginators.json} +0 -0
- /data/apis/{cloudfront-2014-01-31.waiters.json → CloudFront.waiters.json} +0 -0
- /data/apis/{cloudsearch-2013-01-01.paginators.json → CloudSearch.paginators.json} +0 -0
- /data/apis/{cloudtrail-2013-11-01.paginators.json → CloudTrail.paginators.json} +0 -0
- /data/apis/{monitoring-2010-08-01.paginators.json → CloudWatch.paginators.json} +0 -0
- /data/apis/{logs-2014-03-28.paginators.json → CloudWatchLogs.paginators.json} +0 -0
- /data/apis/{datapipeline-2012-10-29.paginators.json → DataPipeline.paginators.json} +0 -0
- /data/apis/{directconnect-2012-10-25.paginators.json → DirectConnect.paginators.json} +0 -0
- /data/apis/{dynamodb-2012-08-10.waiters.json → DynamoDB.waiters.json} +0 -0
- /data/apis/{ec2-2014-06-15.paginators.json → EC2.paginators.json} +0 -0
- /data/apis/{ec2-2014-06-15.waiters.json → EC2.waiters.json} +0 -0
- /data/apis/{elasticmapreduce-2009-03-31.paginators.json → EMR.paginators.json} +0 -0
- /data/apis/{elasticache-2014-03-24.paginators.json → ElastiCache.paginators.json} +0 -0
- /data/apis/{elasticbeanstalk-2010-12-01.paginators.json → ElasticBeanstalk.paginators.json} +0 -0
- /data/apis/{elasticloadbalancing-2012-06-01.paginators.json → ElasticLoadBalancing.paginators.json} +0 -0
- /data/apis/{elastictranscoder-2012-09-25.paginators.json → ElasticTranscoder.paginators.json} +0 -0
- /data/apis/{glacier-2012-06-01.paginators.json → Glacier.paginators.json} +0 -0
- /data/apis/{glacier-2012-06-01.waiters.json → Glacier.waiters.json} +0 -0
- /data/apis/{iam-2010-05-08.paginators.json → IAM.paginators.json} +0 -0
- /data/apis/{importexport-2010-06-01.paginators.json → ImportExport.paginators.json} +0 -0
- /data/apis/{opsworks-2013-02-18.paginators.json → OpsWorks.paginators.json} +0 -0
- /data/apis/{rds-2013-01-10.paginators.json → RDS.paginators.json} +0 -0
- /data/apis/{rds-2013-09-09.waiters.json → RDS.waiters.json} +0 -0
- /data/apis/{redshift-2012-12-01.paginators.json → Redshift.paginators.json} +0 -0
- /data/apis/{redshift-2012-12-01.waiters.json → Redshift.waiters.json} +0 -0
- /data/apis/{route53-2013-04-01.paginators.json → Route53.paginators.json} +0 -0
- /data/apis/{s3-2006-03-01.waiters.json → S3.waiters.json} +0 -0
- /data/apis/{email-2010-12-01.paginators.json → SES.paginators.json} +0 -0
- /data/apis/{email-2010-12-01.waiters.json → SES.waiters.json} +0 -0
- /data/apis/{sns-2010-03-31.paginators.json → SNS.paginators.json} +0 -0
- /data/apis/{sns-2010-03-31.resources.json → SNS.resources.json} +0 -0
- /data/apis/{sqs-2012-11-05.paginators.json → SQS.paginators.json} +0 -0
- /data/apis/{swf-2012-01-25.paginators.json → SWF.paginators.json} +0 -0
- /data/apis/{sdb-2009-04-15.paginators.json → SimpleDB.paginators.json} +0 -0
- /data/apis/{storagegateway-2013-06-30.paginators.json → StorageGateway.paginators.json} +0 -0
- /data/apis/{support-2013-04-15.paginators.json → Support.paginators.json} +0 -0
- /data/lib/{aws → aws-sdk-core}/api/customizer.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/credentials.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/json/builder.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/json/error_handler.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/json/parser.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/json/rest_handler.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/json/rpc_body_handler.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/json/rpc_headers_handler.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/json/simple_body_handler.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/paging/null_pager.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/paging/null_provider.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/paging/pager.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/paging/provider.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/plugins/dynamodb_extended_retries.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/plugins/ec2_copy_encrypted_snapshot.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/plugins/glacier_account_id.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/plugins/glacier_api_version.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/plugins/glacier_checksums.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/plugins/protocols/ec2.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/plugins/protocols/query.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/plugins/protocols/rest_json.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/plugins/protocols/rest_xml.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/plugins/s3_bucket_dns.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/plugins/s3_complete_multipart_upload_fix.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/plugins/s3_get_bucket_location_fix.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/plugins/s3_location_constraint.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/plugins/s3_md5s.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/plugins/s3_redirects.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/plugins/sqs_queue_urls.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/plugins/swf_read_timeouts.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/query/ec2_param_builder.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/query/param.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/query/param_builder.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/query/param_list.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/rest_body_handler.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/shared_credentials.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/signers/base.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/signers/handler.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/signers/s3.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/signers/v2.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/signers/v3.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/tree_hash.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/xml/error_handler.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/xml/rest_handler.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/client/block_io.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/client/configuration.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/client/handler.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/client/handler_builder.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/client/handler_list_entry.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/client/http/headers.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/client/http/response.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/client/logging/formatter.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/client/logging/handler.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/client/managed_file.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/client/param_validator.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/client/plugin.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/client/plugin_list.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/client/plugins/content_length.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/client/plugins/json_simple.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/client/plugins/logging.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/client/plugins/net_http.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/client/plugins/operation_methods.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/client/plugins/param_conversion.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/client/plugins/param_validation.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/client/plugins/raise_response_errors.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/client/request_context.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/model/api.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/model/operation.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/util.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/version.rb +0 -0
data/spec/aws/iam_spec.rb
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
require 'spec_helper'
|
|
2
|
-
|
|
3
|
-
module Aws
|
|
4
|
-
describe IAM do
|
|
5
|
-
|
|
6
|
-
it 'forces the endpoint to iam.amazonaws.com despite region' do
|
|
7
|
-
iam = IAM.new(region: 'us-west-2', credentials: dummy_credentials)
|
|
8
|
-
expect(iam.config.endpoint).to eq('https://iam.amazonaws.com')
|
|
9
|
-
end
|
|
10
|
-
|
|
11
|
-
it 'uses us-east-1 as the signing region' do
|
|
12
|
-
iam = IAM.new(region: 'us-west-2', credentials: dummy_credentials)
|
|
13
|
-
expect(iam.config.sigv4_region).to eq('us-east-1')
|
|
14
|
-
end
|
|
15
|
-
|
|
16
|
-
end
|
|
17
|
-
end
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
require 'spec_helper'
|
|
2
|
-
|
|
3
|
-
module Aws
|
|
4
|
-
describe InstanceProfileCredentials do
|
|
5
|
-
|
|
6
|
-
let(:path) { '/latest/meta-data/iam/security-credentials/' }
|
|
7
|
-
|
|
8
|
-
describe 'without instance metadata service present' do
|
|
9
|
-
|
|
10
|
-
[
|
|
11
|
-
Errno::EHOSTUNREACH,
|
|
12
|
-
Errno::ECONNREFUSED,
|
|
13
|
-
SocketError,
|
|
14
|
-
Timeout::Error,
|
|
15
|
-
].each do |error_class|
|
|
16
|
-
it "returns no credentials for #{error_class}" do
|
|
17
|
-
stub_request(:get, "http://169.254.169.254#{path}").to_raise(error_class)
|
|
18
|
-
expect(InstanceProfileCredentials.new.set?).to be(false)
|
|
19
|
-
end
|
|
20
|
-
end
|
|
21
|
-
|
|
22
|
-
end
|
|
23
|
-
|
|
24
|
-
describe 'with instance metadata service present' do
|
|
25
|
-
|
|
26
|
-
let(:expiration) { Time.now.utc + 3600 }
|
|
27
|
-
let(:expiration2) { expiration + 3600 }
|
|
28
|
-
|
|
29
|
-
let(:resp) { <<-JSON.strip }
|
|
30
|
-
{
|
|
31
|
-
"Code" : "Success",
|
|
32
|
-
"LastUpdated" : "2013-11-22T20:03:48Z",
|
|
33
|
-
"Type" : "AWS-HMAC",
|
|
34
|
-
"AccessKeyId" : "akid",
|
|
35
|
-
"SecretAccessKey" : "secret",
|
|
36
|
-
"Token" : "session-token",
|
|
37
|
-
"Expiration" : "#{expiration.strftime('%Y-%m-%dT%H:%M:%SZ')}"
|
|
38
|
-
}
|
|
39
|
-
JSON
|
|
40
|
-
|
|
41
|
-
let(:resp2) { <<-JSON.strip }
|
|
42
|
-
{
|
|
43
|
-
"Code" : "Success",
|
|
44
|
-
"LastUpdated" : "2013-11-22T20:03:48Z",
|
|
45
|
-
"Type" : "AWS-HMAC",
|
|
46
|
-
"AccessKeyId" : "akid-2",
|
|
47
|
-
"SecretAccessKey" : "secret-2",
|
|
48
|
-
"Token" : "session-token-2",
|
|
49
|
-
"Expiration" : "#{(expiration2).strftime('%Y-%m-%dT%H:%M:%SZ')}"
|
|
50
|
-
}
|
|
51
|
-
JSON
|
|
52
|
-
|
|
53
|
-
before(:each) do
|
|
54
|
-
stub_request(:get, "http://169.254.169.254#{path}").
|
|
55
|
-
to_return(:status => 200, :body => "profile-name\n")
|
|
56
|
-
stub_request(:get, "http://169.254.169.254#{path}profile-name").
|
|
57
|
-
to_return(:status => 200, :body => resp).
|
|
58
|
-
to_return(:status => 200, :body => resp2)
|
|
59
|
-
end
|
|
60
|
-
|
|
61
|
-
it 'populates credentials from the instance profile' do
|
|
62
|
-
c = InstanceProfileCredentials.new
|
|
63
|
-
expect(c.access_key_id).to eq('akid')
|
|
64
|
-
expect(c.secret_access_key).to eq('secret')
|
|
65
|
-
expect(c.session_token).to eq('session-token')
|
|
66
|
-
expect(c.expiration.to_s).to eq(expiration.to_s)
|
|
67
|
-
end
|
|
68
|
-
|
|
69
|
-
it 're-queries the metadata service when #refresh! is called' do
|
|
70
|
-
c = InstanceProfileCredentials.new
|
|
71
|
-
c.refresh!
|
|
72
|
-
expect(c.access_key_id).to eq('akid-2')
|
|
73
|
-
expect(c.secret_access_key).to eq('secret-2')
|
|
74
|
-
expect(c.session_token).to eq('session-token-2')
|
|
75
|
-
expect(c.expiration.to_s).to eq(expiration2.to_s)
|
|
76
|
-
end
|
|
77
|
-
|
|
78
|
-
describe 'auto refreshing' do
|
|
79
|
-
|
|
80
|
-
# expire in 4 minutes
|
|
81
|
-
let(:expiration) { Time.now.utc + 299 }
|
|
82
|
-
|
|
83
|
-
it 'auto-refreshes within 5 minutes from expiration' do
|
|
84
|
-
c = InstanceProfileCredentials.new
|
|
85
|
-
expect(c.access_key_id).to eq('akid-2')
|
|
86
|
-
expect(c.secret_access_key).to eq('secret-2')
|
|
87
|
-
expect(c.session_token).to eq('session-token-2')
|
|
88
|
-
expect(c.expiration.to_s).to eq(expiration2.to_s)
|
|
89
|
-
end
|
|
90
|
-
|
|
91
|
-
end
|
|
92
|
-
end
|
|
93
|
-
end
|
|
94
|
-
end
|
|
@@ -1,188 +0,0 @@
|
|
|
1
|
-
require 'spec_helper'
|
|
2
|
-
|
|
3
|
-
module Aws
|
|
4
|
-
module Json
|
|
5
|
-
describe Builder do
|
|
6
|
-
|
|
7
|
-
let(:members) { {} }
|
|
8
|
-
|
|
9
|
-
def json(params)
|
|
10
|
-
shape = Seahorse::Model::Shapes::Structure.new('members' => members)
|
|
11
|
-
Builder.new.to_json(shape, params)
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
describe 'structures' do
|
|
15
|
-
|
|
16
|
-
it 'returns an empty xml doc when there are no params' do
|
|
17
|
-
expect(json({})).to eq('{}')
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
it 'omits params that are not in the rules' do
|
|
21
|
-
expect(json(abc: 'xyz')).to eq('{}')
|
|
22
|
-
end
|
|
23
|
-
|
|
24
|
-
it 'observes serialized name properties' do
|
|
25
|
-
members['Name'] = {
|
|
26
|
-
'type' => 'string',
|
|
27
|
-
'locationName' => 'FullName'
|
|
28
|
-
}
|
|
29
|
-
expect(json(name: 'John Doe')).to eq('{"FullName":"John Doe"}')
|
|
30
|
-
end
|
|
31
|
-
|
|
32
|
-
it 'serializes nested structures' do
|
|
33
|
-
members['Abc'] = {
|
|
34
|
-
'type' => 'structure',
|
|
35
|
-
'members' => {
|
|
36
|
-
'Mno' => { 'type' => 'string', 'locationName' => 'MNO' }
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
expect(json(abc: { mno: 'xyz' })).to eq('{"Abc":{"MNO":"xyz"}}')
|
|
40
|
-
end
|
|
41
|
-
|
|
42
|
-
it 'does not serialize nil members' do
|
|
43
|
-
members['Cfg'] = {
|
|
44
|
-
'type' => 'structure',
|
|
45
|
-
'members' => {
|
|
46
|
-
'Data' => { 'type' => 'blob' },
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
expect(json(cfg: { data: nil })).to eq('{"Cfg":{}}')
|
|
50
|
-
end
|
|
51
|
-
|
|
52
|
-
end
|
|
53
|
-
|
|
54
|
-
describe 'lists' do
|
|
55
|
-
|
|
56
|
-
it 'serializes lists' do
|
|
57
|
-
members['Items'] = {
|
|
58
|
-
'type' => 'list',
|
|
59
|
-
'member' => { 'type' => 'string' }
|
|
60
|
-
}
|
|
61
|
-
expect(json(items: %w(abc xyz))).to eq('{"Items":["abc","xyz"]}')
|
|
62
|
-
end
|
|
63
|
-
|
|
64
|
-
it 'lists of complex shapes' do
|
|
65
|
-
members['Abc'] = {
|
|
66
|
-
'type' => 'list',
|
|
67
|
-
'member' => {
|
|
68
|
-
'type' => 'structure',
|
|
69
|
-
'members' => {
|
|
70
|
-
'Mno' => { 'type' => 'string', 'locationName' => 'MNO' }
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
expect(json(abc: [{mno:'xyz'}])).to eq('{"Abc":[{"MNO":"xyz"}]}')
|
|
75
|
-
end
|
|
76
|
-
|
|
77
|
-
end
|
|
78
|
-
|
|
79
|
-
describe 'maps' do
|
|
80
|
-
|
|
81
|
-
it 'accepts an arbitrary hash of values' do
|
|
82
|
-
members['Attrs'] = {
|
|
83
|
-
'type' => 'map',
|
|
84
|
-
'key' => { 'type' => 'string' },
|
|
85
|
-
'value' => { 'type' => 'string' }
|
|
86
|
-
}
|
|
87
|
-
params = { attrs: { 'Size' => 'large', 'Color' => 'red' } }
|
|
88
|
-
expect(json(params)).to eq('{"Attrs":{"Size":"large","Color":"red"}}')
|
|
89
|
-
end
|
|
90
|
-
|
|
91
|
-
it 'supports complex hash values' do
|
|
92
|
-
members['People'] = {
|
|
93
|
-
'type' => 'map',
|
|
94
|
-
'key' => { 'type' => 'string' },
|
|
95
|
-
'value' => {
|
|
96
|
-
'type' => 'structure',
|
|
97
|
-
'members' => {
|
|
98
|
-
'Age' => { 'type' => 'integer', 'locationName' => 'AGE' }
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
params = { people: { 'John' => { age: 40 } } }
|
|
103
|
-
expect(json(params)).to eq('{"People":{"John":{"AGE":40}}}')
|
|
104
|
-
end
|
|
105
|
-
|
|
106
|
-
end
|
|
107
|
-
|
|
108
|
-
describe 'scalars' do
|
|
109
|
-
|
|
110
|
-
it 'serializes integers' do
|
|
111
|
-
members['Count'] = { 'type' => 'integer' }
|
|
112
|
-
expect(json(count: 123)).to eq('{"Count":123}')
|
|
113
|
-
end
|
|
114
|
-
|
|
115
|
-
it 'serializes floats' do
|
|
116
|
-
members['Price'] = { 'type' => 'float' }
|
|
117
|
-
expect(json(price: 12.34)).to eq('{"Price":12.34}')
|
|
118
|
-
end
|
|
119
|
-
|
|
120
|
-
it 'serializes booleans' do
|
|
121
|
-
members['Hot'] = { 'type' => 'boolean' }
|
|
122
|
-
members['Cold'] = { 'type' => 'boolean' }
|
|
123
|
-
expect(json(hot:true, cold:false)).to eq('{"Hot":true,"Cold":false}')
|
|
124
|
-
end
|
|
125
|
-
|
|
126
|
-
it 'serializes timestamps' do
|
|
127
|
-
now = Time.now
|
|
128
|
-
members['When'] = { 'type' => 'timestamp' }
|
|
129
|
-
expect(json(when:now)).to eq("{\"When\":#{now.utc.to_i}}")
|
|
130
|
-
end
|
|
131
|
-
|
|
132
|
-
it 'serializes iso8601 timestamps' do
|
|
133
|
-
now = Time.now
|
|
134
|
-
members['When'] = {
|
|
135
|
-
'type' => 'timestamp',
|
|
136
|
-
'timestampFormat' => 'iso8601'
|
|
137
|
-
}
|
|
138
|
-
expect(json(when:now)).to eq("{\"When\":\"#{now.utc.iso8601}\"}")
|
|
139
|
-
end
|
|
140
|
-
|
|
141
|
-
it 'serializes rfc822 timestamps' do
|
|
142
|
-
now = Time.now
|
|
143
|
-
members['When'] = {
|
|
144
|
-
'type' => 'timestamp',
|
|
145
|
-
'timestampFormat' => 'rfc822'
|
|
146
|
-
}
|
|
147
|
-
expect(json(when:now)).to eq("{\"When\":\"#{now.utc.rfc822}\"}")
|
|
148
|
-
end
|
|
149
|
-
|
|
150
|
-
it 'serializes unix timestamps' do
|
|
151
|
-
now = Time.now
|
|
152
|
-
members['When'] = {
|
|
153
|
-
'type' => 'timestamp',
|
|
154
|
-
'timestampFormat' => 'unixTimestamp'
|
|
155
|
-
}
|
|
156
|
-
expect(json(when:now)).to eq("{\"When\":#{now.utc.to_i}}")
|
|
157
|
-
end
|
|
158
|
-
|
|
159
|
-
it 'raises an error for unknown timestamp formats' do
|
|
160
|
-
members['When'] = {
|
|
161
|
-
'type' => 'timestamp',
|
|
162
|
-
'timestampFormat' => 'bogus'
|
|
163
|
-
}
|
|
164
|
-
expect {
|
|
165
|
-
json(when:Time.now)
|
|
166
|
-
}.to raise_error(ArgumentError, 'invalid timestamp format "bogus"')
|
|
167
|
-
end
|
|
168
|
-
|
|
169
|
-
it 'serializes blobs as base64 strings' do
|
|
170
|
-
members['data'] = { 'type' => 'blob' }
|
|
171
|
-
expect(json(data:'hello')).to eq('{"data":"aGVsbG8="}')
|
|
172
|
-
end
|
|
173
|
-
|
|
174
|
-
end
|
|
175
|
-
|
|
176
|
-
# All of the previous tests in this spec file test given a root
|
|
177
|
-
# level structure. JSON allows for root level arrays.
|
|
178
|
-
it 'supports serializing an array as the root element' do
|
|
179
|
-
list_shape = Seahorse::Model::Shapes::List.new(
|
|
180
|
-
'member' => { 'type' => 'string' }
|
|
181
|
-
)
|
|
182
|
-
json = Builder.new.to_json(list_shape, %w(a b c))
|
|
183
|
-
expect(json).to eq('["a","b","c"]')
|
|
184
|
-
end
|
|
185
|
-
|
|
186
|
-
end
|
|
187
|
-
end
|
|
188
|
-
end
|
|
@@ -1,214 +0,0 @@
|
|
|
1
|
-
require 'spec_helper'
|
|
2
|
-
|
|
3
|
-
module Aws
|
|
4
|
-
module Json
|
|
5
|
-
describe Parser do
|
|
6
|
-
|
|
7
|
-
let(:members) { {} }
|
|
8
|
-
|
|
9
|
-
def parse(json)
|
|
10
|
-
shape = Seahorse::Model::Shapes::Structure.new('members' => members)
|
|
11
|
-
Parser.new.parse(shape, json).to_hash
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
it 'returns an empty hash when the JSON is {}' do
|
|
15
|
-
expect(parse('{}')).to eq({})
|
|
16
|
-
end
|
|
17
|
-
|
|
18
|
-
describe 'structures' do
|
|
19
|
-
|
|
20
|
-
it 'symbolizes structure members' do
|
|
21
|
-
members['Name'] = { 'type' => 'string' }
|
|
22
|
-
json = '{"Name":"John Doe"}'
|
|
23
|
-
expect(parse(json)).to eq(name: 'John Doe')
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
it 'parses members using their serialized name' do
|
|
27
|
-
members['First'] = {
|
|
28
|
-
'type' => 'string',
|
|
29
|
-
'locationName' => 'FirstName'
|
|
30
|
-
}
|
|
31
|
-
members['Last'] = {
|
|
32
|
-
'type' => 'string',
|
|
33
|
-
'locationName' => 'LastName'
|
|
34
|
-
}
|
|
35
|
-
json = '{"FirstName":"John", "LastName":"Doe"}'
|
|
36
|
-
expect(parse(json)).to eq(first: 'John', last: 'Doe')
|
|
37
|
-
end
|
|
38
|
-
|
|
39
|
-
it 'ignores non-described values' do
|
|
40
|
-
members['Foo'] = { 'type' => 'string' }
|
|
41
|
-
json = '{"Foo":"bar", "Abc":"xyz"}'
|
|
42
|
-
expect(parse(json)).to eq(foo: 'bar')
|
|
43
|
-
end
|
|
44
|
-
|
|
45
|
-
it 'skips over null values' do
|
|
46
|
-
members['Base'] = {
|
|
47
|
-
'type' => 'structure',
|
|
48
|
-
'members' => {
|
|
49
|
-
'Nested' => {
|
|
50
|
-
'type' => 'structure',
|
|
51
|
-
'members' => {
|
|
52
|
-
'Leaf' => { 'type' => 'string' }
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
json = '{"Base":{"Nested":null}}'
|
|
58
|
-
expect(parse(json)).to eq(base: {})
|
|
59
|
-
end
|
|
60
|
-
|
|
61
|
-
end
|
|
62
|
-
|
|
63
|
-
describe 'lists' do
|
|
64
|
-
|
|
65
|
-
it 'returns nil for lists missing in the json' do
|
|
66
|
-
members['Values'] = {
|
|
67
|
-
'type' => 'list',
|
|
68
|
-
'member' => { 'type' => 'string' }
|
|
69
|
-
}
|
|
70
|
-
json = '{}'
|
|
71
|
-
expect(parse(json)[:values]).to be(nil)
|
|
72
|
-
end
|
|
73
|
-
|
|
74
|
-
it 'parses lists' do
|
|
75
|
-
members['Values'] = {
|
|
76
|
-
'type' => 'list',
|
|
77
|
-
'member' => { 'type' => 'string' }
|
|
78
|
-
}
|
|
79
|
-
json = '{"Values":["abc", "mno", "xyz"]}'
|
|
80
|
-
expect(parse(json)).to eq(values: %w(abc mno xyz))
|
|
81
|
-
end
|
|
82
|
-
|
|
83
|
-
it 'parses lists of complex members' do
|
|
84
|
-
members['Values'] = {
|
|
85
|
-
'type' => 'list',
|
|
86
|
-
'member' => {
|
|
87
|
-
'type' => 'structure',
|
|
88
|
-
'members' => {
|
|
89
|
-
'Name' => { 'type' => 'string' }
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
json = '{"Values":[{"Name":"abc"},{"Name":"xyz"}]}'
|
|
94
|
-
expect(parse(json)).to eq(values: [{name:'abc'}, {name:'xyz'}])
|
|
95
|
-
end
|
|
96
|
-
|
|
97
|
-
end
|
|
98
|
-
|
|
99
|
-
describe 'maps' do
|
|
100
|
-
|
|
101
|
-
it 'parses maps as hashes (without symbolizing keys' do
|
|
102
|
-
members['Attributes'] = {
|
|
103
|
-
'type' => 'map',
|
|
104
|
-
'key' => { 'type' => 'string' },
|
|
105
|
-
'value' => { 'type' => 'string' }
|
|
106
|
-
}
|
|
107
|
-
json = '{"Attributes":{"Size":"large","Color":"red"}}'
|
|
108
|
-
expect(parse(json)).to eq(attributes: {
|
|
109
|
-
'Size' => 'large',
|
|
110
|
-
'Color' => 'red'
|
|
111
|
-
})
|
|
112
|
-
end
|
|
113
|
-
|
|
114
|
-
end
|
|
115
|
-
|
|
116
|
-
describe 'booleans' do
|
|
117
|
-
|
|
118
|
-
it 'converts true/false booleans' do
|
|
119
|
-
members['Hot'] = { 'type' => 'boolean' }
|
|
120
|
-
members['Cold'] = { 'type' => 'boolean' }
|
|
121
|
-
json = '{"Hot":true,"Cold":false}'
|
|
122
|
-
expect(parse(json)).to eq(hot: true, cold: false)
|
|
123
|
-
end
|
|
124
|
-
|
|
125
|
-
end
|
|
126
|
-
|
|
127
|
-
describe 'timestamps' do
|
|
128
|
-
|
|
129
|
-
before(:each) do
|
|
130
|
-
members['CreatedAt'] = {
|
|
131
|
-
'type' => 'timestamp',
|
|
132
|
-
'locationName' => 'Created',
|
|
133
|
-
}
|
|
134
|
-
end
|
|
135
|
-
|
|
136
|
-
it 'can parse unix timestamps' do
|
|
137
|
-
timestamp = 1349908100
|
|
138
|
-
time = Time.at(timestamp)
|
|
139
|
-
json = "{\"Created\":#{timestamp}}"
|
|
140
|
-
data = parse(json)
|
|
141
|
-
expect(data[:created_at]).to be_a(Time)
|
|
142
|
-
expect(data[:created_at]).to eq(time)
|
|
143
|
-
end
|
|
144
|
-
|
|
145
|
-
it 'can parse unix timestamps expressed as floats' do
|
|
146
|
-
timestamp = 1349908100.123
|
|
147
|
-
time = Time.at(timestamp)
|
|
148
|
-
json = "{\"Created\":#{timestamp}}"
|
|
149
|
-
data = parse(json)
|
|
150
|
-
expect(data[:created_at]).to be_a(Time)
|
|
151
|
-
expect(data[:created_at]).to eq(time)
|
|
152
|
-
end
|
|
153
|
-
|
|
154
|
-
it 'can parse iso8601 strings' do
|
|
155
|
-
timestamp = '2012-09-10T15:47:10.001Z'
|
|
156
|
-
time = Time.parse(timestamp).to_time.utc
|
|
157
|
-
json = "{\"Created\":\"#{timestamp}\"}"
|
|
158
|
-
data = parse(json)
|
|
159
|
-
expect(data[:created_at]).to be_a(Time)
|
|
160
|
-
expect(data[:created_at]).to eq(time)
|
|
161
|
-
end
|
|
162
|
-
|
|
163
|
-
it 'can parse rfc822 strings' do
|
|
164
|
-
timestamp = 'Wed, 10 Oct 2012 15:59:55 UTC'
|
|
165
|
-
time = Time.parse(timestamp).to_time.utc
|
|
166
|
-
json = "{\"Created\":\"#{timestamp}\"}"
|
|
167
|
-
data = parse(json)
|
|
168
|
-
expect(data[:created_at]).to be_a(Time)
|
|
169
|
-
expect(data[:created_at]).to eq(time)
|
|
170
|
-
end
|
|
171
|
-
|
|
172
|
-
end
|
|
173
|
-
|
|
174
|
-
describe 'integers' do
|
|
175
|
-
|
|
176
|
-
it 'parses integers' do
|
|
177
|
-
members['count'] = { 'type' => 'integer' }
|
|
178
|
-
json = '{"count":123}'
|
|
179
|
-
expect(parse(json)).to eq(count: 123)
|
|
180
|
-
end
|
|
181
|
-
|
|
182
|
-
end
|
|
183
|
-
|
|
184
|
-
describe 'floats' do
|
|
185
|
-
|
|
186
|
-
it 'parses floats' do
|
|
187
|
-
members['value'] = { 'type' => 'float' }
|
|
188
|
-
json = '{"value":12.34}'
|
|
189
|
-
expect(parse(json)).to eq(value: 12.34)
|
|
190
|
-
end
|
|
191
|
-
|
|
192
|
-
end
|
|
193
|
-
|
|
194
|
-
describe 'blobs' do
|
|
195
|
-
|
|
196
|
-
it 'base64 decodes blobs' do
|
|
197
|
-
members['data'] = { 'type' => 'blob' }
|
|
198
|
-
json = '{"data":"aGVsbG8="}'
|
|
199
|
-
expect(parse(json)).to eq(data: 'hello')
|
|
200
|
-
end
|
|
201
|
-
|
|
202
|
-
end
|
|
203
|
-
|
|
204
|
-
describe 'parsing errors' do
|
|
205
|
-
|
|
206
|
-
it 'does not trap xml parsing errors' do
|
|
207
|
-
json = '{"abc'
|
|
208
|
-
expect { parse(json) }.to raise_error
|
|
209
|
-
end
|
|
210
|
-
|
|
211
|
-
end
|
|
212
|
-
end
|
|
213
|
-
end
|
|
214
|
-
end
|
data/spec/aws/operations_spec.rb
DELETED
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
require 'spec_helper'
|
|
2
|
-
require 'stringio'
|
|
3
|
-
|
|
4
|
-
module Aws
|
|
5
|
-
describe 'Aws' do
|
|
6
|
-
class OperationFixture
|
|
7
|
-
|
|
8
|
-
Request = Struct.new(:method, :host, :headers, :path, :body)
|
|
9
|
-
Response = Struct.new(:status_code, :headers, :body)
|
|
10
|
-
Error = Struct.new(:class, :message)
|
|
11
|
-
|
|
12
|
-
def self.load(svc_name, fixture_name)
|
|
13
|
-
path = File.expand_path(File.join(File.dirname(__FILE__),
|
|
14
|
-
'..', 'fixtures', 'operations', svc_name, "#{fixture_name}.yml"))
|
|
15
|
-
self.new(YAML.load(File.read(path)))
|
|
16
|
-
end
|
|
17
|
-
|
|
18
|
-
def initialize(data)
|
|
19
|
-
@operation = data['operation']
|
|
20
|
-
@config = (data['config'] || {}).inject({}) do |config, (key, value)|
|
|
21
|
-
config.merge(key.to_sym => value)
|
|
22
|
-
end
|
|
23
|
-
@config[:region] ||= 'us-east-1'
|
|
24
|
-
@config[:credentials] = Credentials.new('akid', 'secret')
|
|
25
|
-
@params = data['params'] || {}
|
|
26
|
-
@data = data['data']
|
|
27
|
-
|
|
28
|
-
{
|
|
29
|
-
'error' => Error,
|
|
30
|
-
'request' => Request,
|
|
31
|
-
'response' => Response,
|
|
32
|
-
}.each do |entry, struct_class|
|
|
33
|
-
if data.key?(entry)
|
|
34
|
-
struct = struct_class.new
|
|
35
|
-
data[entry].each do |key, value|
|
|
36
|
-
struct[key] = value
|
|
37
|
-
end
|
|
38
|
-
instance_variable_set("@#{entry}", struct)
|
|
39
|
-
end
|
|
40
|
-
end
|
|
41
|
-
|
|
42
|
-
if @response
|
|
43
|
-
@response.status_code ||= 200
|
|
44
|
-
@response.headers = header_hash(@response.headers)
|
|
45
|
-
@response.body = StringIO.new(@response.body || '')
|
|
46
|
-
end
|
|
47
|
-
end
|
|
48
|
-
|
|
49
|
-
attr_reader :operation, :config, :params, :request, :response, :data, :error
|
|
50
|
-
|
|
51
|
-
def handler
|
|
52
|
-
FixtureHandler.new(self)
|
|
53
|
-
end
|
|
54
|
-
|
|
55
|
-
private
|
|
56
|
-
|
|
57
|
-
def header_hash(headers)
|
|
58
|
-
Seahorse::Client::Http::Headers.new(headers || {})
|
|
59
|
-
end
|
|
60
|
-
|
|
61
|
-
end
|
|
62
|
-
|
|
63
|
-
class FixtureHandler < Seahorse::Client::Handler
|
|
64
|
-
|
|
65
|
-
def call(context)
|
|
66
|
-
response = Seahorse::Client::Response.new(context: context)
|
|
67
|
-
f = context.metadata[:fixture]
|
|
68
|
-
if f.response
|
|
69
|
-
context.http_response.status_code = f.response.status_code
|
|
70
|
-
context.http_response.headers = f.response.headers
|
|
71
|
-
context.http_response.body = f.response.body
|
|
72
|
-
end
|
|
73
|
-
response
|
|
74
|
-
end
|
|
75
|
-
|
|
76
|
-
end
|
|
77
|
-
|
|
78
|
-
def request_assertions(f, http_req)
|
|
79
|
-
if f.request
|
|
80
|
-
expect(http_req.endpoint.host).to eq(f.request.host) if f.request.host
|
|
81
|
-
expect(http_req.http_method).to eq(f.request.method) if f.request.method
|
|
82
|
-
if path = f.request.path
|
|
83
|
-
uri = http_req.endpoint.request_uri
|
|
84
|
-
case path
|
|
85
|
-
when String then expect(uri).to eq(path)
|
|
86
|
-
when Regexp then expect(uri).to match(path)
|
|
87
|
-
end
|
|
88
|
-
end
|
|
89
|
-
if f.request.headers
|
|
90
|
-
f.request.headers.each_pair do |header, value|
|
|
91
|
-
expected_value = value.nil? ? nil : value.to_s
|
|
92
|
-
expect(http_req.headers[header]).to eq(expected_value)
|
|
93
|
-
end
|
|
94
|
-
end
|
|
95
|
-
if f.request.body
|
|
96
|
-
yyyy_mm_dd = /\d{4}-\d{2}-\d{2}/
|
|
97
|
-
body = http_req.body.read.gsub(yyyy_mm_dd, 'YYYY-MM-DD')
|
|
98
|
-
expected_body = f.request.body.gsub(yyyy_mm_dd, 'YYYY-MM-DD')
|
|
99
|
-
expect(body).to eq(expected_body)
|
|
100
|
-
end
|
|
101
|
-
end
|
|
102
|
-
end
|
|
103
|
-
|
|
104
|
-
def response_assertions(f, resp)
|
|
105
|
-
if f.data
|
|
106
|
-
expect(resp.data.to_h).to eq(f.data)
|
|
107
|
-
end
|
|
108
|
-
|
|
109
|
-
if f.error
|
|
110
|
-
expect(resp.data).to be(nil)
|
|
111
|
-
expect(resp.error.class.name).to eq(f.error.class) if f.error.class
|
|
112
|
-
expect(resp.error.message).to eq(f.error.message) if f.error.message
|
|
113
|
-
end
|
|
114
|
-
end
|
|
115
|
-
|
|
116
|
-
glob = File.expand_path(File.join(
|
|
117
|
-
File.dirname(__FILE__), '..', 'fixtures', 'operations', '**', '*.yml'))
|
|
118
|
-
|
|
119
|
-
Dir.glob(glob).group_by { |p| p.split('/')[-2] }.each do |svc_name, paths|
|
|
120
|
-
describe(svc_name) do
|
|
121
|
-
paths.each do |path|
|
|
122
|
-
fixture_name = path.split('/')[-1][0..-5]
|
|
123
|
-
|
|
124
|
-
it(fixture_name) do
|
|
125
|
-
# load the fixture from disk
|
|
126
|
-
f = OperationFixture.load(svc_name, fixture_name)
|
|
127
|
-
|
|
128
|
-
# build the test service class by sub-classing the original
|
|
129
|
-
# service class
|
|
130
|
-
client_class = Aws.service_modules[svc_name.to_sym]::Client
|
|
131
|
-
|
|
132
|
-
client = client_class.new(f.config.merge(raise_response_errors: false))
|
|
133
|
-
req = client.build_request(f.operation, f.params)
|
|
134
|
-
req.handler(FixtureHandler, step: :send)
|
|
135
|
-
req.context.metadata[:fixture] = f
|
|
136
|
-
resp = req.send_request
|
|
137
|
-
|
|
138
|
-
request_assertions(f, resp.context.http_request)
|
|
139
|
-
response_assertions(f, resp)
|
|
140
|
-
end
|
|
141
|
-
end
|
|
142
|
-
end
|
|
143
|
-
end
|
|
144
|
-
end
|
|
145
|
-
end
|