google-cloud-run-client 0.1.0 → 0.3.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: 9f35840b179dd4b63fa6eacc8126e09f444624a912d75dd21d61b8a1df4e17f8
4
- data.tar.gz: 67b4107d9fccc6d77c888604918a2a3e944daa606c00ae5c2f1b103132f33536
3
+ metadata.gz: 581091773e0e9123c43393e0f4b9259b828a4874ab43b7cd2ffbee30a0271db7
4
+ data.tar.gz: e10520bd155244c51485ea6dc0446c0ddec74e19530301d418b888d169c52754
5
5
  SHA512:
6
- metadata.gz: eef34c6ada877d57e568f6f4714d9d985143dd47326a8ba541d6f781733bcc49fb7d168d88fdab9e58056284eab255a715a294324d937cfe3b531254c479f062
7
- data.tar.gz: d0b8ff14c19efbdd549f9e6b1ec0ffcf85845232352bd83f89e1ca019240f792fd128e7a2274674f041dfa163d3cc44e2a76bc560657244d998c93aad11ba094
6
+ metadata.gz: f7de5d1739a8f31aca819ad1354fe76da273e878c9c78cf74cba7617cd8aeeed5ad3798b94afd62cd5c8ef10f6f2bef36a2240bdc2c98489c29e529faf9244de
7
+ data.tar.gz: c8b3b4951a832cab1238db54a95cc432a6f5d1dc2fc8a8b4fda11c22f5b1a43a871a04c3e0064034a294c7b9c12fb7400dbc7d9e08502abdaa598d09cc117d95
data/AUTHENTICATION.md CHANGED
@@ -27,7 +27,7 @@ export GOOGLE_CLOUD_CREDENTIALS=path/to/keyfile.json
27
27
  ```ruby
28
28
  require "google/cloud/run"
29
29
 
30
- client = Google::Cloud::Run.revisions
30
+ client = Google::Cloud::Run.executions
31
31
  ```
32
32
 
33
33
  ## Credential Lookup
@@ -64,7 +64,7 @@ containers where writing files is difficult or not encouraged.
64
64
 
65
65
  The environment variables that google-cloud-run-client
66
66
  checks for credentials are configured on the service Credentials class (such as
67
- `::Google::Cloud::Run::V2::Revisions::Credentials`):
67
+ `::Google::Cloud::Run::V2::Executions::Credentials`):
68
68
 
69
69
  * `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
70
70
  * `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
@@ -75,7 +75,7 @@ require "google/cloud/run"
75
75
 
76
76
  ENV["GOOGLE_CLOUD_CREDENTIALS"] = "path/to/keyfile.json"
77
77
 
78
- client = Google::Cloud::Run.revisions
78
+ client = Google::Cloud::Run.executions
79
79
  ```
80
80
 
81
81
  ### Configuration
@@ -86,7 +86,7 @@ it in an environment variable. Either on an individual client initialization:
86
86
  ```ruby
87
87
  require "google/cloud/run"
88
88
 
89
- client = Google::Cloud::Run.revisions do |config|
89
+ client = Google::Cloud::Run.executions do |config|
90
90
  config.credentials = "path/to/keyfile.json"
91
91
  end
92
92
  ```
@@ -100,7 +100,7 @@ Google::Cloud::Run.configure do |config|
100
100
  config.credentials = "path/to/keyfile.json"
101
101
  end
102
102
 
103
- client = Google::Cloud::Run.revisions
103
+ client = Google::Cloud::Run.executions
104
104
  ```
105
105
 
106
106
  ### Cloud SDK
@@ -112,7 +112,7 @@ credentials are discovered.
112
112
  To configure your system for this, simply:
113
113
 
114
114
  1. [Download and install the Cloud SDK](https://cloud.google.com/sdk)
115
- 2. Authenticate using OAuth 2.0 `$ gcloud auth login`
115
+ 2. Authenticate using OAuth 2.0 `$ gcloud auth application-default login`
116
116
  3. Write code as if already authenticated.
117
117
 
118
118
  **NOTE:** This is _not_ recommended for running in production. The Cloud SDK
data/README.md CHANGED
@@ -62,14 +62,14 @@ end
62
62
 
63
63
  ## Supported Ruby Versions
64
64
 
65
- This library is supported on Ruby 2.5+.
65
+ This library is supported on Ruby 2.6+.
66
66
 
67
67
  Google provides official support for Ruby versions that are actively supported
68
68
  by Ruby Core—that is, Ruby versions that are either in normal maintenance or
69
- in security maintenance, and not end of life. Currently, this means Ruby 2.5
70
- and later. Older versions of Ruby _may_ still work, but are unsupported and not
71
- recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details
72
- about the Ruby support schedule.
69
+ in security maintenance, and not end of life. Older versions of Ruby _may_
70
+ still work, but are unsupported and not recommended. See
71
+ https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby
72
+ support schedule.
73
73
 
74
74
  ## Which client should I use?
75
75
 
@@ -18,7 +18,7 @@ module Google
18
18
  module Cloud
19
19
  module Run
20
20
  module Client
21
- VERSION = "0.1.0"
21
+ VERSION = "0.3.0"
22
22
  end
23
23
  end
24
24
  end
@@ -44,6 +44,66 @@ end
44
44
  module Google
45
45
  module Cloud
46
46
  module Run
47
+ ##
48
+ # Create a new client object for Executions.
49
+ #
50
+ # By default, this returns an instance of
51
+ # [Google::Cloud::Run::V2::Executions::Client](https://googleapis.dev/ruby/google-cloud-run-v2/latest/Google/Cloud/Run/V2/Executions/Client.html)
52
+ # for version V2 of the API.
53
+ # However, you can specify specify a different API version by passing it in the
54
+ # `version` parameter. If the Executions service is
55
+ # supported by that API version, and the corresponding gem is available, the
56
+ # appropriate versioned client will be returned.
57
+ #
58
+ # ## About Executions
59
+ #
60
+ # Cloud Run Execution Control Plane API.
61
+ #
62
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
63
+ # Defaults to `:v2`.
64
+ # @return [Executions::Client] A client object for the specified version.
65
+ #
66
+ def self.executions version: :v2, &block
67
+ require "google/cloud/run/#{version.to_s.downcase}"
68
+
69
+ package_name = Google::Cloud::Run
70
+ .constants
71
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
72
+ .first
73
+ package_module = Google::Cloud::Run.const_get package_name
74
+ package_module.const_get(:Executions).const_get(:Client).new(&block)
75
+ end
76
+
77
+ ##
78
+ # Create a new client object for Jobs.
79
+ #
80
+ # By default, this returns an instance of
81
+ # [Google::Cloud::Run::V2::Jobs::Client](https://googleapis.dev/ruby/google-cloud-run-v2/latest/Google/Cloud/Run/V2/Jobs/Client.html)
82
+ # for version V2 of the API.
83
+ # However, you can specify specify a different API version by passing it in the
84
+ # `version` parameter. If the Jobs service is
85
+ # supported by that API version, and the corresponding gem is available, the
86
+ # appropriate versioned client will be returned.
87
+ #
88
+ # ## About Jobs
89
+ #
90
+ # Cloud Run Job Control Plane API.
91
+ #
92
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
93
+ # Defaults to `:v2`.
94
+ # @return [Jobs::Client] A client object for the specified version.
95
+ #
96
+ def self.jobs version: :v2, &block
97
+ require "google/cloud/run/#{version.to_s.downcase}"
98
+
99
+ package_name = Google::Cloud::Run
100
+ .constants
101
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
102
+ .first
103
+ package_module = Google::Cloud::Run.const_get package_name
104
+ package_module.const_get(:Jobs).const_get(:Client).new(&block)
105
+ end
106
+
47
107
  ##
48
108
  # Create a new client object for Revisions.
49
109
  #
@@ -104,6 +164,36 @@ module Google
104
164
  package_module.const_get(:Services).const_get(:Client).new(&block)
105
165
  end
106
166
 
167
+ ##
168
+ # Create a new client object for Tasks.
169
+ #
170
+ # By default, this returns an instance of
171
+ # [Google::Cloud::Run::V2::Tasks::Client](https://googleapis.dev/ruby/google-cloud-run-v2/latest/Google/Cloud/Run/V2/Tasks/Client.html)
172
+ # for version V2 of the API.
173
+ # However, you can specify specify a different API version by passing it in the
174
+ # `version` parameter. If the Tasks service is
175
+ # supported by that API version, and the corresponding gem is available, the
176
+ # appropriate versioned client will be returned.
177
+ #
178
+ # ## About Tasks
179
+ #
180
+ # Cloud Run Task Control Plane API.
181
+ #
182
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
183
+ # Defaults to `:v2`.
184
+ # @return [Tasks::Client] A client object for the specified version.
185
+ #
186
+ def self.tasks version: :v2, &block
187
+ require "google/cloud/run/#{version.to_s.downcase}"
188
+
189
+ package_name = Google::Cloud::Run
190
+ .constants
191
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
192
+ .first
193
+ package_module = Google::Cloud::Run.const_get package_name
194
+ package_module.const_get(:Tasks).const_get(:Client).new(&block)
195
+ end
196
+
107
197
  ##
108
198
  # Configure the google-cloud-run-client library.
109
199
  #
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: 0.1.0
4
+ version: 0.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: 2022-05-13 00:00:00.000000000 Z
11
+ date: 2022-11-11 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.0'
33
+ version: '0.5'
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.0'
43
+ version: '0.5'
44
44
  - - "<"
45
45
  - !ruby/object:Gem::Version
46
46
  version: 2.a
@@ -50,28 +50,28 @@ dependencies:
50
50
  requirements:
51
51
  - - "~>"
52
52
  - !ruby/object:Gem::Version
53
- version: 1.25.1
53
+ version: 1.26.1
54
54
  type: :development
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
58
  - - "~>"
59
59
  - !ruby/object:Gem::Version
60
- version: 1.25.1
60
+ version: 1.26.1
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: minitest
63
63
  requirement: !ruby/object:Gem::Requirement
64
64
  requirements:
65
65
  - - "~>"
66
66
  - !ruby/object:Gem::Version
67
- version: '5.14'
67
+ version: '5.16'
68
68
  type: :development
69
69
  prerelease: false
70
70
  version_requirements: !ruby/object:Gem::Requirement
71
71
  requirements:
72
72
  - - "~>"
73
73
  - !ruby/object:Gem::Version
74
- version: '5.14'
74
+ version: '5.16'
75
75
  - !ruby/object:Gem::Dependency
76
76
  name: minitest-focus
77
77
  requirement: !ruby/object:Gem::Requirement
@@ -106,14 +106,14 @@ dependencies:
106
106
  requirements:
107
107
  - - ">="
108
108
  - !ruby/object:Gem::Version
109
- version: '12.0'
109
+ version: '13.0'
110
110
  type: :development
111
111
  prerelease: false
112
112
  version_requirements: !ruby/object:Gem::Requirement
113
113
  requirements:
114
114
  - - ">="
115
115
  - !ruby/object:Gem::Version
116
- version: '12.0'
116
+ version: '13.0'
117
117
  - !ruby/object:Gem::Dependency
118
118
  name: redcarpet
119
119
  requirement: !ruby/object:Gem::Requirement
@@ -182,14 +182,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
182
182
  requirements:
183
183
  - - ">="
184
184
  - !ruby/object:Gem::Version
185
- version: '2.5'
185
+ version: '2.6'
186
186
  required_rubygems_version: !ruby/object:Gem::Requirement
187
187
  requirements:
188
188
  - - ">="
189
189
  - !ruby/object:Gem::Version
190
190
  version: '0'
191
191
  requirements: []
192
- rubygems_version: 3.3.5
192
+ rubygems_version: 3.3.14
193
193
  signing_key:
194
194
  specification_version: 4
195
195
  summary: API Client library for the Cloud Run API