google-ads-googleads 3.0.0 → 3.0.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: acdbcc60bc0cc8bac0e6bde7ffccd079a9493eb5af1dad50d1f4ec03a8492b26
|
4
|
+
data.tar.gz: 776f9a06b923d43c267343ea008bf8354390bfb87e6185d1e1db88b8c4afac96
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b43368237848284c9cefb6e57d5abd6ee221217e0905b79fbfea68499766bec3f0798205f9eaef79bf453b3becc0effbaa6078e0ba6e5e31591413830c4043d1
|
7
|
+
data.tar.gz: 8a75307ecac6158de3042f705e1d4d9026b1b3d8ff2f87ab24dabe3f3933f343d031dc093da4425c7eb33a381f2e625f6ccd244227fb517f48e9b9d260f6e3b7
|
data/ChangeLog
CHANGED
@@ -39,6 +39,8 @@ module Google
|
|
39
39
|
attr_accessor :treat_deprecation_warnings_as_errors
|
40
40
|
attr_accessor :warn_on_all_deprecations
|
41
41
|
|
42
|
+
attr_accessor :use_insecure_channel
|
43
|
+
|
42
44
|
def initialize(&block)
|
43
45
|
@refresh_token = nil
|
44
46
|
@client_id = nil
|
@@ -58,6 +60,8 @@ module Google
|
|
58
60
|
@treat_deprecation_warnings_as_errors = false
|
59
61
|
@warn_on_all_deprecations = false
|
60
62
|
|
63
|
+
@use_insecure_channel = false
|
64
|
+
|
61
65
|
yield self if block_given?
|
62
66
|
end
|
63
67
|
|
@@ -155,9 +155,13 @@ module Google
|
|
155
155
|
MAX_METADATA_SIZE => 16*1024*1024,
|
156
156
|
}
|
157
157
|
|
158
|
-
|
159
|
-
|
160
|
-
|
158
|
+
if !@config.use_insecure_channel
|
159
|
+
call_creds = GRPC::Core::CallCredentials.new(get_credentials)
|
160
|
+
chan_creds = GRPC::Core::ChannelCredentials.new.compose(call_creds)
|
161
|
+
GRPC::Core::Channel.new(target, channel_args, chan_creds)
|
162
|
+
else
|
163
|
+
GRPC::Core::Channel.new(target, channel_args, :this_channel_is_insecure)
|
164
|
+
end
|
161
165
|
end
|
162
166
|
|
163
167
|
def patch_lro_headers(class_to_return, headers)
|
@@ -80,17 +80,20 @@ module Google
|
|
80
80
|
begin
|
81
81
|
gax_error.status_details.each do |detail|
|
82
82
|
# If there is an underlying GoogleAdsFailure, throw that one.
|
83
|
-
if detail.
|
84
|
-
|
83
|
+
if detail.class.name.start_with?("Google::Ads::GoogleAds") &&
|
84
|
+
detail.class.name.end_with?("GoogleAdsFailure")
|
85
85
|
raise Google::Ads::GoogleAds::Errors::GoogleAdsError.new(
|
86
|
-
detail
|
87
|
-
|
88
|
-
|
86
|
+
detail
|
87
|
+
)
|
88
|
+
elsif detail.is_a?(Google::Protobuf::Any)
|
89
89
|
type = Google::Protobuf::DescriptorPool.generated_pool.lookup(
|
90
|
-
|
90
|
+
detail.type_name
|
91
|
+
).msgclass
|
91
92
|
failure = detail.unpack(type)
|
93
|
+
|
92
94
|
raise Google::Ads::GoogleAds::Errors::GoogleAdsError.new(
|
93
|
-
|
95
|
+
failure
|
96
|
+
)
|
94
97
|
end
|
95
98
|
end
|
96
99
|
rescue Google::Ads::GoogleAds::Errors::GoogleAdsError
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-ads-googleads
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google Inc
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-08-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-gax
|