google-cloud-os_login 1.6.0 → 1.7.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: edc0cde56873af4f85dbafce5f2a616714eef94d52b59783b093a48b57ad554a
4
- data.tar.gz: c15d57977e5d8669ef06a61b74acb7331341a549744eed66c24ff16dc22be38e
3
+ metadata.gz: e765c74e510a85ecc22c0a57b644262642f581dd0087ae53ab1e5539613f2cdf
4
+ data.tar.gz: d9e096b14bf022790aa971b830169a1aad6641a72f5c5c2fea255d361fb25475
5
5
  SHA512:
6
- metadata.gz: 44a249787deef01f9730c77bae4bbd3e5c9e09c3931183a431f51750f711af0c894c639f280b932b6a64381795e65505df153bb2e1c8ddb98f6d30e530201e9a
7
- data.tar.gz: 82ec4635da062792a29c52b4bb78b337d695512560d1388a75bff530c43ddaf98c9a34b7279a6fab450b54e44c5082ff58e93e346bff0fee3a9d3fbc57be0db4
6
+ metadata.gz: bdc109a49659926b373f64cb7f8afa10ac90ac560137f862061a66183b57d47d33fb0baa2e66aa039333857965d9c7ea303c2b8178950f38a7b259af5112ed37
7
+ data.tar.gz: bf3e8fef9ec5b59c1b21d3aa25a177be6b4c813a4bc3d9c7b12263739e13ce7b82e4a58c9953bdaae6796c3f9d375fa7e25654f6a9254647bb1e11c71c00b3b4
data/README.md CHANGED
@@ -43,9 +43,40 @@ and includes substantial interface changes. Existing code written for earlier
43
43
  versions of this library will likely require updates to use this version.
44
44
  See the {file:MIGRATING.md MIGRATING.md} document for more information.
45
45
 
46
+ ## Debug Logging
47
+
48
+ This library comes with opt-in Debug Logging that can help you troubleshoot
49
+ your application's integration with the API. When logging is activated, key
50
+ events such as requests and responses, along with data payloads and metadata
51
+ such as headers and client configuration, are logged to the standard error
52
+ stream.
53
+
54
+ **WARNING:** Client Library Debug Logging includes your data payloads in
55
+ plaintext, which could include sensitive data such as PII for yourself or your
56
+ customers, private keys, or other security data that could be compromising if
57
+ leaked. Always practice good data hygiene with your application logs, and follow
58
+ the principle of least access. Google also recommends that Client Library Debug
59
+ Logging be enabled only temporarily during active debugging, and not used
60
+ permanently in production.
61
+
62
+ To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
63
+ to the value `all`. Alternatively, you can set the value to a comma-delimited
64
+ list of client library gem names. This will select the default logging behavior,
65
+ which writes logs to the standard error stream. On a local workstation, this may
66
+ result in logs appearing on the console. When running on a Google Cloud hosting
67
+ service such as [Google Cloud Run](https://cloud.google.com/run), this generally
68
+ results in logs appearing alongside your application logs in the
69
+ [Google Cloud Logging](https://cloud.google.com/logging/) service.
70
+
71
+ Debug logging also requires that the versioned clients for this service be
72
+ sufficiently recent, released after about Dec 10, 2024. If logging is not
73
+ working, try updating the versioned clients in your bundle or installed gems:
74
+ [google-cloud-os_login-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-os_login-v1/latest),
75
+ [google-cloud-os_login-v1beta](https://cloud.google.com/ruby/docs/reference/google-cloud-os_login-v1beta/latest).
76
+
46
77
  ## Supported Ruby Versions
47
78
 
48
- This library is supported on Ruby 2.7+.
79
+ This library is supported on Ruby 3.0+.
49
80
 
50
81
  Google provides official support for Ruby versions that are actively supported
51
82
  by Ruby Core—that is, Ruby versions that are either in normal maintenance or
@@ -20,7 +20,7 @@
20
20
  module Google
21
21
  module Cloud
22
22
  module OsLogin
23
- VERSION = "1.6.0"
23
+ VERSION = "1.7.0"
24
24
  end
25
25
  end
26
26
  end
@@ -58,6 +58,11 @@ module Google
58
58
  # You can also specify a different transport by passing `:rest` or `:grpc` in
59
59
  # the `transport` parameter.
60
60
  #
61
+ # Raises an exception if the currently installed versioned client gem for the
62
+ # given API version does not support the given transport of the OsLoginService service.
63
+ # You can determine whether the method will succeed by calling
64
+ # {Google::Cloud::OsLogin.os_login_service_available?}.
65
+ #
61
66
  # ## About OsLoginService
62
67
  #
63
68
  # Cloud OS Login API
@@ -82,6 +87,37 @@ module Google
82
87
  service_module.const_get(:Client).new(&block)
83
88
  end
84
89
 
90
+ ##
91
+ # Determines whether the OsLoginService service is supported by the current client.
92
+ # If true, you can retrieve a client object by calling {Google::Cloud::OsLogin.os_login_service}.
93
+ # If false, that method will raise an exception. This could happen if the given
94
+ # API version does not exist or does not support the OsLoginService service,
95
+ # or if the versioned client gem needs an update to support the OsLoginService service.
96
+ #
97
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
98
+ # Defaults to `:v1`.
99
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
100
+ # @return [boolean] Whether the service is available.
101
+ #
102
+ def self.os_login_service_available? version: :v1, transport: :grpc
103
+ require "google/cloud/os_login/#{version.to_s.downcase}"
104
+ package_name = Google::Cloud::OsLogin
105
+ .constants
106
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
107
+ .first
108
+ return false unless package_name
109
+ service_module = Google::Cloud::OsLogin.const_get package_name
110
+ return false unless service_module.const_defined? :OsLoginService
111
+ service_module = service_module.const_get :OsLoginService
112
+ if transport == :rest
113
+ return false unless service_module.const_defined? :Rest
114
+ service_module = service_module.const_get :Rest
115
+ end
116
+ service_module.const_defined? :Client
117
+ rescue ::LoadError
118
+ false
119
+ end
120
+
85
121
  ##
86
122
  # Configure the google-cloud-os_login library.
87
123
  #
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-os_login
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.0
4
+ version: 1.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-02-26 00:00:00.000000000 Z
10
+ date: 2025-01-29 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: google-cloud-core
@@ -85,7 +84,6 @@ homepage: https://github.com/googleapis/google-cloud-ruby
85
84
  licenses:
86
85
  - Apache-2.0
87
86
  metadata: {}
88
- post_install_message:
89
87
  rdoc_options: []
90
88
  require_paths:
91
89
  - lib
@@ -93,15 +91,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
93
91
  requirements:
94
92
  - - ">="
95
93
  - !ruby/object:Gem::Version
96
- version: '2.7'
94
+ version: '3.0'
97
95
  required_rubygems_version: !ruby/object:Gem::Requirement
98
96
  requirements:
99
97
  - - ">="
100
98
  - !ruby/object:Gem::Version
101
99
  version: '0'
102
100
  requirements: []
103
- rubygems_version: 3.5.6
104
- signing_key:
101
+ rubygems_version: 3.6.2
105
102
  specification_version: 4
106
103
  summary: API Client library for the Cloud OS Login API
107
104
  test_files: []