lib/google/cloud/talent/v4beta1/job_service/client.rb in google-cloud-talent-v4beta1-0.8.0 vs lib/google/cloud/talent/v4beta1/job_service/client.rb in google-cloud-talent-v4beta1-0.8.1
- old
+ new
@@ -150,11 +150,11 @@
# Create credentials
credentials = @config.credentials
# Use self-signed JWT if the endpoint is unchanged from default,
# but only if the default endpoint does not have a region prefix.
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
!@config.endpoint.split(".").first.include?("-")
credentials ||= Credentials.default scope: @config.scope,
enable_self_signed_jwt: enable_self_signed_jwt
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
credentials = Credentials.new credentials, scope: @config.scope
@@ -1839,10 +1839,12 @@
# @return [::String]
#
class Configuration
extend ::Gapic::Config
- config_attr :endpoint, "jobs.googleapis.com", ::String
+ DEFAULT_ENDPOINT = "jobs.googleapis.com"
+
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
config_attr :credentials, nil do |value|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
allowed.any? { |klass| klass === value }
end