google-cloud-run-client 1.2.0 → 1.3.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: 034ba4363abe95cea298679c5ae2003519f7b24c778ac9930534574b50743961
4
- data.tar.gz: d7889e8f751b5f60981f41785e9b84dde8a6d8ab963c1e9c6dcbf64c51e167ed
3
+ metadata.gz: 53e4842f0b0c2cecb561cdd206e4973cade13939b28a117fa239be6a5f4c164e
4
+ data.tar.gz: 58d46ff642eccfb8e9af7bb190b81c7d8320effd5e4fa09f25ccd5ef4960053c
5
5
  SHA512:
6
- metadata.gz: ebec786d7a98e0cbfb379882dca832d88ad52e661c05ae4e9fef5a9b5353f3d6cee2ac6820c2abc7f4f9761ff5f3383ba31a0657aa7ff5bb10e687a4b379b51b
7
- data.tar.gz: 88102440935ec668b538114ffae253d1766ecb4b950b7fba4663ea2912386d94d3aa5e0f6d2281e7be7cc05c06228ed38eb8ac91df4134e78572cdfcc237b54c
6
+ metadata.gz: 797208b1a8365198b234ba142f20c6d3297cf73e54fbfd5c342010254156edd846c27bb58359a2662f003f5b7d0428d6b2f1211c2c10a9851462dfc136ae1a1f
7
+ data.tar.gz: 65dfc0a6f6b772c5341fa37e7203cdb837f2d49d144219005dd5e4e51dde58e49c5da74c2045ff3745354514c1f131df004ec8bdf33119d45679290459088a28
data/AUTHENTICATION.md CHANGED
@@ -56,7 +56,7 @@ To configure a credentials file for an individual client initialization:
56
56
  ```ruby
57
57
  require "google/cloud/run"
58
58
 
59
- client = Google::Cloud::Run.executions do |config|
59
+ client = Google::Cloud::Run.builds do |config|
60
60
  config.credentials = "path/to/credentialfile.json"
61
61
  end
62
62
  ```
@@ -70,7 +70,7 @@ Google::Cloud::Run.configure do |config|
70
70
  config.credentials = "path/to/credentialfile.json"
71
71
  end
72
72
 
73
- client = Google::Cloud::Run.executions
73
+ client = Google::Cloud::Run.builds
74
74
  ```
75
75
 
76
76
  ### Environment Variables
@@ -100,7 +100,7 @@ require "google/cloud/run"
100
100
 
101
101
  ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json"
102
102
 
103
- client = Google::Cloud::Run.executions
103
+ client = Google::Cloud::Run.builds
104
104
  ```
105
105
 
106
106
  ### Local ADC file
@@ -18,7 +18,7 @@ module Google
18
18
  module Cloud
19
19
  module Run
20
20
  module Client
21
- VERSION = "1.2.0"
21
+ VERSION = "1.3.0"
22
22
  end
23
23
  end
24
24
  end
@@ -45,6 +45,40 @@ end
45
45
  module Google
46
46
  module Cloud
47
47
  module Run
48
+ ##
49
+ # Create a new client object for Builds.
50
+ #
51
+ # By default, this returns an instance of
52
+ # [Google::Cloud::Run::V2::Builds::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-run-v2/latest/Google-Cloud-Run-V2-Builds-Client)
53
+ # for a gRPC client for version V2 of the API.
54
+ # However, you can specify a different API version by passing it in the
55
+ # `version` parameter. If the Builds service is
56
+ # supported by that API version, and the corresponding gem is available, the
57
+ # appropriate versioned client will be returned.
58
+ # You can also specify a different transport by passing `:rest` or `:grpc` in
59
+ # the `transport` parameter.
60
+ #
61
+ # ## About Builds
62
+ #
63
+ # Cloud Run Build Control Plane API
64
+ #
65
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
66
+ # Defaults to `:v2`.
67
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
68
+ # @return [::Object] A client object for the specified version.
69
+ #
70
+ def self.builds version: :v2, transport: :grpc, &block
71
+ require "google/cloud/run/#{version.to_s.downcase}"
72
+
73
+ package_name = Google::Cloud::Run
74
+ .constants
75
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
76
+ .first
77
+ service_module = Google::Cloud::Run.const_get(package_name).const_get(:Builds)
78
+ service_module = service_module.const_get(:Rest) if transport == :rest
79
+ service_module.const_get(:Client).new(&block)
80
+ end
81
+
48
82
  ##
49
83
  # Create a new client object for Executions.
50
84
  #
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-run-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.3.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: 2024-02-26 00:00:00.000000000 Z
11
+ date: 2024-10-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-cloud-core
@@ -30,7 +30,7 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '0.13'
33
+ version: '0.17'
34
34
  - - "<"
35
35
  - !ruby/object:Gem::Version
36
36
  version: 2.a
@@ -40,7 +40,7 @@ dependencies:
40
40
  requirements:
41
41
  - - ">="
42
42
  - !ruby/object:Gem::Version
43
- version: '0.13'
43
+ version: '0.17'
44
44
  - - "<"
45
45
  - !ruby/object:Gem::Version
46
46
  version: 2.a
@@ -77,7 +77,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
77
77
  - !ruby/object:Gem::Version
78
78
  version: '0'
79
79
  requirements: []
80
- rubygems_version: 3.5.6
80
+ rubygems_version: 3.5.21
81
81
  signing_key:
82
82
  specification_version: 4
83
83
  summary: API Client library for the Cloud Run API