google-cloud-bigquery-data_policies 1.0.0 → 1.1.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: 7969c8a16ec8ad2d16762353a53bc660913ab5dfec350697987dcdc354f7a18c
4
- data.tar.gz: e0d881782c0e5b81367563ca21aafdf2cddb89a7096b29648a6dec8887645deb
3
+ metadata.gz: abbcb149cb8dac65a6916ad9b40e403a31dff0b329a625ebcfa463970ac9c89b
4
+ data.tar.gz: bf3466e47c1ecfe36fedb5cfdd97b852ed06e90d2bfce74f597f9df140150571
5
5
  SHA512:
6
- metadata.gz: c83bb92f5b382e97f64e63545159478efa420b82814ce5b55011fe578db08b91d4e8d163b5acbeee2946d68cc0d0dd6bd00f618b6127fe423fd093c5f170c079
7
- data.tar.gz: 965a479df1ad669e1ff2cb122ed19bd5acd4fb245fdc31d9b5648842907e694056867cb9082e56c01eb182395616ed0f250eba9d78bed3de1665775aafae420c
6
+ metadata.gz: 1ef69aea577d5e320e093ad81d80af3ee2398cd7c2e4958aae8baf1c564e2cafebac9e1e2922dd489c5be2a55d8a742f93612b8a7e08326b38297c77e5e0c4a6
7
+ data.tar.gz: d4ef7fbfa49f3f4d61d82e76bab3cc432f559306c70db6b1bfb6b0d770b8d6a13936536b9790481e0c3e8d92719611803320e2fa00548351a08549b54884deb3
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/bigquerydatapolicy.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+.
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Bigquery
23
23
  module DataPolicies
24
- VERSION = "1.0.0"
24
+ VERSION = "1.1.0"
25
25
  end
26
26
  end
27
27
  end
@@ -55,6 +55,8 @@ module Google
55
55
  # `version` parameter. If the DataPolicyService service is
56
56
  # supported by that API version, and the corresponding gem is available, the
57
57
  # appropriate versioned client will be returned.
58
+ # You can also specify a different transport by passing `:rest` or `:grpc` in
59
+ # the `transport` parameter.
58
60
  #
59
61
  # ## About DataPolicyService
60
62
  #
@@ -62,9 +64,10 @@ module Google
62
64
  #
63
65
  # @param version [::String, ::Symbol] The API version to connect to. Optional.
64
66
  # Defaults to `:v1`.
67
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
65
68
  # @return [::Object] A client object for the specified version.
66
69
  #
67
- def self.data_policy_service version: :v1, &block
70
+ def self.data_policy_service version: :v1, transport: :grpc, &block
68
71
  require "google/cloud/bigquery/data_policies/#{version.to_s.downcase}"
69
72
 
70
73
  package_name = Google::Cloud::Bigquery::DataPolicies
@@ -72,6 +75,7 @@ module Google
72
75
  .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
73
76
  .first
74
77
  service_module = Google::Cloud::Bigquery::DataPolicies.const_get(package_name).const_get(:DataPolicyService)
78
+ service_module = service_module.const_get(:Rest) if transport == :rest
75
79
  service_module.const_get(:Client).new(&block)
76
80
  end
77
81
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-bigquery-data_policies
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.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: 2023-01-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-bigquery-data_policies-v1
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '0.0'
19
+ version: '0.2'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: 2.a
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: '0.0'
29
+ version: '0.2'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a
@@ -36,7 +36,7 @@ dependencies:
36
36
  requirements:
37
37
  - - ">="
38
38
  - !ruby/object:Gem::Version
39
- version: '0.0'
39
+ version: '0.1'
40
40
  - - "<"
41
41
  - !ruby/object:Gem::Version
42
42
  version: 2.a
@@ -46,7 +46,7 @@ dependencies:
46
46
  requirements:
47
47
  - - ">="
48
48
  - !ruby/object:Gem::Version
49
- version: '0.0'
49
+ version: '0.1'
50
50
  - - "<"
51
51
  - !ruby/object:Gem::Version
52
52
  version: 2.a