google-cloud-security-public_ca 1.0.1 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d5814009e4e7a6bd311373d4829558f44552c2611e95196d8ff7a7c86d48465e
4
- data.tar.gz: fb30ff8794d12064651513ff9f0e7bf739a481d0f0797ce313eb106685c4a8af
3
+ metadata.gz: 3aaee405d5a86f89bb06e1c29bb428ddd95f2ac29f5243c427fe00c990981809
4
+ data.tar.gz: cadb2c3fcba8f17593eca234fc9fa4b2479102d3f43a44bce4b74fa0d10478bc
5
5
  SHA512:
6
- metadata.gz: dd12ad6d2702d951a5cd4fb0e68c3a898afb4ee9c96d1f4f17ca699f02522ff79c5f41ae376b373a0cce7a622469615719d69c4ad581fab43eb77d8094fa6e95
7
- data.tar.gz: db73e10a81bc684134be754fbf720ebc4a92dfb512d56e68e92193d9df3154dc1aaba9e5a1d4c97e0f85c00d32f03d9d1314e1ec4e6505903f9b960871630665
6
+ metadata.gz: befa6b9a25b32978f7dacad11ea590495adecb9ee2b2e836903c64b21757e58b86c08c361a247aa097b72bc673fb58e6422ff8b9ae1f6ff4a8f65b0af4858ccf
7
+ data.tar.gz: 9e474d9cfe59e8fbc1600df677c48335ba3fc8f10d6ad4decd2ebd7b011ddfd9edb6a23a956b533c3b09ad486196b69b0096362eb86ee928e8b2ea6e2971455d
data/README.md CHANGED
@@ -34,9 +34,39 @@ 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/publicca.googleapis.com)
35
35
  1. {file:AUTHENTICATION.md Set up authentication.}
36
36
 
37
+ ## Debug Logging
38
+
39
+ This library comes with opt-in Debug Logging that can help you troubleshoot
40
+ your application's integration with the API. When logging is activated, key
41
+ events such as requests and responses, along with data payloads and metadata
42
+ such as headers and client configuration, are logged to the standard error
43
+ stream.
44
+
45
+ **WARNING:** Client Library Debug Logging includes your data payloads in
46
+ plaintext, which could include sensitive data such as PII for yourself or your
47
+ customers, private keys, or other security data that could be compromising if
48
+ leaked. Always practice good data hygiene with your application logs, and follow
49
+ the principle of least access. Google also recommends that Client Library Debug
50
+ Logging be enabled only temporarily during active debugging, and not used
51
+ permanently in production.
52
+
53
+ To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
54
+ to the value `all`. Alternatively, you can set the value to a comma-delimited
55
+ list of client library gem names. This will select the default logging behavior,
56
+ which writes logs to the standard error stream. On a local workstation, this may
57
+ result in logs appearing on the console. When running on a Google Cloud hosting
58
+ service such as [Google Cloud Run](https://cloud.google.com/run), this generally
59
+ results in logs appearing alongside your application logs in the
60
+ [Google Cloud Logging](https://cloud.google.com/logging/) service.
61
+
62
+ Debug logging also requires that the versioned clients for this service be
63
+ sufficiently recent, released after about Dec 10, 2024. If logging is not
64
+ working, try updating the versioned clients in your bundle or installed gems:
65
+ [google-cloud-security-public_ca-v1beta1](https://cloud.google.com/ruby/docs/reference/google-cloud-security-public_ca-v1beta1/latest).
66
+
37
67
  ## Supported Ruby Versions
38
68
 
39
- This library is supported on Ruby 2.7+.
69
+ This library is supported on Ruby 3.0+.
40
70
 
41
71
  Google provides official support for Ruby versions that are actively supported
42
72
  by Ruby Core—that is, Ruby versions that are either in normal maintenance or
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Security
23
23
  module PublicCA
24
- VERSION = "1.0.1"
24
+ VERSION = "1.1.0"
25
25
  end
26
26
  end
27
27
  end
@@ -59,6 +59,11 @@ module Google
59
59
  # You can also specify a different transport by passing `:rest` or `:grpc` in
60
60
  # the `transport` parameter.
61
61
  #
62
+ # Raises an exception if the currently installed versioned client gem for the
63
+ # given API version does not support the given transport of the PublicCertificateAuthorityService service.
64
+ # You can determine whether the method will succeed by calling
65
+ # {Google::Cloud::Security::PublicCA.public_certificate_authority_service_available?}.
66
+ #
62
67
  # ## About PublicCertificateAuthorityService
63
68
  #
64
69
  # Manages the resources required for ACME [external account
@@ -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 PublicCertificateAuthorityService service is supported by the current client.
92
+ # If true, you can retrieve a client object by calling {Google::Cloud::Security::PublicCA.public_certificate_authority_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 PublicCertificateAuthorityService service,
95
+ # or if the versioned client gem needs an update to support the PublicCertificateAuthorityService service.
96
+ #
97
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
98
+ # Defaults to `:v1beta1`.
99
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
100
+ # @return [boolean] Whether the service is available.
101
+ #
102
+ def self.public_certificate_authority_service_available? version: :v1beta1, transport: :grpc
103
+ require "google/cloud/security/public_ca/#{version.to_s.downcase}"
104
+ package_name = Google::Cloud::Security::PublicCA
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::Security::PublicCA.const_get package_name
110
+ return false unless service_module.const_defined? :PublicCertificateAuthorityService
111
+ service_module = service_module.const_get :PublicCertificateAuthorityService
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-security-public_ca library.
87
123
  #
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-security-public_ca
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.1.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-08-08 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
@@ -67,7 +66,6 @@ homepage: https://github.com/googleapis/google-cloud-ruby
67
66
  licenses:
68
67
  - Apache-2.0
69
68
  metadata: {}
70
- post_install_message:
71
69
  rdoc_options: []
72
70
  require_paths:
73
71
  - lib
@@ -75,15 +73,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
75
73
  requirements:
76
74
  - - ">="
77
75
  - !ruby/object:Gem::Version
78
- version: '2.7'
76
+ version: '3.0'
79
77
  required_rubygems_version: !ruby/object:Gem::Requirement
80
78
  requirements:
81
79
  - - ">="
82
80
  - !ruby/object:Gem::Version
83
81
  version: '0'
84
82
  requirements: []
85
- rubygems_version: 3.5.6
86
- signing_key:
83
+ rubygems_version: 3.6.2
87
84
  specification_version: 4
88
85
  summary: API Client library for the Public Certificate Authority API
89
86
  test_files: []