google-cloud-translate 2.2.0 → 2.3.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: 1d46a3536bbd20420cc8627279984040d9648b02beb22fdb1879909a1707de63
4
- data.tar.gz: 651d0935669fb6196f4d823fb63d3ec3b2feaf8bde3f5080bf7d9c3d2035b7b7
3
+ metadata.gz: e9017717a3a554b70871ae4640cd18eea061647f599ab9425264e2c8b67b2524
4
+ data.tar.gz: 9a4bc6d4409525d4d3c4c31e9b291addf9fbcfaeec70102a4efb4d5de5feec3a
5
5
  SHA512:
6
- metadata.gz: 9326823cec751bccc013659c2bcf5070b52d4fa910d191fb9b6071587c9007d56ee1f2fc8b8681bf9cc757894772fcf3fe01c3ff11db521c7f25bf7dc75e1689
7
- data.tar.gz: 30e7d484afb99b39d207ea7e2a2593618bbdbe2d1ce0200835829fd377398a3a59b555c626da2439b984103cb3a9dd1b867c6886e22390bb04dfc1a1890c809e
6
+ metadata.gz: 4ac4580fb2385cdd2b9365c3f0901093f0c960abab1bb4fcd7acde0499109c7a68e5c9e4f7eb80eabba912ff589c54f1697623a74aeccd1db39aaeaa37ca5d21
7
+ data.tar.gz: 53e7cdf69fc891cb98866bf61b2cb6246e45b1ca558c8e86f7d65c0a5c30caba867806f923871fc0ee3a026e43b8fd66ea7c0c888edab156d5930db917f05215
@@ -1,5 +1,11 @@
1
1
  # Release History
2
2
 
3
+ ### 2.3.0 / 2020-03-28
4
+
5
+ #### Features
6
+
7
+ * send quota project header in the V2 client
8
+
3
9
  ### 2.2.0 / 2020-03-11
4
10
 
5
11
  #### Features
@@ -110,12 +110,16 @@ module Google
110
110
  ##
111
111
  # The default HTTP headers to be sent on all API calls.
112
112
  def default_http_headers
113
- @default_http_headers ||= {
114
- "User-Agent" => "gcloud-ruby/#{Google::Cloud::Translate::VERSION}",
115
- "google-cloud-resource-prefix" => "projects/#{@project}",
116
- "Content-Type" => "application/json",
117
- "x-goog-api-client" => "gl-ruby/#{RUBY_VERSION} gccl/#{Google::Cloud::Translate::VERSION}"
118
- }
113
+ @default_http_headers ||= begin
114
+ headers = {
115
+ "User-Agent" => "gcloud-ruby/#{Google::Cloud::Translate::VERSION}",
116
+ "google-cloud-resource-prefix" => "projects/#{@project}",
117
+ "Content-Type" => "application/json",
118
+ "x-goog-api-client" => "gl-ruby/#{RUBY_VERSION} gccl/#{Google::Cloud::Translate::VERSION}"
119
+ }
120
+ headers["x-goog-user-project"] = credentials.quota_project_id if credentials.respond_to? :quota_project_id
121
+ headers
122
+ end
119
123
  end
120
124
 
121
125
  ##
@@ -16,7 +16,7 @@
16
16
  module Google
17
17
  module Cloud
18
18
  module Translate
19
- VERSION = "2.2.0".freeze
19
+ VERSION = "2.3.0".freeze
20
20
  end
21
21
  end
22
22
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-translate
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-11 00:00:00.000000000 Z
11
+ date: 2020-03-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday