aws-sdk-code-generator 0.4.0.pre → 0.6.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/api.rb +2 -1
- data/lib/aws-sdk-code-generator/client_constructor.rb +2 -1
- data/lib/aws-sdk-code-generator/client_operation_documentation.rb +2 -1
- data/lib/aws-sdk-code-generator/client_operation_list.rb +4 -0
- data/lib/aws-sdk-code-generator/code_builder.rb +54 -2
- data/lib/aws-sdk-code-generator/endpoint_parameter.rb +190 -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/helper.rb +11 -1
- data/lib/aws-sdk-code-generator/plugin_list.rb +5 -2
- 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 +85 -16
- data/lib/aws-sdk-code-generator/views/async_client_class.rb +5 -1
- data/lib/aws-sdk-code-generator/views/client_api_module.rb +58 -16
- data/lib/aws-sdk-code-generator/views/client_class.rb +5 -1
- data/lib/aws-sdk-code-generator/views/endpoint_parameters_class.rb +6 -50
- data/lib/aws-sdk-code-generator/views/endpoint_provider_class.rb +9 -0
- data/lib/aws-sdk-code-generator/views/endpoints_module.rb +18 -124
- data/lib/aws-sdk-code-generator/views/endpoints_plugin.rb +46 -4
- data/lib/aws-sdk-code-generator/views/errors_module.rb +21 -0
- data/lib/aws-sdk-code-generator/views/event_streams_module.rb +7 -1
- data/lib/aws-sdk-code-generator/views/features/smoke.rb +100 -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/resource_class.rb +22 -0
- data/lib/aws-sdk-code-generator/views/root_resource_class.rb +19 -0
- data/lib/aws-sdk-code-generator/views/service_module.rb +41 -27
- data/lib/aws-sdk-code-generator/views/spec/endpoint_provider_spec_class.rb +25 -12
- data/lib/aws-sdk-code-generator/views/types_module.rb +34 -11
- data/lib/aws-sdk-code-generator.rb +29 -1
- data/templates/async_client_class.mustache +6 -1
- data/templates/client_api_module.mustache +14 -0
- data/templates/client_class.mustache +10 -47
- data/templates/endpoint_parameters_class.mustache +16 -13
- data/templates/endpoints_module.mustache +19 -11
- data/templates/endpoints_plugin.mustache +38 -20
- data/templates/errors_module.mustache +5 -0
- 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 +8 -1
- data/templates/root_resource_class.mustache +5 -0
- data/templates/service_module.mustache +13 -3
- data/templates/spec/endpoint_provider_spec_class.mustache +11 -1
- data/templates/types_module.mustache +4 -0
- metadata +27 -7
- data/lib/aws-sdk-code-generator/views/features/smoke_step_definitions.rb +0 -26
- data/templates/features/smoke_step_definitions.mustache +0 -31
@@ -17,9 +17,7 @@ require '{{.}}'
|
|
17
17
|
{{/requires}}
|
18
18
|
{{/require_core_guard?}}
|
19
19
|
|
20
|
-
{{
|
21
|
-
require_relative '{{.}}'
|
22
|
-
{{/relative_requires}}
|
20
|
+
Aws::Plugins::GlobalConfiguration.add_identifier(:{{service_identifier}})
|
23
21
|
|
24
22
|
# This module provides support for {{full_name}}. This module is available in the
|
25
23
|
# `{{gem_name}}` gem.
|
@@ -52,7 +50,19 @@ require_relative '{{.}}'
|
|
52
50
|
#
|
53
51
|
# @!group service
|
54
52
|
module {{module_name}}
|
53
|
+
{{#autoloads}}
|
54
|
+
{{#is_plugin}}
|
55
|
+
module Plugins
|
56
|
+
autoload :{{class_name}}, '{{file_path}}'
|
57
|
+
end
|
58
|
+
{{/is_plugin}}
|
59
|
+
{{^is_plugin}}
|
60
|
+
autoload :{{class_name}}, '{{file_path}}'
|
61
|
+
{{/is_plugin}}
|
62
|
+
{{/autoloads}}
|
55
63
|
|
56
64
|
GEM_VERSION = '{{gem_version}}'
|
57
65
|
|
58
66
|
end
|
67
|
+
|
68
|
+
require_relative '{{prefix}}/customizations'
|
@@ -11,7 +11,7 @@ module {{module_name}}
|
|
11
11
|
subject { {{module_name}}::EndpointProvider.new }
|
12
12
|
|
13
13
|
{{#endpoint_tests}}
|
14
|
-
context
|
14
|
+
context "{{{documentation}}}" do
|
15
15
|
let(:expected) do
|
16
16
|
{{{expect}}}
|
17
17
|
end
|
@@ -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.6.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-10-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: kramdown
|
@@ -56,6 +56,7 @@ files:
|
|
56
56
|
- lib/aws-sdk-code-generator/codegenerated_plugin.rb
|
57
57
|
- lib/aws-sdk-code-generator/crosslink.rb
|
58
58
|
- lib/aws-sdk-code-generator/docstring.rb
|
59
|
+
- lib/aws-sdk-code-generator/endpoint_parameter.rb
|
59
60
|
- lib/aws-sdk-code-generator/error_list.rb
|
60
61
|
- lib/aws-sdk-code-generator/errors.rb
|
61
62
|
- lib/aws-sdk-code-generator/eventstream_example.rb
|
@@ -63,6 +64,15 @@ files:
|
|
63
64
|
- lib/aws-sdk-code-generator/hash_formatter.rb
|
64
65
|
- lib/aws-sdk-code-generator/helper.rb
|
65
66
|
- lib/aws-sdk-code-generator/plugin_list.rb
|
67
|
+
- lib/aws-sdk-code-generator/rbs.rb
|
68
|
+
- lib/aws-sdk-code-generator/rbs/error_list.rb
|
69
|
+
- lib/aws-sdk-code-generator/rbs/keyword_argument_builder.rb
|
70
|
+
- lib/aws-sdk-code-generator/rbs/method_signature.rb
|
71
|
+
- lib/aws-sdk-code-generator/rbs/resource_action.rb
|
72
|
+
- lib/aws-sdk-code-generator/rbs/resource_association.rb
|
73
|
+
- lib/aws-sdk-code-generator/rbs/resource_batch_action.rb
|
74
|
+
- lib/aws-sdk-code-generator/rbs/resource_client_request.rb
|
75
|
+
- lib/aws-sdk-code-generator/rbs/waiter.rb
|
66
76
|
- lib/aws-sdk-code-generator/resource_action.rb
|
67
77
|
- lib/aws-sdk-code-generator/resource_action_code.rb
|
68
78
|
- lib/aws-sdk-code-generator/resource_association.rb
|
@@ -108,9 +118,14 @@ files:
|
|
108
118
|
- lib/aws-sdk-code-generator/views/event_streams_module.rb
|
109
119
|
- lib/aws-sdk-code-generator/views/features/env.rb
|
110
120
|
- lib/aws-sdk-code-generator/views/features/smoke.rb
|
111
|
-
- lib/aws-sdk-code-generator/views/features/smoke_step_definitions.rb
|
112
121
|
- lib/aws-sdk-code-generator/views/features/step_definitions.rb
|
113
122
|
- lib/aws-sdk-code-generator/views/gemspec.rb
|
123
|
+
- lib/aws-sdk-code-generator/views/rbs/client_class.rb
|
124
|
+
- lib/aws-sdk-code-generator/views/rbs/errors_module.rb
|
125
|
+
- lib/aws-sdk-code-generator/views/rbs/resource_class.rb
|
126
|
+
- lib/aws-sdk-code-generator/views/rbs/root_resource_class.rb
|
127
|
+
- lib/aws-sdk-code-generator/views/rbs/types_module.rb
|
128
|
+
- lib/aws-sdk-code-generator/views/rbs/waiters_module.rb
|
114
129
|
- lib/aws-sdk-code-generator/views/resource_class.rb
|
115
130
|
- lib/aws-sdk-code-generator/views/root_resource_class.rb
|
116
131
|
- lib/aws-sdk-code-generator/views/service_module.rb
|
@@ -137,11 +152,16 @@ files:
|
|
137
152
|
- templates/event_streams_module.mustache
|
138
153
|
- templates/features/env.mustache
|
139
154
|
- templates/features/smoke.mustache
|
140
|
-
- templates/features/smoke_step_definitions.mustache
|
141
155
|
- templates/features/step_definitions.mustache
|
142
156
|
- templates/gemspec.mustache
|
143
157
|
- templates/license.txt
|
144
158
|
- templates/method.mustache
|
159
|
+
- templates/rbs/client_class.mustache
|
160
|
+
- templates/rbs/errors_module.mustache
|
161
|
+
- templates/rbs/resource_class.mustache
|
162
|
+
- templates/rbs/root_resource_class.mustache
|
163
|
+
- templates/rbs/types_module.mustache
|
164
|
+
- templates/rbs/waiters_module.mustache
|
145
165
|
- templates/resource_class.mustache
|
146
166
|
- templates/root_resource_class.mustache
|
147
167
|
- templates/service_module.mustache
|
@@ -165,11 +185,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
165
185
|
version: '0'
|
166
186
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
167
187
|
requirements:
|
168
|
-
- - "
|
188
|
+
- - ">="
|
169
189
|
- !ruby/object:Gem::Version
|
170
|
-
version:
|
190
|
+
version: '0'
|
171
191
|
requirements: []
|
172
|
-
rubygems_version: 3.
|
192
|
+
rubygems_version: 3.5.9
|
173
193
|
signing_key:
|
174
194
|
specification_version: 4
|
175
195
|
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
|