google-cloud-artifact_registry 1.1.0 → 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: f6af5beb94bcbeaf41cf90dd4d5730c41a79e5a4b2748119d530fe4c9b32c243
4
- data.tar.gz: d9ebadeda126ad35e1268ecc1a4870052d57b7063346b2cb3b7de70c8ae46561
3
+ metadata.gz: 4244251fed31d5cea6189438bcf9dc74d7bbd076e66d0bf4379ad89a8b9b0f67
4
+ data.tar.gz: 69ed17176fcd00ea38bf3cbe6fe4955c0dccb9e6c94d82ad2a86069abb0419c3
5
5
  SHA512:
6
- metadata.gz: e76157bb2f52cf90d4b5d8395a5cd14b732fa3ad8679d1217472124a74b7a38fa14f4a4559def3977209c55fce9c025ca0403451efe4fab3e54e274d644c69cc
7
- data.tar.gz: 2356f80f4bc089375cdc67dd66e55285ed704cc24a37f5c23398e646f0104fde8af126fb398b20af4a4d42d1eb12fbc54b6410e27df622f49a40023c7a45c72b
6
+ metadata.gz: 3971d6765b9c53e1a0f10ec986b4fb0102b2909c85c84c5ac91c011e720eb12ceee1251afc4331d644110cfc05f838b57560def54b89c71925bbf7f687b9fe7c
7
+ data.tar.gz: a204f65794f5b7ccc95d99a895c7ee08598353dac7014cc4a4480726c304070e85993daca997f3928246ddcbf20ddd01446a16f36e17cd2cbf966361709d8b28
data/AUTHENTICATION.md CHANGED
@@ -114,7 +114,7 @@ credentials are discovered.
114
114
  To configure your system for this, simply:
115
115
 
116
116
  1. [Download and install the Cloud SDK](https://cloud.google.com/sdk)
117
- 2. Authenticate using OAuth 2.0 `$ gcloud auth login`
117
+ 2. Authenticate using OAuth 2.0 `$ gcloud auth application-default login`
118
118
  3. Write code as if already authenticated.
119
119
 
120
120
  **NOTE:** This is _not_ recommended for running in production. The Cloud SDK
data/README.md CHANGED
@@ -35,32 +35,6 @@ 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
- ## Enabling Logging
39
-
40
- To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
41
- The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib/libdoc/logger/rdoc/Logger.html) as shown below,
42
- or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
43
- 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)
44
- and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
45
-
46
- Configuring a Ruby stdlib logger:
47
-
48
- ```ruby
49
- require "logger"
50
-
51
- module MyLogger
52
- LOGGER = Logger.new $stderr, level: Logger::WARN
53
- def logger
54
- LOGGER
55
- end
56
- end
57
-
58
- # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
59
- module GRPC
60
- extend MyLogger
61
- end
62
- ```
63
-
64
38
  ## Supported Ruby Versions
65
39
 
66
40
  This library is supported on Ruby 2.6+.
@@ -20,7 +20,7 @@
20
20
  module Google
21
21
  module Cloud
22
22
  module ArtifactRegistry
23
- VERSION = "1.1.0"
23
+ VERSION = "1.2.0"
24
24
  end
25
25
  end
26
26
  end
@@ -49,11 +49,13 @@ module Google
49
49
  #
50
50
  # By default, this returns an instance of
51
51
  # [Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client](https://googleapis.dev/ruby/google-cloud-artifact_registry-v1/latest/Google/Cloud/ArtifactRegistry/V1/ArtifactRegistry/Client.html)
52
- # for version V1 of the API.
53
- # However, you can specify specify a different API version by passing it in the
52
+ # for a gRPC client for version V1 of the API.
53
+ # However, you can specify a different API version by passing it in the
54
54
  # `version` parameter. If the ArtifactRegistry service is
55
55
  # supported by that API version, and the corresponding gem is available, the
56
56
  # appropriate versioned client will be returned.
57
+ # You can also specify a different transport by passing `:rest` or `:grpc` in
58
+ # the `transport` parameter.
57
59
  #
58
60
  # ## About ArtifactRegistry
59
61
  #
@@ -73,17 +75,19 @@ module Google
73
75
  #
74
76
  # @param version [::String, ::Symbol] The API version to connect to. Optional.
75
77
  # Defaults to `:v1`.
76
- # @return [ArtifactRegistry::Client] A client object for the specified version.
78
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
79
+ # @return [::Object] A client object for the specified version.
77
80
  #
78
- def self.artifact_registry version: :v1, &block
81
+ def self.artifact_registry version: :v1, transport: :grpc, &block
79
82
  require "google/cloud/artifact_registry/#{version.to_s.downcase}"
80
83
 
81
84
  package_name = Google::Cloud::ArtifactRegistry
82
85
  .constants
83
86
  .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
84
87
  .first
85
- package_module = Google::Cloud::ArtifactRegistry.const_get package_name
86
- package_module.const_get(:ArtifactRegistry).const_get(:Client).new(&block)
88
+ service_module = Google::Cloud::ArtifactRegistry.const_get(package_name).const_get(:ArtifactRegistry)
89
+ service_module = service_module.const_get(:Rest) if transport == :rest
90
+ service_module.const_get(:Client).new(&block)
87
91
  end
88
92
 
89
93
  ##
@@ -103,7 +107,7 @@ module Google
103
107
  # * `timeout` (*type:* `Numeric`) -
104
108
  # Default timeout in seconds.
105
109
  # * `metadata` (*type:* `Hash{Symbol=>String}`) -
106
- # Additional gRPC headers to be sent with the call.
110
+ # Additional headers to be sent with the call.
107
111
  # * `retry_policy` (*type:* `Hash`) -
108
112
  # The retry policy. The value is a hash with the following keys:
109
113
  # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-artifact_registry
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
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-07-01 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-artifact_registry-v1
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '0.0'
19
+ version: '0.8'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: 2.a
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: '0.0'
29
+ version: '0.8'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a
@@ -36,7 +36,7 @@ dependencies:
36
36
  requirements:
37
37
  - - ">="
38
38
  - !ruby/object:Gem::Version
39
- version: '0.0'
39
+ version: '0.8'
40
40
  - - "<"
41
41
  - !ruby/object:Gem::Version
42
42
  version: 2.a
@@ -46,7 +46,7 @@ dependencies:
46
46
  requirements:
47
47
  - - ">="
48
48
  - !ruby/object:Gem::Version
49
- version: '0.0'
49
+ version: '0.8'
50
50
  - - "<"
51
51
  - !ruby/object:Gem::Version
52
52
  version: 2.a
@@ -209,7 +209,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
209
209
  - !ruby/object:Gem::Version
210
210
  version: '0'
211
211
  requirements: []
212
- rubygems_version: 3.3.14
212
+ rubygems_version: 3.4.2
213
213
  signing_key:
214
214
  specification_version: 4
215
215
  summary: API Client library for the Artifact Registry API