gapic-common 0.22.0 → 0.23.0

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: a6143272a78f1ebc1b6510a51e3c9c4f649b4095bf0ff97d9148cdaa50a7d508
4
- data.tar.gz: ac0b0d305c54b0db5a12efa4fd829076f807e1e33e8dcf81e329f78e6dfc73e7
3
+ metadata.gz: a2024379257fb476ddc9d24c767c78625a18e00ea07ddeabafa58130d1fa2185
4
+ data.tar.gz: cb1daa2c812ca07c9ba5dd8e4a8985b1f770538ef4051ef52ff2b9ce513d9527
5
5
  SHA512:
6
- metadata.gz: 7b5d9797b9a635235ab8804a1435c02f9e96214fc0b0d5f8c660a0f9d89d3d67f0fae9300ec489a38800a08c00e8297360b9e680bc3c3e72f42f0083e511981c
7
- data.tar.gz: 313c2bea43584fe99d48a38bacb816c56625e4cf1b704565e6b69beed3e9a509fe176a2f81c8ccebc684f1d8a083774a531c72524fba77fe9958f0dd66a8ca26
6
+ metadata.gz: aaf2ce7ebb30a22733a7e75124439d3bda7c07e06865f812f69881ff90206103325ed853c6853f70befbaa89c2de288f6ad1b642ff73ac72d59fe9917cc745a9
7
+ data.tar.gz: a4bf7f9d40eb38a5891701ffcb0d6779c72ca970908ad5fe3b3c312f091fd504c9ec865fdff01a81576e57a1b725197645e8a535351a17221a0e046508e8baca
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Release History
2
2
 
3
+ ### 0.23.0 (2024-10-15)
4
+
5
+ #### Features
6
+
7
+ * Disable universe domain check if credentials include an explicit request to do so ([#1119](https://github.com/googleapis/gapic-generator-ruby/issues/1119))
8
+
3
9
  ### 0.22.0 (2024-07-17)
4
10
 
5
11
  #### Features
@@ -14,6 +14,6 @@
14
14
 
15
15
  module Gapic
16
16
  module Common
17
- VERSION = "0.22.0".freeze
17
+ VERSION = "0.23.0".freeze
18
18
  end
19
19
  end
data/lib/gapic/headers.rb CHANGED
@@ -19,6 +19,8 @@ require "gapic/common/version"
19
19
  module Gapic
20
20
  # A collection of common header values.
21
21
  module Headers
22
+ # rubocop:disable Metrics/CyclomaticComplexity,Metrics/PerceivedComplexity
23
+
22
24
  ##
23
25
  # @param ruby_version [String] The ruby version. Defaults to `RUBY_VERSION`.
24
26
  # @param lib_name [String] The client library name.
@@ -32,6 +34,7 @@ module Gapic
32
34
  # `:grpc` to send the GRPC library version (if defined)
33
35
  # `:rest` to send the REST library version (if defined)
34
36
  # Defaults to `[:grpc]`
37
+ #
35
38
  def self.x_goog_api_client ruby_version: nil, lib_name: nil, lib_version: nil, gax_version: nil,
36
39
  gapic_version: nil, grpc_version: nil, rest_version: nil, protobuf_version: nil,
37
40
  transports_version_send: [:grpc]
@@ -52,4 +55,6 @@ module Gapic
52
55
  x_goog_api_client_header.join " ".freeze
53
56
  end
54
57
  end
58
+
59
+ # rubocop:enable Metrics/CyclomaticComplexity,Metrics/PerceivedComplexity
55
60
  end
@@ -60,11 +60,11 @@ module Gapic
60
60
  raise ArgumentError, "endpoint or endpoint_template is required" if endpoint.nil? && endpoint_template.nil?
61
61
  raise ArgumentError, "credentials is required" if credentials.nil?
62
62
 
63
- # TODO: The env logic should live in google-cloud-env
64
63
  universe_domain ||= ENV["GOOGLE_CLOUD_UNIVERSE_DOMAIN"] || "googleapis.com"
65
64
  endpoint ||= endpoint_template.sub ENDPOINT_SUBSTITUTION, universe_domain
66
65
 
67
- if credentials.respond_to?(:universe_domain) && credentials.universe_domain != universe_domain
66
+ if !(credentials.respond_to?(:disable_universe_domain_check) && credentials.disable_universe_domain_check) &&
67
+ credentials.respond_to?(:universe_domain) && credentials.universe_domain != universe_domain
68
68
  raise UniverseDomainMismatch,
69
69
  "Universe domain is #{universe_domain} but credentials are in #{credentials.universe_domain}"
70
70
  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.22.0
4
+ version: 0.23.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: 2024-07-22 00:00:00.000000000 Z
11
+ date: 2024-10-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -196,7 +196,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
196
196
  - !ruby/object:Gem::Version
197
197
  version: '0'
198
198
  requirements: []
199
- rubygems_version: 3.5.6
199
+ rubygems_version: 3.5.21
200
200
  signing_key:
201
201
  specification_version: 4
202
202
  summary: Common code for GAPIC-generated API clients