google-apis-core 1.3.2 → 1.4.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 +4 -4
- data/CHANGELOG.md +10 -0
- data/OVERVIEW.md +8 -0
- data/lib/google/apis/core/base_service.rb +1 -0
- data/lib/google/apis/core/version.rb +1 -1
- data/lib/google/apis/options.rb +27 -2
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: acf2f399e82520a21f535b5d3a47d75d20aaa428e7c4807d2704f897dbdb54f5
|
|
4
|
+
data.tar.gz: 1e0290e584b80556ae63867e753a2440bc92418d1e58f9731bb952a3230835c9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 583de4d2a041f1f07d927e2f422a5f64e53b8349586d986aee61b46de694bf1f67b4ac10a44288377c07e5e660d008adc2ae08e644f8a476bd07bd6a68a882e0
|
|
7
|
+
data.tar.gz: 0c7d347a9ee35b7b65a33821e97f4b15407652f1c7771c6b47c1258a3dacf1810dafbee8596a02e326f480d458e83bfa2c3e9bbda0e6457e06e8955cb45c37a4
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Release History
|
|
2
2
|
|
|
3
|
+
### 1.4.0 (2026-10-22)
|
|
4
|
+
|
|
5
|
+
#### Features
|
|
6
|
+
|
|
7
|
+
* allow setting the faraday adapter to use ([#27337](https://github.com/googleapis/google-api-ruby-client/issues/27337)) ([370d8ae](https://github.com/googleapis/google-api-ruby-client/commit/370d8ae750e125066f3c1204b3ceb561d3aca1dd)), refs [#27339](https://github.com/googleapis/google-api-ruby-client/issues/27339)
|
|
8
|
+
|
|
9
|
+
#### Documentation
|
|
10
|
+
|
|
11
|
+
* document ClientOptions#adapter requirements and caveats ([#28298](https://github.com/googleapis/google-api-ruby-client/issues/28298)) ([96bd38f](https://github.com/googleapis/google-api-ruby-client/commit/96bd38fcceccfe20f0713545611911604d673f94)), refs [#27337](https://github.com/googleapis/google-api-ruby-client/issues/27337)
|
|
12
|
+
|
|
3
13
|
### 1.3.2 (2026-10-15)
|
|
4
14
|
|
|
5
15
|
#### Bug Fixes
|
data/OVERVIEW.md
CHANGED
|
@@ -22,6 +22,14 @@ should pin `google-apis-core` to a 0.x version in your Gemfile. For example:
|
|
|
22
22
|
|
|
23
23
|
gem "google-apis-core", "~> 0.18"
|
|
24
24
|
|
|
25
|
+
google-apis-core uses Faraday's default adapter, which wraps [net-http](https://github.com/ruby/net-http), and is tested only against it. You can change the adapter by setting the `:adapter` client option:
|
|
26
|
+
|
|
27
|
+
```ruby
|
|
28
|
+
Google::Apis::ClientOptions.default.adapter = :net_http_persistent # or :httpx, or...
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
There's a caveat, though: downloading media requires a `faraday` adapter which [implements the `on_data` streaming API](https://lostisland.github.io/faraday/#/advanced/streaming-responses?id=streaming-responses). See {Google::Apis::ClientOptions#adapter} for the full requirements.
|
|
32
|
+
|
|
25
33
|
## Documentation
|
|
26
34
|
|
|
27
35
|
More detailed descriptions of the Google legacy REST clients are available in two documents.
|
|
@@ -567,6 +567,7 @@ module Google
|
|
|
567
567
|
Faraday.new options do |faraday|
|
|
568
568
|
faraday.response :logger, Google::Apis.logger if client_options.log_http_requests
|
|
569
569
|
faraday.response :follow_redirects_google_apis_core, limit: 5
|
|
570
|
+
faraday.adapter client_options.adapter if client_options.adapter
|
|
570
571
|
end
|
|
571
572
|
end
|
|
572
573
|
|
data/lib/google/apis/options.rb
CHANGED
|
@@ -23,7 +23,8 @@ module Google
|
|
|
23
23
|
:read_timeout_sec,
|
|
24
24
|
:send_timeout_sec,
|
|
25
25
|
:log_http_requests,
|
|
26
|
-
:transparent_gzip_decompression
|
|
26
|
+
:transparent_gzip_decompression,
|
|
27
|
+
:adapter)
|
|
27
28
|
|
|
28
29
|
RequestOptions = Struct.new(
|
|
29
30
|
:authorization,
|
|
@@ -50,6 +51,30 @@ module Google
|
|
|
50
51
|
# @return [String] Name of the application, for identification in the User-Agent header
|
|
51
52
|
# @!attribute [rw] application_version
|
|
52
53
|
# @return [String] Version of the application, for identification in the User-Agent header
|
|
54
|
+
# @!attribute [rw] adapter
|
|
55
|
+
# @return [Symbol, Class, nil] The Faraday adapter for HTTP connections, either a registered
|
|
56
|
+
# adapter name ([Faraday adapters](https://lostisland.github.io/faraday/#/adapters/index?id=adapters),
|
|
57
|
+
# for example `:net_http_persistent`) or an adapter class. If `nil` (the
|
|
58
|
+
# default), Faraday uses `Faraday.default_adapter`, which is `:net_http` unless changed.
|
|
59
|
+
#
|
|
60
|
+
# Only the default `:net_http` adapter is tested with google-apis-core. Any other adapter
|
|
61
|
+
# is used at your own risk. It must:
|
|
62
|
+
#
|
|
63
|
+
# * support response streaming with `on_data`, which media downloads require;
|
|
64
|
+
# * honor the `open_timeout_sec`, `read_timeout_sec`, `send_timeout_sec` and `proxy_url`
|
|
65
|
+
# settings;
|
|
66
|
+
# * raise `Faraday::Error` subclasses for network failures, so that requests are retried;
|
|
67
|
+
# * be safe to use from several threads at once, because each service shares a single
|
|
68
|
+
# connection.
|
|
69
|
+
#
|
|
70
|
+
# If the adapter keeps connections open, don't reuse them across `fork`. Create services
|
|
71
|
+
# in each process after forking.
|
|
72
|
+
#
|
|
73
|
+
# Load the adapter (for example `require "faraday/net_http_persistent"`) before the
|
|
74
|
+
# connection is created. An unregistered name raises `Faraday::Error` at that point.
|
|
75
|
+
# A service creates its connection once, on first use, so set this option before then.
|
|
76
|
+
# Each service copies `ClientOptions.default` when it's created, so changing the default
|
|
77
|
+
# only affects services created afterwards.
|
|
53
78
|
# @!attribute [rw] proxy_url
|
|
54
79
|
# @return [String] URL of a proxy server
|
|
55
80
|
# @!attribute [rw] log_http_requests
|
|
@@ -82,7 +107,7 @@ module Google
|
|
|
82
107
|
# @!attribute [rw] max_interval
|
|
83
108
|
# @return [Integer] The maximum interval in seconds that any individual retry can reach.
|
|
84
109
|
# @!attribute [rw] multiplier
|
|
85
|
-
# @return [Numeric] Each successive interval grows by this factor. A multipler of 1.5 means the next interval
|
|
110
|
+
# @return [Numeric] Each successive interval grows by this factor. A multipler of 1.5 means the next interval
|
|
86
111
|
# will be 1.5x the current interval.
|
|
87
112
|
# @!attribute [rw] header
|
|
88
113
|
# @return [Hash<String,String>] Additional HTTP headers to include in requests.
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: google-apis-core
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Google LLC
|
|
@@ -167,7 +167,7 @@ licenses:
|
|
|
167
167
|
metadata:
|
|
168
168
|
bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
|
|
169
169
|
changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/google-apis-core/CHANGELOG.md
|
|
170
|
-
documentation_uri: https://googleapis.dev/ruby/google-apis-core/v1.
|
|
170
|
+
documentation_uri: https://googleapis.dev/ruby/google-apis-core/v1.4.0
|
|
171
171
|
source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/google-apis-core
|
|
172
172
|
rdoc_options: []
|
|
173
173
|
require_paths:
|