gapic-generator-cloud 0.6.10 → 0.6.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9adb0645be11ef3c975f469ae2be9befdfce7cfcbf86d557d538308d4d99766e
4
- data.tar.gz: 12ba32f9420109e109d0f90cfb6d4660f2704012df6497a17496bf81fb68e01d
3
+ metadata.gz: 2957bcfef6da89ca64200f8299f0f84767da2fa04830230dd9d2a27d43ecf2a5
4
+ data.tar.gz: 2d591da86b144ce9817d3a75d90084ea1b8d6b33e79e61ee3c90bffa3c3b412b
5
5
  SHA512:
6
- metadata.gz: 0a40867091f35b0cde5fdffb5e61a4a40908652183c5b551b2f3e8fcf30d3073ce774f274740ecf8a41db1a2e4f21d260cf18593c8feddacaf0e419821fa2704
7
- data.tar.gz: 4664240334180131efa2d59b15114a83c2b4bb13b80ba7113fe2d3b522419f873b96e2e5b2f90e2d2acb73484c50fe4e964f1536caa29a41b82c2cd338edcf44
6
+ metadata.gz: 991ec0c1d722ff6a851ad908a2f003dddaeb1abfa0e035b939e293fa0914fcf1fd73444b8f86e1afa3cc74672f4780da91383e110a4787dbbecca94474b2bb9c
7
+ data.tar.gz: 22d52a0982fd15315f009fe2fac863c00985669cad9b5426e70a3a9e25e86927bc76f3f3ffe9da970eebcc42e1c22baf4028cb69e9a296f473aadaf422a4fb49
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Release History for gapic-generator-cloud
2
2
 
3
+ ### 0.6.11 / 2021-02-01
4
+
5
+ * Includes changes from gapic-generator 0.6.11.
6
+ * Updated generated readmes to cover main vs versioned clients.
7
+
3
8
  ### 0.6.10 / 2021-01-13
4
9
 
5
10
  * Includes changes from gapic-generator 0.6.10.
@@ -18,7 +18,7 @@
18
18
  module Gapic
19
19
  module Generator
20
20
  module Cloud
21
- VERSION = "0.6.10"
21
+ VERSION = "0.6.11"
22
22
  end
23
23
  end
24
24
  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\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|
@@ -2,10 +2,18 @@
2
2
 
3
3
  <%= gem.summary %>
4
4
 
5
- <%= gem.description %>
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 -%>
@@ -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 a convenience wrapper library that brings the
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.
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.10
4
+ version: 0.6.11
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: 2021-01-14 00:00:00.000000000 Z
13
+ date: 2021-02-01 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.10
35
+ version: 0.6.11
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.10
42
+ version: 0.6.11
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: google-style
45
45
  requirement: !ruby/object:Gem::Requirement
@@ -207,7 +207,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
207
207
  - !ruby/object:Gem::Version
208
208
  version: '0'
209
209
  requirements: []
210
- rubygems_version: 3.1.2
210
+ rubygems_version: 3.1.4
211
211
  signing_key:
212
212
  specification_version: 4
213
213
  summary: An API Client Generator for Ruby in Ruby!