Skip to content

Commit 50f4524

Browse files
feat: bless "::Google::Auth::BaseClient" as an allowed by default credentials type in Config (#1169)
1 parent aea0e9d commit 50f4524

File tree

70 files changed

+114
-79
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+114
-79
lines changed

gapic-generator/templates/default/service/client/_config.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ class Configuration
107107

108108
config_attr :endpoint, nil, ::String, nil
109109
config_attr :credentials, nil do |value|
110-
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
110+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
111111
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel
112112
allowed.any? { |klass| klass === value }
113113
end

gapic-generator/templates/default/service/rest/client/_config.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ class Configuration
9898

9999
config_attr :endpoint, nil, ::String, nil
100100
config_attr :credentials, nil do |value|
101-
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
101+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
102102
allowed.any? { |klass| klass === value }
103103
end
104104
config_attr :scope, nil, ::String, ::Array, nil

shared/output/ads/googleads/lib/google/ads/google_ads/v15/services/campaign_service/client.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -418,8 +418,8 @@ class Configuration
418418

419419
config_attr :endpoint, nil, ::String, nil
420420
config_attr :credentials, nil do |value|
421-
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client,
422-
nil]
421+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials,
422+
::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
423423
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel
424424
allowed.any? { |klass| klass === value }
425425
end

shared/output/cloud/compute_small/lib/google/cloud/compute/v1/addresses/rest/client.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -767,7 +767,7 @@ class Configuration
767767

768768
config_attr :endpoint, nil, ::String, nil
769769
config_attr :credentials, nil do |value|
770-
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
770+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
771771
allowed.any? { |klass| klass === value }
772772
end
773773
config_attr :scope, nil, ::String, ::Array, nil

shared/output/cloud/compute_small/lib/google/cloud/compute/v1/global_operations/rest/client.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ class Configuration
430430

431431
config_attr :endpoint, nil, ::String, nil
432432
config_attr :credentials, nil do |value|
433-
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
433+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
434434
allowed.any? { |klass| klass === value }
435435
end
436436
config_attr :scope, nil, ::String, ::Array, nil

shared/output/cloud/compute_small/lib/google/cloud/compute/v1/networks/rest/client.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ class Configuration
490490

491491
config_attr :endpoint, nil, ::String, nil
492492
config_attr :credentials, nil do |value|
493-
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
493+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
494494
allowed.any? { |klass| klass === value }
495495
end
496496
config_attr :scope, nil, ::String, ::Array, nil

shared/output/cloud/compute_small/lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ class Configuration
389389

390390
config_attr :endpoint, nil, ::String, nil
391391
config_attr :credentials, nil do |value|
392-
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
392+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
393393
allowed.any? { |klass| klass === value }
394394
end
395395
config_attr :scope, nil, ::String, ::Array, nil

shared/output/cloud/compute_small/lib/google/cloud/compute/v1/region_operations/rest/client.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -622,7 +622,7 @@ class Configuration
622622

623623
config_attr :endpoint, nil, ::String, nil
624624
config_attr :credentials, nil do |value|
625-
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
625+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
626626
allowed.any? { |klass| klass === value }
627627
end
628628
config_attr :scope, nil, ::String, ::Array, nil

shared/output/cloud/grafeas_v1/lib/grafeas/v1/grafeas/client.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1554,7 +1554,7 @@ class Configuration
15541554

15551555
config_attr :endpoint, nil, ::String, nil
15561556
config_attr :credentials, nil do |value|
1557-
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1557+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
15581558
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel
15591559
allowed.any? { |klass| klass === value }
15601560
end

shared/output/cloud/language_v1/lib/google/cloud/language/v1/language_service/client.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1349,7 +1349,7 @@ class Configuration
13491349

13501350
config_attr :endpoint, nil, ::String, nil
13511351
config_attr :credentials, nil do |value|
1352-
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1352+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
13531353
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel
13541354
allowed.any? { |klass| klass === value }
13551355
end

0 commit comments

Comments
 (0)