gapic-generator-cloud 0.11.0 → 0.45.1

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.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +302 -0
  3. data/README.md +82 -61
  4. data/bin/protoc-gen-bazel_ruby_cloud +2 -2
  5. data/bin/protoc-gen-ruby_cloud +2 -2
  6. data/lib/gapic/generator/cloud/version.rb +1 -1
  7. data/lib/gapic/generators/cloud_generator.rb +20 -19
  8. data/lib/gapic/generators/cloud_generator_parameters.rb +4 -1
  9. data/lib/gapic/presenters/cloud_gem_presenter.rb +56 -15
  10. data/lib/gapic/presenters/wrapper_gem_presenter.rb +31 -9
  11. data/lib/gapic/presenters/wrapper_service_presenter.rb +3 -3
  12. data/templates/cloud/gem/authentication.text.erb +125 -0
  13. data/templates/cloud/gem/{rakefile.erb → rakefile.text.erb} +0 -32
  14. data/templates/cloud/gem/{readme.erb → readme.text.erb} +48 -26
  15. data/templates/cloud/gem/{repo-metadata.erb → repo-metadata.text.erb} +3 -4
  16. data/templates/cloud/gem/{rubocop.erb → rubocop.text.erb} +3 -0
  17. data/templates/cloud/service/rest/client/method/def/_rescue.text.erb +3 -0
  18. data/templates/cloud/wrapper_gem/{_main.erb → _main.text.erb} +67 -16
  19. data/templates/cloud/wrapper_gem/client_test.text.erb +59 -0
  20. data/templates/cloud/wrapper_gem/gemfile.text.erb +29 -0
  21. data/templates/cloud/wrapper_gem/{gemspec.erb → gemspec.text.erb} +2 -11
  22. data/templates/cloud/wrapper_gem/{rakefile.erb → rakefile.text.erb} +2 -32
  23. data/templates/cloud/wrapper_gem/{readme.erb → readme.text.erb} +45 -37
  24. data/templates/cloud/wrapper_gem/{version_test.erb → version_test.text.erb} +1 -1
  25. metadata +33 -163
  26. data/templates/cloud/gem/authentication.erb +0 -156
  27. data/templates/cloud/service/rest/client/method/def/_rescue.erb +0 -4
  28. data/templates/cloud/wrapper_gem/client_test.erb +0 -29
  29. data/templates/cloud/wrapper_gem/gemfile.erb +0 -8
  30. /data/templates/cloud/gem/{gitignore.erb → gitignore.text.erb} +0 -0
  31. /data/templates/cloud/gem/{license.erb → license.text.erb} +0 -0
  32. /data/templates/cloud/gem/{yardopts.erb → yardopts.text.erb} +0 -0
  33. /data/templates/cloud/service/client/{_credentials.erb → _credentials.text.erb} +0 -0
  34. /data/templates/cloud/service/client/{_requires.erb → _requires.text.erb} +0 -0
  35. /data/templates/cloud/service/client/{_self_configure.erb → _self_configure.text.erb} +0 -0
  36. /data/templates/cloud/service/client/method/def/{_rescue.erb → _rescue.text.erb} +0 -0
  37. /data/templates/cloud/service/client/method/docs/{_error.erb → _error.text.erb} +0 -0
  38. /data/templates/cloud/service/rest/client/method/docs/{_error.erb → _error.text.erb} +0 -0
  39. /data/templates/cloud/shared/{_license.erb → _license.text.erb} +0 -0
  40. /data/templates/cloud/wrapper_gem/{entrypoint.erb → entrypoint.text.erb} +0 -0
  41. /data/templates/cloud/wrapper_gem/{main.erb → main.text.erb} +0 -0
  42. /data/templates/cloud/wrapper_gem/{rubocop.erb → rubocop.text.erb} +0 -0
  43. /data/templates/cloud/wrapper_gem/{yardopts.erb → yardopts.text.erb} +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 57149fac08b20d6e334e33b7e27e136430c024953f54bcd906f9a91c49ffe2db
4
- data.tar.gz: bfa5c66f6d47bf20a6bbe9f217f2e34cbc6a94f53a5768830045a59d1c8a6d7c
3
+ metadata.gz: fd3ba7e1f62b5d8af6c2ddeaa63557c5a7fade4d237d4871bdffc13777935593
4
+ data.tar.gz: 7a0b3064f14be0a78d41dbbccae50027d7958e078eadf91228d8065e76acc755
5
5
  SHA512:
6
- metadata.gz: bfc7b46a6028c007bf4b75b11c03067f39331c63f046153bbd63a6757427116c8c7859a8e3ea87c9ac211f96a4c694175c2379fb7b3a4b045fcf37e46d0e3034
7
- data.tar.gz: 0ea77a6b3a09412112b5e183d578651b3176bb21820961b0e5611ef13858ca9b0f6ba4b03f438ff2dec523700a5c516494de380fda6c1df522435b8baf497eb5
6
+ metadata.gz: eb26389a06e47d1435bc1e683df1ce2d6c8b68d911d60e12c186d7ef19ead358fc514253865dcf7f4f76896170092439e82290210bca93c5c507b4461b18d191
7
+ data.tar.gz: 4247324d76e4327855cc3b6f519d03bc80a52197193c48c019983292791e38267f1d2538c9bf284c5ea52f9018be0e3f60406c2adc82f524772909bff3d7f8c0
data/CHANGELOG.md CHANGED
@@ -1,5 +1,307 @@
1
1
  # Release History for gapic-generator-cloud
2
2
 
3
+ ### 0.45.1 / 2025-05-01
4
+
5
+ * Includes changes from gapic-generator 0.45.1
6
+ * Fix: Build script fixes
7
+
8
+ ### 0.45.0 / 2025-05-01
9
+
10
+ * Includes changes from gapic-generator 0.45.0
11
+ * Feature: Updated rails to 8.0
12
+ * Feature: Update protobuf to 4.30
13
+
14
+ ### 0.44.0 / 2025-04-30
15
+
16
+ * Includes changes from gapic-generator 0.44.0
17
+ * Feature: Update Ruby to 3.2.8
18
+ * Feature: ruby 3.1 and google-style 1.31.0
19
+
20
+ ### 0.43.0 / 2025-04-24
21
+
22
+ * Includes changes from gapic-generator 0.43.0
23
+ * Fix: Fixed typo in generated wrapper readmes
24
+ * Fix: Provide a better check for grpc when typechecking credentials
25
+
26
+ ### 0.42.1 / 2025-02-04
27
+
28
+ * Includes changes from gapic-generator 0.42.1
29
+ * Fix: Wrappers load release dependencies if local dependencies do not match
30
+
31
+ ### 0.42.0 / 2025-01-30
32
+
33
+ * Includes changes from gapic-generator 0.42.0
34
+ * Feature: Change REGAPIC pagination algorithm to the standard algorithm for non-compute clients
35
+
36
+ ### 0.41.0 / 2025-01-24
37
+
38
+ * Includes changes from gapic-generator 0.41.0
39
+ * Feature: Change minimum Ruby version to 3.0
40
+
41
+ ### 0.40.0 / 2025-01-24
42
+
43
+ * Includes changes from gapic-generator 0.40.0
44
+ * Feature: Wrapper clients provide better introspection to determine availability of client objects
45
+
46
+ ### 0.39.2 / 2025-01-24
47
+
48
+ * Includes changes from gapic-generator 0.39.2
49
+
50
+ ### 0.39.1 / 2025-01-23
51
+
52
+ * Includes changes from gapic-generator 0.39.1
53
+
54
+ ### 0.39.0 / 2025-01-22
55
+
56
+ * Includes changes from gapic-generator 0.39.0
57
+
58
+ ### 0.38.3 / 2024-12-10
59
+
60
+ * Includes changes from gapic-generator 0.38.3
61
+ * Fix: Added logger methods to generated dummy stub classes in generated tests
62
+
63
+ ### 0.38.2 / 2024-12-10
64
+
65
+ * Includes changes from gapic-generator 0.38.2
66
+
67
+ ### 0.38.1 / 2024-12-09
68
+
69
+ * Includes changes from gapic-generator 0.38.1
70
+ * Fix: fix wrapper gem tests by stubbing the stub_logger method
71
+
72
+ ### 0.38.0 / 2024-12-06
73
+
74
+ * Includes changes from gapic-generator 0.38.0
75
+ * Feature: Support request-response debug logging from generated GAPICs
76
+
77
+ ### 0.37.0 / 2024-10-24
78
+
79
+ * Includes changes from gapic-generator 0.37.0
80
+
81
+ ### 0.36.1 / 2024-09-20
82
+
83
+ * Includes changes from gapic-generator 0.36.1
84
+
85
+ ### 0.36.0 / 2024-08-22
86
+
87
+ * Includes changes from gapic-generator 0.36.0
88
+
89
+ ### 0.35.0 / 2024-08-15
90
+
91
+ * Includes changes from gapic-generator 0.35.0
92
+ * Feature: Disable xrefs for README files in wrapper gems
93
+
94
+ ### 0.34.1 / 2024-08-08
95
+
96
+ * Includes changes from gapic-generator 0.34.1
97
+
98
+ ### 0.34.0 / 2024-08-07
99
+
100
+ * Includes changes from gapic-generator 0.34.0
101
+ * Feature: Refactor README.md and gemspec files
102
+
103
+ ### 0.33.0 / 2024-07-02
104
+
105
+ * Includes changes from gapic-generator 0.33.0
106
+
107
+ ### 0.32.0 / 2024-05-13
108
+
109
+ * Includes changes from gapic-generator 0.32.0
110
+
111
+ ### 0.31.0 / 2024-04-25
112
+
113
+ * Includes changes from gapic-generator 0.31.0
114
+
115
+ ### 0.30.0 / 2024-04-24
116
+
117
+ * Includes changes from gapic-generator 0.30.0
118
+
119
+ ### 0.29.0 / 2024-02-22
120
+
121
+ * Includes changes from gapic-generator 0.29.0
122
+ * Feature: Update minimum Ruby version of generated libraries to 2.7
123
+ * Fix: update gemfiles and set bundle platforms to x86_64-linux
124
+
125
+ ### 0.28.0 / 2024-02-14
126
+
127
+ * Includes changes from gapic-generator 0.28.0
128
+
129
+ ### 0.27.4 / 2024-01-12
130
+
131
+ * Includes changes from gapic-generator 0.27.4
132
+ * Fix: Fix wrapper tests with universe domain changes
133
+
134
+ ### 0.27.3 / 2024-01-12
135
+
136
+ * Includes changes from gapic-generator 0.27.3
137
+
138
+ ### 0.27.2 / 2024-01-11
139
+
140
+ * Includes changes from gapic-generator 0.27.2
141
+ * Fix: Update wrapper configs for universe_domain support
142
+
143
+ ### 0.27.1 / 2024-01-09
144
+
145
+ * Includes changes from gapic-generator 0.27.1
146
+
147
+ ### 0.27.0 / 2024-01-08
148
+
149
+ * Includes changes from gapic-generator 0.27.0
150
+ * Feature: Update rubocop autofix to use Rubocop 1.59
151
+ * Feature: Generate toys files
152
+ * Feature: Updates to generated authentication documentation
153
+
154
+ ### 0.26.0 / 2023-12-04
155
+
156
+ * Includes changes from gapic-generator 0.26.0
157
+ * Feature: Use google-protobuf instead of third-party protobuf library
158
+ * Fix: clean up and update gem dependencies
159
+
160
+ ### 0.25.1 / 2023-09-12
161
+
162
+ * Includes changes from gapic-generator 0.25.1
163
+ * Fix: Workaround for grpc windows issue during tests
164
+
165
+ ### 0.25.0 / 2023-09-07
166
+
167
+ * Includes changes from gapic-generator 0.25.0
168
+
169
+ ### 0.24.0 / 2023-07-05
170
+
171
+ * Includes changes from gapic-generator 0.24.0
172
+
173
+ ### 0.23.4 / 2023-06-03
174
+
175
+ * Includes changes from gapic-generator 0.23.4
176
+
177
+ ### 0.23.3 / 2023-05-26
178
+
179
+ * Includes changes from gapic-generator 0.23.3
180
+ * Fix: Generated clients depend on gapic-common 0.19
181
+
182
+ ### 0.23.2 / 2023-03-08
183
+
184
+ * Includes changes from gapic-generator 0.23.2
185
+ * Fix: Replace googleapis.dev links with equivalent cloud.google.com or rubydoc.info links
186
+ * Fix: Fix broken ruby-doc logger class links in readme templates
187
+ * Fix: Path override now affects wrapper factory method names
188
+
189
+ ### 0.23.1 / 2023-02-28
190
+
191
+ * Includes changes from gapic-generator 0.23.1
192
+
193
+ ### 0.23.0 / 2023-02-27
194
+
195
+ * Includes changes from gapic-generator 0.23.0
196
+ * Feature: Honor metadata from the service yaml
197
+
198
+ ### 0.22.0 / 2023-02-14
199
+
200
+ * Includes changes from gapic-generator 0.22.0
201
+ * Feature: Update mixin dependency versions to 0.4
202
+
203
+ ### 0.21.1 / 2023-02-13
204
+
205
+ * Includes changes from gapic-generator 0.21.1
206
+ * Fix: Get rubocop working in bazel
207
+
208
+ ### 0.21.0 / 2023-02-09
209
+
210
+ * Includes changes from gapic-generator 0.21.0
211
+ * Feature: Load and interpret snippetgen phase 2 config data
212
+ * Feature: Implemented enough of SnippetGen phase 2 to generate the initial test case
213
+ * Feature: add a transport operation class in Rest
214
+
215
+ ### 0.20.0 / 2023-01-19
216
+
217
+ * Includes changes from gapic-generator 0.20.0
218
+
219
+ ### 0.19.0 / 2023-01-17
220
+
221
+ * Includes changes from gapic-generator 0.19.0
222
+ * Fix: remove a deprecated method usage that new Ruby does not like
223
+
224
+ ### 0.18.1 / 2022-12-15
225
+
226
+ * Includes changes from gapic-generator 0.18.1
227
+
228
+ ### 0.18.0 / 2022-12-15
229
+
230
+ * Includes changes from gapic-generator 0.18.0
231
+ * Fix: Cross-ref links use the REST client class in REST client docs
232
+ * Feature: all fixes for the combined rest+grpc libraries
233
+ * Fix: handle only regapic errors for REST libraries
234
+ * Feature: Updated wrapper generator to support multi-transport clients
235
+
236
+ ### 0.17.2 / 2022-10-27
237
+
238
+ * Includes changes from gapic-generator 0.17.2
239
+ * Fix: Update snippetgen phase 1 to conform to standard sample style
240
+
241
+ ### 0.17.1 / 2022-10-26
242
+
243
+ * Includes changes from gapic-generator 0.17.1
244
+
245
+ ### 0.17.0 / 2022-10-21
246
+
247
+ * Includes changes from gapic-generator 0.17.0
248
+
249
+ ### 0.16.1 / 2022-09-27
250
+
251
+ * Includes changes from gapic-generator 0.16.1
252
+ * Fix: correct cause of Cloud error
253
+
254
+ ### 0.16.0 / 2022-09-16
255
+
256
+ * Includes changes from gapic-generator 0.16.0
257
+ * Feature: parse details information from REST errors
258
+ * Feature: Support numeric enums
259
+
260
+ ### 0.15.3 / 2022-08-18
261
+
262
+ * Includes changes from gapic-generator 0.15.3
263
+ * Fix: Fix out of date SDK auth documentation
264
+
265
+ ### 0.15.2 / 2022-07-27
266
+
267
+ * Includes changes from gapic-generator 0.15.2
268
+
269
+ ### 0.15.1 / 2022-07-26
270
+
271
+ * Includes changes from gapic-generator 0.15.1
272
+ * Fix: mixin proto_docs removal works for iam
273
+
274
+ ### 0.15.0 / 2022-07-25
275
+
276
+ * Includes changes from gapic-generator 0.15.0
277
+ * Fix: Update default generated repo-metadata so it doesn't trigger the lint bot
278
+ * Fix: Wrapper rakefiles do not depend on credentials for generic clients
279
+ * Fix: suppress generation of mixin proto_docs and wrapper client factory methods
280
+
281
+ ### 0.14.1 / 2022-06-29
282
+
283
+ * Includes changes from gapic-generator 0.14.1
284
+
285
+ ### 0.14.0 / 2022-06-27
286
+
287
+ * Includes changes from gapic-generator 0.14.0
288
+ * Feature: generate code using full GRPC transcoding for rest libraries
289
+ * Feature: Update minimum Ruby version to 2.6
290
+
291
+ ### 0.13.0 / 2022-05-11
292
+
293
+ * Includes changes from gapic-generator 0.13.0
294
+ * Feature: Adjust links and repo metadata based on whether the product is part of gcp/cloud
295
+
296
+ ### 0.12.0 / 2022-04-29
297
+
298
+ * Includes changes from gapic-generator 0.12.0
299
+ * Feature: Generate snippet metadata files
300
+
301
+ ### 0.11.1 / 2022-04-06
302
+
303
+ * Includes changes from gapic-generator 0.11.1
304
+
3
305
  ### 0.11.0 / 2022-03-01
4
306
 
5
307
  * Includes changes from gapic-generator 0.11.0
data/README.md CHANGED
@@ -2,83 +2,104 @@
2
2
 
3
3
  Create Ruby clients from a protocol buffer description of an API.
4
4
 
5
- **Note** This project is a preview. Please try it out and let us know what you think,
6
- but there are currently no guarantees of stability or support.
5
+ This code is used to generate client libraries for many Google APIs including
6
+ Cloud and Ads services. The `gapic-generator` gem itself includes the main
7
+ generator, whereas the `gapic-generator-cloud` and `gapic-generator-ads` gems
8
+ provide modifications specific to Google Cloud and Google Ads APIs.
9
+
10
+ These gems can also be used to create clients for any other API, for Google or
11
+ non-Google services, that use protocol buffers as the description language. The
12
+ generators will work best for APIs that follow the design guidance documented
13
+ in the [Google AIPs](https://aip.dev/). An API that is not AIP-compliant should
14
+ still yield a usable client library, but it may be missing features such as
15
+ idiomatic naming, pagination, or retry configuration.
16
+
17
+ **Important:** This is not an official Google project. While it is being used
18
+ internally to generate official Google API client libraries, there is no
19
+ guarantee of support or stability for any other use.
20
+
21
+ ## Using the Ruby gem
22
+
23
+ This section provides a brief getting started guide for the Ruby gem. However,
24
+ we do not release the Ruby gems often, and they may be substantially behind the
25
+ current generator code. In most cases, we recommend generating from the
26
+ GitHub repository directly. See the main README for
27
+ https://github.com/googleapis/gapic-generator-ruby for more information.
28
+
29
+ ### Install the Generator
30
+
31
+ The generator is a plugin for **protoc**, the protocol buffers compiler, so
32
+ you'll need to install it first, along with the standard protobuf and grpc
33
+ plugins for Ruby. The easiest way to do this is to install the `grpc-tools` gem
34
+ which will provide all three. You can also follow the
35
+ [official install instructions](https://github.com/protocolbuffers/protobuf#protobuf-compiler-installation).
36
+ Note that if you installed protoc using `grpc-tools`, the compiler binary name
37
+ will be named `grpc_tools_ruby_protoc`; otherwise it will likely be `protoc`.
38
+
39
+ Install the `gapic-generator` gem to get access to the gapic generator plugin.
40
+ Since you are looking at the `gapic-generator-cloud` gem's README, we will
41
+ assume you want Cloud-specific output, so also install `gapic-generator-cloud`.
42
+
43
+ Alternatively, add all the above to a Gemfile:
44
+
45
+ ```ruby
46
+ # Gemfile
47
+ source "https://rubygems.org/"
48
+
49
+ gem "grpc-tools"
50
+ gem "gapic-generator"
51
+ gem "gapic-generator-cloud"
52
+ ```
7
53
 
8
- ## Usage
9
- ### Install the Proto Compiler
10
- This generator relies on the Protocol Buffer Compiler to [orchestrate] the
11
- client generation.
54
+ And install using bundler:
12
55
 
13
56
  ```sh
14
- # Declare the protobuf version to use.
15
- $ export PROTOBUF_VERSION=3.6.1
16
-
17
- # Declare the target installation system.
18
- # export SYSTEM=osx
19
- $ export SYSTEM=linux
20
-
21
- # Get the precompiled protobuf compiler.
22
- $ curl --location https://github.com/google/protobuf/releases/download/v${PROTOBUF_VERSION}/protoc-${PROTOBUF_VERSION}-linux-x86_64.zip > usr/src/protoc/protoc-${PROTOBUF_VERSION}.zip
23
- $ cd /usr/src/protoc/
24
- $ unzip protoc-${PROTOBUF_VERSION}.zip
25
- $ rm protoc-${PROTOBUF_VERSION}.zip
26
-
27
- # Link the protoc to the path.
28
- $ ln -s /usr/src/protoc/bin/protoc /usr/local/bin/protoc
29
- $ mkdir -p /protos/
30
-
31
- # Move the common protobuf files to the local include folder.
32
- $ cp -R /usr/src/protoc/include/* /usr/local/include/
57
+ $ bundle install
33
58
  ```
34
59
 
35
- [orchestrate]: https://developers.google.com/protocol-buffers/docs/reference/ruby-generated
60
+ ### Generate an API
36
61
 
37
- ### Build and Install the Generator
38
- This tool is in pre-alpha so it is not yet released to RubyGems. You will have to
39
- build the generator from scratch.
62
+ Installing the cloud-specific generator exposes `protoc-gen-ruby_cloud` on the
63
+ PATH. (Note that this name is different from the `protoc-gen-ruby_gapic` plugin
64
+ exposed by the basic generator.) By doing so, it gives the protobuf compiler
65
+ the CLI option `--ruby_cloud_out` on which you can specify an output path for
66
+ this generator.
40
67
 
41
- ```sh
42
- $ git clone https://github.com/googleapis/gapic-generator-ruby.git
43
- $ cd gapic-generator-ruby
44
- $ gem build gapic-generator.gemspec
45
- $ gem install gapic-generator-0.1.0.gem
46
- $ which protoc-gen-ruby_gapic
47
- > {Non-empty path}
48
- ```
68
+ In most cases, in order to generate a functional client library, you must also
69
+ include the Ruby proto and grpc plugins, using the CLI options `--ruby_out` and
70
+ `--grpc_out`.
49
71
 
50
- ### Generate an API
51
- Installing this generator exposes `protoc-gen-ruby_gapic` on the PATH. By doing
52
- so, it gives the protobuf compiler the CLI option `--ruby_gapic_out` on which
53
- you can specify an output path for this generator.
72
+ If you want to experiment with an already-existing API, you can use one of the
73
+ existing Google APIs from https://github.com/googleapis/googleapis.
74
+ First you should get the protos and dependencies:
54
75
 
55
- If you want to experiment with an already-existing API, one example is available.
56
- Note: You need to clone the googleapis repository from GitHub, and change
57
- to a special branch:
58
76
  ```sh
59
- # Get the protos and it's dependencies.
60
- $ git clone git@github.com:googleapis/api-common-protos.git
61
77
  $ git clone git@github.com:googleapis/googleapis.git
62
- $ cd googleapis
63
- $ git checkout --track -b input-contract origin/input-contract
64
-
65
- # Now you're ready to compile the API.
66
- $ protoc google/cloud/vision/v1/*.proto \
67
- --proto_path=../api-common-protos/ --proto_path=. \
68
- --ruby_gapic_out=/dest/
69
78
  ```
70
79
 
71
- ## Contributing
80
+ Now you're ready to compile the API. For example, to compile the Vision V1 API:
72
81
 
73
- Contributions to this library are always welcome and highly encouraged.
82
+ ```sh
83
+ $ grpc_tools_ruby_protoc google/cloud/vision/v1/*.proto \
84
+ --proto_path=googleapis/ \
85
+ --ruby_out=/path/to/dest/ \
86
+ --grpc_out=/path/to/dest/ \
87
+ --ruby_cloud_out=/path/to/dest/ \
88
+ ```
74
89
 
75
- See the [CONTRIBUTING](CONTRIBUTING.md) documentation for more information on how to get started.
90
+ Note: most real-world client libraries require additional options to be passed
91
+ to the generator, via the `--ruby_cloud_opt` flag. Those options are not
92
+ covered in this document.
76
93
 
77
- ## Versioning
94
+ ## Support
78
95
 
79
- This library is currently a **preview** with no guarantees of stability or support. Please get
80
- involved and let us know if you find it useful and we'll work towards a stable version.
96
+ This is not an official Google project. While it is being used internally to
97
+ generate official Google API client libraries, there is no guarantee of support
98
+ or stability for any other use.
81
99
 
82
- ## Disclaimer
100
+ As of January 2024, this generator can be run on Ruby 3.0 or later. In general,
101
+ we will make an effort to ensure it is supported on non-end-of-life versions of
102
+ Ruby.
83
103
 
84
- This is not an official Google product.
104
+ Issues can be filed on GitHub at
105
+ https://github.com/googleapis/gapic-generator-ruby/issues.
@@ -19,7 +19,7 @@ $LOAD_PATH.unshift ::File.expand_path("../lib", __dir__)
19
19
  $LOAD_PATH.unshift ::File.expand_path("../../gapic-generator/lib", __dir__)
20
20
 
21
21
  require "gapic/runner"
22
- require "google/protobuf/compiler/plugin.pb"
22
+ require "google/protobuf/compiler/plugin_pb"
23
23
 
24
24
  # Ensure that no encoding conversions are done on STDIN and STDOUT
25
25
  # since we are passing binary data back and forth. Otherwise these
@@ -32,4 +32,4 @@ request = Google::Protobuf::Compiler::CodeGeneratorRequest.decode STDIN.read
32
32
  # Run the request, specifying the cloud generator
33
33
  response = Gapic::Runner.run request, generator: :cloud
34
34
 
35
- STDOUT.print response.serialize
35
+ STDOUT.print Google::Protobuf::Compiler::CodeGeneratorResponse.encode response
@@ -18,7 +18,7 @@
18
18
  $LOAD_PATH.unshift ::File.expand_path("../lib", __dir__)
19
19
  gem "gapic-generator"
20
20
  require "gapic/runner"
21
- require "google/protobuf/compiler/plugin.pb"
21
+ require "google/protobuf/compiler/plugin_pb"
22
22
 
23
23
  # Ensure that no encoding conversions are done on STDIN and STDOUT
24
24
  # since we are passing binary data back and forth. Otherwise these
@@ -31,4 +31,4 @@ request = Google::Protobuf::Compiler::CodeGeneratorRequest.decode STDIN.read
31
31
  # Run the request, specifying the cloud generator
32
32
  response = Gapic::Runner.run request, generator: :cloud
33
33
 
34
- STDOUT.print response.serialize
34
+ STDOUT.print Google::Protobuf::Compiler::CodeGeneratorResponse.encode response
@@ -18,7 +18,7 @@
18
18
  module Gapic
19
19
  module Generator
20
20
  module Cloud
21
- VERSION = "0.11.0"
21
+ VERSION = "0.45.1"
22
22
  end
23
23
  end
24
24
  end
@@ -58,9 +58,9 @@ module Gapic
58
58
 
59
59
  # Additional Gem level files
60
60
  cloud_files = []
61
- cloud_files << g("gem/repo-metadata.erb", ".repo-metadata.json", gem: gem)
61
+ cloud_files << g("gem/repo-metadata", ".repo-metadata.json", gem: gem)
62
62
  unless gem.services.empty? || gem.generic_endpoint?
63
- cloud_files << g("gem/authentication.erb", "AUTHENTICATION.md", gem: gem)
63
+ cloud_files << g("gem/authentication", "AUTHENTICATION.md", gem: gem)
64
64
  end
65
65
 
66
66
  format_files cloud_files
@@ -82,23 +82,24 @@ module Gapic
82
82
 
83
83
  gem = Gapic::Presenters.wrapper_gem_presenter @api
84
84
 
85
- files << g("gem/gitignore.erb", ".gitignore", gem: gem)
86
- files << g("gem/repo-metadata.erb", ".repo-metadata.json", gem: gem)
87
- files << g("wrapper_gem/rubocop.erb", ".rubocop.yml", gem: gem)
88
- files << g("wrapper_gem/yardopts.erb", ".yardopts", gem: gem)
89
- files << g("gem/authentication.erb", "AUTHENTICATION.md", gem: gem) unless gem.generic_endpoint?
90
- files << g("gem/changelog.erb", "CHANGELOG.md", gem: gem)
91
- files << g("wrapper_gem/gemfile.erb", "Gemfile", gem: gem)
92
- files << g("gem/license.erb", "LICENSE.md", gem: gem)
93
- files << g("wrapper_gem/rakefile.erb", "Rakefile", gem: gem)
94
- files << g("wrapper_gem/readme.erb", "README.md", gem: gem)
95
- files << g("wrapper_gem/gemspec.erb", "#{gem.name}.gemspec", gem: gem)
96
- files << g("wrapper_gem/entrypoint.erb", "lib/#{gem.name}.rb", gem: gem) if gem.needs_entrypoint?
97
- files << g("wrapper_gem/main.erb", "lib/#{gem.namespace_file_path}", gem: gem)
98
- files << g("gem/version.erb", "lib/#{gem.version_file_path}", gem: gem)
99
- files << g("gem/test_helper.erb", "test/helper.rb", gem: gem)
100
- files << g("wrapper_gem/client_test.erb", "test/#{gem.namespace_require}/client_test.rb", gem: gem)
101
- files << g("wrapper_gem/version_test.erb", "test/#{gem.namespace_require}/version_test.rb", gem: gem)
85
+ files << g("gem/gitignore", ".gitignore", gem: gem)
86
+ files << g("gem/repo-metadata", ".repo-metadata.json", gem: gem)
87
+ files << g("wrapper_gem/rubocop", ".rubocop.yml", gem: gem)
88
+ files << g("gem/toys", ".toys.rb", gem: gem)
89
+ files << g("wrapper_gem/yardopts", ".yardopts", gem: gem)
90
+ files << g("gem/authentication", "AUTHENTICATION.md", gem: gem) unless gem.generic_endpoint?
91
+ files << g("gem/changelog", "CHANGELOG.md", gem: gem)
92
+ files << g("wrapper_gem/gemfile", "Gemfile", gem: gem)
93
+ files << g("gem/license", "LICENSE.md", gem: gem)
94
+ files << g("wrapper_gem/rakefile", "Rakefile", gem: gem)
95
+ files << g("wrapper_gem/readme", "README.md", gem: gem)
96
+ files << g("wrapper_gem/gemspec", "#{gem.name}.gemspec", gem: gem)
97
+ files << g("wrapper_gem/entrypoint", "lib/#{gem.name}.rb", gem: gem) if gem.needs_entrypoint?
98
+ files << g("wrapper_gem/main", "lib/#{gem.namespace_file_path}", gem: gem)
99
+ files << g("gem/version", "lib/#{gem.version_file_path}", gem: gem)
100
+ files << g("gem/test_helper", "test/helper.rb", gem: gem)
101
+ files << g("wrapper_gem/client_test", "test/#{gem.namespace_require}/client_test.rb", gem: gem)
102
+ files << g("wrapper_gem/version_test", "test/#{gem.namespace_require}/version_test.rb", gem: gem)
102
103
 
103
104
  format_files files
104
105
 
@@ -24,6 +24,8 @@ module Gapic
24
24
  "ruby-cloud-free-tier" => ":gem.:free_tier",
25
25
  "ruby-cloud-yard-strict" => ":gem.:yard_strict",
26
26
  "ruby-cloud-generic-endpoint" => ":gem.:generic_endpoint",
27
+ "ruby-cloud-is-cloud-product" => ":gem.:is_cloud_product",
28
+ "ruby-cloud-rest-numeric-enums" => ":gem.:rest_numeric_enums",
27
29
  "ruby-cloud-generate-metadata" => ":generate_metadata",
28
30
  "ruby-cloud-generate-standalone-snippets" => ":generate_standalone_snippets",
29
31
  "ruby-cloud-generate-yardoc-snippets" => ":generate_yardoc_snippets"
@@ -49,7 +51,8 @@ module Gapic
49
51
  "ruby-cloud-default-service-host" => ":defaults.:service.:default_host",
50
52
  "ruby-cloud-grpc-service-config" => "grpc_service_config",
51
53
  "ruby-cloud-service-yaml" => ":service_yaml",
52
- "ruby-cloud-wrapper-gem-override" => ":overrides.:wrapper_gem_name"
54
+ "ruby-cloud-wrapper-gem-override" => ":overrides.:wrapper_gem_name",
55
+ "ruby-cloud-snippet-configs-path" => ":snippet_configs_path"
53
56
  }.freeze
54
57
 
55
58
  ARRAY_PARAMETERS_ALIASES = {