gapic-common 0.3.2 → 0.4.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: eb1fde9489ba4700abd83cbf1a7fea7aab2ed2f844da5ac2070b8c73fe6bf0d8
4
- data.tar.gz: bf9a3bce0b7d5c31edf806baceb5e228318ea3656a84c2a6e8b00bf11acbeee2
3
+ metadata.gz: e757f6cec4043dffd4d2b89e6f3fc02297074d6a28b361331fa16fbb0eef5d9b
4
+ data.tar.gz: 4dc4b0631dea8a91020bb7a004d9f17cfa48b9c2face5ef7ceb515a6a6ac4bfa
5
5
  SHA512:
6
- metadata.gz: 281a1e48c10da144d2494e566468849299cf24639ca6119428cea669080c7ff435b758383b2ecf1173edd774c765d69a017f347b1e4ad49373b0c9d2925c2834
7
- data.tar.gz: b33835a789ff87319ccb7ef8c448de8cadd44a8c44cf2c52f9553f7ceeea6d9b4715dcd19a1723cf9085d32b5be69dec0e2a46d39755aff0a795e6b030332339
6
+ metadata.gz: 30b58a2dd114652b524b2878745cc16028c0d65b197a4f3cf8c112883165b0509697a4909fffc19874efb08ee47d059e44b15151b9a74962bbcadac0c085054f
7
+ data.tar.gz: b6e463d4d9ff2c0366d334503da2660d403ee97c40529db65ec0929cf0547407e458d20dd37031536c1129c0439e11d8cce6975baa08f4df14369f475a690b0e
data/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # Release History
2
2
 
3
+ ### 0.4.2 / 20201-06-07
4
+
5
+ * Expand googleauth dependency to include 1.x
6
+ * Add a REST PUT method helper to Gapic::Rest.
7
+
8
+ ### 0.4.1 / 2021-04-15
9
+
10
+ * Provide a default value for the 'body' in the REST POST method in Gapic::Rest.
11
+
12
+ ### 0.4.0 / 2021-02-23
13
+
14
+ * Support for the REST calls via the Gapic::Rest::ClientStub and other classes in Gapic::Rest
15
+ REST support is still being developed. Notably the full retries handling is not implemented yet.
16
+
17
+ ### 0.3.4 / 2020-08-07
18
+
19
+ * Support the :this_channel_is_insecure gRPC pseudo-credential, used by tests and emulators.
20
+
21
+ ### 0.3.3 / 2020-08-05
22
+
23
+ * Retry configs properly handle error name strings.
24
+
3
25
  ### 0.3.2 / 2020-07-30
4
26
 
5
27
  * Alias PagedEnumerable#next_page to PagedEnumerable#next_page!
data/CONTRIBUTING.md CHANGED
@@ -8,7 +8,7 @@ just a few small guidelines you need to follow.
8
8
  Contributions to this project must be accompanied by a Contributor License
9
9
  Agreement. You (or your employer) retain the copyright to your contribution;
10
10
  this simply gives us permission to use and redistribute your contributions as
11
- part of the project. Head over to <https://cla.developers.google.com/> to see
11
+ part of the project. Head over to https://cla.developers.google.com/ to see
12
12
  your current agreements on file or to sign a new one.
13
13
 
14
14
  You generally only need to submit a CLA once, so if you've already submitted one
@@ -26,7 +26,9 @@ module Gapic
26
26
  # @return [RetryPolicy, Object]
27
27
  #
28
28
  class CallOptions
29
- attr_reader :timeout, :metadata, :retry_policy
29
+ attr_reader :timeout
30
+ attr_reader :metadata
31
+ attr_reader :retry_policy
30
32
 
31
33
  ##
32
34
  # Create a new Options object instance.
@@ -29,7 +29,7 @@ module Gapic
29
29
  # @param max_delay [Numeric] client-side timeout
30
30
  #
31
31
  def initialize retry_codes: nil, initial_delay: nil, multiplier: nil, max_delay: nil
32
- @retry_codes = retry_codes
32
+ @retry_codes = convert_codes retry_codes
33
33
  @initial_delay = initial_delay
34
34
  @multiplier = multiplier
35
35
  @max_delay = max_delay
@@ -77,7 +77,7 @@ module Gapic
77
77
  def apply_defaults retry_policy
78
78
  return unless retry_policy.is_a? Hash
79
79
 
80
- @retry_codes ||= retry_policy[:retry_codes]
80
+ @retry_codes ||= convert_codes retry_policy[:retry_codes]
81
81
  @initial_delay ||= retry_policy[:initial_delay]
82
82
  @multiplier ||= retry_policy[:multiplier]
83
83
  @max_delay ||= retry_policy[:max_delay]
@@ -85,6 +85,34 @@ module Gapic
85
85
  self
86
86
  end
87
87
 
88
+ # @private
89
+ # See https://grpc.github.io/grpc/core/md_doc_statuscodes.html for a
90
+ # list of error codes.
91
+ ERROR_CODE_MAPPING = [
92
+ "OK",
93
+ "CANCELLED",
94
+ "UNKNOWN",
95
+ "INVALID_ARGUMENT",
96
+ "DEADLINE_EXCEEDED",
97
+ "NOT_FOUND",
98
+ "ALREADY_EXISTS",
99
+ "PERMISSION_DENIED",
100
+ "RESOURCE_EXHAUSTED",
101
+ "FAILED_PRECONDITION",
102
+ "ABORTED",
103
+ "OUT_OF_RANGE",
104
+ "UNIMPLEMENTED",
105
+ "INTERNAL",
106
+ "UNAVAILABLE",
107
+ "DATA_LOSS",
108
+ "UNAUTHENTICATED"
109
+ ].freeze
110
+
111
+ # @private
112
+ ERROR_STRING_MAPPING = ERROR_CODE_MAPPING.each_with_index.each_with_object({}) do |(str, num), hash|
113
+ hash[str] = num
114
+ end.freeze
115
+
88
116
  private
89
117
 
90
118
  def retry? error
@@ -96,6 +124,18 @@ module Gapic
96
124
  Kernel.sleep delay
97
125
  end
98
126
 
127
+ def convert_codes input_codes
128
+ return nil if input_codes.nil?
129
+ Array(input_codes).map do |obj|
130
+ case obj
131
+ when String
132
+ ERROR_STRING_MAPPING[obj]
133
+ when Integer
134
+ obj
135
+ end
136
+ end.compact
137
+ end
138
+
99
139
  ##
100
140
  # Calculate and set the next delay value.
101
141
  def increment_delay!
@@ -14,6 +14,6 @@
14
14
 
15
15
  module Gapic
16
16
  module Common
17
- VERSION = "0.3.2".freeze
17
+ VERSION = "0.4.2".freeze
18
18
  end
19
19
  end
data/lib/gapic/config.rb CHANGED
@@ -72,7 +72,7 @@ module Gapic
72
72
 
73
73
  if instance_variable_defined? :@parent_config
74
74
  parent = instance_variable_get :@parent_config
75
- return parent.__send__ name if parent&.respond_to? name
75
+ return parent.__send__ name if parent.respond_to? name
76
76
  end
77
77
 
78
78
  default
@@ -58,10 +58,11 @@ module Gapic
58
58
  channel_args = Hash channel_args
59
59
  interceptors = Array interceptors
60
60
 
61
- @grpc_stub = if credentials.is_a? GRPC::Core::Channel
61
+ @grpc_stub = case credentials
62
+ when GRPC::Core::Channel
62
63
  grpc_stub_class.new endpoint, nil, channel_override: credentials,
63
64
  interceptors: interceptors
64
- elsif credentials.is_a? GRPC::Core::ChannelCredentials
65
+ when GRPC::Core::ChannelCredentials, Symbol
65
66
  grpc_stub_class.new endpoint, credentials, channel_args: channel_args,
66
67
  interceptors: interceptors
67
68
  else
@@ -122,9 +122,7 @@ module Gapic
122
122
  yield response, operation if block_given?
123
123
  response
124
124
  rescue StandardError => e
125
- if check_retry? deadline
126
- retry if options.retry_policy.call e
127
- end
125
+ retry if check_retry?(deadline) && options.retry_policy.call(e)
128
126
 
129
127
  raise e
130
128
  end
@@ -27,13 +27,11 @@ module GRPC
27
27
  return nil.to_a if rpc_status.nil?
28
28
 
29
29
  rpc_status.details.map do |detail|
30
- begin
31
- detail_type = Google::Protobuf::DescriptorPool.generated_pool.lookup detail.type_name
32
- detail = detail.unpack detail_type.msgclass if detail_type
33
- detail
34
- rescue Google::Protobuf::ParseError
35
- detail
36
- end
30
+ detail_type = Google::Protobuf::DescriptorPool.generated_pool.lookup detail.type_name
31
+ detail = detail.unpack detail_type.msgclass if detail_type
32
+ detail
33
+ rescue Google::Protobuf::ParseError
34
+ detail
37
35
  end
38
36
  end
39
37
  end
@@ -80,13 +80,11 @@ module Gapic
80
80
  #
81
81
  # @raise [RuntimeError] if it's not started yet.
82
82
  #
83
- def each
83
+ def each &block
84
84
  return enum_for :each unless block_given?
85
85
 
86
86
  each_page do |page|
87
- page.each do |obj|
88
- yield obj
89
- end
87
+ page.each(&block)
90
88
  end
91
89
  end
92
90
 
@@ -201,7 +199,8 @@ module Gapic
201
199
  # @return [GRPC::ActiveCall::Operation] the RPC operation for the page.
202
200
  class Page
203
201
  include Enumerable
204
- attr_reader :response, :operation
202
+ attr_reader :response
203
+ attr_reader :operation
205
204
 
206
205
  ##
207
206
  # @private
@@ -96,7 +96,7 @@ module Gapic
96
96
  #
97
97
  # @return [Array<Object>] The coerced version of the given values.
98
98
  def self.coerce_array array, field_descriptor
99
- raise ArgumentError, "Value " + array.to_s + " must be an array" unless array.is_a? Array
99
+ raise ArgumentError, "Value #{array} must be an array" unless array.is_a? Array
100
100
  array.map do |val|
101
101
  coerce_value val, field_descriptor
102
102
  end
data/lib/gapic/rest.rb ADDED
@@ -0,0 +1,27 @@
1
+ # Copyright 2021 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
+ ##
16
+ # Rest GAPIC features are still under development.
17
+ #
18
+
19
+ require "faraday"
20
+ require "gapic/call_options"
21
+ require "gapic/common/version"
22
+ require "gapic/headers"
23
+ require "gapic/protobuf"
24
+ require "gapic/rest/client_stub"
25
+ require "gapic/rest/error"
26
+ require "gapic/rest/faraday_middleware"
27
+ require "json"
@@ -0,0 +1,139 @@
1
+ # Copyright 2021 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
+ require "gapic/rest/faraday_middleware"
17
+
18
+ module Gapic
19
+ module Rest
20
+ ##
21
+ # A class for making REST calls through Faraday
22
+ # ClientStub's responsibilities:
23
+ # - wrap Faraday methods with a bounded explicit interface
24
+ # - store service endpoint and create full url for the request
25
+ # - store credentials and add auth information to the request
26
+ #
27
+ class ClientStub
28
+ ##
29
+ # Initializes with an endpoint and credentials
30
+ # @param endpoint [String] an endpoint for the service that this stub will send requests to
31
+ # @param credentials [Google::Auth::Credentials]
32
+ # Credentials to send with calls in form of a googleauth credentials object.
33
+ # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
34
+ #
35
+ # @yield [Faraday::Connection]
36
+ #
37
+ def initialize endpoint:, credentials:
38
+ @endpoint = endpoint
39
+ @endpoint = "https://#{endpoint}" unless /^https?:/.match? endpoint
40
+ @endpoint.sub! %r{/$}, ""
41
+
42
+ @credentials = credentials
43
+
44
+ @connection = Faraday.new url: @endpoint do |conn|
45
+ conn.headers = { "Content-Type" => "application/json" }
46
+ conn.request :google_authorization, @credentials
47
+ conn.request :retry
48
+ conn.response :raise_error
49
+ conn.adapter :net_http
50
+ end
51
+
52
+ yield @connection if block_given?
53
+ end
54
+
55
+ ##
56
+ # Makes a GET request
57
+ #
58
+ # @param uri [String] uri to send this request to
59
+ # @param params [Hash] query string parameters for the request
60
+ # @param options [::Gapic::CallOptions] gapic options to be applied to the REST call.
61
+ # Currently only timeout and headers are supported.
62
+ # @return [Faraday::Response]
63
+ def make_get_request uri:, params: {}, options: {}
64
+ make_http_request :get, uri: uri, body: nil, params: params, options: options
65
+ end
66
+
67
+ ##
68
+ # Makes a DELETE request
69
+ #
70
+ # @param uri [String] uri to send this request to
71
+ # @param params [Hash] query string parameters for the request
72
+ # @param options [::Gapic::CallOptions] gapic options to be applied to the REST call.
73
+ # Currently only timeout and headers are supported.
74
+ # @return [Faraday::Response]
75
+ def make_delete_request uri:, params: {}, options: {}
76
+ make_http_request :delete, uri: uri, body: nil, params: params, options: options
77
+ end
78
+
79
+ ##
80
+ # Makes a PATCH request
81
+ #
82
+ # @param uri [String] uri to send this request to
83
+ # @param body [String] a body to send with the request, nil for requests without a body
84
+ # @param params [Hash] query string parameters for the request
85
+ # @param options [::Gapic::CallOptions] gapic options to be applied to the REST call.
86
+ # Currently only timeout and headers are supported.
87
+ # @return [Faraday::Response]
88
+ def make_patch_request uri:, body:, params: {}, options: {}
89
+ make_http_request :patch, uri: uri, body: body, params: params, options: options
90
+ end
91
+
92
+ ##
93
+ # Makes a POST request
94
+ #
95
+ # @param uri [String] uri to send this request to
96
+ # @param body [String] a body to send with the request, nil for requests without a body
97
+ # @param params [Hash] query string parameters for the request
98
+ # @param options [::Gapic::CallOptions] gapic options to be applied to the REST call.
99
+ # Currently only timeout and headers are supported.
100
+ # @return [Faraday::Response]
101
+ def make_post_request uri:, body: nil, params: {}, options: {}
102
+ make_http_request :post, uri: uri, body: body, params: params, options: options
103
+ end
104
+
105
+ ##
106
+ # Makes a PUT request
107
+ #
108
+ # @param uri [String] uri to send this request to
109
+ # @param body [String] a body to send with the request, nil for requests without a body
110
+ # @param params [Hash] query string parameters for the request
111
+ # @param options [::Gapic::CallOptions] gapic options to be applied to the REST call.
112
+ # Currently only timeout and headers are supported.
113
+ # @return [Faraday::Response]
114
+ def make_put_request uri:, body: nil, params: {}, options: {}
115
+ make_http_request :put, uri: uri, body: body, params: params, options: options
116
+ end
117
+
118
+ protected
119
+
120
+ ##
121
+ # Sends a http request via Faraday
122
+ # @param verb [Symbol] http verb
123
+ # @param uri [String] uri to send this request to
124
+ # @param body [String, nil] a body to send with the request, nil for requests without a body
125
+ # @param params [Hash] query string parameters for the request
126
+ # @param options [::Gapic::CallOptions] gapic options to be applied to the REST call.
127
+ # Currently only timeout and headers are supported.
128
+ # @return [Faraday::Response]
129
+ def make_http_request verb, uri:, body:, params:, options:
130
+ @connection.send verb, uri do |req|
131
+ req.params = params if params.any?
132
+ req.body = body unless body.nil?
133
+ req.headers = req.headers.merge options.metadata
134
+ req.options.timeout = options.timeout if options.timeout&.positive?
135
+ end
136
+ end
137
+ end
138
+ end
139
+ end
@@ -0,0 +1,73 @@
1
+ # Copyright 2021 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 "json"
16
+
17
+ module Gapic
18
+ module Rest
19
+ # Gapic REST exception class
20
+ class Error < StandardError
21
+ # @return [Integer] the http status code for the error
22
+ attr_reader :status_code
23
+
24
+ ##
25
+ # @param message [String, nil] error message
26
+ # @param status_code [Integer, nil] HTTP status code of this error
27
+ #
28
+ def initialize message, status_code
29
+ @status_code = status_code
30
+ super message
31
+ end
32
+
33
+ class << self
34
+ ##
35
+ # This creates a new error message wrapping the Faraday's one. Additionally
36
+ # it tries to parse and set a detailed message and an error code from
37
+ # from the Google Cloud's response body
38
+ #
39
+ def wrap_faraday_error err
40
+ message = err.message
41
+ status_code = err.response_status
42
+
43
+ if err.response_body
44
+ msg, code = try_parse_from_body err.response_body
45
+ message = "An error has occurred when making a REST request: #{msg}" unless msg.nil?
46
+ status_code = code unless code.nil?
47
+ end
48
+
49
+ Gapic::Rest::Error.new message, status_code
50
+ end
51
+
52
+ private
53
+
54
+ ##
55
+ # Tries to get the error information from the JSON bodies
56
+ #
57
+ # @param body_str [String]
58
+ # @return [Array(String, String)]
59
+ def try_parse_from_body body_str
60
+ body = JSON.parse body_str
61
+ return [nil, nil] unless body && body["error"].is_a?(Hash)
62
+
63
+ message = body["error"]["message"]
64
+ code = body["error"]["code"]
65
+
66
+ [message, code]
67
+ rescue JSON::ParserError
68
+ [nil, nil]
69
+ end
70
+ end
71
+ end
72
+ end
73
+ end
@@ -0,0 +1,45 @@
1
+ # Copyright 2021 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
+ require "faraday"
15
+
16
+ module Gapic
17
+ module Rest
18
+ # Registers the middleware with Faraday
19
+ module FaradayMiddleware
20
+ ##
21
+ # Request middleware that constructs the Authorization HTTP header
22
+ # using ::Google::Auth::Credentials
23
+ #
24
+ class GoogleAuthorization < Faraday::Middleware
25
+ ##
26
+ # @param app [#call]
27
+ # @param credentials [::Google::Auth::Credentials]
28
+ def initialize app, credentials
29
+ @credentials = credentials
30
+ super app
31
+ end
32
+
33
+ # @param env [Faraday::Env]
34
+ def call env
35
+ auth_hash = @credentials.client.apply({})
36
+ env.request_headers["Authorization"] = auth_hash[:authorization]
37
+
38
+ @app.call env
39
+ end
40
+ end
41
+
42
+ Faraday::Request.register_middleware google_authorization: -> { GoogleAuthorization }
43
+ end
44
+ end
45
+ end
metadata CHANGED
@@ -1,103 +1,117 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gapic-common
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google API Authors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-30 00:00:00.000000000 Z
11
+ date: 2021-06-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: google-protobuf
14
+ name: faraday
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '3.12'
20
- - - ">="
21
- - !ruby/object:Gem::Version
22
- version: 3.12.2
19
+ version: '1.3'
23
20
  type: :runtime
24
21
  prerelease: false
25
22
  version_requirements: !ruby/object:Gem::Requirement
26
23
  requirements:
27
24
  - - "~>"
28
25
  - !ruby/object:Gem::Version
29
- version: '3.12'
30
- - - ">="
31
- - !ruby/object:Gem::Version
32
- version: 3.12.2
26
+ version: '1.3'
33
27
  - !ruby/object:Gem::Dependency
34
28
  name: googleapis-common-protos
35
29
  requirement: !ruby/object:Gem::Requirement
36
30
  requirements:
37
31
  - - ">="
38
32
  - !ruby/object:Gem::Version
39
- version: 1.3.9
33
+ version: 1.3.11
40
34
  - - "<"
41
35
  - !ruby/object:Gem::Version
42
- version: '2.0'
36
+ version: 2.a
43
37
  type: :runtime
44
38
  prerelease: false
45
39
  version_requirements: !ruby/object:Gem::Requirement
46
40
  requirements:
47
41
  - - ">="
48
42
  - !ruby/object:Gem::Version
49
- version: 1.3.9
43
+ version: 1.3.11
50
44
  - - "<"
51
45
  - !ruby/object:Gem::Version
52
- version: '2.0'
46
+ version: 2.a
53
47
  - !ruby/object:Gem::Dependency
54
48
  name: googleapis-common-protos-types
55
49
  requirement: !ruby/object:Gem::Requirement
56
50
  requirements:
57
51
  - - ">="
58
52
  - !ruby/object:Gem::Version
59
- version: 1.0.4
53
+ version: 1.0.6
60
54
  - - "<"
61
55
  - !ruby/object:Gem::Version
62
- version: '2.0'
56
+ version: 2.a
63
57
  type: :runtime
64
58
  prerelease: false
65
59
  version_requirements: !ruby/object:Gem::Requirement
66
60
  requirements:
67
61
  - - ">="
68
62
  - !ruby/object:Gem::Version
69
- version: 1.0.4
63
+ version: 1.0.6
70
64
  - - "<"
71
65
  - !ruby/object:Gem::Version
72
- version: '2.0'
66
+ version: 2.a
73
67
  - !ruby/object:Gem::Dependency
74
68
  name: googleauth
69
+ requirement: !ruby/object:Gem::Requirement
70
+ requirements:
71
+ - - ">="
72
+ - !ruby/object:Gem::Version
73
+ version: 0.16.2
74
+ - - "<"
75
+ - !ruby/object:Gem::Version
76
+ version: 2.a
77
+ type: :runtime
78
+ prerelease: false
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ version: 0.16.2
84
+ - - "<"
85
+ - !ruby/object:Gem::Version
86
+ version: 2.a
87
+ - !ruby/object:Gem::Dependency
88
+ name: google-protobuf
75
89
  requirement: !ruby/object:Gem::Requirement
76
90
  requirements:
77
91
  - - "~>"
78
92
  - !ruby/object:Gem::Version
79
- version: '0.9'
93
+ version: '3.14'
80
94
  type: :runtime
81
95
  prerelease: false
82
96
  version_requirements: !ruby/object:Gem::Requirement
83
97
  requirements:
84
98
  - - "~>"
85
99
  - !ruby/object:Gem::Version
86
- version: '0.9'
100
+ version: '3.14'
87
101
  - !ruby/object:Gem::Dependency
88
102
  name: grpc
89
103
  requirement: !ruby/object:Gem::Requirement
90
104
  requirements:
91
105
  - - "~>"
92
106
  - !ruby/object:Gem::Version
93
- version: '1.25'
107
+ version: '1.36'
94
108
  type: :runtime
95
109
  prerelease: false
96
110
  version_requirements: !ruby/object:Gem::Requirement
97
111
  requirements:
98
112
  - - "~>"
99
113
  - !ruby/object:Gem::Version
100
- version: '1.25'
114
+ version: '1.36'
101
115
  - !ruby/object:Gem::Dependency
102
116
  name: google-cloud-core
103
117
  requirement: !ruby/object:Gem::Requirement
@@ -118,28 +132,28 @@ dependencies:
118
132
  requirements:
119
133
  - - "~>"
120
134
  - !ruby/object:Gem::Version
121
- version: 1.24.0
135
+ version: 1.25.1
122
136
  type: :development
123
137
  prerelease: false
124
138
  version_requirements: !ruby/object:Gem::Requirement
125
139
  requirements:
126
140
  - - "~>"
127
141
  - !ruby/object:Gem::Version
128
- version: 1.24.0
142
+ version: 1.25.1
129
143
  - !ruby/object:Gem::Dependency
130
144
  name: minitest
131
145
  requirement: !ruby/object:Gem::Requirement
132
146
  requirements:
133
147
  - - "~>"
134
148
  - !ruby/object:Gem::Version
135
- version: '5.10'
149
+ version: '5.14'
136
150
  type: :development
137
151
  prerelease: false
138
152
  version_requirements: !ruby/object:Gem::Requirement
139
153
  requirements:
140
154
  - - "~>"
141
155
  - !ruby/object:Gem::Version
142
- version: '5.10'
156
+ version: '5.14'
143
157
  - !ruby/object:Gem::Dependency
144
158
  name: minitest-autotest
145
159
  requirement: !ruby/object:Gem::Requirement
@@ -254,6 +268,10 @@ files:
254
268
  - lib/gapic/operation/retry_policy.rb
255
269
  - lib/gapic/paged_enumerable.rb
256
270
  - lib/gapic/protobuf.rb
271
+ - lib/gapic/rest.rb
272
+ - lib/gapic/rest/client_stub.rb
273
+ - lib/gapic/rest/error.rb
274
+ - lib/gapic/rest/faraday_middleware.rb
257
275
  - lib/gapic/stream_input.rb
258
276
  homepage: https://github.com/googleapis/gapic-generator-ruby
259
277
  licenses:
@@ -267,14 +285,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
267
285
  requirements:
268
286
  - - ">="
269
287
  - !ruby/object:Gem::Version
270
- version: '2.4'
288
+ version: '2.5'
271
289
  required_rubygems_version: !ruby/object:Gem::Requirement
272
290
  requirements:
273
291
  - - ">="
274
292
  - !ruby/object:Gem::Version
275
293
  version: '0'
276
294
  requirements: []
277
- rubygems_version: 3.0.3
295
+ rubygems_version: 3.1.6
278
296
  signing_key:
279
297
  specification_version: 4
280
298
  summary: Common code for GAPIC-generated API clients