Skip to content

Commit

Permalink
fix: Update wrapper configs for universe_domain support (#1027)
Browse files Browse the repository at this point in the history
  • Loading branch information
dazuma authored Jan 11, 2024
1 parent 40ae10d commit 9d65b9e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion gapic-generator-cloud/templates/cloud/wrapper_gem/_main.erb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ require "google/cloud/config"

# Set the default configuration
::Google::Cloud.configure.add_config! :<%= gem.google_cloud_short_name %> do |config|
config.add_field! :endpoint, <%= gem.services.first&.client_endpoint.inspect %>, match: ::String
config.add_field! :endpoint, nil, match: ::String
config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials]
config.add_field! :scope, nil, match: [::Array, ::String]
config.add_field! :lib_name, nil, match: ::String
Expand All @@ -26,6 +26,7 @@ require "google/cloud/config"
config.add_field! :metadata, nil, match: ::Hash
config.add_field! :retry_policy, nil, match: [::Hash, ::Proc]
config.add_field! :quota_project, nil, match: ::String
config.add_field! :universe_domain, nil, match: ::String
end
<%- end -%>
<% end %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

# Set the default configuration
::Google::Cloud.configure.add_config! :compute do |config|
config.add_field! :endpoint, "compute.googleapis.com", match: ::String
config.add_field! :endpoint, nil, match: ::String
config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials]
config.add_field! :scope, nil, match: [::Array, ::String]
config.add_field! :lib_name, nil, match: ::String
Expand All @@ -38,6 +38,7 @@
config.add_field! :metadata, nil, match: ::Hash
config.add_field! :retry_policy, nil, match: [::Hash, ::Proc]
config.add_field! :quota_project, nil, match: ::String
config.add_field! :universe_domain, nil, match: ::String
end

module Google
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

# Set the default configuration
::Google::Cloud.configure.add_config! :language do |config|
config.add_field! :endpoint, "language.googleapis.com", match: ::String
config.add_field! :endpoint, nil, match: ::String
config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials]
config.add_field! :scope, nil, match: [::Array, ::String]
config.add_field! :lib_name, nil, match: ::String
Expand All @@ -39,6 +39,7 @@
config.add_field! :metadata, nil, match: ::Hash
config.add_field! :retry_policy, nil, match: [::Hash, ::Proc]
config.add_field! :quota_project, nil, match: ::String
config.add_field! :universe_domain, nil, match: ::String
end

module Google
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

# Set the default configuration
::Google::Cloud.configure.add_config! :secret_manager do |config|
config.add_field! :endpoint, "secretmanager.googleapis.com", match: ::String
config.add_field! :endpoint, nil, match: ::String
config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials]
config.add_field! :scope, nil, match: [::Array, ::String]
config.add_field! :lib_name, nil, match: ::String
Expand All @@ -39,6 +39,7 @@
config.add_field! :metadata, nil, match: ::Hash
config.add_field! :retry_policy, nil, match: [::Hash, ::Proc]
config.add_field! :quota_project, nil, match: ::String
config.add_field! :universe_domain, nil, match: ::String
end

module Google
Expand Down

0 comments on commit 9d65b9e

Please sign in to comment.