google-cloud-artifact_registry 1.4.0 → 2.0.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: 1dd97aeb92f32e93a91b5798f8b78a74d810538955ed54c93031acc66b6c7741
4
+ data.tar.gz: fac9a8e2ad41327043432a14a5e452ce363ce29fe184af9be2ef5e94008ca7ad
5
5
  SHA512:
6
- metadata.gz: 71db9787a8155beae657db94f77d69c939cfee4f83de7711c8a0acd0f215aa16b30c302d444c89261ef5fe50e233b67ee275f1cc34cc83ac80e4fbfcd52b6a13
7
- data.tar.gz: 6b09b6fcc0b5d1a9a2cfb9ebd4ee955143b06967a3ec7460214740a9493685faff9b1d25602a123bb3e6c1c4be1c465408bb129cfc2db8904a9c5738a46168e9
6
+ metadata.gz: 5fc57bc3ab7989ba3bdcfdb9a40c7dfe56f071b9ec75c626e7341f949377168a7781ebd2fc8560adc298b9004a2a261012ff74e487a932ab372de99dd00fab08
7
+ data.tar.gz: 0d3763f5fe114dd3ff3e1245f62825ef520aa30261b2d61376a9ed91a70c3d5dc3e4cee7dc435f23f5ced3ce9385e462fe353ccbeede95474d411cd2bc6d78c2
data/README.md CHANGED
@@ -16,8 +16,7 @@ for this library, google-cloud-artifact_registry, to see the convenience methods
16
16
  constructing client objects. Reference documentation for the client objects
17
17
  themselves can be found in the client library documentation for the versioned
18
18
  client gems:
19
- [google-cloud-artifact_registry-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-artifact_registry-v1/latest),
20
- [google-cloud-artifact_registry-v1beta2](https://cloud.google.com/ruby/docs/reference/google-cloud-artifact_registry-v1beta2/latest).
19
+ [google-cloud-artifact_registry-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-artifact_registry-v1/latest).
21
20
 
22
21
  See also the [Product Documentation](https://cloud.google.com/artifact-registry/)
23
22
  for more usage information.
@@ -35,9 +34,39 @@ In order to use this library, you first need to go through the following steps:
35
34
  1. [Enable the API.](https://console.cloud.google.com/apis/library/artifactregistry.googleapis.com)
36
35
  1. {file:AUTHENTICATION.md Set up authentication.}
37
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-artifact_registry-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-artifact_registry-v1/latest).
66
+
38
67
  ## Supported Ruby Versions
39
68
 
40
- This library is supported on Ruby 2.7+.
69
+ This library is supported on Ruby 3.0+.
41
70
 
42
71
  Google provides official support for Ruby versions that are actively supported
43
72
  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 = "2.0.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,55 +1,28 @@
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: 2.0.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-02-13 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: google-cloud-artifact_registry-v1
15
14
  requirement: !ruby/object:Gem::Requirement
16
15
  requirements:
17
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: '0.12'
20
- - - "<"
21
- - !ruby/object:Gem::Version
22
- version: 2.a
23
- type: :runtime
24
- prerelease: false
25
- version_requirements: !ruby/object:Gem::Requirement
26
- requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- version: '0.12'
30
- - - "<"
31
- - !ruby/object:Gem::Version
32
- version: 2.a
33
- - !ruby/object:Gem::Dependency
34
- name: google-cloud-artifact_registry-v1beta2
35
- requirement: !ruby/object:Gem::Requirement
36
- requirements:
37
- - - ">="
38
- - !ruby/object:Gem::Version
39
- version: '0.11'
40
- - - "<"
16
+ - - "~>"
41
17
  - !ruby/object:Gem::Version
42
- version: 2.a
18
+ version: '1.3'
43
19
  type: :runtime
44
20
  prerelease: false
45
21
  version_requirements: !ruby/object:Gem::Requirement
46
22
  requirements:
47
- - - ">="
48
- - !ruby/object:Gem::Version
49
- version: '0.11'
50
- - - "<"
23
+ - - "~>"
51
24
  - !ruby/object:Gem::Version
52
- version: 2.a
25
+ version: '1.3'
53
26
  - !ruby/object:Gem::Dependency
54
27
  name: google-cloud-core
55
28
  requirement: !ruby/object:Gem::Requirement
@@ -82,7 +55,6 @@ homepage: https://github.com/googleapis/google-cloud-ruby
82
55
  licenses:
83
56
  - Apache-2.0
84
57
  metadata: {}
85
- post_install_message:
86
58
  rdoc_options: []
87
59
  require_paths:
88
60
  - lib
@@ -90,15 +62,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
90
62
  requirements:
91
63
  - - ">="
92
64
  - !ruby/object:Gem::Version
93
- version: '2.7'
65
+ version: '3.0'
94
66
  required_rubygems_version: !ruby/object:Gem::Requirement
95
67
  requirements:
96
68
  - - ">="
97
69
  - !ruby/object:Gem::Version
98
70
  version: '0'
99
71
  requirements: []
100
- rubygems_version: 3.5.6
101
- signing_key:
72
+ rubygems_version: 3.6.3
102
73
  specification_version: 4
103
74
  summary: API Client library for the Artifact Registry API
104
75
  test_files: []