Skip to content

Commit

Permalink
feat: add a transport operation class in Rest (#911)
Browse files Browse the repository at this point in the history
  • Loading branch information
viacheslav-rostovtsev authored Feb 9, 2023
1 parent 180893c commit 8b52608
Show file tree
Hide file tree
Showing 15 changed files with 80 additions and 0 deletions.
38 changes: 38 additions & 0 deletions gapic-common/lib/gapic/rest/transport_operation.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Copyright 2023 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

module Gapic
module Rest
##
# Surfaces information about the active call
# from the underlying transport library.
#
class TransportOperation
##
# @private
# The underlying transport's library object that describes the active call, if any.
# It is not guaranteed to be any specific type, and its value is not guarateed to be stable.
# @return [::Object, nil, ::Faraday::Response]
attr_reader :underlying_op

##
# @private
# @param request [::Object, nil, ::Faraday::Response]
# The underlying transport's library object that describes the active call, if any.
def initialize underlying_op
@underlying_op = underlying_op
end
end
end
end
3 changes: 3 additions & 0 deletions gapic-generator-cloud/templates/cloud/gem/rubocop.erb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ AllCops:

Layout/LineLength:
Enabled: false
Lint/Debugger:
Exclude:
- "snippets/**/*.rb"
Metrics/AbcSize:
Enabled: false
Metrics/ClassLength:
Expand Down
3 changes: 3 additions & 0 deletions gapic-generator/templates/default/gem/rubocop.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ AllCops:

Layout/LineLength:
Enabled: false
Lint/Debugger:
Exclude:
- "snippets/**/*.rb"
Metrics/AbcSize:
Enabled: false
Metrics/ClassLength:
Expand Down
3 changes: 3 additions & 0 deletions shared/output/cloud/compute_small/.rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ AllCops:

Layout/LineLength:
Enabled: false
Lint/Debugger:
Exclude:
- "snippets/**/*.rb"
Metrics/AbcSize:
Enabled: false
Metrics/ClassLength:
Expand Down
3 changes: 3 additions & 0 deletions shared/output/cloud/grafeas_v1/.rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ AllCops:

Layout/LineLength:
Enabled: false
Lint/Debugger:
Exclude:
- "snippets/**/*.rb"
Metrics/AbcSize:
Enabled: false
Metrics/ClassLength:
Expand Down
3 changes: 3 additions & 0 deletions shared/output/cloud/language_v1/.rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ AllCops:

Layout/LineLength:
Enabled: false
Lint/Debugger:
Exclude:
- "snippets/**/*.rb"
Metrics/AbcSize:
Enabled: false
Metrics/ClassLength:
Expand Down
3 changes: 3 additions & 0 deletions shared/output/cloud/language_v1beta1/.rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ AllCops:

Layout/LineLength:
Enabled: false
Lint/Debugger:
Exclude:
- "snippets/**/*.rb"
Metrics/AbcSize:
Enabled: false
Metrics/ClassLength:
Expand Down
3 changes: 3 additions & 0 deletions shared/output/cloud/language_v1beta2/.rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ AllCops:

Layout/LineLength:
Enabled: false
Lint/Debugger:
Exclude:
- "snippets/**/*.rb"
Metrics/AbcSize:
Enabled: false
Metrics/ClassLength:
Expand Down
3 changes: 3 additions & 0 deletions shared/output/cloud/location/.rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ AllCops:

Layout/LineLength:
Enabled: false
Lint/Debugger:
Exclude:
- "snippets/**/*.rb"
Metrics/AbcSize:
Enabled: false
Metrics/ClassLength:
Expand Down
3 changes: 3 additions & 0 deletions shared/output/cloud/secretmanager_v1beta1/.rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ AllCops:

Layout/LineLength:
Enabled: false
Lint/Debugger:
Exclude:
- "snippets/**/*.rb"
Metrics/AbcSize:
Enabled: false
Metrics/ClassLength:
Expand Down
3 changes: 3 additions & 0 deletions shared/output/cloud/speech_v1/.rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ AllCops:

Layout/LineLength:
Enabled: false
Lint/Debugger:
Exclude:
- "snippets/**/*.rb"
Metrics/AbcSize:
Enabled: false
Metrics/ClassLength:
Expand Down
3 changes: 3 additions & 0 deletions shared/output/cloud/vision_v1/.rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ AllCops:

Layout/LineLength:
Enabled: false
Lint/Debugger:
Exclude:
- "snippets/**/*.rb"
Metrics/AbcSize:
Enabled: false
Metrics/ClassLength:
Expand Down
3 changes: 3 additions & 0 deletions shared/output/gapic/templates/garbage/.rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ AllCops:

Layout/LineLength:
Enabled: false
Lint/Debugger:
Exclude:
- "snippets/**/*.rb"
Metrics/AbcSize:
Enabled: false
Metrics/ClassLength:
Expand Down
3 changes: 3 additions & 0 deletions shared/output/gapic/templates/showcase/.rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ AllCops:

Layout/LineLength:
Enabled: false
Lint/Debugger:
Exclude:
- "snippets/**/*.rb"
Metrics/AbcSize:
Enabled: false
Metrics/ClassLength:
Expand Down
3 changes: 3 additions & 0 deletions shared/output/gapic/templates/testing/.rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ AllCops:

Layout/LineLength:
Enabled: false
Lint/Debugger:
Exclude:
- "snippets/**/*.rb"
Metrics/AbcSize:
Enabled: false
Metrics/ClassLength:
Expand Down

0 comments on commit 8b52608

Please sign in to comment.