google-cloud-debugger 0.32.1 → 0.32.2

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: 9b7ed1274bf5cea538b50035f9ce20d8dd442229cf891ab55feaac18af6e5bf0
4
- data.tar.gz: a635a7b21556d84b9b1f4ce3809e0d6b4465ebb7a7d8371d38c62bb51479c800
3
+ metadata.gz: c284cd24cb8878c64aa43c984273d0e898fabe94611fd832a29df638ff3ce331
4
+ data.tar.gz: aeac4adb53d4421316d7b2b9bb46e23b7c37227c4fe0c08461115fff73316d15
5
5
  SHA512:
6
- metadata.gz: df72382f398676edfc3703ac5294b21f1db461f8e80d104d9afe63cfa86aea1b686e94f5b9e9f8aaa14f826a0719c96d2618d6cc65560f56370d04cf9220c827
7
- data.tar.gz: ab85c6aa805fb1b884b49a887ad3f2ffa3ed2ed7666cdff9e997de886e8b1a06e52dc4dcbee8c808e21bb8acf62c6f83f253835b327841c283bd9e6d72247dcd
6
+ metadata.gz: 330dddc3afa46c30eaab89bb51020588842105921a0d8a742b26b3c60b863382c69ace755087a2e334b6998090a91df0017d94af29c5f05159f2354cad027208
7
+ data.tar.gz: 96778f50ba64a4ac516180870534944fd30b217a721047d6415b9adb7583ad18bd3a195a36dc6221e63e5990fa085705022bb9cf2c8309d0932fc7e2193c420b
data/.yardopts CHANGED
@@ -1,7 +1,8 @@
1
1
  --no-private
2
2
  --title=Stackdriver Debugger
3
- --exclude lib/google/devtools
3
+ --exclude _pb\.rb$
4
4
  --markup markdown
5
+ --markup-provider redcarpet
5
6
 
6
7
  ./lib/**/*.rb
7
8
  -
data/README.md CHANGED
@@ -246,14 +246,14 @@ end
246
246
 
247
247
  ## Supported Ruby Versions
248
248
 
249
- This library is supported on Ruby 2.2 or later.
250
-
251
- However, Ruby 2.3 or later is strongly recommended, as earlier releases have
252
- reached or are nearing end-of-life. After June 1, 2018, Google will provide
253
- official support only for Ruby versions that are considered current and
254
- supported by Ruby Core (that is, Ruby versions that are either in normal
255
- maintenance or in security maintenance).
256
- See https://www.ruby-lang.org/en/downloads/branches/ for further details.
249
+ This library is supported on Ruby 2.3+.
250
+
251
+ Google provides official support for Ruby versions that are actively supported
252
+ by Ruby Core—that is, Ruby versions that are either in normal maintenance or
253
+ in security maintenance, and not end of life. Currently, this means Ruby 2.3
254
+ and later. Older versions of Ruby _may_ still work, but are unsupported and not
255
+ recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details
256
+ about the Ruby support schedule.
257
257
 
258
258
  This library follows [Semantic Versioning](http://semver.org/). It is currently
259
259
  in major version zero (0.y.z), which means that anything may change at any time
@@ -13,7 +13,7 @@
13
13
  # limitations under the License.
14
14
 
15
15
 
16
- require "googleauth"
16
+ require "google/cloud/debugger/v2/credentials"
17
17
  require "google/cloud/logging/credentials"
18
18
 
19
19
  module Google
@@ -38,21 +38,9 @@ module Google
38
38
  #
39
39
  # debugger.project_id #=> "my-project"
40
40
  #
41
- class Credentials < Google::Auth::Credentials
42
- SCOPE = (["https://www.googleapis.com/auth/cloud_debugger"] +
43
- Google::Cloud::Logging::Credentials::SCOPE).freeze
44
- PATH_ENV_VARS = %w[DEBUGGER_CREDENTIALS
45
- GOOGLE_CLOUD_CREDENTIALS
46
- DEBUGGER_KEYFILE
47
- GOOGLE_CLOUD_KEYFILE
48
- GCLOUD_KEYFILE].freeze
49
- JSON_ENV_VARS = %w[DEBUGGER_CREDENTIALS_JSON
50
- GOOGLE_CLOUD_CREDENTIALS_JSON
51
- DEBUGGER_KEYFILE_JSON
52
- GOOGLE_CLOUD_KEYFILE_JSON
53
- GCLOUD_KEYFILE_JSON].freeze
54
- DEFAULT_PATHS = \
55
- ["~/.config/gcloud/application_default_credentials.json"].freeze
41
+ class Credentials < Google::Cloud::Debugger::V2::Credentials
42
+ SCOPE = (Google::Cloud::Debugger::V2::Credentials::SCOPE +
43
+ Google::Cloud::Logging::Credentials::SCOPE).uniq.freeze
56
44
  end
57
45
  end
58
46
  end
@@ -1,4 +1,4 @@
1
- # Copyright 2017 Google LLC
1
+ # Copyright 2018 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -17,34 +17,60 @@ require "google/cloud/debugger/v2/controller2_client"
17
17
 
18
18
  module Google
19
19
  module Cloud
20
- # rubocop:disable LineLength
21
-
22
- ##
23
- # # Ruby Client for Stackdriver Debugger API ([Alpha](https://github.com/GoogleCloudPlatform/google-cloud-ruby#versioning))
24
- #
25
- # [Stackdriver Debugger API][Product Documentation]:
26
- # Examines the call stack and variables of a running application
27
- # without stopping or slowing it down.
28
- # - [Product Documentation][]
29
- #
30
- # ## Quick Start
31
- # In order to use this library, you first need to go through the following
32
- # steps:
33
- #
34
- # 1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
35
- # 2. [Enable the Stackdriver Debugger API.](https://console.cloud.google.com/apis/api/debugger)
36
- # 3. [Setup Authentication.](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud/master/guides/authentication)
37
- #
38
- # ### Next Steps
39
- # - Read the [Stackdriver Debugger API Product documentation][Product Documentation]
40
- # to learn more about the product and see How-to Guides.
41
- # - View this [repository's main README](https://github.com/GoogleCloudPlatform/google-cloud-ruby/blob/master/README.md)
42
- # to see the full list of Cloud APIs that we cover.
43
- #
44
- # [Product Documentation]: https://cloud.google.com/debugger
45
- #
46
- #
47
20
  module Debugger
21
+ # rubocop:disable LineLength
22
+
23
+ ##
24
+ # # Ruby Client for Stackdriver Debugger API ([Alpha](https://github.com/GoogleCloudPlatform/google-cloud-ruby#versioning))
25
+ #
26
+ # [Stackdriver Debugger API][Product Documentation]:
27
+ # Examines the call stack and variables of a running application
28
+ # without stopping or slowing it down.
29
+ # - [Product Documentation][]
30
+ #
31
+ # ## Quick Start
32
+ # In order to use this library, you first need to go through the following
33
+ # steps:
34
+ #
35
+ # 1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
36
+ # 2. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
37
+ # 3. [Enable the Stackdriver Debugger API.](https://console.cloud.google.com/apis/library/clouddebugger.googleapis.com)
38
+ # 4. [Setup Authentication.](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud/master/guides/authentication)
39
+ #
40
+ # ### Next Steps
41
+ # - Read the [Stackdriver Debugger API Product documentation][Product Documentation]
42
+ # to learn more about the product and see How-to Guides.
43
+ # - View this [repository's main README](https://github.com/GoogleCloudPlatform/google-cloud-ruby/blob/master/README.md)
44
+ # to see the full list of Cloud APIs that we cover.
45
+ #
46
+ # [Product Documentation]: https://cloud.google.com/debugger
47
+ #
48
+ # ## Enabling Logging
49
+ #
50
+ # To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
51
+ # The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib-2.5.0/libdoc/logger/rdoc/Logger.html) as shown below,
52
+ # or a [`Google::Cloud::Logging::Logger`](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-logging/latest/google/cloud/logging/logger)
53
+ # that will write logs to [Stackdriver Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
54
+ # and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
55
+ #
56
+ # Configuring a Ruby stdlib logger:
57
+ #
58
+ # ```ruby
59
+ # require "logger"
60
+ #
61
+ # module MyLogger
62
+ # LOGGER = Logger.new $stderr, level: Logger::WARN
63
+ # def logger
64
+ # LOGGER
65
+ # end
66
+ # end
67
+ #
68
+ # # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
69
+ # module GRPC
70
+ # extend MyLogger
71
+ # end
72
+ # ```
73
+ #
48
74
  module V2
49
75
  # rubocop:enable LineLength
50
76
 
@@ -87,28 +113,27 @@ module Google
87
113
  # or the specified config is missing data points.
88
114
  # @param timeout [Numeric]
89
115
  # The default timeout, in seconds, for calls made through this client.
116
+ # @param metadata [Hash]
117
+ # Default metadata to be sent with each request. This can be overridden on a per call basis.
118
+ # @param exception_transformer [Proc]
119
+ # An optional proc that intercepts any exceptions raised during an API call to inject
120
+ # custom error handling.
90
121
  def self.new \
91
- service_path: nil,
92
- port: nil,
93
- channel: nil,
94
- chan_creds: nil,
95
- updater_proc: nil,
96
122
  credentials: nil,
97
123
  scopes: nil,
98
124
  client_config: nil,
99
125
  timeout: nil,
126
+ metadata: nil,
127
+ exception_transformer: nil,
100
128
  lib_name: nil,
101
129
  lib_version: nil
102
130
  kwargs = {
103
- service_path: service_path,
104
- port: port,
105
- channel: channel,
106
- chan_creds: chan_creds,
107
- updater_proc: updater_proc,
108
131
  credentials: credentials,
109
132
  scopes: scopes,
110
133
  client_config: client_config,
111
134
  timeout: timeout,
135
+ metadata: metadata,
136
+ exception_transformer: exception_transformer,
112
137
  lib_name: lib_name,
113
138
  lib_version: lib_version
114
139
  }.select { |_, v| v != nil }
@@ -163,28 +188,27 @@ module Google
163
188
  # or the specified config is missing data points.
164
189
  # @param timeout [Numeric]
165
190
  # The default timeout, in seconds, for calls made through this client.
191
+ # @param metadata [Hash]
192
+ # Default metadata to be sent with each request. This can be overridden on a per call basis.
193
+ # @param exception_transformer [Proc]
194
+ # An optional proc that intercepts any exceptions raised during an API call to inject
195
+ # custom error handling.
166
196
  def self.new \
167
- service_path: nil,
168
- port: nil,
169
- channel: nil,
170
- chan_creds: nil,
171
- updater_proc: nil,
172
197
  credentials: nil,
173
198
  scopes: nil,
174
199
  client_config: nil,
175
200
  timeout: nil,
201
+ metadata: nil,
202
+ exception_transformer: nil,
176
203
  lib_name: nil,
177
204
  lib_version: nil
178
205
  kwargs = {
179
- service_path: service_path,
180
- port: port,
181
- channel: channel,
182
- chan_creds: chan_creds,
183
- updater_proc: updater_proc,
184
206
  credentials: credentials,
185
207
  scopes: scopes,
186
208
  client_config: client_config,
187
209
  timeout: timeout,
210
+ metadata: metadata,
211
+ exception_transformer: exception_transformer,
188
212
  lib_name: lib_name,
189
213
  lib_version: lib_version
190
214
  }.select { |_, v| v != nil }
@@ -1,4 +1,4 @@
1
- # Copyright 2017 Google LLC
1
+ # Copyright 2018 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -18,9 +18,6 @@
18
18
  # and updates to that file get reflected here through a refresh process.
19
19
  # For the short term, the refresh process will only be runnable by Google
20
20
  # engineers.
21
- #
22
- # The only allowed edits are to method and file documentation. A 3-way
23
- # merge preserves those additions if the generated source changes.
24
21
 
25
22
  require "json"
26
23
  require "pathname"
@@ -28,7 +25,7 @@ require "pathname"
28
25
  require "google/gax"
29
26
 
30
27
  require "google/devtools/clouddebugger/v2/controller_pb"
31
- require "google/cloud/debugger/credentials"
28
+ require "google/cloud/debugger/v2/credentials"
32
29
 
33
30
  module Google
34
31
  module Cloud
@@ -66,6 +63,9 @@ module Google
66
63
  # The default port of the service.
67
64
  DEFAULT_SERVICE_PORT = 443
68
65
 
66
+ # The default set of gRPC interceptors.
67
+ GRPC_INTERCEPTORS = []
68
+
69
69
  DEFAULT_TIMEOUT = 30
70
70
 
71
71
  # The scopes needed to make gRPC calls to all of the methods defined in
@@ -75,6 +75,7 @@ module Google
75
75
  "https://www.googleapis.com/auth/cloud_debugger"
76
76
  ].freeze
77
77
 
78
+
78
79
  # @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
79
80
  # Provides the means for authenticating requests made by the client. This parameter can
80
81
  # be many types.
@@ -99,16 +100,18 @@ module Google
99
100
  # or the specified config is missing data points.
100
101
  # @param timeout [Numeric]
101
102
  # The default timeout, in seconds, for calls made through this client.
103
+ # @param metadata [Hash]
104
+ # Default metadata to be sent with each request. This can be overridden on a per call basis.
105
+ # @param exception_transformer [Proc]
106
+ # An optional proc that intercepts any exceptions raised during an API call to inject
107
+ # custom error handling.
102
108
  def initialize \
103
- service_path: SERVICE_ADDRESS,
104
- port: DEFAULT_SERVICE_PORT,
105
- channel: nil,
106
- chan_creds: nil,
107
- updater_proc: nil,
108
109
  credentials: nil,
109
110
  scopes: ALL_SCOPES,
110
111
  client_config: {},
111
112
  timeout: DEFAULT_TIMEOUT,
113
+ metadata: nil,
114
+ exception_transformer: nil,
112
115
  lib_name: nil,
113
116
  lib_version: ""
114
117
  # These require statements are intentionally placed here to initialize
@@ -117,21 +120,10 @@ module Google
117
120
  require "google/gax/grpc"
118
121
  require "google/devtools/clouddebugger/v2/controller_services_pb"
119
122
 
120
- if channel || chan_creds || updater_proc
121
- warn "The `channel`, `chan_creds`, and `updater_proc` parameters will be removed " \
122
- "on 2017/09/08"
123
- credentials ||= channel
124
- credentials ||= chan_creds
125
- credentials ||= updater_proc
126
- end
127
- if service_path != SERVICE_ADDRESS || port != DEFAULT_SERVICE_PORT
128
- warn "`service_path` and `port` parameters are deprecated and will be removed"
129
- end
130
-
131
- credentials ||= Google::Cloud::Debugger::Credentials.default
123
+ credentials ||= Google::Cloud::Debugger::V2::Credentials.default
132
124
 
133
125
  if credentials.is_a?(String) || credentials.is_a?(Hash)
134
- updater_proc = Google::Cloud::Debugger::Credentials.new(credentials).updater_proc
126
+ updater_proc = Google::Cloud::Debugger::V2::Credentials.new(credentials).updater_proc
135
127
  end
136
128
  if credentials.is_a?(GRPC::Core::Channel)
137
129
  channel = credentials
@@ -146,13 +138,16 @@ module Google
146
138
  updater_proc = credentials.updater_proc
147
139
  end
148
140
 
141
+ package_version = Gem.loaded_specs['google-cloud-debugger'].version.version
142
+
149
143
  google_api_client = "gl-ruby/#{RUBY_VERSION}"
150
144
  google_api_client << " #{lib_name}/#{lib_version}" if lib_name
151
- google_api_client << " gapic/0.1.0 gax/#{Google::Gax::VERSION}"
145
+ google_api_client << " gapic/#{package_version} gax/#{Google::Gax::VERSION}"
152
146
  google_api_client << " grpc/#{GRPC::VERSION}"
153
147
  google_api_client.freeze
154
148
 
155
149
  headers = { :"x-goog-api-client" => google_api_client }
150
+ headers.merge!(metadata) unless metadata.nil?
156
151
  client_config_file = Pathname.new(__dir__).join(
157
152
  "controller2_client_config.json"
158
153
  )
@@ -164,9 +159,14 @@ module Google
164
159
  Google::Gax::Grpc::STATUS_CODE_NAMES,
165
160
  timeout,
166
161
  errors: Google::Gax::Grpc::API_ERRORS,
167
- kwargs: headers
162
+ metadata: headers
168
163
  )
169
164
  end
165
+
166
+ # Allow overriding the service path/port in subclasses.
167
+ service_path = self.class::SERVICE_ADDRESS
168
+ port = self.class::DEFAULT_SERVICE_PORT
169
+ interceptors = self.class::GRPC_INTERCEPTORS
170
170
  @controller2_stub = Google::Gax::Grpc.create_stub(
171
171
  service_path,
172
172
  port,
@@ -174,20 +174,24 @@ module Google
174
174
  channel: channel,
175
175
  updater_proc: updater_proc,
176
176
  scopes: scopes,
177
+ interceptors: interceptors,
177
178
  &Google::Devtools::Clouddebugger::V2::Controller2::Stub.method(:new)
178
179
  )
179
180
 
180
181
  @register_debuggee = Google::Gax.create_api_call(
181
182
  @controller2_stub.method(:register_debuggee),
182
- defaults["register_debuggee"]
183
+ defaults["register_debuggee"],
184
+ exception_transformer: exception_transformer
183
185
  )
184
186
  @list_active_breakpoints = Google::Gax.create_api_call(
185
187
  @controller2_stub.method(:list_active_breakpoints),
186
- defaults["list_active_breakpoints"]
188
+ defaults["list_active_breakpoints"],
189
+ exception_transformer: exception_transformer
187
190
  )
188
191
  @update_active_breakpoint = Google::Gax.create_api_call(
189
192
  @controller2_stub.method(:update_active_breakpoint),
190
- defaults["update_active_breakpoint"]
193
+ defaults["update_active_breakpoint"],
194
+ exception_transformer: exception_transformer
191
195
  )
192
196
  end
193
197
 
@@ -213,23 +217,29 @@ module Google
213
217
  # @param options [Google::Gax::CallOptions]
214
218
  # Overrides the default settings for this call, e.g, timeout,
215
219
  # retries, etc.
220
+ # @yield [result, operation] Access the result along with the RPC operation
221
+ # @yieldparam result [Google::Devtools::Clouddebugger::V2::RegisterDebuggeeResponse]
222
+ # @yieldparam operation [GRPC::ActiveCall::Operation]
216
223
  # @return [Google::Devtools::Clouddebugger::V2::RegisterDebuggeeResponse]
217
224
  # @raise [Google::Gax::GaxError] if the RPC is aborted.
218
225
  # @example
219
226
  # require "google/cloud/debugger/v2"
220
227
  #
221
228
  # controller2_client = Google::Cloud::Debugger::V2::Controller2.new
229
+ #
230
+ # # TODO: Initialize +debuggee+:
222
231
  # debuggee = {}
223
232
  # response = controller2_client.register_debuggee(debuggee)
224
233
 
225
234
  def register_debuggee \
226
235
  debuggee,
227
- options: nil
236
+ options: nil,
237
+ &block
228
238
  req = {
229
239
  debuggee: debuggee
230
240
  }.delete_if { |_, v| v.nil? }
231
241
  req = Google::Gax::to_proto(req, Google::Devtools::Clouddebugger::V2::RegisterDebuggeeRequest)
232
- @register_debuggee.call(req, options)
242
+ @register_debuggee.call(req, options, &block)
233
243
  end
234
244
 
235
245
  # Returns the list of all active breakpoints for the debuggee.
@@ -263,12 +273,17 @@ module Google
263
273
  # @param options [Google::Gax::CallOptions]
264
274
  # Overrides the default settings for this call, e.g, timeout,
265
275
  # retries, etc.
276
+ # @yield [result, operation] Access the result along with the RPC operation
277
+ # @yieldparam result [Google::Devtools::Clouddebugger::V2::ListActiveBreakpointsResponse]
278
+ # @yieldparam operation [GRPC::ActiveCall::Operation]
266
279
  # @return [Google::Devtools::Clouddebugger::V2::ListActiveBreakpointsResponse]
267
280
  # @raise [Google::Gax::GaxError] if the RPC is aborted.
268
281
  # @example
269
282
  # require "google/cloud/debugger/v2"
270
283
  #
271
284
  # controller2_client = Google::Cloud::Debugger::V2::Controller2.new
285
+ #
286
+ # # TODO: Initialize +debuggee_id+:
272
287
  # debuggee_id = ''
273
288
  # response = controller2_client.list_active_breakpoints(debuggee_id)
274
289
 
@@ -276,14 +291,15 @@ module Google
276
291
  debuggee_id,
277
292
  wait_token: nil,
278
293
  success_on_timeout: nil,
279
- options: nil
294
+ options: nil,
295
+ &block
280
296
  req = {
281
297
  debuggee_id: debuggee_id,
282
298
  wait_token: wait_token,
283
299
  success_on_timeout: success_on_timeout
284
300
  }.delete_if { |_, v| v.nil? }
285
301
  req = Google::Gax::to_proto(req, Google::Devtools::Clouddebugger::V2::ListActiveBreakpointsRequest)
286
- @list_active_breakpoints.call(req, options)
302
+ @list_active_breakpoints.call(req, options, &block)
287
303
  end
288
304
 
289
305
  # Updates the breakpoint state or mutable fields.
@@ -306,26 +322,34 @@ module Google
306
322
  # @param options [Google::Gax::CallOptions]
307
323
  # Overrides the default settings for this call, e.g, timeout,
308
324
  # retries, etc.
325
+ # @yield [result, operation] Access the result along with the RPC operation
326
+ # @yieldparam result [Google::Devtools::Clouddebugger::V2::UpdateActiveBreakpointResponse]
327
+ # @yieldparam operation [GRPC::ActiveCall::Operation]
309
328
  # @return [Google::Devtools::Clouddebugger::V2::UpdateActiveBreakpointResponse]
310
329
  # @raise [Google::Gax::GaxError] if the RPC is aborted.
311
330
  # @example
312
331
  # require "google/cloud/debugger/v2"
313
332
  #
314
333
  # controller2_client = Google::Cloud::Debugger::V2::Controller2.new
334
+ #
335
+ # # TODO: Initialize +debuggee_id+:
315
336
  # debuggee_id = ''
337
+ #
338
+ # # TODO: Initialize +breakpoint+:
316
339
  # breakpoint = {}
317
340
  # response = controller2_client.update_active_breakpoint(debuggee_id, breakpoint)
318
341
 
319
342
  def update_active_breakpoint \
320
343
  debuggee_id,
321
344
  breakpoint,
322
- options: nil
345
+ options: nil,
346
+ &block
323
347
  req = {
324
348
  debuggee_id: debuggee_id,
325
349
  breakpoint: breakpoint
326
350
  }.delete_if { |_, v| v.nil? }
327
351
  req = Google::Gax::to_proto(req, Google::Devtools::Clouddebugger::V2::UpdateActiveBreakpointRequest)
328
- @update_active_breakpoint.call(req, options)
352
+ @update_active_breakpoint.call(req, options, &block)
329
353
  end
330
354
  end
331
355
  end
@@ -0,0 +1,41 @@
1
+ # Copyright 2018 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # https://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require "googleauth"
16
+
17
+ module Google
18
+ module Cloud
19
+ module Debugger
20
+ module V2
21
+ class Credentials < Google::Auth::Credentials
22
+ SCOPE = [
23
+ "https://www.googleapis.com/auth/cloud-platform",
24
+ "https://www.googleapis.com/auth/cloud_debugger"
25
+ ].freeze
26
+ PATH_ENV_VARS = %w(DEBUGGER_CREDENTIALS
27
+ DEBUGGER_KEYFILE
28
+ GOOGLE_CLOUD_CREDENTIALS
29
+ GOOGLE_CLOUD_KEYFILE
30
+ GCLOUD_KEYFILE)
31
+ JSON_ENV_VARS = %w(DEBUGGER_CREDENTIALS_JSON
32
+ DEBUGGER_KEYFILE_JSON
33
+ GOOGLE_CLOUD_CREDENTIALS_JSON
34
+ GOOGLE_CLOUD_KEYFILE_JSON
35
+ GCLOUD_KEYFILE_JSON)
36
+ DEFAULT_PATHS = ["~/.config/gcloud/application_default_credentials.json"]
37
+ end
38
+ end
39
+ end
40
+ end
41
+ end
@@ -1,4 +1,4 @@
1
- # Copyright 2017 Google LLC
1
+ # Copyright 2018 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -18,9 +18,6 @@
18
18
  # and updates to that file get reflected here through a refresh process.
19
19
  # For the short term, the refresh process will only be runnable by Google
20
20
  # engineers.
21
- #
22
- # The only allowed edits are to method and file documentation. A 3-way
23
- # merge preserves those additions if the generated source changes.
24
21
 
25
22
  require "json"
26
23
  require "pathname"
@@ -28,7 +25,7 @@ require "pathname"
28
25
  require "google/gax"
29
26
 
30
27
  require "google/devtools/clouddebugger/v2/debugger_pb"
31
- require "google/cloud/debugger/credentials"
28
+ require "google/cloud/debugger/v2/credentials"
32
29
 
33
30
  module Google
34
31
  module Cloud
@@ -58,6 +55,9 @@ module Google
58
55
  # The default port of the service.
59
56
  DEFAULT_SERVICE_PORT = 443
60
57
 
58
+ # The default set of gRPC interceptors.
59
+ GRPC_INTERCEPTORS = []
60
+
61
61
  DEFAULT_TIMEOUT = 30
62
62
 
63
63
  # The scopes needed to make gRPC calls to all of the methods defined in
@@ -67,6 +67,7 @@ module Google
67
67
  "https://www.googleapis.com/auth/cloud_debugger"
68
68
  ].freeze
69
69
 
70
+
70
71
  # @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
71
72
  # Provides the means for authenticating requests made by the client. This parameter can
72
73
  # be many types.
@@ -91,16 +92,18 @@ module Google
91
92
  # or the specified config is missing data points.
92
93
  # @param timeout [Numeric]
93
94
  # The default timeout, in seconds, for calls made through this client.
95
+ # @param metadata [Hash]
96
+ # Default metadata to be sent with each request. This can be overridden on a per call basis.
97
+ # @param exception_transformer [Proc]
98
+ # An optional proc that intercepts any exceptions raised during an API call to inject
99
+ # custom error handling.
94
100
  def initialize \
95
- service_path: SERVICE_ADDRESS,
96
- port: DEFAULT_SERVICE_PORT,
97
- channel: nil,
98
- chan_creds: nil,
99
- updater_proc: nil,
100
101
  credentials: nil,
101
102
  scopes: ALL_SCOPES,
102
103
  client_config: {},
103
104
  timeout: DEFAULT_TIMEOUT,
105
+ metadata: nil,
106
+ exception_transformer: nil,
104
107
  lib_name: nil,
105
108
  lib_version: ""
106
109
  # These require statements are intentionally placed here to initialize
@@ -109,21 +112,10 @@ module Google
109
112
  require "google/gax/grpc"
110
113
  require "google/devtools/clouddebugger/v2/debugger_services_pb"
111
114
 
112
- if channel || chan_creds || updater_proc
113
- warn "The `channel`, `chan_creds`, and `updater_proc` parameters will be removed " \
114
- "on 2017/09/08"
115
- credentials ||= channel
116
- credentials ||= chan_creds
117
- credentials ||= updater_proc
118
- end
119
- if service_path != SERVICE_ADDRESS || port != DEFAULT_SERVICE_PORT
120
- warn "`service_path` and `port` parameters are deprecated and will be removed"
121
- end
122
-
123
- credentials ||= Google::Cloud::Debugger::Credentials.default
115
+ credentials ||= Google::Cloud::Debugger::V2::Credentials.default
124
116
 
125
117
  if credentials.is_a?(String) || credentials.is_a?(Hash)
126
- updater_proc = Google::Cloud::Debugger::Credentials.new(credentials).updater_proc
118
+ updater_proc = Google::Cloud::Debugger::V2::Credentials.new(credentials).updater_proc
127
119
  end
128
120
  if credentials.is_a?(GRPC::Core::Channel)
129
121
  channel = credentials
@@ -138,13 +130,16 @@ module Google
138
130
  updater_proc = credentials.updater_proc
139
131
  end
140
132
 
133
+ package_version = Gem.loaded_specs['google-cloud-debugger'].version.version
134
+
141
135
  google_api_client = "gl-ruby/#{RUBY_VERSION}"
142
136
  google_api_client << " #{lib_name}/#{lib_version}" if lib_name
143
- google_api_client << " gapic/0.1.0 gax/#{Google::Gax::VERSION}"
137
+ google_api_client << " gapic/#{package_version} gax/#{Google::Gax::VERSION}"
144
138
  google_api_client << " grpc/#{GRPC::VERSION}"
145
139
  google_api_client.freeze
146
140
 
147
141
  headers = { :"x-goog-api-client" => google_api_client }
142
+ headers.merge!(metadata) unless metadata.nil?
148
143
  client_config_file = Pathname.new(__dir__).join(
149
144
  "debugger2_client_config.json"
150
145
  )
@@ -156,9 +151,14 @@ module Google
156
151
  Google::Gax::Grpc::STATUS_CODE_NAMES,
157
152
  timeout,
158
153
  errors: Google::Gax::Grpc::API_ERRORS,
159
- kwargs: headers
154
+ metadata: headers
160
155
  )
161
156
  end
157
+
158
+ # Allow overriding the service path/port in subclasses.
159
+ service_path = self.class::SERVICE_ADDRESS
160
+ port = self.class::DEFAULT_SERVICE_PORT
161
+ interceptors = self.class::GRPC_INTERCEPTORS
162
162
  @debugger2_stub = Google::Gax::Grpc.create_stub(
163
163
  service_path,
164
164
  port,
@@ -166,28 +166,34 @@ module Google
166
166
  channel: channel,
167
167
  updater_proc: updater_proc,
168
168
  scopes: scopes,
169
+ interceptors: interceptors,
169
170
  &Google::Devtools::Clouddebugger::V2::Debugger2::Stub.method(:new)
170
171
  )
171
172
 
172
173
  @set_breakpoint = Google::Gax.create_api_call(
173
174
  @debugger2_stub.method(:set_breakpoint),
174
- defaults["set_breakpoint"]
175
+ defaults["set_breakpoint"],
176
+ exception_transformer: exception_transformer
175
177
  )
176
178
  @get_breakpoint = Google::Gax.create_api_call(
177
179
  @debugger2_stub.method(:get_breakpoint),
178
- defaults["get_breakpoint"]
180
+ defaults["get_breakpoint"],
181
+ exception_transformer: exception_transformer
179
182
  )
180
183
  @delete_breakpoint = Google::Gax.create_api_call(
181
184
  @debugger2_stub.method(:delete_breakpoint),
182
- defaults["delete_breakpoint"]
185
+ defaults["delete_breakpoint"],
186
+ exception_transformer: exception_transformer
183
187
  )
184
188
  @list_breakpoints = Google::Gax.create_api_call(
185
189
  @debugger2_stub.method(:list_breakpoints),
186
- defaults["list_breakpoints"]
190
+ defaults["list_breakpoints"],
191
+ exception_transformer: exception_transformer
187
192
  )
188
193
  @list_debuggees = Google::Gax.create_api_call(
189
194
  @debugger2_stub.method(:list_debuggees),
190
- defaults["list_debuggees"]
195
+ defaults["list_debuggees"],
196
+ exception_transformer: exception_transformer
191
197
  )
192
198
  end
193
199
 
@@ -208,14 +214,23 @@ module Google
208
214
  # @param options [Google::Gax::CallOptions]
209
215
  # Overrides the default settings for this call, e.g, timeout,
210
216
  # retries, etc.
217
+ # @yield [result, operation] Access the result along with the RPC operation
218
+ # @yieldparam result [Google::Devtools::Clouddebugger::V2::SetBreakpointResponse]
219
+ # @yieldparam operation [GRPC::ActiveCall::Operation]
211
220
  # @return [Google::Devtools::Clouddebugger::V2::SetBreakpointResponse]
212
221
  # @raise [Google::Gax::GaxError] if the RPC is aborted.
213
222
  # @example
214
223
  # require "google/cloud/debugger/v2"
215
224
  #
216
225
  # debugger2_client = Google::Cloud::Debugger::V2::Debugger2.new
226
+ #
227
+ # # TODO: Initialize +debuggee_id+:
217
228
  # debuggee_id = ''
229
+ #
230
+ # # TODO: Initialize +breakpoint+:
218
231
  # breakpoint = {}
232
+ #
233
+ # # TODO: Initialize +client_version+:
219
234
  # client_version = ''
220
235
  # response = debugger2_client.set_breakpoint(debuggee_id, breakpoint, client_version)
221
236
 
@@ -223,14 +238,15 @@ module Google
223
238
  debuggee_id,
224
239
  breakpoint,
225
240
  client_version,
226
- options: nil
241
+ options: nil,
242
+ &block
227
243
  req = {
228
244
  debuggee_id: debuggee_id,
229
245
  breakpoint: breakpoint,
230
246
  client_version: client_version
231
247
  }.delete_if { |_, v| v.nil? }
232
248
  req = Google::Gax::to_proto(req, Google::Devtools::Clouddebugger::V2::SetBreakpointRequest)
233
- @set_breakpoint.call(req, options)
249
+ @set_breakpoint.call(req, options, &block)
234
250
  end
235
251
 
236
252
  # Gets breakpoint information.
@@ -245,14 +261,23 @@ module Google
245
261
  # @param options [Google::Gax::CallOptions]
246
262
  # Overrides the default settings for this call, e.g, timeout,
247
263
  # retries, etc.
264
+ # @yield [result, operation] Access the result along with the RPC operation
265
+ # @yieldparam result [Google::Devtools::Clouddebugger::V2::GetBreakpointResponse]
266
+ # @yieldparam operation [GRPC::ActiveCall::Operation]
248
267
  # @return [Google::Devtools::Clouddebugger::V2::GetBreakpointResponse]
249
268
  # @raise [Google::Gax::GaxError] if the RPC is aborted.
250
269
  # @example
251
270
  # require "google/cloud/debugger/v2"
252
271
  #
253
272
  # debugger2_client = Google::Cloud::Debugger::V2::Debugger2.new
273
+ #
274
+ # # TODO: Initialize +debuggee_id+:
254
275
  # debuggee_id = ''
276
+ #
277
+ # # TODO: Initialize +breakpoint_id+:
255
278
  # breakpoint_id = ''
279
+ #
280
+ # # TODO: Initialize +client_version+:
256
281
  # client_version = ''
257
282
  # response = debugger2_client.get_breakpoint(debuggee_id, breakpoint_id, client_version)
258
283
 
@@ -260,14 +285,15 @@ module Google
260
285
  debuggee_id,
261
286
  breakpoint_id,
262
287
  client_version,
263
- options: nil
288
+ options: nil,
289
+ &block
264
290
  req = {
265
291
  debuggee_id: debuggee_id,
266
292
  breakpoint_id: breakpoint_id,
267
293
  client_version: client_version
268
294
  }.delete_if { |_, v| v.nil? }
269
295
  req = Google::Gax::to_proto(req, Google::Devtools::Clouddebugger::V2::GetBreakpointRequest)
270
- @get_breakpoint.call(req, options)
296
+ @get_breakpoint.call(req, options, &block)
271
297
  end
272
298
 
273
299
  # Deletes the breakpoint from the debuggee.
@@ -282,13 +308,22 @@ module Google
282
308
  # @param options [Google::Gax::CallOptions]
283
309
  # Overrides the default settings for this call, e.g, timeout,
284
310
  # retries, etc.
311
+ # @yield [result, operation] Access the result along with the RPC operation
312
+ # @yieldparam result []
313
+ # @yieldparam operation [GRPC::ActiveCall::Operation]
285
314
  # @raise [Google::Gax::GaxError] if the RPC is aborted.
286
315
  # @example
287
316
  # require "google/cloud/debugger/v2"
288
317
  #
289
318
  # debugger2_client = Google::Cloud::Debugger::V2::Debugger2.new
319
+ #
320
+ # # TODO: Initialize +debuggee_id+:
290
321
  # debuggee_id = ''
322
+ #
323
+ # # TODO: Initialize +breakpoint_id+:
291
324
  # breakpoint_id = ''
325
+ #
326
+ # # TODO: Initialize +client_version+:
292
327
  # client_version = ''
293
328
  # debugger2_client.delete_breakpoint(debuggee_id, breakpoint_id, client_version)
294
329
 
@@ -296,14 +331,15 @@ module Google
296
331
  debuggee_id,
297
332
  breakpoint_id,
298
333
  client_version,
299
- options: nil
334
+ options: nil,
335
+ &block
300
336
  req = {
301
337
  debuggee_id: debuggee_id,
302
338
  breakpoint_id: breakpoint_id,
303
339
  client_version: client_version
304
340
  }.delete_if { |_, v| v.nil? }
305
341
  req = Google::Gax::to_proto(req, Google::Devtools::Clouddebugger::V2::DeleteBreakpointRequest)
306
- @delete_breakpoint.call(req, options)
342
+ @delete_breakpoint.call(req, options, &block)
307
343
  nil
308
344
  end
309
345
 
@@ -336,13 +372,20 @@ module Google
336
372
  # @param options [Google::Gax::CallOptions]
337
373
  # Overrides the default settings for this call, e.g, timeout,
338
374
  # retries, etc.
375
+ # @yield [result, operation] Access the result along with the RPC operation
376
+ # @yieldparam result [Google::Devtools::Clouddebugger::V2::ListBreakpointsResponse]
377
+ # @yieldparam operation [GRPC::ActiveCall::Operation]
339
378
  # @return [Google::Devtools::Clouddebugger::V2::ListBreakpointsResponse]
340
379
  # @raise [Google::Gax::GaxError] if the RPC is aborted.
341
380
  # @example
342
381
  # require "google/cloud/debugger/v2"
343
382
  #
344
383
  # debugger2_client = Google::Cloud::Debugger::V2::Debugger2.new
384
+ #
385
+ # # TODO: Initialize +debuggee_id+:
345
386
  # debuggee_id = ''
387
+ #
388
+ # # TODO: Initialize +client_version+:
346
389
  # client_version = ''
347
390
  # response = debugger2_client.list_breakpoints(debuggee_id, client_version)
348
391
 
@@ -354,7 +397,8 @@ module Google
354
397
  action: nil,
355
398
  strip_results: nil,
356
399
  wait_token: nil,
357
- options: nil
400
+ options: nil,
401
+ &block
358
402
  req = {
359
403
  debuggee_id: debuggee_id,
360
404
  client_version: client_version,
@@ -365,7 +409,7 @@ module Google
365
409
  wait_token: wait_token
366
410
  }.delete_if { |_, v| v.nil? }
367
411
  req = Google::Gax::to_proto(req, Google::Devtools::Clouddebugger::V2::ListBreakpointsRequest)
368
- @list_breakpoints.call(req, options)
412
+ @list_breakpoints.call(req, options, &block)
369
413
  end
370
414
 
371
415
  # Lists all the debuggees that the user has access to.
@@ -381,13 +425,20 @@ module Google
381
425
  # @param options [Google::Gax::CallOptions]
382
426
  # Overrides the default settings for this call, e.g, timeout,
383
427
  # retries, etc.
428
+ # @yield [result, operation] Access the result along with the RPC operation
429
+ # @yieldparam result [Google::Devtools::Clouddebugger::V2::ListDebuggeesResponse]
430
+ # @yieldparam operation [GRPC::ActiveCall::Operation]
384
431
  # @return [Google::Devtools::Clouddebugger::V2::ListDebuggeesResponse]
385
432
  # @raise [Google::Gax::GaxError] if the RPC is aborted.
386
433
  # @example
387
434
  # require "google/cloud/debugger/v2"
388
435
  #
389
436
  # debugger2_client = Google::Cloud::Debugger::V2::Debugger2.new
437
+ #
438
+ # # TODO: Initialize +project+:
390
439
  # project = ''
440
+ #
441
+ # # TODO: Initialize +client_version+:
391
442
  # client_version = ''
392
443
  # response = debugger2_client.list_debuggees(project, client_version)
393
444
 
@@ -395,14 +446,15 @@ module Google
395
446
  project,
396
447
  client_version,
397
448
  include_inactive: nil,
398
- options: nil
449
+ options: nil,
450
+ &block
399
451
  req = {
400
452
  project: project,
401
453
  client_version: client_version,
402
454
  include_inactive: include_inactive
403
455
  }.delete_if { |_, v| v.nil? }
404
456
  req = Google::Gax::to_proto(req, Google::Devtools::Clouddebugger::V2::ListDebuggeesRequest)
405
- @list_debuggees.call(req, options)
457
+ @list_debuggees.call(req, options, &block)
406
458
  end
407
459
  end
408
460
  end
@@ -0,0 +1,90 @@
1
+ # Copyright 2018 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # https://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ module Google
16
+ module Devtools
17
+ module Clouddebugger
18
+ module V2
19
+ # Request to register a debuggee.
20
+ # @!attribute [rw] debuggee
21
+ # @return [Google::Devtools::Clouddebugger::V2::Debuggee]
22
+ # Debuggee information to register.
23
+ # The fields +project+, +uniquifier+, +description+ and +agent_version+
24
+ # of the debuggee must be set.
25
+ class RegisterDebuggeeRequest; end
26
+
27
+ # Response for registering a debuggee.
28
+ # @!attribute [rw] debuggee
29
+ # @return [Google::Devtools::Clouddebugger::V2::Debuggee]
30
+ # Debuggee resource.
31
+ # The field +id+ is guranteed to be set (in addition to the echoed fields).
32
+ # If the field +is_disabled+ is set to +true+, the agent should disable
33
+ # itself by removing all breakpoints and detaching from the application.
34
+ # It should however continue to poll +RegisterDebuggee+ until reenabled.
35
+ class RegisterDebuggeeResponse; end
36
+
37
+ # Request to list active breakpoints.
38
+ # @!attribute [rw] debuggee_id
39
+ # @return [String]
40
+ # Identifies the debuggee.
41
+ # @!attribute [rw] wait_token
42
+ # @return [String]
43
+ # A token that, if specified, blocks the method call until the list
44
+ # of active breakpoints has changed, or a server-selected timeout has
45
+ # expired. The value should be set from the +next_wait_token+ field in
46
+ # the last response. The initial value should be set to +"init"+.
47
+ # @!attribute [rw] success_on_timeout
48
+ # @return [true, false]
49
+ # If set to +true+ (recommended), returns +google.rpc.Code.OK+ status and
50
+ # sets the +wait_expired+ response field to +true+ when the server-selected
51
+ # timeout has expired.
52
+ #
53
+ # If set to +false+ (deprecated), returns +google.rpc.Code.ABORTED+ status
54
+ # when the server-selected timeout has expired.
55
+ class ListActiveBreakpointsRequest; end
56
+
57
+ # Response for listing active breakpoints.
58
+ # @!attribute [rw] breakpoints
59
+ # @return [Array<Google::Devtools::Clouddebugger::V2::Breakpoint>]
60
+ # List of all active breakpoints.
61
+ # The fields +id+ and +location+ are guaranteed to be set on each breakpoint.
62
+ # @!attribute [rw] next_wait_token
63
+ # @return [String]
64
+ # A token that can be used in the next method call to block until
65
+ # the list of breakpoints changes.
66
+ # @!attribute [rw] wait_expired
67
+ # @return [true, false]
68
+ # If set to +true+, indicates that there is no change to the
69
+ # list of active breakpoints and the server-selected timeout has expired.
70
+ # The +breakpoints+ field would be empty and should be ignored.
71
+ class ListActiveBreakpointsResponse; end
72
+
73
+ # Request to update an active breakpoint.
74
+ # @!attribute [rw] debuggee_id
75
+ # @return [String]
76
+ # Identifies the debuggee being debugged.
77
+ # @!attribute [rw] breakpoint
78
+ # @return [Google::Devtools::Clouddebugger::V2::Breakpoint]
79
+ # Updated breakpoint information.
80
+ # The field +id+ must be set.
81
+ # The agent must echo all Breakpoint specification fields in the update.
82
+ class UpdateActiveBreakpointRequest; end
83
+
84
+ # Response for updating an active breakpoint.
85
+ # The message is defined to allow future extensions.
86
+ class UpdateActiveBreakpointResponse; end
87
+ end
88
+ end
89
+ end
90
+ end
@@ -1,4 +1,4 @@
1
- # Copyright 2017 Google LLC
1
+ # Copyright 2018 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2017 Google LLC
1
+ # Copyright 2018 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -15,19 +15,6 @@
15
15
  module Google
16
16
  module Devtools
17
17
  module Clouddebugger
18
- ##
19
- # # Stackdriver Debugger API Contents
20
- #
21
- # | Class | Description |
22
- # | ----- | ----------- |
23
- # | [Debugger2Client][] | Examines the call stack and variables of a running application without stopping or slowing it down. |
24
- # | [Controller2Client][] | Examines the call stack and variables of a running application without stopping or slowing it down. |
25
- # | [Data Types][] | Data types for Google::Cloud::Debugger::V2 |
26
- #
27
- # [Debugger2Client]: https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-debugger/latest/google/devtools/clouddebugger/v2/debugger2client
28
- # [Controller2Client]: https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-debugger/latest/google/devtools/clouddebugger/v2/controller2client
29
- # [Data Types]: https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-debugger/latest/google/devtools/clouddebugger/v2/datatypes
30
- #
31
18
  module V2
32
19
  # Request to set a breakpoint
33
20
  # @!attribute [rw] debuggee_id
@@ -1,4 +1,4 @@
1
- # Copyright 2017 Google LLC
1
+ # Copyright 2018 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -0,0 +1,28 @@
1
+ # Copyright 2018 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # https://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ module Google
16
+ module Protobuf
17
+ # A generic empty message that you can re-use to avoid defining duplicated
18
+ # empty messages in your APIs. A typical example is to use it as the request
19
+ # or the response type of an API method. For instance:
20
+ #
21
+ # service Foo {
22
+ # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
23
+ # }
24
+ #
25
+ # The JSON representation for +Empty+ is empty JSON object +{}+.
26
+ class Empty; end
27
+ end
28
+ end
@@ -1,4 +1,4 @@
1
- # Copyright 2017 Google LLC
1
+ # Copyright 2018 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -16,7 +16,7 @@
16
16
  module Google
17
17
  module Cloud
18
18
  module Debugger
19
- VERSION = "0.32.1".freeze
19
+ VERSION = "0.32.2".freeze
20
20
  end
21
21
  end
22
22
  end
@@ -7,7 +7,7 @@
7
7
  # you may not use this file except in compliance with the License.
8
8
  # You may obtain a copy of the License at
9
9
  #
10
- # https://www.apache.org/licenses/LICENSE-2.0
10
+ # http://www.apache.org/licenses/LICENSE-2.0
11
11
  #
12
12
  # Unless required by applicable law or agreed to in writing, software
13
13
  # distributed under the License is distributed on an "AS IS" BASIS,
@@ -7,7 +7,7 @@
7
7
  # you may not use this file except in compliance with the License.
8
8
  # You may obtain a copy of the License at
9
9
  #
10
- # https://www.apache.org/licenses/LICENSE-2.0
10
+ # http://www.apache.org/licenses/LICENSE-2.0
11
11
  #
12
12
  # Unless required by applicable law or agreed to in writing, software
13
13
  # distributed under the License is distributed on an "AS IS" BASIS,
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-debugger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.32.1
4
+ version: 0.32.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Heng Xiong
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-07-05 00:00:00.000000000 Z
11
+ date: 2018-08-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: binding_of_caller
@@ -150,6 +150,20 @@ dependencies:
150
150
  - - "~>"
151
151
  - !ruby/object:Gem::Version
152
152
  version: '1.1'
153
+ - !ruby/object:Gem::Dependency
154
+ name: redcarpet
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - "~>"
158
+ - !ruby/object:Gem::Version
159
+ version: '3.0'
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - "~>"
165
+ - !ruby/object:Gem::Version
166
+ version: '3.0'
153
167
  - !ruby/object:Gem::Dependency
154
168
  name: rubocop
155
169
  requirement: !ruby/object:Gem::Requirement
@@ -294,13 +308,15 @@ files:
294
308
  - lib/google/cloud/debugger/v2.rb
295
309
  - lib/google/cloud/debugger/v2/controller2_client.rb
296
310
  - lib/google/cloud/debugger/v2/controller2_client_config.json
311
+ - lib/google/cloud/debugger/v2/credentials.rb
297
312
  - lib/google/cloud/debugger/v2/debugger2_client.rb
298
313
  - lib/google/cloud/debugger/v2/debugger2_client_config.json
314
+ - lib/google/cloud/debugger/v2/doc/google/devtools/clouddebugger/v2/controller.rb
299
315
  - lib/google/cloud/debugger/v2/doc/google/devtools/clouddebugger/v2/data.rb
300
316
  - lib/google/cloud/debugger/v2/doc/google/devtools/clouddebugger/v2/debugger.rb
301
317
  - lib/google/cloud/debugger/v2/doc/google/devtools/source/v1/source_context.rb
318
+ - lib/google/cloud/debugger/v2/doc/google/protobuf/empty.rb
302
319
  - lib/google/cloud/debugger/v2/doc/google/protobuf/timestamp.rb
303
- - lib/google/cloud/debugger/v2/doc/overview.rb
304
320
  - lib/google/cloud/debugger/version.rb
305
321
  - lib/google/devtools/clouddebugger/v2/controller_pb.rb
306
322
  - lib/google/devtools/clouddebugger/v2/controller_services_pb.rb
@@ -1,54 +0,0 @@
1
- # Copyright 2017 Google LLC
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # https://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
- module Google
16
- module Cloud
17
- # rubocop:disable LineLength
18
-
19
- ##
20
- # # Ruby Client for Stackdriver Debugger API ([Beta](https://github.com/GoogleCloudPlatform/google-cloud-ruby#versioning))
21
- #
22
- # [Stackdriver Debugger API][Product Documentation]:
23
- # Examines the call stack and variables of a running application
24
- # without stopping or slowing it down.
25
- # - [Product Documentation][]
26
- #
27
- # ## Quick Start
28
- # In order to use this library, you first need to go through the following
29
- # steps:
30
- #
31
- # 1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
32
- # 2. [Enable the Stackdriver Debugger API.](https://console.cloud.google.com/apis/api/debugger)
33
- # 3. [Setup Authentication.](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud/master/guides/authentication)
34
- #
35
- # ### Installation
36
- # ```
37
- # $ gem install google-cloud-debugger
38
- # ```
39
- #
40
- # ### Next Steps
41
- # - Read the [Stackdriver Debugger API Product documentation][Product Documentation]
42
- # to learn more about the product and see How-to Guides.
43
- # - View this [repository's main README](https://github.com/GoogleCloudPlatform/google-cloud-ruby/blob/master/README.md)
44
- # to see the full list of Cloud APIs that we cover.
45
- #
46
- # [Product Documentation]: https://cloud.google.com/debugger
47
- #
48
- #
49
- module Debugger
50
- module V2
51
- end
52
- end
53
- end
54
- end