google-cloud-artifact_registry 1.4.0 → 1.5.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: b6aec9e73ed044fa84a325ed044c68cc4d96c45dbd9f69c9c7112525bd8597fc
4
- data.tar.gz: 481d5f88d42e9c0423409b8fe698ed452926c70dc641c4ba362ba4c8da8fe2f6
3
+ metadata.gz: 77450b65cef0287d8761e9dde63f582130e099cc9e791113cee277f6e550ae97
4
+ data.tar.gz: cbd01293e8ccc235f42f1fbadd4acdf7263d42123e3fb7106eaed4a7cd317f81
5
5
  SHA512:
6
- metadata.gz: 71db9787a8155beae657db94f77d69c939cfee4f83de7711c8a0acd0f215aa16b30c302d444c89261ef5fe50e233b67ee275f1cc34cc83ac80e4fbfcd52b6a13
7
- data.tar.gz: 6b09b6fcc0b5d1a9a2cfb9ebd4ee955143b06967a3ec7460214740a9493685faff9b1d25602a123bb3e6c1c4be1c465408bb129cfc2db8904a9c5738a46168e9
6
+ metadata.gz: 795fb1ace00082d01df51ba06012011965211c63f8b3c1c917fb4bbbfd88b9dac48b4e62ff10de11d6be57f7e4c33677c279b6bc8e805ae35a6746ff74bd5d25
7
+ data.tar.gz: ee359595cf6668901e40e4adea566d416dde4b7b9392b9fcf5a61da00fc0fce97203d464559a9b49d089b4f809c39e32bdd26beeb16435e8f54be1540d47ae00
data/README.md CHANGED
@@ -35,9 +35,40 @@ 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/artifactregistry.googleapis.com)
36
36
  1. {file:AUTHENTICATION.md Set up authentication.}
37
37
 
38
+ ## Debug Logging
39
+
40
+ This library comes with opt-in Debug Logging that can help you troubleshoot
41
+ your application's integration with the API. When logging is activated, key
42
+ events such as requests and responses, along with data payloads and metadata
43
+ such as headers and client configuration, are logged to the standard error
44
+ stream.
45
+
46
+ **WARNING:** Client Library Debug Logging includes your data payloads in
47
+ plaintext, which could include sensitive data such as PII for yourself or your
48
+ customers, private keys, or other security data that could be compromising if
49
+ leaked. Always practice good data hygiene with your application logs, and follow
50
+ the principle of least access. Google also recommends that Client Library Debug
51
+ Logging be enabled only temporarily during active debugging, and not used
52
+ permanently in production.
53
+
54
+ To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
55
+ to the value `all`. Alternatively, you can set the value to a comma-delimited
56
+ list of client library gem names. This will select the default logging behavior,
57
+ which writes logs to the standard error stream. On a local workstation, this may
58
+ result in logs appearing on the console. When running on a Google Cloud hosting
59
+ service such as [Google Cloud Run](https://cloud.google.com/run), this generally
60
+ results in logs appearing alongside your application logs in the
61
+ [Google Cloud Logging](https://cloud.google.com/logging/) service.
62
+
63
+ Debug logging also requires that the versioned clients for this service be
64
+ sufficiently recent, released after about Dec 10, 2024. If logging is not
65
+ working, try updating the versioned clients in your bundle or installed gems:
66
+ [google-cloud-artifact_registry-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-artifact_registry-v1/latest),
67
+ [google-cloud-artifact_registry-v1beta2](https://cloud.google.com/ruby/docs/reference/google-cloud-artifact_registry-v1beta2/latest).
68
+
38
69
  ## Supported Ruby Versions
39
70
 
40
- This library is supported on Ruby 2.7+.
71
+ This library is supported on Ruby 3.0+.
41
72
 
42
73
  Google provides official support for Ruby versions that are actively supported
43
74
  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 ArtifactRegistry
23
- VERSION = "1.4.0"
23
+ VERSION = "1.5.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 ArtifactRegistry service.
63
+ # You can determine whether the method will succeed by calling
64
+ # {Google::Cloud::ArtifactRegistry.artifact_registry_available?}.
65
+ #
61
66
  # ## About ArtifactRegistry
62
67
  #
63
68
  # The Artifact Registry API service.
@@ -91,6 +96,37 @@ module Google
91
96
  service_module.const_get(:Client).new(&block)
92
97
  end
93
98
 
99
+ ##
100
+ # Determines whether the ArtifactRegistry service is supported by the current client.
101
+ # If true, you can retrieve a client object by calling {Google::Cloud::ArtifactRegistry.artifact_registry}.
102
+ # If false, that method will raise an exception. This could happen if the given
103
+ # API version does not exist or does not support the ArtifactRegistry service,
104
+ # or if the versioned client gem needs an update to support the ArtifactRegistry service.
105
+ #
106
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
107
+ # Defaults to `:v1`.
108
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
109
+ # @return [boolean] Whether the service is available.
110
+ #
111
+ def self.artifact_registry_available? version: :v1, transport: :grpc
112
+ require "google/cloud/artifact_registry/#{version.to_s.downcase}"
113
+ package_name = Google::Cloud::ArtifactRegistry
114
+ .constants
115
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
116
+ .first
117
+ return false unless package_name
118
+ service_module = Google::Cloud::ArtifactRegistry.const_get package_name
119
+ return false unless service_module.const_defined? :ArtifactRegistry
120
+ service_module = service_module.const_get :ArtifactRegistry
121
+ if transport == :rest
122
+ return false unless service_module.const_defined? :Rest
123
+ service_module = service_module.const_get :Rest
124
+ end
125
+ service_module.const_defined? :Client
126
+ rescue ::LoadError
127
+ false
128
+ end
129
+
94
130
  ##
95
131
  # Configure the google-cloud-artifact_registry library.
96
132
  #
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-artifact_registry
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.5.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-artifact_registry-v1
@@ -82,7 +81,6 @@ homepage: https://github.com/googleapis/google-cloud-ruby
82
81
  licenses:
83
82
  - Apache-2.0
84
83
  metadata: {}
85
- post_install_message:
86
84
  rdoc_options: []
87
85
  require_paths:
88
86
  - lib
@@ -90,15 +88,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
90
88
  requirements:
91
89
  - - ">="
92
90
  - !ruby/object:Gem::Version
93
- version: '2.7'
91
+ version: '3.0'
94
92
  required_rubygems_version: !ruby/object:Gem::Requirement
95
93
  requirements:
96
94
  - - ">="
97
95
  - !ruby/object:Gem::Version
98
96
  version: '0'
99
97
  requirements: []
100
- rubygems_version: 3.5.6
101
- signing_key:
98
+ rubygems_version: 3.6.2
102
99
  specification_version: 4
103
100
  summary: API Client library for the Artifact Registry API
104
101
  test_files: []