google-cloud-metastore 1.2.0 → 1.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: f764c45a4f8e9f953748a7c46bd8a0a25242bff883f38a020030f8fa23764f98
4
- data.tar.gz: 00a23f61240ff61ce10618d0ff672f2de88fa7cf16d7a57e6bc3f8e2e9a3e3af
3
+ metadata.gz: 56a759b8dfd1e778ca20992ac8e6aec6697cd5c11f9c0754ba6a0de2842fc08f
4
+ data.tar.gz: f95c956e8bf83a666fab4eb16cd829057dbfb9f9f80675d9720518d4bf4acaa0
5
5
  SHA512:
6
- metadata.gz: a599bd5bb5ebc6bdc07e7f7f4a4e6befce2afbf73ddcbfb46468641c70c6dfe4a1d1684939ea9f39c23806d1416b5b4da5e956ec9ab29f5687c0d460673e2c8f
7
- data.tar.gz: 1402216564776ac94fc4a0e5a69d1f2dc79af63e900a61472cf1834e1e6d751a0a7768a2884404aec0a150a5c228d030270184c4ade6b5b557eb756f387b0d6e
6
+ metadata.gz: 48688a71de297b913fe98672c58af0c4b25ae5770d877855a7284c6479147a13693948dc69e23c26b4317c30a582c00d2402360ea89e45d3381790a6c804e7cd
7
+ data.tar.gz: 0d7232f44b7382706fbd4a6d94f424fcfcf6717a87b87bffbf2e463007ecb318407b338f60500bfba8d0ef148c193840837793ebbae9aed45c8bedb321d30077
data/README.md CHANGED
@@ -35,32 +35,6 @@ In order to use this library, you first need to go through the following steps:
35
35
  1. [Enable the API.](https://console.cloud.google.com/apis/library/metastore.googleapis.com)
36
36
  1. {file:AUTHENTICATION.md Set up authentication.}
37
37
 
38
- ## Enabling Logging
39
-
40
- To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
41
- The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below,
42
- or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
43
- that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
44
- and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
45
-
46
- Configuring a Ruby stdlib logger:
47
-
48
- ```ruby
49
- require "logger"
50
-
51
- module MyLogger
52
- LOGGER = Logger.new $stderr, level: Logger::WARN
53
- def logger
54
- LOGGER
55
- end
56
- end
57
-
58
- # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
59
- module GRPC
60
- extend MyLogger
61
- end
62
- ```
63
-
64
38
  ## Supported Ruby Versions
65
39
 
66
40
  This library is supported on Ruby 2.6+.
@@ -20,7 +20,7 @@
20
20
  module Google
21
21
  module Cloud
22
22
  module Metastore
23
- VERSION = "1.2.0"
23
+ VERSION = "1.3.0"
24
24
  end
25
25
  end
26
26
  end
@@ -49,11 +49,13 @@ module Google
49
49
  #
50
50
  # By default, this returns an instance of
51
51
  # [Google::Cloud::Metastore::V1::DataprocMetastore::Client](https://googleapis.dev/ruby/google-cloud-metastore-v1/latest/Google/Cloud/Metastore/V1/DataprocMetastore/Client.html)
52
- # for version V1 of the API.
53
- # However, you can specify specify a different API version by passing it in the
52
+ # for a gRPC client for version V1 of the API.
53
+ # However, you can specify a different API version by passing it in the
54
54
  # `version` parameter. If the DataprocMetastore service is
55
55
  # supported by that API version, and the corresponding gem is available, the
56
56
  # appropriate versioned client will be returned.
57
+ # You can also specify a different transport by passing `:rest` or `:grpc` in
58
+ # the `transport` parameter.
57
59
  #
58
60
  # ## About DataprocMetastore
59
61
  #
@@ -77,17 +79,19 @@ module Google
77
79
  #
78
80
  # @param version [::String, ::Symbol] The API version to connect to. Optional.
79
81
  # Defaults to `:v1`.
80
- # @return [DataprocMetastore::Client] A client object for the specified version.
82
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
83
+ # @return [::Object] A client object for the specified version.
81
84
  #
82
- def self.dataproc_metastore version: :v1, &block
85
+ def self.dataproc_metastore version: :v1, transport: :grpc, &block
83
86
  require "google/cloud/metastore/#{version.to_s.downcase}"
84
87
 
85
88
  package_name = Google::Cloud::Metastore
86
89
  .constants
87
90
  .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
88
91
  .first
89
- package_module = Google::Cloud::Metastore.const_get package_name
90
- package_module.const_get(:DataprocMetastore).const_get(:Client).new(&block)
92
+ service_module = Google::Cloud::Metastore.const_get(package_name).const_get(:DataprocMetastore)
93
+ service_module = service_module.const_get(:Rest) if transport == :rest
94
+ service_module.const_get(:Client).new(&block)
91
95
  end
92
96
 
93
97
  ##
@@ -95,11 +99,13 @@ module Google
95
99
  #
96
100
  # By default, this returns an instance of
97
101
  # [Google::Cloud::Metastore::V1::DataprocMetastoreFederation::Client](https://googleapis.dev/ruby/google-cloud-metastore-v1/latest/Google/Cloud/Metastore/V1/DataprocMetastoreFederation/Client.html)
98
- # for version V1 of the API.
99
- # However, you can specify specify a different API version by passing it in the
102
+ # for a gRPC client for version V1 of the API.
103
+ # However, you can specify a different API version by passing it in the
100
104
  # `version` parameter. If the DataprocMetastoreFederation service is
101
105
  # supported by that API version, and the corresponding gem is available, the
102
106
  # appropriate versioned client will be returned.
107
+ # You can also specify a different transport by passing `:rest` or `:grpc` in
108
+ # the `transport` parameter.
103
109
  #
104
110
  # ## About DataprocMetastoreFederation
105
111
  #
@@ -119,17 +125,19 @@ module Google
119
125
  #
120
126
  # @param version [::String, ::Symbol] The API version to connect to. Optional.
121
127
  # Defaults to `:v1`.
122
- # @return [DataprocMetastoreFederation::Client] A client object for the specified version.
128
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
129
+ # @return [::Object] A client object for the specified version.
123
130
  #
124
- def self.dataproc_metastore_federation version: :v1, &block
131
+ def self.dataproc_metastore_federation version: :v1, transport: :grpc, &block
125
132
  require "google/cloud/metastore/#{version.to_s.downcase}"
126
133
 
127
134
  package_name = Google::Cloud::Metastore
128
135
  .constants
129
136
  .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
130
137
  .first
131
- package_module = Google::Cloud::Metastore.const_get package_name
132
- package_module.const_get(:DataprocMetastoreFederation).const_get(:Client).new(&block)
138
+ service_module = Google::Cloud::Metastore.const_get(package_name).const_get(:DataprocMetastoreFederation)
139
+ service_module = service_module.const_get(:Rest) if transport == :rest
140
+ service_module.const_get(:Client).new(&block)
133
141
  end
134
142
 
135
143
  ##
@@ -149,7 +157,7 @@ module Google
149
157
  # * `timeout` (*type:* `Numeric`) -
150
158
  # Default timeout in seconds.
151
159
  # * `metadata` (*type:* `Hash{Symbol=>String}`) -
152
- # Additional gRPC headers to be sent with the call.
160
+ # Additional headers to be sent with the call.
153
161
  # * `retry_policy` (*type:* `Hash`) -
154
162
  # The retry policy. The value is a hash with the following keys:
155
163
  # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-metastore
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.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: 2022-12-12 00:00:00.000000000 Z
11
+ date: 2023-03-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-cloud-core
@@ -30,7 +30,7 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '0.4'
33
+ version: '0.6'
34
34
  - - "<"
35
35
  - !ruby/object:Gem::Version
36
36
  version: 2.a
@@ -40,7 +40,7 @@ dependencies:
40
40
  requirements:
41
41
  - - ">="
42
42
  - !ruby/object:Gem::Version
43
- version: '0.4'
43
+ version: '0.6'
44
44
  - - "<"
45
45
  - !ruby/object:Gem::Version
46
46
  version: 2.a
@@ -50,7 +50,7 @@ dependencies:
50
50
  requirements:
51
51
  - - ">="
52
52
  - !ruby/object:Gem::Version
53
- version: '0.3'
53
+ version: '0.6'
54
54
  - - "<"
55
55
  - !ruby/object:Gem::Version
56
56
  version: 2.a
@@ -60,7 +60,7 @@ dependencies:
60
60
  requirements:
61
61
  - - ">="
62
62
  - !ruby/object:Gem::Version
63
- version: '0.3'
63
+ version: '0.6'
64
64
  - - "<"
65
65
  - !ruby/object:Gem::Version
66
66
  version: 2.a
@@ -212,7 +212,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
212
212
  - !ruby/object:Gem::Version
213
213
  version: '0'
214
214
  requirements: []
215
- rubygems_version: 3.3.14
215
+ rubygems_version: 3.4.2
216
216
  signing_key:
217
217
  specification_version: 4
218
218
  summary: API Client library for the Dataproc Metastore API