gapic-common 1.0.0 → 1.2.0
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +18 -0
- data/lib/gapic/common/version.rb +1 -1
- data/lib/gapic/grpc/service_stub/rpc_call.rb +2 -2
- data/lib/gapic/logging_concerns.rb +4 -0
- data/lib/gapic/rest/client_stub.rb +2 -2
- data/lib/gapic/rest/http_binding_override_configuration.rb +48 -0
- data/lib/gapic/rest.rb +1 -0
- metadata +7 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ac5c845df865497acbdcb4656a47667dd657083d85ef964f633fc0540ef80493
|
4
|
+
data.tar.gz: 851ab12cf7a9e8d5e5f93c991846f0a4701a5a96047fef0ebb17392a55061984
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3225a82b3d2b7006fa0191c55e46e836724ec07d240d7fc5eb11188ccc5613572a714a012a5e904d85cc70d13bb816cd735faf0c3b458e54552e36f483f07f21
|
7
|
+
data.tar.gz: 7d4e26754019a71ae7bca52e2e195b71db46c755c6eca1cce34504990e31f2055d390119d9ae0bf81d1b217f7f1d3185200557da3c4d04b8aa251a3d87a13b54
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,23 @@
|
|
1
1
|
# Release History
|
2
2
|
|
3
|
+
### 1.2.0 (2025-09-04)
|
4
|
+
|
5
|
+
#### Features
|
6
|
+
|
7
|
+
* update google-protobuf dependency ([#41](https://github.com/googleapis/ruby-core-libraries/issues/41))
|
8
|
+
|
9
|
+
### 1.1.0 (2025-08-11)
|
10
|
+
|
11
|
+
#### Features
|
12
|
+
|
13
|
+
* add http binding configuration ([#38](https://github.com/googleapis/ruby-core-libraries/issues/38))
|
14
|
+
|
15
|
+
### 1.0.1 (2025-07-17)
|
16
|
+
|
17
|
+
#### Bug Fixes
|
18
|
+
|
19
|
+
* Removed log preprocessing of large payload data when logging is disabled ([#35](https://github.com/googleapis/ruby-core-libraries/issues/35))
|
20
|
+
|
3
21
|
### 1.0.0 (2025-04-30)
|
4
22
|
|
5
23
|
#### Features
|
data/lib/gapic/common/version.rb
CHANGED
@@ -183,7 +183,7 @@ module Gapic
|
|
183
183
|
end
|
184
184
|
|
185
185
|
def log_request request, metadata, try_number
|
186
|
-
return request unless @stub_logger
|
186
|
+
return request unless @stub_logger&.enabled?
|
187
187
|
@stub_logger.info do |entry|
|
188
188
|
entry.set_system_name
|
189
189
|
entry.set_service
|
@@ -221,7 +221,7 @@ module Gapic
|
|
221
221
|
end
|
222
222
|
|
223
223
|
def log_response response, try_number
|
224
|
-
return response unless @stub_logger
|
224
|
+
return response unless @stub_logger&.enabled?
|
225
225
|
@stub_logger.info do |entry|
|
226
226
|
entry.set_system_name
|
227
227
|
entry.set_service
|
@@ -278,7 +278,7 @@ module Gapic
|
|
278
278
|
end
|
279
279
|
|
280
280
|
def log_request method_name, request_id, try_number, body, metadata
|
281
|
-
return unless stub_logger
|
281
|
+
return unless stub_logger&.enabled?
|
282
282
|
stub_logger.info do |entry|
|
283
283
|
entry.set_system_name
|
284
284
|
entry.set_service
|
@@ -299,7 +299,7 @@ module Gapic
|
|
299
299
|
end
|
300
300
|
|
301
301
|
def log_response method_name, request_id, try_number, response, is_server_streaming
|
302
|
-
return unless stub_logger
|
302
|
+
return unless stub_logger&.enabled?
|
303
303
|
stub_logger.info do |entry|
|
304
304
|
entry.set_system_name
|
305
305
|
entry.set_service
|
@@ -0,0 +1,48 @@
|
|
1
|
+
# Copyright 2025 Google LLC
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
require "gapic/config"
|
16
|
+
|
17
|
+
module Gapic
|
18
|
+
module Rest
|
19
|
+
##
|
20
|
+
# @private
|
21
|
+
# A specialized Configuration class to use when generating
|
22
|
+
# package-level binding override configuration.
|
23
|
+
#
|
24
|
+
# This configuration is for internal use of the client library classes,
|
25
|
+
# and it is not intended that the end-users will read or change it.
|
26
|
+
#
|
27
|
+
# @attribute [rw] bindings_override
|
28
|
+
# Overrides for http bindings for the RPC of the mixins for the given package.
|
29
|
+
# return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
|
30
|
+
#
|
31
|
+
class HttpBindingOverrideConfiguration
|
32
|
+
extend ::Gapic::Config
|
33
|
+
|
34
|
+
# @private
|
35
|
+
# Overrides for http bindings for the RPC of the mixins for the given package.
|
36
|
+
# Services in the package should use these when creating clients for the mixin services.
|
37
|
+
# @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
|
38
|
+
config_attr :bindings_override, {}, ::Hash, nil
|
39
|
+
|
40
|
+
# @private
|
41
|
+
def initialize parent_config = nil
|
42
|
+
@parent_config = parent_config unless parent_config.nil?
|
43
|
+
|
44
|
+
yield self if block_given?
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
data/lib/gapic/rest.rb
CHANGED
@@ -25,6 +25,7 @@ require "gapic/rest/client_stub"
|
|
25
25
|
require "gapic/rest/error"
|
26
26
|
require "gapic/rest/faraday_middleware"
|
27
27
|
require "gapic/rest/grpc_transcoder"
|
28
|
+
require "gapic/rest/http_binding_override_configuration"
|
28
29
|
require "gapic/rest/operation"
|
29
30
|
require "gapic/rest/paged_enumerable"
|
30
31
|
require "gapic/rest/server_stream"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gapic-common
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google API Authors
|
@@ -123,22 +123,16 @@ dependencies:
|
|
123
123
|
name: google-protobuf
|
124
124
|
requirement: !ruby/object:Gem::Requirement
|
125
125
|
requirements:
|
126
|
-
- - "
|
127
|
-
- !ruby/object:Gem::Version
|
128
|
-
version: '3.25'
|
129
|
-
- - "<"
|
126
|
+
- - "~>"
|
130
127
|
- !ruby/object:Gem::Version
|
131
|
-
version:
|
128
|
+
version: '4.26'
|
132
129
|
type: :runtime
|
133
130
|
prerelease: false
|
134
131
|
version_requirements: !ruby/object:Gem::Requirement
|
135
132
|
requirements:
|
136
|
-
- - "
|
137
|
-
- !ruby/object:Gem::Version
|
138
|
-
version: '3.25'
|
139
|
-
- - "<"
|
133
|
+
- - "~>"
|
140
134
|
- !ruby/object:Gem::Version
|
141
|
-
version:
|
135
|
+
version: '4.26'
|
142
136
|
- !ruby/object:Gem::Dependency
|
143
137
|
name: grpc
|
144
138
|
requirement: !ruby/object:Gem::Requirement
|
@@ -200,6 +194,7 @@ files:
|
|
200
194
|
- lib/gapic/rest/faraday_middleware.rb
|
201
195
|
- lib/gapic/rest/grpc_transcoder.rb
|
202
196
|
- lib/gapic/rest/grpc_transcoder/http_binding.rb
|
197
|
+
- lib/gapic/rest/http_binding_override_configuration.rb
|
203
198
|
- lib/gapic/rest/operation.rb
|
204
199
|
- lib/gapic/rest/paged_enumerable.rb
|
205
200
|
- lib/gapic/rest/server_stream.rb
|
@@ -225,7 +220,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
225
220
|
- !ruby/object:Gem::Version
|
226
221
|
version: '0'
|
227
222
|
requirements: []
|
228
|
-
rubygems_version: 3.6.
|
223
|
+
rubygems_version: 3.6.9
|
229
224
|
specification_version: 4
|
230
225
|
summary: Common code for GAPIC-generated API clients
|
231
226
|
test_files: []
|