gapic-generator-cloud 0.6.8 → 0.6.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +25 -0
- data/bin/protoc-gen-bazel_ruby_cloud +1 -1
- data/bin/protoc-gen-ruby_cloud +1 -1
- data/lib/gapic/generator/cloud/version.rb +1 -1
- data/lib/gapic/generators/cloud_generator.rb +26 -17
- data/lib/gapic/generators/cloud_generator_parameters.rb +70 -0
- data/lib/gapic/presenters/cloud_gem_presenter.rb +30 -0
- data/lib/gapic/presenters/wrapper_gem_presenter.rb +4 -0
- data/templates/cloud/gem/license.erb +188 -190
- data/templates/cloud/gem/rakefile.erb +5 -0
- data/templates/cloud/gem/readme.erb +69 -1
- data/templates/cloud/gem/rubocop.erb +2 -0
- data/templates/cloud/gem/yardopts-cloudrad.erb +15 -0
- data/templates/cloud/wrapper_gem/_main.erb +2 -2
- data/templates/cloud/wrapper_gem/rakefile.erb +5 -0
- data/templates/cloud/wrapper_gem/readme.erb +61 -2
- data/templates/cloud/wrapper_gem/yardopts-cloudrad.erb +17 -0
- metadata +8 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c3b3ebbc7732ba43bd59827bb83762589fa5f95ac37aa644d68d6f4b9b8547bd
|
4
|
+
data.tar.gz: e870d4229bb7b5a3b04ba7b32c61e1c5924556e280f4ae197364e1b02daceba7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d8297b2952f6ad21170822930d8e85a219bb33c4040b2748ffac6ae17e4543657176066dfd43d0fb01cd29c428235f80cf62bde55406430f98d0cfd293a9c266
|
7
|
+
data.tar.gz: 2641b83f2217f920e543928db606930d6201134b53a46cefd4b423542f00bff6502f8326efb3f5bace1f54029b4d9b581d44aab1b179c82490d18fedc57ba4f6
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,30 @@
|
|
1
1
|
# Release History for gapic-generator-cloud
|
2
2
|
|
3
|
+
### 0.6.13 / 2021-02-22
|
4
|
+
|
5
|
+
* Includes changes from gapic-generator 0.6.13.
|
6
|
+
* Fixed formatting of generated Apache license files.
|
7
|
+
* Generate Rake task and special yardopts file for Cloud RAD.
|
8
|
+
* Executable entrypoints set the default external locale to utf-8.
|
9
|
+
|
10
|
+
### 0.6.12 / 2021-02-01
|
11
|
+
|
12
|
+
* Fixed a bug in the identification of versioned clients that incorrectly flagged `google-cloud-vision`.
|
13
|
+
|
14
|
+
### 0.6.11 / 2021-02-01
|
15
|
+
|
16
|
+
* Includes changes from gapic-generator 0.6.11.
|
17
|
+
* Updated generated readmes to cover main vs versioned clients.
|
18
|
+
|
19
|
+
### 0.6.10 / 2021-01-13
|
20
|
+
|
21
|
+
* Includes changes from gapic-generator 0.6.10.
|
22
|
+
* A set of human-readable cloud-specific command-line parameters can now be specified for the gapic-generator-cloud, e.g. `ruby-cloud-gem-name`. These parameters strictly duplicate the existing behaviour of old command-line parameters, e.g. `:gem.:name`.
|
23
|
+
|
24
|
+
### 0.6.9 / 2020-12-07
|
25
|
+
|
26
|
+
* Includes changes from gapic-generator 0.6.9.
|
27
|
+
|
3
28
|
### 0.6.8 / 2020-09-16
|
4
29
|
|
5
30
|
* Includes changes from gapic-generator 0.6.8.
|
data/bin/protoc-gen-ruby_cloud
CHANGED
@@ -15,6 +15,7 @@
|
|
15
15
|
# limitations under the License.
|
16
16
|
|
17
17
|
require "gapic/generators/default_generator"
|
18
|
+
require "gapic/generators/cloud_generator_parameters"
|
18
19
|
require "gapic/presenters"
|
19
20
|
require "gapic/presenters/cloud_gem_presenter"
|
20
21
|
require "gapic/presenters/wrapper_gem_presenter"
|
@@ -76,23 +77,24 @@ module Gapic
|
|
76
77
|
|
77
78
|
gem = Gapic::Presenters.wrapper_gem_presenter @api
|
78
79
|
|
79
|
-
files << g("gem/gitignore.erb",
|
80
|
-
files << g("gem/repo-metadata.erb",
|
81
|
-
files << g("wrapper_gem/rubocop.erb",
|
82
|
-
files << g("wrapper_gem/yardopts.erb",
|
83
|
-
files << g("
|
84
|
-
files << g("gem/
|
85
|
-
files << g("
|
86
|
-
files << g("
|
87
|
-
files << g("
|
88
|
-
files << g("wrapper_gem/
|
89
|
-
files << g("wrapper_gem/
|
90
|
-
files << g("wrapper_gem/
|
91
|
-
files << g("wrapper_gem/
|
92
|
-
files << g("
|
93
|
-
files << g("gem/
|
94
|
-
files << g("
|
95
|
-
files << g("wrapper_gem/
|
80
|
+
files << g("gem/gitignore.erb", ".gitignore", gem: gem)
|
81
|
+
files << g("gem/repo-metadata.erb", ".repo-metadata.json", gem: gem)
|
82
|
+
files << g("wrapper_gem/rubocop.erb", ".rubocop.yml", gem: gem)
|
83
|
+
files << g("wrapper_gem/yardopts.erb", ".yardopts", gem: gem)
|
84
|
+
files << g("wrapper_gem/yardopts-cloudrad.erb", ".yardopts-cloudrad", gem: gem)
|
85
|
+
files << g("gem/authentication.erb", "AUTHENTICATION.md", gem: gem) unless gem.generic_endpoint?
|
86
|
+
files << g("gem/changelog.erb", "CHANGELOG.md", gem: gem)
|
87
|
+
files << g("wrapper_gem/gemfile.erb", "Gemfile", gem: gem)
|
88
|
+
files << g("gem/license.erb", "LICENSE.md", gem: gem)
|
89
|
+
files << g("wrapper_gem/rakefile.erb", "Rakefile", gem: gem)
|
90
|
+
files << g("wrapper_gem/readme.erb", "README.md", gem: gem)
|
91
|
+
files << g("wrapper_gem/gemspec.erb", "#{gem.name}.gemspec", gem: gem)
|
92
|
+
files << g("wrapper_gem/entrypoint.erb", "lib/#{gem.name}.rb", gem: gem) if gem.needs_entrypoint?
|
93
|
+
files << g("wrapper_gem/main.erb", "lib/#{gem.namespace_file_path}", gem: gem)
|
94
|
+
files << g("gem/version.erb", "lib/#{gem.version_file_path}", gem: gem)
|
95
|
+
files << g("gem/test_helper.erb", "test/helper.rb", gem: gem)
|
96
|
+
files << g("wrapper_gem/client_test.erb", "test/#{gem.namespace_require}/client_test.rb", gem: gem)
|
97
|
+
files << g("wrapper_gem/version_test.erb", "test/#{gem.namespace_require}/version_test.rb", gem: gem)
|
96
98
|
|
97
99
|
format_files files
|
98
100
|
|
@@ -101,6 +103,13 @@ module Gapic
|
|
101
103
|
|
102
104
|
# rubocop:enable all
|
103
105
|
|
106
|
+
# Schema of the parameters that the generator accepts
|
107
|
+
# @return [Gapic::Schema::ParameterSchema]
|
108
|
+
def self.parameter_schema
|
109
|
+
CloudGeneratorParameters.default_schema
|
110
|
+
end
|
111
|
+
|
112
|
+
|
104
113
|
private
|
105
114
|
|
106
115
|
##
|
@@ -0,0 +1,70 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
require "gapic/generators/default_generator_parameters"
|
18
|
+
|
19
|
+
module Gapic
|
20
|
+
module Generators
|
21
|
+
# Contains the cloud generator's parameters
|
22
|
+
module CloudGeneratorParameters
|
23
|
+
BOOL_PARAMETERS_ALIASES = {
|
24
|
+
"ruby-cloud-free-tier" => ":gem.:free_tier",
|
25
|
+
"ruby-cloud-yard-strict" => ":gem.:yard_strict",
|
26
|
+
"ruby-cloud-generic-endpoint" => ":gem.:generic_endpoint"
|
27
|
+
}.freeze
|
28
|
+
|
29
|
+
STRING_PARAMETERS_ALIASES = {
|
30
|
+
"ruby-cloud-gem-name" => ":gem.:name",
|
31
|
+
"ruby-cloud-gem-namespace" => ":gem.:namespace",
|
32
|
+
"ruby-cloud-title" => ":gem.:title",
|
33
|
+
"ruby-cloud-description" => ":gem.:description",
|
34
|
+
"ruby-cloud-summary" => ":gem.:summary",
|
35
|
+
"ruby-cloud-homepage" => ":gem.:homepage",
|
36
|
+
"ruby-cloud-env-prefix" => ":gem.:env_prefix",
|
37
|
+
"ruby-cloud-wrapper-of" => ":gem.:version_dependencies",
|
38
|
+
"ruby-cloud-migration-version" => ":gem.:migration_version",
|
39
|
+
"ruby-cloud-product-url" => ":gem.:product_documentation_url",
|
40
|
+
"ruby-cloud-issues-url" => ":gem.:issue_tracker_url",
|
41
|
+
"ruby-cloud-api-id" => ":gem.:api_id",
|
42
|
+
"ruby-cloud-api-shortname" => ":gem.:api_shortname",
|
43
|
+
"ruby-cloud-factory-method-suffix" => ":gem.:factory_method_suffix",
|
44
|
+
"ruby-cloud-default-service-host" => ":defaults.:service.:default_host",
|
45
|
+
"ruby-cloud-grpc-service-config" => "grpc_service_config"
|
46
|
+
}.freeze
|
47
|
+
|
48
|
+
ARRAY_PARAMETERS_ALIASES = {
|
49
|
+
"ruby-cloud-default-oauth-scopes" => ":defaults.:service.:oauth_scopes"
|
50
|
+
}.freeze
|
51
|
+
|
52
|
+
MAP_PARAMETERS_ALIASES = {
|
53
|
+
"ruby-cloud-common-services" => ":common_services",
|
54
|
+
"ruby-cloud-path-override" => ":overrides.:file_path",
|
55
|
+
"ruby-cloud-namespace-override" => ":overrides.:namespace",
|
56
|
+
"ruby-cloud-service-override" => ":overrides.:service",
|
57
|
+
"ruby-cloud-extra-dependencies" => ":gem.:extra_dependencies"
|
58
|
+
}.freeze
|
59
|
+
|
60
|
+
def self.default_schema
|
61
|
+
Gapic::Generators::DefaultGeneratorParameters.default_schema.extend_with_aliases(
|
62
|
+
bool_aliases: BOOL_PARAMETERS_ALIASES,
|
63
|
+
string_aliases: STRING_PARAMETERS_ALIASES,
|
64
|
+
array_aliases: ARRAY_PARAMETERS_ALIASES,
|
65
|
+
map_aliases: MAP_PARAMETERS_ALIASES
|
66
|
+
)
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
@@ -37,6 +37,36 @@ module Gapic
|
|
37
37
|
deps["google-cloud-errors"] = "~> 1.0"
|
38
38
|
deps
|
39
39
|
end
|
40
|
+
|
41
|
+
##
|
42
|
+
# The name of the wrapper gem corresponding to this versioned gem
|
43
|
+
# @return [String]
|
44
|
+
#
|
45
|
+
def wrapper_name
|
46
|
+
minfo = /^(.+)-v\d\w*$/.match name
|
47
|
+
minfo ? minfo[1] : nil
|
48
|
+
end
|
49
|
+
|
50
|
+
alias_method :readme_description, :description # rubocop:disable Style/Alias
|
51
|
+
|
52
|
+
##
|
53
|
+
# Overrides the gemspec description including a note that users should
|
54
|
+
# consider installing the wrapper instead of this versioned gem.
|
55
|
+
#
|
56
|
+
# Note: The method `readme_description` was aliased to the superclass
|
57
|
+
# method because the description without this note is used in the readme.
|
58
|
+
#
|
59
|
+
# @return [String]
|
60
|
+
#
|
61
|
+
def description
|
62
|
+
desc = readme_description
|
63
|
+
if wrapper_name
|
64
|
+
desc += " Note that #{name} is a version-specific client library." \
|
65
|
+
" For most uses, we recommend installing the main client library" \
|
66
|
+
" #{wrapper_name} instead. See the readme for more details."
|
67
|
+
end
|
68
|
+
desc
|
69
|
+
end
|
40
70
|
end
|
41
71
|
|
42
72
|
def self.cloud_gem_presenter api
|
@@ -101,6 +101,10 @@ module Gapic
|
|
101
101
|
version_dependencies.first&.first
|
102
102
|
end
|
103
103
|
|
104
|
+
def default_versioned_gem
|
105
|
+
versioned_gems.first
|
106
|
+
end
|
107
|
+
|
104
108
|
def dependencies
|
105
109
|
deps = { "google-cloud-core" => "~> 1.5" }
|
106
110
|
version_dependencies.each do |version, requirement|
|
@@ -1,193 +1,191 @@
|
|
1
1
|
<%- assert_locals gem -%>
|
2
|
-
Apache License
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
same "printed page" as the copyright notice for easier
|
190
|
-
identification within third-party archives.
|
2
|
+
Apache License
|
3
|
+
Version 2.0, January 2004
|
4
|
+
http://www.apache.org/licenses/
|
5
|
+
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
7
|
+
|
8
|
+
1. Definitions.
|
9
|
+
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
12
|
+
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
14
|
+
the copyright owner that is granting the License.
|
15
|
+
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
17
|
+
other entities that control, are controlled by, or are under common
|
18
|
+
control with that entity. For the purposes of this definition,
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
20
|
+
direction or management of such entity, whether by contract or
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
23
|
+
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
25
|
+
exercising permissions granted by this License.
|
26
|
+
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
28
|
+
including but not limited to software source code, documentation
|
29
|
+
source, and configuration files.
|
30
|
+
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
32
|
+
transformation or translation of a Source form, including but
|
33
|
+
not limited to compiled object code, generated documentation,
|
34
|
+
and conversions to other media types.
|
35
|
+
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
37
|
+
Object form, made available under the License, as indicated by a
|
38
|
+
copyright notice that is included in or attached to the work
|
39
|
+
(an example is provided in the Appendix below).
|
40
|
+
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
47
|
+
the Work and Derivative Works thereof.
|
48
|
+
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
50
|
+
the original version of the Work and any modifications or additions
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
62
|
+
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
65
|
+
subsequently incorporated within the Work.
|
66
|
+
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
73
|
+
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
79
|
+
where such license applies only to those patent claims licensable
|
80
|
+
by such Contributor that are necessarily infringed by their
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
83
|
+
institute patent litigation against any entity (including a
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
86
|
+
or contributory patent infringement, then any patent licenses
|
87
|
+
granted to You under this License for that Work shall terminate
|
88
|
+
as of the date such litigation is filed.
|
89
|
+
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
92
|
+
modifications, and in Source or Object form, provided that You
|
93
|
+
meet the following conditions:
|
94
|
+
|
95
|
+
(a) You must give any other recipients of the Work or
|
96
|
+
Derivative Works a copy of this License; and
|
97
|
+
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
99
|
+
stating that You changed the files; and
|
100
|
+
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
103
|
+
attribution notices from the Source form of the Work,
|
104
|
+
excluding those notices that do not pertain to any part of
|
105
|
+
the Derivative Works; and
|
106
|
+
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
109
|
+
include a readable copy of the attribution notices contained
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
112
|
+
of the following places: within a NOTICE text file distributed
|
113
|
+
as part of the Derivative Works; within the Source form or
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
115
|
+
within a display generated by the Derivative Works, if and
|
116
|
+
wherever such third-party notices normally appear. The contents
|
117
|
+
of the NOTICE file are for informational purposes only and
|
118
|
+
do not modify the License. You may add Your own attribution
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
121
|
+
that such additional attribution notices cannot be construed
|
122
|
+
as modifying the License.
|
123
|
+
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
125
|
+
may provide additional or different license terms and conditions
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
129
|
+
the conditions stated in this License.
|
130
|
+
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
134
|
+
this License, without any additional terms or conditions.
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
136
|
+
the terms of any separate license agreement you may have executed
|
137
|
+
with Licensor regarding such Contributions.
|
138
|
+
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
141
|
+
except as required for reasonable and customary use in describing the
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
143
|
+
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
153
|
+
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
159
|
+
incidental, or consequential damages of any character arising as a
|
160
|
+
result of this License or out of the use or inability to use the
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
163
|
+
other commercial damages or losses), even if such Contributor
|
164
|
+
has been advised of the possibility of such damages.
|
165
|
+
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
169
|
+
or other liability obligations and/or rights consistent with this
|
170
|
+
License. However, in accepting such obligations, You may act only
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
175
|
+
of your accepting any such warranty or additional liability.
|
176
|
+
|
177
|
+
END OF TERMS AND CONDITIONS
|
178
|
+
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
180
|
+
|
181
|
+
To apply the Apache License to your work, attach the following
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
183
|
+
replaced with your own identifying information. (Don't include
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
185
|
+
comment syntax for the file format. We also recommend that a
|
186
|
+
file or class name and description of purpose be included on the
|
187
|
+
same "printed page" as the copyright notice for easier
|
188
|
+
identification within third-party archives.
|
191
189
|
|
192
190
|
Copyright [yyyy] [name of copyright owner]
|
193
191
|
|
@@ -195,7 +193,7 @@ identification within third-party archives.
|
|
195
193
|
you may not use this file except in compliance with the License.
|
196
194
|
You may obtain a copy of the License at
|
197
195
|
|
198
|
-
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
199
197
|
|
200
198
|
Unless required by applicable law or agreed to in writing, software
|
201
199
|
distributed under the License is distributed on an "AS IS" BASIS,
|
@@ -149,6 +149,11 @@ task :doctest do
|
|
149
149
|
puts "The <%= gem.name %> gem does not have doctest tests."
|
150
150
|
end
|
151
151
|
|
152
|
+
task :cloudrad do
|
153
|
+
ENV["CLOUDRAD_GEM_NAME"] = "<%= gem.name %>"
|
154
|
+
sh "bundle exec yard doc --fail-on-warning --yardopts .yardopts-cloudrad"
|
155
|
+
end
|
156
|
+
|
152
157
|
desc "Run the CI build"
|
153
158
|
task :ci do
|
154
159
|
header "BUILDING <%= gem.name %>"
|
@@ -2,10 +2,18 @@
|
|
2
2
|
|
3
3
|
<%= gem.summary %>
|
4
4
|
|
5
|
-
<%= gem.
|
5
|
+
<%= gem.readme_description %>
|
6
6
|
|
7
7
|
<%= gem.homepage %>
|
8
8
|
|
9
|
+
<%- if gem.wrapper_name -%>
|
10
|
+
This gem is a _versioned_ client. It provides basic client classes for a
|
11
|
+
specific version of the <%= gem.title %> API. Most users should consider using
|
12
|
+
the main client gem,
|
13
|
+
[<%= gem.wrapper_name %>](https://rubygems.org/gems/<%= gem.wrapper_name %>).
|
14
|
+
See the section below titled *Which client should I use?* for more information.
|
15
|
+
|
16
|
+
<%- end -%>
|
9
17
|
## Installation
|
10
18
|
|
11
19
|
```
|
@@ -93,3 +101,63 @@ in security maintenance, and not end of life. Currently, this means Ruby 2.4
|
|
93
101
|
and later. Older versions of Ruby _may_ still work, but are unsupported and not
|
94
102
|
recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details
|
95
103
|
about the Ruby support schedule.
|
104
|
+
<%- if gem.wrapper_name -%>
|
105
|
+
|
106
|
+
## Which client should I use?
|
107
|
+
|
108
|
+
Most modern Ruby client libraries for Google APIs come in two flavors: the main
|
109
|
+
client library with a name such as `<%= gem.wrapper_name %>`,
|
110
|
+
and lower-level _versioned_ client libraries with names such as
|
111
|
+
`<%= gem.name %>`.
|
112
|
+
_In most cases, you should install the main client._
|
113
|
+
|
114
|
+
### What's the difference between the main client and a versioned client?
|
115
|
+
|
116
|
+
A _versioned client_ provides a basic set of data types and client classes for
|
117
|
+
a _single version_ of a specific service. (That is, for a service with multiple
|
118
|
+
versions, there might be a separate versioned client for each service version.)
|
119
|
+
Most versioned clients are written and maintained by a code generator.
|
120
|
+
|
121
|
+
The _main client_ is designed to provide you with the _recommended_ client
|
122
|
+
interfaces for the service. There will be only one main client for any given
|
123
|
+
service, even a service with multiple versions. The main client includes
|
124
|
+
factory methods for constructing the client objects we recommend for most
|
125
|
+
users. In some cases, those will be classes provided by an underlying versioned
|
126
|
+
client; in other cases, they will be handwritten higher-level client objects
|
127
|
+
with additional capabilities, convenience methods, or best practices built in.
|
128
|
+
Generally, the main client will default to a recommended service version,
|
129
|
+
although in some cases you can override this if you need to talk to a specific
|
130
|
+
service version.
|
131
|
+
|
132
|
+
### Why would I want to use the main client?
|
133
|
+
|
134
|
+
We recommend that most users install the main client gem for a service. You can
|
135
|
+
identify this gem as the one _without_ a version in its name, e.g.
|
136
|
+
`<%= gem.wrapper_name %>`.
|
137
|
+
The main client is recommended because it will embody the best practices for
|
138
|
+
accessing the service, and may also provide more convenient interfaces or
|
139
|
+
tighter integration into frameworks and third-party libraries. In addition, the
|
140
|
+
documentation and samples published by Google will generally demonstrate use of
|
141
|
+
the main client.
|
142
|
+
|
143
|
+
### Why would I want to use a versioned client?
|
144
|
+
|
145
|
+
You can use a versioned client if you are content with a possibly lower-level
|
146
|
+
class interface, you explicitly want to avoid features provided by the main
|
147
|
+
client, or you want to access a specific service version not be covered by the
|
148
|
+
main client. You can identify versioned client gems because the service version
|
149
|
+
is part of the name, e.g. `<%= gem.name %>`.
|
150
|
+
|
151
|
+
### What about the google-apis-<name> clients?
|
152
|
+
|
153
|
+
Client library gems with names that begin with `google-apis-` are based on an
|
154
|
+
older code generation technology. They talk to a REST/JSON backend (whereas
|
155
|
+
most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may
|
156
|
+
not offer the same performance, features, and ease of use provided by more
|
157
|
+
modern clients.
|
158
|
+
|
159
|
+
The `google-apis-` clients have wide coverage across Google services, so you
|
160
|
+
might need to use one if there is no modern client available for the service.
|
161
|
+
However, if a modern client is available, we generally recommend it over the
|
162
|
+
older `google-apis-` clients.
|
163
|
+
<%- end -%>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<%- assert_locals gem -%>
|
2
|
+
--no-private
|
3
|
+
--title=<%= gem.title %> API
|
4
|
+
--exclude _pb\.rb$
|
5
|
+
--format yaml
|
6
|
+
--template-path ../template
|
7
|
+
|
8
|
+
./lib/**/*.rb
|
9
|
+
./proto_docs/**/*.rb
|
10
|
+
-
|
11
|
+
README.md
|
12
|
+
LICENSE.md
|
13
|
+
<%- unless gem.generic_endpoint? -%>
|
14
|
+
AUTHENTICATION.md
|
15
|
+
<%- end -%>
|
@@ -76,8 +76,8 @@ end
|
|
76
76
|
# The library version as recorded in instrumentation and logging.
|
77
77
|
# * `interceptors` (*type:* `Array<GRPC::ClientInterceptor>`) -
|
78
78
|
# An array of interceptors that are run before calls are executed.
|
79
|
-
# * `timeout` (*type:* `
|
80
|
-
# Default timeout in
|
79
|
+
# * `timeout` (*type:* `Numeric`) -
|
80
|
+
# Default timeout in seconds.
|
81
81
|
# * `metadata` (*type:* `Hash{Symbol=>String}`) -
|
82
82
|
# Additional gRPC headers to be sent with the call.
|
83
83
|
# * `retry_policy` (*type:* `Hash`) -
|
@@ -148,6 +148,11 @@ task :doctest do
|
|
148
148
|
puts "The <%= gem.name %> gem does not have doctest tests."
|
149
149
|
end
|
150
150
|
|
151
|
+
task :cloudrad do
|
152
|
+
ENV["CLOUDRAD_GEM_NAME"] = "<%= gem.name %>"
|
153
|
+
sh "bundle exec yard doc --fail-on-warning --yardopts .yardopts-cloudrad"
|
154
|
+
end
|
155
|
+
|
151
156
|
desc "Run the CI build"
|
152
157
|
task :ci do
|
153
158
|
header "BUILDING <%= gem.name %>"
|
@@ -6,9 +6,10 @@
|
|
6
6
|
|
7
7
|
Actual client classes for the various versions of this API are defined in
|
8
8
|
_versioned_ client gems, with names of the form `<%= gem.name %>-v*`.
|
9
|
-
The gem `<%= gem.name %>` is
|
9
|
+
The gem `<%= gem.name %>` is the main client library that brings the
|
10
10
|
verisoned gems in as dependencies, and provides high-level methods for
|
11
|
-
constructing clients.
|
11
|
+
constructing clients. More information on versioned clients can be found below
|
12
|
+
in the section titled *Which client should I use?*.
|
12
13
|
|
13
14
|
View the [Client Library Documentation](<%= gem.library_documentation_url %>)
|
14
15
|
for this library, <%= gem.name %>, to see the convenience methods for
|
@@ -95,3 +96,61 @@ in security maintenance, and not end of life. Currently, this means Ruby 2.4
|
|
95
96
|
and later. Older versions of Ruby _may_ still work, but are unsupported and not
|
96
97
|
recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details
|
97
98
|
about the Ruby support schedule.
|
99
|
+
|
100
|
+
## Which client should I use?
|
101
|
+
|
102
|
+
Most modern Ruby client libraries for Google APIs come in two flavors: the main
|
103
|
+
client library with a name such as `<%= gem.name %>`,
|
104
|
+
and lower-level _versioned_ client libraries with names such as
|
105
|
+
`<%= gem.default_versioned_gem %>`.
|
106
|
+
_In most cases, you should install the main client._
|
107
|
+
|
108
|
+
### What's the difference between the main client and a versioned client?
|
109
|
+
|
110
|
+
A _versioned client_ provides a basic set of data types and client classes for
|
111
|
+
a _single version_ of a specific service. (That is, for a service with multiple
|
112
|
+
versions, there might be a separate versioned client for each service version.)
|
113
|
+
Most versioned clients are written and maintained by a code generator.
|
114
|
+
|
115
|
+
The _main client_ is designed to provide you with the _recommended_ client
|
116
|
+
interfaces for the service. There will be only one main client for any given
|
117
|
+
service, even a service with multiple versions. The main client includes
|
118
|
+
factory methods for constructing the client objects we recommend for most
|
119
|
+
users. In some cases, those will be classes provided by an underlying versioned
|
120
|
+
client; in other cases, they will be handwritten higher-level client objects
|
121
|
+
with additional capabilities, convenience methods, or best practices built in.
|
122
|
+
Generally, the main client will default to a recommended service version,
|
123
|
+
although in some cases you can override this if you need to talk to a specific
|
124
|
+
service version.
|
125
|
+
|
126
|
+
### Why would I want to use the main client?
|
127
|
+
|
128
|
+
We recommend that most users install the main client gem for a service. You can
|
129
|
+
identify this gem as the one _without_ a version in its name, e.g.
|
130
|
+
`<%= gem.name %>`.
|
131
|
+
The main client is recommended because it will embody the best practices for
|
132
|
+
accessing the service, and may also provide more convenient interfaces or
|
133
|
+
tighter integration into frameworks and third-party libraries. In addition, the
|
134
|
+
documentation and samples published by Google will generally demonstrate use of
|
135
|
+
the main client.
|
136
|
+
|
137
|
+
### Why would I want to use a versioned client?
|
138
|
+
|
139
|
+
You can use a versioned client if you are content with a possibly lower-level
|
140
|
+
class interface, you explicitly want to avoid features provided by the main
|
141
|
+
client, or you want to access a specific service version not be covered by the
|
142
|
+
main client. You can identify versioned client gems because the service version
|
143
|
+
is part of the name, e.g. `<%= gem.default_versioned_gem %>`.
|
144
|
+
|
145
|
+
### What about the google-apis-<name> clients?
|
146
|
+
|
147
|
+
Client library gems with names that begin with `google-apis-` are based on an
|
148
|
+
older code generation technology. They talk to a REST/JSON backend (whereas
|
149
|
+
most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may
|
150
|
+
not offer the same performance, features, and ease of use provided by more
|
151
|
+
modern clients.
|
152
|
+
|
153
|
+
The `google-apis-` clients have wide coverage across Google services, so you
|
154
|
+
might need to use one if there is no modern client available for the service.
|
155
|
+
However, if a modern client is available, we generally recommend it over the
|
156
|
+
older `google-apis-` clients.
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<%- assert_locals gem -%>
|
2
|
+
--no-private
|
3
|
+
--title=<%= gem.title %> API
|
4
|
+
--exclude _pb\.rb$
|
5
|
+
--format yaml
|
6
|
+
--template-path ../template
|
7
|
+
|
8
|
+
./lib/**/*.rb
|
9
|
+
-
|
10
|
+
README.md
|
11
|
+
<%- unless gem.generic_endpoint? -%>
|
12
|
+
AUTHENTICATION.md
|
13
|
+
<%- end -%>
|
14
|
+
<%- if gem.migration? -%>
|
15
|
+
MIGRATING.md
|
16
|
+
<%- end -%>
|
17
|
+
LICENSE.md
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gapic-generator-cloud
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ernest Landrito
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2021-02-23 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: actionpack
|
@@ -32,14 +32,14 @@ dependencies:
|
|
32
32
|
requirements:
|
33
33
|
- - '='
|
34
34
|
- !ruby/object:Gem::Version
|
35
|
-
version: 0.6.
|
35
|
+
version: 0.6.13
|
36
36
|
type: :runtime
|
37
37
|
prerelease: false
|
38
38
|
version_requirements: !ruby/object:Gem::Requirement
|
39
39
|
requirements:
|
40
40
|
- - '='
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: 0.6.
|
42
|
+
version: 0.6.13
|
43
43
|
- !ruby/object:Gem::Dependency
|
44
44
|
name: google-style
|
45
45
|
requirement: !ruby/object:Gem::Requirement
|
@@ -159,6 +159,7 @@ files:
|
|
159
159
|
- cloud-rubocop.yml
|
160
160
|
- lib/gapic/generator/cloud/version.rb
|
161
161
|
- lib/gapic/generators/cloud_generator.rb
|
162
|
+
- lib/gapic/generators/cloud_generator_parameters.rb
|
162
163
|
- lib/gapic/presenters/cloud_gem_presenter.rb
|
163
164
|
- lib/gapic/presenters/wrapper_gem_presenter.rb
|
164
165
|
- lib/gapic/presenters/wrapper_service_presenter.rb
|
@@ -169,6 +170,7 @@ files:
|
|
169
170
|
- templates/cloud/gem/readme.erb
|
170
171
|
- templates/cloud/gem/repo-metadata.erb
|
171
172
|
- templates/cloud/gem/rubocop.erb
|
173
|
+
- templates/cloud/gem/yardopts-cloudrad.erb
|
172
174
|
- templates/cloud/gem/yardopts.erb
|
173
175
|
- templates/cloud/service/client/_credentials.erb
|
174
176
|
- templates/cloud/service/client/_requires.erb
|
@@ -186,6 +188,7 @@ files:
|
|
186
188
|
- templates/cloud/wrapper_gem/readme.erb
|
187
189
|
- templates/cloud/wrapper_gem/rubocop.erb
|
188
190
|
- templates/cloud/wrapper_gem/version_test.erb
|
191
|
+
- templates/cloud/wrapper_gem/yardopts-cloudrad.erb
|
189
192
|
- templates/cloud/wrapper_gem/yardopts.erb
|
190
193
|
homepage: https://github.com/googleapis/gapic-generator-ruby
|
191
194
|
licenses:
|
@@ -206,7 +209,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
206
209
|
- !ruby/object:Gem::Version
|
207
210
|
version: '0'
|
208
211
|
requirements: []
|
209
|
-
rubygems_version: 3.
|
212
|
+
rubygems_version: 3.1.4
|
210
213
|
signing_key:
|
211
214
|
specification_version: 4
|
212
215
|
summary: An API Client Generator for Ruby in Ruby!
|