aws-sdk-code-generator 0.4.0.pre → 0.5.0.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/aws-sdk-code-generator/client_constructor.rb +2 -1
- data/lib/aws-sdk-code-generator/code_builder.rb +52 -0
- data/lib/aws-sdk-code-generator/eventstream_example.rb +34 -34
- data/lib/aws-sdk-code-generator/gem_builder.rb +3 -5
- data/lib/aws-sdk-code-generator/plugin_list.rb +2 -1
- data/lib/aws-sdk-code-generator/rbs/error_list.rb +38 -0
- data/lib/aws-sdk-code-generator/rbs/keyword_argument_builder.rb +159 -0
- data/lib/aws-sdk-code-generator/rbs/method_signature.rb +11 -0
- data/lib/aws-sdk-code-generator/rbs/resource_action.rb +39 -0
- data/lib/aws-sdk-code-generator/rbs/resource_association.rb +50 -0
- data/lib/aws-sdk-code-generator/rbs/resource_batch_action.rb +59 -0
- data/lib/aws-sdk-code-generator/rbs/resource_client_request.rb +40 -0
- data/lib/aws-sdk-code-generator/rbs/waiter.rb +53 -0
- data/lib/aws-sdk-code-generator/rbs.rb +40 -0
- data/lib/aws-sdk-code-generator/resource_batch_action_code.rb +3 -1
- data/lib/aws-sdk-code-generator/resource_client_request.rb +3 -1
- data/lib/aws-sdk-code-generator/resource_waiter.rb +6 -5
- data/lib/aws-sdk-code-generator/service.rb +21 -0
- data/lib/aws-sdk-code-generator/views/async_client_class.rb +5 -1
- data/lib/aws-sdk-code-generator/views/client_api_module.rb +29 -4
- data/lib/aws-sdk-code-generator/views/client_class.rb +5 -1
- data/lib/aws-sdk-code-generator/views/event_streams_module.rb +7 -1
- data/lib/aws-sdk-code-generator/views/features/smoke.rb +99 -23
- data/lib/aws-sdk-code-generator/views/features/step_definitions.rb +1 -4
- data/lib/aws-sdk-code-generator/views/gemspec.rb +13 -3
- data/lib/aws-sdk-code-generator/views/rbs/client_class.rb +172 -0
- data/lib/aws-sdk-code-generator/views/rbs/errors_module.rb +28 -0
- data/lib/aws-sdk-code-generator/views/rbs/resource_class.rb +95 -0
- data/lib/aws-sdk-code-generator/views/rbs/root_resource_class.rb +30 -0
- data/lib/aws-sdk-code-generator/views/rbs/types_module.rb +257 -0
- data/lib/aws-sdk-code-generator/views/rbs/waiters_module.rb +22 -0
- data/lib/aws-sdk-code-generator/views/spec/endpoint_provider_spec_class.rb +5 -1
- data/lib/aws-sdk-code-generator/views/types_module.rb +8 -9
- data/lib/aws-sdk-code-generator.rb +17 -1
- data/templates/client_api_module.mustache +7 -0
- data/templates/client_class.mustache +0 -45
- data/templates/endpoints_module.mustache +1 -0
- data/templates/endpoints_plugin.mustache +4 -2
- data/templates/features/smoke.mustache +11 -15
- data/templates/features/step_definitions.mustache +0 -5
- data/templates/gemspec.mustache +5 -2
- data/templates/rbs/client_class.mustache +39 -0
- data/templates/rbs/errors_module.mustache +17 -0
- data/templates/rbs/resource_class.mustache +71 -0
- data/templates/rbs/root_resource_class.mustache +26 -0
- data/templates/rbs/types_module.mustache +37 -0
- data/templates/rbs/waiters_module.mustache +17 -0
- data/templates/resource_class.mustache +3 -1
- data/templates/spec/endpoint_provider_spec_class.mustache +10 -0
- metadata +24 -5
- data/lib/aws-sdk-code-generator/views/features/smoke_step_definitions.rb +0 -26
- data/templates/features/smoke_step_definitions.mustache +0 -31
@@ -51,6 +51,13 @@ module {{module_name}}
|
|
51
51
|
{{/http_checksum}}
|
52
52
|
}
|
53
53
|
{{/http_checksum}}
|
54
|
+
{{#request_compression}}
|
55
|
+
o.request_compression = {
|
56
|
+
{{#request_compression}}
|
57
|
+
{{{key}}} => {{{value}}},
|
58
|
+
{{/request_compression}}
|
59
|
+
}
|
60
|
+
{{/request_compression}}
|
54
61
|
{{#deprecated}}
|
55
62
|
o.deprecated = true
|
56
63
|
{{/deprecated}}
|
@@ -38,51 +38,6 @@ module {{module_name}}
|
|
38
38
|
# @overload initialize(options)
|
39
39
|
# @param [Hash] options
|
40
40
|
{{>documentation}}
|
41
|
-
# @option options [URI::HTTP,String] :http_proxy A proxy to send
|
42
|
-
# requests through. Formatted like 'http://proxy.com:123'.
|
43
|
-
#
|
44
|
-
# @option options [Float] :http_open_timeout (15) The number of
|
45
|
-
# seconds to wait when opening a HTTP session before raising a
|
46
|
-
# `Timeout::Error`.
|
47
|
-
#
|
48
|
-
# @option options [Float] :http_read_timeout (60) The default
|
49
|
-
# number of seconds to wait for response data. This value can
|
50
|
-
# safely be set per-request on the session.
|
51
|
-
#
|
52
|
-
# @option options [Float] :http_idle_timeout (5) The number of
|
53
|
-
# seconds a connection is allowed to sit idle before it is
|
54
|
-
# considered stale. Stale connections are closed and removed
|
55
|
-
# from the pool before making a request.
|
56
|
-
#
|
57
|
-
# @option options [Float] :http_continue_timeout (1) The number of
|
58
|
-
# seconds to wait for a 100-continue response before sending the
|
59
|
-
# request body. This option has no effect unless the request has
|
60
|
-
# "Expect" header set to "100-continue". Defaults to `nil` which
|
61
|
-
# disables this behaviour. This value can safely be set per
|
62
|
-
# request on the session.
|
63
|
-
#
|
64
|
-
# @option options [Float] :ssl_timeout (nil) Sets the SSL timeout
|
65
|
-
# in seconds.
|
66
|
-
#
|
67
|
-
# @option options [Boolean] :http_wire_trace (false) When `true`,
|
68
|
-
# HTTP debug output will be sent to the `:logger`.
|
69
|
-
#
|
70
|
-
# @option options [Boolean] :ssl_verify_peer (true) When `true`,
|
71
|
-
# SSL peer certificates are verified when establishing a
|
72
|
-
# connection.
|
73
|
-
#
|
74
|
-
# @option options [String] :ssl_ca_bundle Full path to the SSL
|
75
|
-
# certificate authority bundle file that should be used when
|
76
|
-
# verifying peer certificates. If you do not pass
|
77
|
-
# `:ssl_ca_bundle` or `:ssl_ca_directory` the the system default
|
78
|
-
# will be used if available.
|
79
|
-
#
|
80
|
-
# @option options [String] :ssl_ca_directory Full path of the
|
81
|
-
# directory that contains the unbundled SSL certificate
|
82
|
-
# authority files for verifying peer certificates. If you do
|
83
|
-
# not pass `:ssl_ca_bundle` or `:ssl_ca_directory` the the
|
84
|
-
# system default will be used if available.
|
85
|
-
#
|
86
41
|
{{/client_constructor}}
|
87
42
|
def initialize(*args)
|
88
43
|
super
|
@@ -10,6 +10,7 @@ module {{module_name}}
|
|
10
10
|
option(
|
11
11
|
:endpoint_provider,
|
12
12
|
doc_type: '{{module_name}}::EndpointProvider',
|
13
|
+
rbs_type: 'untyped',
|
13
14
|
docstring: 'The endpoint provider used to resolve endpoints. Any '\
|
14
15
|
'object that responds to `#resolve_endpoint(parameters)` '\
|
15
16
|
'where `parameters` is a Struct similar to '\
|
@@ -29,16 +30,17 @@ module {{module_name}}
|
|
29
30
|
# @api private
|
30
31
|
class Handler < Seahorse::Client::Handler
|
31
32
|
def call(context)
|
32
|
-
# If endpoint was discovered, do not resolve or apply the endpoint.
|
33
33
|
unless context[:discovered_endpoint]
|
34
34
|
params = parameters_for_operation(context)
|
35
35
|
endpoint = context.config.endpoint_provider.resolve_endpoint(params)
|
36
36
|
|
37
37
|
context.http_request.endpoint = endpoint.url
|
38
38
|
apply_endpoint_headers(context, endpoint.headers)
|
39
|
+
|
40
|
+
context[:endpoint_params] = params
|
41
|
+
context[:endpoint_properties] = endpoint.properties
|
39
42
|
end
|
40
43
|
|
41
|
-
context[:endpoint_params] = params
|
42
44
|
context[:auth_scheme] =
|
43
45
|
Aws::Endpoints.resolve_auth_scheme(context, endpoint)
|
44
46
|
|
@@ -1,22 +1,18 @@
|
|
1
1
|
{{#generated_src_warning}}
|
2
2
|
{{generated_src_warning}}
|
3
3
|
{{/generated_src_warning}}
|
4
|
-
Feature: Smoke tests for {{
|
5
|
-
|
6
|
-
Background:
|
7
|
-
{{#client_endpoint}}
|
8
|
-
Given I create a client with endpoint '{{client_endpoint}}'
|
9
|
-
{{/client_endpoint}}
|
10
|
-
{{^client_endpoint}}
|
11
|
-
Given I create a client in region '{{client_region}}'
|
12
|
-
{{/client_endpoint}}
|
4
|
+
Feature: Smoke tests for {{service_name}}
|
13
5
|
{{#smoke_tests}}
|
14
6
|
|
15
|
-
{{
|
16
|
-
Scenario: {{
|
17
|
-
|
18
|
-
|
7
|
+
{{tags}}
|
8
|
+
Scenario: {{id}}
|
9
|
+
Given I create a '{{service_module}}' client with config:
|
10
|
+
"""
|
11
|
+
{{&config_hash}}
|
12
|
+
"""
|
13
|
+
When I call the operation '{{operation_name}}' with params:
|
14
|
+
"""
|
19
15
|
{{¶m_hash}}
|
20
|
-
|
21
|
-
|
16
|
+
"""
|
17
|
+
Then {{&expectation}}
|
22
18
|
{{/smoke_tests}}
|
@@ -1,10 +1,5 @@
|
|
1
1
|
Before("@{{var_name}}") do
|
2
|
-
{{#client_endpoint}}
|
3
|
-
@service = {{module_name}}::Resource.new(endpoint: '{{client_endpoint}}')
|
4
|
-
{{/client_endpoint}}
|
5
|
-
{{^client_endpoint}}
|
6
2
|
@service = {{module_name}}::Resource.new
|
7
|
-
{{/client_endpoint}}
|
8
3
|
@client = @service.client
|
9
4
|
end
|
10
5
|
|
data/templates/gemspec.mustache
CHANGED
@@ -24,8 +24,11 @@ Gem::Specification.new do |spec|
|
|
24
24
|
|
25
25
|
{{/metadata}}
|
26
26
|
{{#dependencies}}
|
27
|
-
spec.add_dependency(
|
27
|
+
spec.add_dependency({{{gem_version}}})
|
28
28
|
{{/dependencies}}
|
29
29
|
|
30
|
-
spec.required_ruby_version = '>= 2.
|
30
|
+
spec.required_ruby_version = '>= 2.5'
|
31
|
+
{{#deprecated?}}
|
32
|
+
spec.post_install_message = '*** {{gem_name}} is deprecated ***'
|
33
|
+
{{/deprecated?}}
|
31
34
|
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
{{generated_src_warning}}
|
2
|
+
module Aws
|
3
|
+
module {{service_name}}
|
4
|
+
class Client < ::Seahorse::Client::Base
|
5
|
+
include ::Aws::ClientStubs
|
6
|
+
|
7
|
+
# https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/{{service_name}}/Client.html#initialize-instance_method
|
8
|
+
def self.new: ({{{client_option}}}) -> instance
|
9
|
+
| (?Hash[Symbol, untyped]) -> instance
|
10
|
+
|
11
|
+
{{#operations}}
|
12
|
+
|
13
|
+
{{^empty_structure}}
|
14
|
+
interface {{interface}}
|
15
|
+
include ::Seahorse::Client::_ResponseSuccess[{{data}}]
|
16
|
+
{{#returns_members}}
|
17
|
+
def {{method_name}}: () -> {{{returns}}}
|
18
|
+
{{/returns_members}}
|
19
|
+
end
|
20
|
+
{{/empty_structure}}
|
21
|
+
# https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/{{service_name}}/Client.html#{{method_name}}-instance_method
|
22
|
+
{{{signature}}}
|
23
|
+
{{/operations}}
|
24
|
+
{{#waiters?}}
|
25
|
+
|
26
|
+
{{#waiters_first}}
|
27
|
+
# https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/{{service_name}}/Client.html#wait_until-instance_method
|
28
|
+
def wait_until: {{{client_overload_keyword_argument}}}
|
29
|
+
| {{{client_overload_positional_argument}}}
|
30
|
+
{{/waiters_first}}
|
31
|
+
{{#waiters_others}}
|
32
|
+
| {{{client_overload_keyword_argument}}}
|
33
|
+
| {{{client_overload_positional_argument}}}
|
34
|
+
{{/waiters_others}}
|
35
|
+
{{/waiters?}}
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
@@ -0,0 +1,17 @@
|
|
1
|
+
{{generated_src_warning}}
|
2
|
+
module Aws
|
3
|
+
module {{service_name}}
|
4
|
+
module Errors
|
5
|
+
class ServiceError < ::Aws::Errors::ServiceError
|
6
|
+
end
|
7
|
+
|
8
|
+
{{#errors}}
|
9
|
+
class {{name}} < ::Aws::Errors::ServiceError
|
10
|
+
{{#members}}
|
11
|
+
{{{signature}}}
|
12
|
+
{{/members}}
|
13
|
+
end
|
14
|
+
{{/errors}}
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,71 @@
|
|
1
|
+
{{generated_src_warning}}
|
2
|
+
module Aws
|
3
|
+
module {{service_name}}
|
4
|
+
# https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/{{service_name}}/{{class_name}}.html
|
5
|
+
class {{class_name}}
|
6
|
+
# https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/{{service_name}}/{{class_name}}.html#initialize-instance_method
|
7
|
+
{{{initialize_signature}}}
|
8
|
+
{{#identifiers}}
|
9
|
+
|
10
|
+
# https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/{{service_name}}/{{class_name}}.html#{{name}}-instance_method
|
11
|
+
def {{name}}: () -> {{type}}
|
12
|
+
{{#alias}}
|
13
|
+
alias {{alias}} {{name}}
|
14
|
+
{{/alias}}
|
15
|
+
{{/identifiers}}
|
16
|
+
{{#data_attributes}}
|
17
|
+
|
18
|
+
# https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/{{service_name}}/{{class_name}}.html#{{method_name}}-instance_method
|
19
|
+
{{{signature}}}
|
20
|
+
{{/data_attributes}}
|
21
|
+
|
22
|
+
def client: () -> Client
|
23
|
+
|
24
|
+
{{#load?}}
|
25
|
+
# https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/{{service_name}}/{{class_name}}.html#load-instance_method
|
26
|
+
def load: () -> self
|
27
|
+
alias reload load
|
28
|
+
{{/load?}}
|
29
|
+
|
30
|
+
{{#load_or_shape?}}
|
31
|
+
# https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/{{service_name}}/{{class_name}}.html#data-instance_method
|
32
|
+
def data: () -> Types::{{shape}}
|
33
|
+
{{/load_or_shape?}}
|
34
|
+
{{^load_or_shape?}}
|
35
|
+
# https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/{{service_name}}/{{class_name}}.html#data-instance_method
|
36
|
+
def data: () -> EmptyStructure
|
37
|
+
{{/load_or_shape?}}
|
38
|
+
|
39
|
+
# https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/{{service_name}}/{{class_name}}.html#data_loaded?-instance_method
|
40
|
+
def data_loaded?: () -> bool
|
41
|
+
|
42
|
+
{{#exists_waiters}}
|
43
|
+
# https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/{{service_name}}/{{class_name}}.html#exists?-instance_method
|
44
|
+
def exists?: (?max_attempts: Integer, ?delay: Numeric, ?before_attempt: (^(Integer attempts) -> void), ?before_wait: (^(Integer attempts, untyped response) -> void)) -> bool
|
45
|
+
| (?Hash[Symbol, untyped]) -> bool
|
46
|
+
{{/exists_waiters}}
|
47
|
+
{{#waiters}}
|
48
|
+
|
49
|
+
# https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/{{service_name}}/{{class_name}}.html#{{method_name}}-instance_method
|
50
|
+
{{{signature}}}
|
51
|
+
{{/waiters}}
|
52
|
+
{{#actions}}
|
53
|
+
|
54
|
+
# https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/{{service_name}}/{{class_name}}.html#{{method_name}}-instance_method
|
55
|
+
{{{signature}}}
|
56
|
+
{{/actions}}
|
57
|
+
{{#associations}}
|
58
|
+
|
59
|
+
# https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/{{service_name}}/{{class_name}}.html#{{method_name}}-instance_method
|
60
|
+
{{{signature}}}
|
61
|
+
{{/associations}}
|
62
|
+
|
63
|
+
class Collection < ::Aws::Resources::Collection[{{class_name}}]
|
64
|
+
{{#batch_actions}}
|
65
|
+
|
66
|
+
{{{signature}}}
|
67
|
+
{{/batch_actions}}
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
{{generated_src_warning}}
|
2
|
+
module Aws
|
3
|
+
module {{service_name}}
|
4
|
+
# https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/{{service_name}}/Resource.html
|
5
|
+
class Resource
|
6
|
+
# https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/{{service_name}}/Resource.html#initialize-instance_method
|
7
|
+
def initialize: (
|
8
|
+
?client: Client,{{{client_option}}}) -> void
|
9
|
+
| (?Hash[Symbol, untyped]) -> void
|
10
|
+
|
11
|
+
def client: () -> Client
|
12
|
+
|
13
|
+
{{#actions}}
|
14
|
+
|
15
|
+
# https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/{{service_name}}/Resource.html#{{method_name}}-instance_method
|
16
|
+
{{{signature}}}
|
17
|
+
{{/actions}}
|
18
|
+
|
19
|
+
{{#associations}}
|
20
|
+
|
21
|
+
# https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/{{service_name}}/Resource.html#{{method_name}}-instance_method
|
22
|
+
{{{signature}}}
|
23
|
+
{{/associations}}
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
{{#generated_src_warning}}
|
2
|
+
{{generated_src_warning}}
|
3
|
+
{{/generated_src_warning}}
|
4
|
+
module {{module_name}}
|
5
|
+
module Types
|
6
|
+
{{#structures}}
|
7
|
+
|
8
|
+
{{> documentation}}
|
9
|
+
{{#empty?}}
|
10
|
+
class {{class_name}} < Aws::EmptyStructure
|
11
|
+
end
|
12
|
+
{{/empty?}}
|
13
|
+
{{^empty?}}
|
14
|
+
class {{class_name}}
|
15
|
+
{{#members}}
|
16
|
+
attr_accessor {{member_name}}: {{{returns}}}
|
17
|
+
{{/members}}
|
18
|
+
SENSITIVE: {{sensitive_params}}
|
19
|
+
{{#union?}}
|
20
|
+
|
21
|
+
{{#members}}
|
22
|
+
class {{member_class_name}} < {{class_name}}
|
23
|
+
end
|
24
|
+
{{/members}}
|
25
|
+
{{/union?}}
|
26
|
+
end
|
27
|
+
{{/empty?}}
|
28
|
+
{{/structures}}
|
29
|
+
{{#eventstreams}}
|
30
|
+
|
31
|
+
{{> documentation}}
|
32
|
+
class {{class_name}} < Enumerator[untyped, untyped]
|
33
|
+
def event_types: () -> {{#empty?}}[]{{/empty?}}{{^empty?}}[{{#types}}:{{member_name}}{{^last}}, {{/last}}{{/types}}]{{/empty?}}
|
34
|
+
end
|
35
|
+
{{/eventstreams}}
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
{{generated_src_warning}}
|
2
|
+
module Aws
|
3
|
+
module {{service_name}}
|
4
|
+
module Waiters
|
5
|
+
{{#waiters}}
|
6
|
+
|
7
|
+
class {{class_name}}
|
8
|
+
def initialize: (?client: Client, ?max_attempts: Integer, ?delay: Integer, ?before_attempt: Proc, ?before_wait: Proc) -> void
|
9
|
+
| (?Hash[Symbol, untyped]) -> void
|
10
|
+
|
11
|
+
def wait: {{{waiter_overload_keyword_argument}}}
|
12
|
+
| {{{waiter_overload_positional_argument}}}
|
13
|
+
end
|
14
|
+
{{/waiters}}
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -213,7 +213,9 @@ module {{module_name}}
|
|
213
213
|
:retry
|
214
214
|
end
|
215
215
|
end
|
216
|
-
Aws::
|
216
|
+
Aws::Plugins::UserAgent.feature('resource') do
|
217
|
+
Aws::Waiters::Waiter.new(options).wait({})
|
218
|
+
end
|
217
219
|
end
|
218
220
|
{{/wait_until}}
|
219
221
|
{{#actions?}}
|
@@ -50,6 +50,16 @@ module {{module_name}}
|
|
50
50
|
{{/expect_error?}}
|
51
51
|
{{^expect_error?}}
|
52
52
|
{{#expect_auth?}}
|
53
|
+
{{#s3_express_auth?}}
|
54
|
+
client.stub_responses(:create_session, credentials: {
|
55
|
+
access_key_id: 's3-akid',
|
56
|
+
secret_access_key: 's3-secret',
|
57
|
+
session_token: 's3-session',
|
58
|
+
expiration: Time.now + 60 * 5
|
59
|
+
})
|
60
|
+
expect_auth({"name"=>"sigv4", "signingName"=>"s3express"})
|
61
|
+
Aws::S3.express_credentials_cache.clear
|
62
|
+
{{/s3_express_auth?}}
|
53
63
|
expect_auth({{{expected_auth}}})
|
54
64
|
{{/expect_auth?}}
|
55
65
|
resp = client.{{operation_name}}(
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws-sdk-code-generator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0.pre
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Amazon Web Services
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-05-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: kramdown
|
@@ -63,6 +63,15 @@ files:
|
|
63
63
|
- lib/aws-sdk-code-generator/hash_formatter.rb
|
64
64
|
- lib/aws-sdk-code-generator/helper.rb
|
65
65
|
- lib/aws-sdk-code-generator/plugin_list.rb
|
66
|
+
- lib/aws-sdk-code-generator/rbs.rb
|
67
|
+
- lib/aws-sdk-code-generator/rbs/error_list.rb
|
68
|
+
- lib/aws-sdk-code-generator/rbs/keyword_argument_builder.rb
|
69
|
+
- lib/aws-sdk-code-generator/rbs/method_signature.rb
|
70
|
+
- lib/aws-sdk-code-generator/rbs/resource_action.rb
|
71
|
+
- lib/aws-sdk-code-generator/rbs/resource_association.rb
|
72
|
+
- lib/aws-sdk-code-generator/rbs/resource_batch_action.rb
|
73
|
+
- lib/aws-sdk-code-generator/rbs/resource_client_request.rb
|
74
|
+
- lib/aws-sdk-code-generator/rbs/waiter.rb
|
66
75
|
- lib/aws-sdk-code-generator/resource_action.rb
|
67
76
|
- lib/aws-sdk-code-generator/resource_action_code.rb
|
68
77
|
- lib/aws-sdk-code-generator/resource_association.rb
|
@@ -108,9 +117,14 @@ files:
|
|
108
117
|
- lib/aws-sdk-code-generator/views/event_streams_module.rb
|
109
118
|
- lib/aws-sdk-code-generator/views/features/env.rb
|
110
119
|
- lib/aws-sdk-code-generator/views/features/smoke.rb
|
111
|
-
- lib/aws-sdk-code-generator/views/features/smoke_step_definitions.rb
|
112
120
|
- lib/aws-sdk-code-generator/views/features/step_definitions.rb
|
113
121
|
- lib/aws-sdk-code-generator/views/gemspec.rb
|
122
|
+
- lib/aws-sdk-code-generator/views/rbs/client_class.rb
|
123
|
+
- lib/aws-sdk-code-generator/views/rbs/errors_module.rb
|
124
|
+
- lib/aws-sdk-code-generator/views/rbs/resource_class.rb
|
125
|
+
- lib/aws-sdk-code-generator/views/rbs/root_resource_class.rb
|
126
|
+
- lib/aws-sdk-code-generator/views/rbs/types_module.rb
|
127
|
+
- lib/aws-sdk-code-generator/views/rbs/waiters_module.rb
|
114
128
|
- lib/aws-sdk-code-generator/views/resource_class.rb
|
115
129
|
- lib/aws-sdk-code-generator/views/root_resource_class.rb
|
116
130
|
- lib/aws-sdk-code-generator/views/service_module.rb
|
@@ -137,11 +151,16 @@ files:
|
|
137
151
|
- templates/event_streams_module.mustache
|
138
152
|
- templates/features/env.mustache
|
139
153
|
- templates/features/smoke.mustache
|
140
|
-
- templates/features/smoke_step_definitions.mustache
|
141
154
|
- templates/features/step_definitions.mustache
|
142
155
|
- templates/gemspec.mustache
|
143
156
|
- templates/license.txt
|
144
157
|
- templates/method.mustache
|
158
|
+
- templates/rbs/client_class.mustache
|
159
|
+
- templates/rbs/errors_module.mustache
|
160
|
+
- templates/rbs/resource_class.mustache
|
161
|
+
- templates/rbs/root_resource_class.mustache
|
162
|
+
- templates/rbs/types_module.mustache
|
163
|
+
- templates/rbs/waiters_module.mustache
|
145
164
|
- templates/resource_class.mustache
|
146
165
|
- templates/root_resource_class.mustache
|
147
166
|
- templates/service_module.mustache
|
@@ -169,7 +188,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
169
188
|
- !ruby/object:Gem::Version
|
170
189
|
version: 1.3.1
|
171
190
|
requirements: []
|
172
|
-
rubygems_version: 3.
|
191
|
+
rubygems_version: 3.4.1
|
173
192
|
signing_key:
|
174
193
|
specification_version: 4
|
175
194
|
summary: AWS SDK for Ruby - Code Generator
|
@@ -1,26 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module AwsSdkCodeGenerator
|
4
|
-
module Views
|
5
|
-
module Features
|
6
|
-
class SmokeStepDefinitions < View
|
7
|
-
|
8
|
-
# @param [Hash] options
|
9
|
-
# @option options [required, Service] :service
|
10
|
-
def initialize(options)
|
11
|
-
service = options.fetch(:service)
|
12
|
-
@module_name = service.module_name
|
13
|
-
end
|
14
|
-
|
15
|
-
attr_reader :module_name
|
16
|
-
|
17
|
-
# @return [String|nil]
|
18
|
-
def generated_src_warning
|
19
|
-
return if @custom
|
20
|
-
GENERATED_SRC_WARNING
|
21
|
-
end
|
22
|
-
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
@@ -1,31 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
{{#generated_src_warning}}
|
4
|
-
{{generated_src_warning}}
|
5
|
-
{{/generated_src_warning}}
|
6
|
-
# Shared Smoke Test Definitions
|
7
|
-
Given(/I create a client in region '(.*?)'/) do |region|
|
8
|
-
@regional_client = {{module_name}}::Client.new(region: region)
|
9
|
-
end
|
10
|
-
|
11
|
-
Given(/I create a client with endpoint '(.*?)'/) do |endpoint|
|
12
|
-
@regional_client = {{module_name}}::Client.new(endpoint: endpoint)
|
13
|
-
end
|
14
|
-
|
15
|
-
When(/I call the operation '(.*?)' with params:/) do |operation, params|
|
16
|
-
opts = JSON.parse(params, symbolize_names: true)
|
17
|
-
begin
|
18
|
-
@regional_client.send(operation.to_sym, opts)
|
19
|
-
@operation_raised_error = false
|
20
|
-
rescue StandardError
|
21
|
-
@operation_raised_error = true
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
Then(/I expect an error was raised/) do
|
26
|
-
expect(@operation_raised_error).to be_truthy
|
27
|
-
end
|
28
|
-
|
29
|
-
Then(/I expect an error was not raised/) do
|
30
|
-
expect(@operation_raised_error).not_to be_truthy
|
31
|
-
end
|