google-apis-core 0.15.1 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2aa5b385b62b4d2892f62889791dd507076098a92b4485e9439b608cea35f529
4
- data.tar.gz: 1b7e3e031e932ae10a3164d6302272e3dc64fe937c6656650e3d8bad80447bb5
3
+ metadata.gz: 4b72f0bd125a4b9a5bbefb344ca6906f60c2da97299f477a411f4174a5a1e125
4
+ data.tar.gz: f60c015250f7df95b17c06a13e30a038f02f63d964940fb35b1be3596b455226
5
5
  SHA512:
6
- metadata.gz: 024d82e1a05cb3ff39d09ee521257b38853d52b03401fd26381c1b5563c354fe5df795b9fb742a24e08b414bcfd25db93bdc6b3e414fa64f0904e9eefde7d64b
7
- data.tar.gz: 5e243dedd8dfb150f83c15801e40a0fb9a1786f7eb91163a5ab0bdb4dfe637328786edcc2f0be5be9a373e7897a4dc1471bbd7d570216037f2c6d0609c2942e4
6
+ metadata.gz: 7a08ed2a45ee09dd772fe046fa7b245663d9c39c12f26aab8a15d836d78a5bd1b98d6d9b97d4b97fc86dfba57e068074c7f484555ff1acea1b9ecba7bf699a34
7
+ data.tar.gz: b7125709ef96626805cf00bd31638b628e1425964a73021c0efd0a62d488a01037a9055371dde53ebf54c64905526de682474d006ae68072e081f423b3954618
data/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Release History
2
2
 
3
+ ### 0.17.0 (2025-04-30)
4
+
5
+ #### Features
6
+
7
+ * ruby 3.1 minimum, 3.4 default ([#22594](https://github.com/googleapis/google-api-ruby-client/issues/22594))
8
+ #### Bug Fixes
9
+
10
+ * Fixed a method redefined warning ([#21572](https://github.com/googleapis/google-api-ruby-client/issues/21572))
11
+ * Ensure compatibility with frozen string literals ([#21648](https://github.com/googleapis/google-api-ruby-client/issues/21648))
12
+
13
+ ### 0.16.0 (2025-01-12)
14
+
15
+ #### Features
16
+
17
+ * add ECONNRESET error as retriable error ([#20354](https://github.com/googleapis/google-api-ruby-client/issues/20354))
18
+
3
19
  ### 0.15.1 (2024-07-29)
4
20
 
5
21
  #### Bug Fixes
@@ -151,7 +151,7 @@ module Google
151
151
 
152
152
  # HTTP client
153
153
  # @return [HTTPClient]
154
- attr_accessor :client
154
+ attr_writer :client
155
155
 
156
156
  # General settings
157
157
  # @return [Google::Apis::ClientOptions]
@@ -42,7 +42,7 @@ module Google
42
42
  end
43
43
 
44
44
  def read(length = nil, buf = nil)
45
- buf = buf ? buf.replace('') : ''
45
+ buf = buf ? buf.replace('') : +''
46
46
 
47
47
  begin
48
48
  io = @ios[@index]
@@ -46,7 +46,7 @@ module Google
46
46
  @download_io = File.open(download_dest, 'wb')
47
47
  @close_io_on_finish = true
48
48
  else
49
- @download_io = StringIO.new('', 'wb')
49
+ @download_io = StringIO.new(+'', 'wb')
50
50
  @close_io_on_finish = false
51
51
  end
52
52
  super
@@ -283,7 +283,7 @@ module Google
283
283
  # @yield [nil, err] if block given
284
284
  # @raise [StandardError] if no block
285
285
  def error(err, rethrow: false, &block)
286
- logger.debug { sprintf('Error - %s', PP.pp(err, '')) }
286
+ logger.debug { sprintf('Error - %s', PP.pp(err, +'')) }
287
287
  if err.is_a?(HTTPClient::BadResponseError)
288
288
  begin
289
289
  res = err.res
@@ -292,7 +292,12 @@ module Google
292
292
  rescue Google::Apis::Error => e
293
293
  err = e
294
294
  end
295
- elsif err.is_a?(HTTPClient::TimeoutError) || err.is_a?(SocketError) || err.is_a?(HTTPClient::KeepAliveDisconnected) || err.is_a?(Errno::ECONNREFUSED) || err.is_a?(Errno::ETIMEDOUT)
295
+ elsif err.is_a?(HTTPClient::TimeoutError) ||
296
+ err.is_a?(SocketError) ||
297
+ err.is_a?(HTTPClient::KeepAliveDisconnected) ||
298
+ err.is_a?(Errno::ECONNREFUSED) ||
299
+ err.is_a?(Errno::ETIMEDOUT) ||
300
+ err.is_a?(Errno::ECONNRESET)
296
301
  err = Google::Apis::TransmissionError.new(err)
297
302
  end
298
303
  block.call(nil, err) if block_given?
@@ -380,7 +385,7 @@ module Google
380
385
  end
381
386
 
382
387
  def safe_pretty_representation obj
383
- out = ""
388
+ out = +""
384
389
  printer = RedactingPP.new out, 79
385
390
  printer.guard_inspect_key { printer.pp obj }
386
391
  printer.flush
@@ -388,7 +393,7 @@ module Google
388
393
  end
389
394
 
390
395
  def safe_single_line_representation obj
391
- out = ""
396
+ out = +""
392
397
  printer = RedactingSingleLine.new out
393
398
  printer.guard_inspect_key { printer.pp obj }
394
399
  printer.flush
@@ -31,7 +31,7 @@ module Google
31
31
  end
32
32
 
33
33
  def to_io(boundary)
34
- part = ''
34
+ part = +''
35
35
  part << "--#{boundary}\r\n"
36
36
  part << "Content-Type: application/json\r\n"
37
37
  @header.each do |(k, v)|
@@ -59,7 +59,7 @@ module Google
59
59
  end
60
60
 
61
61
  def to_io(boundary)
62
- head = ''
62
+ head = +''
63
63
  head << "--#{boundary}\r\n"
64
64
  @header.each do |(k, v)|
65
65
  head << "#{k}: #{v}\r\n"
@@ -67,7 +67,7 @@ module Google
67
67
  head << "Content-Length: #{@length}\r\n" unless @length.nil?
68
68
  head << "Content-Transfer-Encoding: binary\r\n"
69
69
  head << "\r\n"
70
- Google::Apis::Core::CompositeIO.new(StringIO.new(head), @io, StringIO.new("\r\n"))
70
+ Google::Apis::Core::CompositeIO.new(StringIO.new(head), @io, StringIO.new(+"\r\n"))
71
71
  end
72
72
  end
73
73
 
@@ -126,7 +126,7 @@ module Google
126
126
  # @return [IO]
127
127
  # IO stream
128
128
  def assemble
129
- @parts << StringIO.new("--#{@boundary}--\r\n\r\n")
129
+ @parts << StringIO.new(+"--#{@boundary}--\r\n\r\n")
130
130
  Google::Apis::Core::CompositeIO.new(*@parts)
131
131
  end
132
132
  end
@@ -16,7 +16,7 @@ module Google
16
16
  module Apis
17
17
  module Core
18
18
  # Core version
19
- VERSION = "0.15.1".freeze
19
+ VERSION = "0.17.0".freeze
20
20
  end
21
21
  end
22
22
  end
@@ -43,7 +43,7 @@ module Google
43
43
  end
44
44
 
45
45
  def inspect
46
- extra = ""
46
+ extra = +""
47
47
  extra << " status_code: #{status_code.inspect}" unless status_code.nil?
48
48
  extra << " header: #{header.inspect}" unless header.nil?
49
49
  extra << " body: #{body.inspect}" unless body.nil?
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-apis-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.1
4
+ version: 0.17.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-07-29 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: representable
@@ -126,7 +125,6 @@ dependencies:
126
125
  - - ">="
127
126
  - !ruby/object:Gem::Version
128
127
  version: '0'
129
- description:
130
128
  email: googleapis-packages@google.com
131
129
  executables: []
132
130
  extensions: []
@@ -166,9 +164,8 @@ licenses:
166
164
  metadata:
167
165
  bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
168
166
  changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/google-apis-core/CHANGELOG.md
169
- documentation_uri: https://googleapis.dev/ruby/google-apis-core/v0.15.1
167
+ documentation_uri: https://googleapis.dev/ruby/google-apis-core/v0.17.0
170
168
  source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/google-apis-core
171
- post_install_message:
172
169
  rdoc_options: []
173
170
  require_paths:
174
171
  - lib
@@ -176,15 +173,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
176
173
  requirements:
177
174
  - - ">="
178
175
  - !ruby/object:Gem::Version
179
- version: '2.7'
176
+ version: '3.1'
180
177
  required_rubygems_version: !ruby/object:Gem::Requirement
181
178
  requirements:
182
179
  - - ">="
183
180
  - !ruby/object:Gem::Version
184
181
  version: '0'
185
182
  requirements: []
186
- rubygems_version: 3.5.6
187
- signing_key:
183
+ rubygems_version: 3.6.8
188
184
  specification_version: 4
189
185
  summary: Common utility and base classes for legacy Google REST clients
190
186
  test_files: []