gapic-common 0.4.3 → 0.5.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 +4 -0
- data/lib/gapic/common/version.rb +1 -1
- data/lib/gapic/headers.rb +13 -3
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f181f3deefc2a5b42d783327db4c51a7e415cd7d5e58e16354ea2703cdb89293
|
|
4
|
+
data.tar.gz: 8aebd8ac22c5f770c551a69a82e5bfc74d5d72c13448e8d66d12a182d1ff77b0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1d8353989aaf3874d554ff160ee3d2504fa50f68a5627fb7bdb2b6b3f12941c3fb9ef677475ac0714fb7905750582ff3780ed7e6e976a890970e3ee12bdfa90b
|
|
7
|
+
data.tar.gz: 3c867837b3b3aaa608f0b456536cd6b091e865ef3f2e5e882662545b31d1f6da95853486ec5b1544493c16edf5b6634f0e69dc87bf7cff8244b61f5c16c05c60
|
data/CHANGELOG.md
CHANGED
data/lib/gapic/common/version.rb
CHANGED
data/lib/gapic/headers.rb
CHANGED
|
@@ -26,17 +26,27 @@ module Gapic
|
|
|
26
26
|
# @param gax_version [String] The Gapic version. Defaults to `Gapic::Common::VERSION`.
|
|
27
27
|
# @param gapic_version [String] The Gapic version.
|
|
28
28
|
# @param grpc_version [String] The GRPC version. Defaults to `GRPC::VERSION`.
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
# @param rest_version [String] The Rest Library (Faraday) version. Defaults to `Faraday::VERSION`.
|
|
30
|
+
# @param transports_version_send [Array] Which transports to send versions for.
|
|
31
|
+
# Allowed values to contain are:
|
|
32
|
+
# `:grpc` to send the GRPC library version (if defined)
|
|
33
|
+
# `:rest` to send the REST library version (if defined)
|
|
34
|
+
# Defaults to `[:grpc]`
|
|
35
|
+
def self.x_goog_api_client ruby_version: nil, lib_name: nil, lib_version: nil, gax_version: nil,
|
|
36
|
+
gapic_version: nil, grpc_version: nil, rest_version: nil,
|
|
37
|
+
transports_version_send: [:grpc]
|
|
38
|
+
|
|
31
39
|
ruby_version ||= ::RUBY_VERSION
|
|
32
40
|
gax_version ||= ::Gapic::Common::VERSION
|
|
33
41
|
grpc_version ||= ::GRPC::VERSION if defined? ::GRPC
|
|
42
|
+
rest_version ||= ::Faraday::VERSION if defined? ::Faraday
|
|
34
43
|
|
|
35
44
|
x_goog_api_client_header = ["gl-ruby/#{ruby_version}"]
|
|
36
45
|
x_goog_api_client_header << "#{lib_name}/#{lib_version}" if lib_name
|
|
37
46
|
x_goog_api_client_header << "gax/#{gax_version}"
|
|
38
47
|
x_goog_api_client_header << "gapic/#{gapic_version}" if gapic_version
|
|
39
|
-
x_goog_api_client_header << "grpc/#{grpc_version}" if grpc_version
|
|
48
|
+
x_goog_api_client_header << "grpc/#{grpc_version}" if grpc_version && transports_version_send.include?(:grpc)
|
|
49
|
+
x_goog_api_client_header << "rest/#{rest_version}" if rest_version && transports_version_send.include?(:rest)
|
|
40
50
|
x_goog_api_client_header.join " ".freeze
|
|
41
51
|
end
|
|
42
52
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: gapic-common
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.5.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Google API Authors
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-06-
|
|
11
|
+
date: 2021-06-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|