google-identity-access_context_manager 1.1.1 → 1.2.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: 6597d87943d9ea6a8c8e35b4fd0462188bf88acdcd415f40842662e1c194c712
4
- data.tar.gz: 63c2f1a0963709d113bb0ee9104ca0f6b945c53c937a184a42eb370db60b2e73
3
+ metadata.gz: 4fb4a7149fab1d4333540b3044457dcb260aa4acaf70a0f690433b3db5746408
4
+ data.tar.gz: 0654b35be2f7675028ba8522dfc198056edc54c252ea069adea3d76ccc02a220
5
5
  SHA512:
6
- metadata.gz: 540e99473e872526ed865a67ae00cca491b71410c89fd27534e03735faefe12dd098ea2ca25439a5a242e7cc881eb5e07874f82e0e9b85fcace03cdae4953ca2
7
- data.tar.gz: da991e43da77c4871359a70d2abc54f4f859fe20d243a58e0977089fd4227adb0fa4b25efd09c127d6216c18c20bb5bc6189b32eaaf608d936e2841b9745dc78
6
+ metadata.gz: c0c725cc049e62832a52b3c8a061850149d05c8f53e94e259d12bb131f7a308a2e9a0efbf96e9e044e8f7d871eacba5446df1249b564121671595e503a0b96b2
7
+ data.tar.gz: b4106189ed1717d9b7246812f79cc98232b037db3b0d314c8fcccf840f8daf4f5c5a5d0d694143d6ec43c7de1c0523efad504ea57560b2414ea5ac1229b241d1
data/README.md CHANGED
@@ -34,32 +34,6 @@ In order to use this library, you first need to go through the following steps:
34
34
  1. [Enable the API.](https://console.cloud.google.com/apis/library/accesscontextmanager.googleapis.com)
35
35
  1. {file:AUTHENTICATION.md Set up authentication.}
36
36
 
37
- ## Enabling Logging
38
-
39
- To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
40
- The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib/libdoc/logger/rdoc/Logger.html) as shown below,
41
- or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
42
- 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)
43
- and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
44
-
45
- Configuring a Ruby stdlib logger:
46
-
47
- ```ruby
48
- require "logger"
49
-
50
- module MyLogger
51
- LOGGER = Logger.new $stderr, level: Logger::WARN
52
- def logger
53
- LOGGER
54
- end
55
- end
56
-
57
- # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
58
- module GRPC
59
- extend MyLogger
60
- end
61
- ```
62
-
63
37
  ## Supported Ruby Versions
64
38
 
65
39
  This library is supported on Ruby 2.6+.
@@ -20,7 +20,7 @@
20
20
  module Google
21
21
  module Identity
22
22
  module AccessContextManager
23
- VERSION = "1.1.1"
23
+ VERSION = "1.2.0"
24
24
  end
25
25
  end
26
26
  end
@@ -32,11 +32,13 @@ module Google
32
32
  #
33
33
  # By default, this returns an instance of
34
34
  # [Google::Identity::AccessContextManager::V1::AccessContextManager::Client](https://googleapis.dev/ruby/google-identity-access_context_manager-v1/latest/Google/Identity/AccessContextManager/V1/AccessContextManager/Client.html)
35
- # for version V1 of the API.
36
- # However, you can specify specify a different API version by passing it in the
35
+ # for a gRPC client for version V1 of the API.
36
+ # However, you can specify a different API version by passing it in the
37
37
  # `version` parameter. If the AccessContextManager service is
38
38
  # supported by that API version, and the corresponding gem is available, the
39
39
  # appropriate versioned client will be returned.
40
+ # You can also specify a different transport by passing `:rest` or `:grpc` in
41
+ # the `transport` parameter.
40
42
  #
41
43
  # ## About AccessContextManager
42
44
  #
@@ -54,17 +56,19 @@ module Google
54
56
  #
55
57
  # @param version [::String, ::Symbol] The API version to connect to. Optional.
56
58
  # Defaults to `:v1`.
57
- # @return [AccessContextManager::Client] A client object for the specified version.
59
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
60
+ # @return [::Object] A client object for the specified version.
58
61
  #
59
- def self.access_context_manager version: :v1, &block
62
+ def self.access_context_manager version: :v1, transport: :grpc, &block
60
63
  require "google/identity/access_context_manager/#{version.to_s.downcase}"
61
64
 
62
65
  package_name = Google::Identity::AccessContextManager
63
66
  .constants
64
67
  .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
65
68
  .first
66
- package_module = Google::Identity::AccessContextManager.const_get package_name
67
- package_module.const_get(:AccessContextManager).const_get(:Client).new(&block)
69
+ service_module = Google::Identity::AccessContextManager.const_get(package_name).const_get(:AccessContextManager)
70
+ service_module = service_module.const_get(:Rest) if transport == :rest
71
+ service_module.const_get(:Client).new(&block)
68
72
  end
69
73
  end
70
74
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-identity-access_context_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.2.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-11-10 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.0'
33
+ version: '0.4'
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.0'
43
+ version: '0.4'
44
44
  - - "<"
45
45
  - !ruby/object:Gem::Version
46
46
  version: 2.a
@@ -189,7 +189,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
189
189
  - !ruby/object:Gem::Version
190
190
  version: '0'
191
191
  requirements: []
192
- rubygems_version: 3.3.14
192
+ rubygems_version: 3.4.2
193
193
  signing_key:
194
194
  specification_version: 4
195
195
  summary: API Client library for the Access Context Manager API