google-cloud-functions 1.6.0 → 2.0.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 +4 -4
- data/AUTHENTICATION.md +3 -3
- data/README.md +4 -4
- data/lib/google/cloud/functions/version.rb +1 -1
- data/lib/google/cloud/functions.rb +24 -19
- metadata +8 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5d5b637c7d621652354e1db54578ccef905ee3b294434d97927d0235288892a1
|
4
|
+
data.tar.gz: a03d8aa071cdddb842415ffb24da12be31a0dc6e18fc4e59e4a9627357b96baa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9e4e240d3ae9cafd41071be58ddad7a298187eba5931c62bd0e40a4ca6f062d99de0e33108c1e68f89b577ac14a403a2e7715db710738ea47c8ae3a27512314b
|
7
|
+
data.tar.gz: 11f144be7723db696542475dc9a26b9de6b5e76b3ac0bb4b246c20155c479d02051de598df8c7760247d4ff7710f7e114a075b9e229a4a6bbf404ee2b78b03c2
|
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/functions"
|
58
58
|
|
59
|
-
client = Google::Cloud::Functions.
|
59
|
+
client = Google::Cloud::Functions.function_service do |config|
|
60
60
|
config.credentials = "path/to/credentialfile.json"
|
61
61
|
end
|
62
62
|
```
|
@@ -70,7 +70,7 @@ Google::Cloud::Functions.configure do |config|
|
|
70
70
|
config.credentials = "path/to/credentialfile.json"
|
71
71
|
end
|
72
72
|
|
73
|
-
client = Google::Cloud::Functions.
|
73
|
+
client = Google::Cloud::Functions.function_service
|
74
74
|
```
|
75
75
|
|
76
76
|
### Environment Variables
|
@@ -100,7 +100,7 @@ require "google/cloud/functions"
|
|
100
100
|
|
101
101
|
ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json"
|
102
102
|
|
103
|
-
client = Google::Cloud::Functions.
|
103
|
+
client = Google::Cloud::Functions.function_service
|
104
104
|
```
|
105
105
|
|
106
106
|
### Local ADC file
|
data/README.md
CHANGED
@@ -16,7 +16,7 @@ for this library, google-cloud-functions, to see the convenience methods for
|
|
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-functions-
|
19
|
+
[google-cloud-functions-v2](https://cloud.google.com/ruby/docs/reference/google-cloud-functions-v2/latest).
|
20
20
|
|
21
21
|
See also the [Product Documentation](https://cloud.google.com/functions)
|
22
22
|
for more usage information.
|
@@ -62,7 +62,7 @@ results in logs appearing alongside your application logs in the
|
|
62
62
|
Debug logging also requires that the versioned clients for this service be
|
63
63
|
sufficiently recent, released after about Dec 10, 2024. If logging is not
|
64
64
|
working, try updating the versioned clients in your bundle or installed gems:
|
65
|
-
[google-cloud-functions-
|
65
|
+
[google-cloud-functions-v2](https://cloud.google.com/ruby/docs/reference/google-cloud-functions-v2/latest).
|
66
66
|
|
67
67
|
## Supported Ruby Versions
|
68
68
|
|
@@ -80,7 +80,7 @@ support schedule.
|
|
80
80
|
Most modern Ruby client libraries for Google APIs come in two flavors: the main
|
81
81
|
client library with a name such as `google-cloud-functions`,
|
82
82
|
and lower-level _versioned_ client libraries with names such as
|
83
|
-
`google-cloud-functions-
|
83
|
+
`google-cloud-functions-v2`.
|
84
84
|
_In most cases, you should install the main client._
|
85
85
|
|
86
86
|
### What's the difference between the main client and a versioned client?
|
@@ -118,7 +118,7 @@ You can use a versioned client if you are content with a possibly lower-level
|
|
118
118
|
class interface, you explicitly want to avoid features provided by the main
|
119
119
|
client, or you want to access a specific service version not be covered by the
|
120
120
|
main client. You can identify versioned client gems because the service version
|
121
|
-
is part of the name, e.g. `google-cloud-functions-
|
121
|
+
is part of the name, e.g. `google-cloud-functions-v2`.
|
122
122
|
|
123
123
|
### What about the google-apis-<name> clients?
|
124
124
|
|
@@ -46,57 +46,62 @@ module Google
|
|
46
46
|
module Cloud
|
47
47
|
module Functions
|
48
48
|
##
|
49
|
-
# Create a new client object for
|
49
|
+
# Create a new client object for FunctionService.
|
50
50
|
#
|
51
51
|
# By default, this returns an instance of
|
52
|
-
# [Google::Cloud::Functions::
|
53
|
-
# for a gRPC client for version
|
52
|
+
# [Google::Cloud::Functions::V2::FunctionService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-functions-v2/latest/Google-Cloud-Functions-V2-FunctionService-Client)
|
53
|
+
# for a gRPC client for version V2 of the API.
|
54
54
|
# However, you can specify a different API version by passing it in the
|
55
|
-
# `version` parameter. If the
|
55
|
+
# `version` parameter. If the FunctionService service is
|
56
56
|
# supported by that API version, and the corresponding gem is available, the
|
57
57
|
# appropriate versioned client will be returned.
|
58
58
|
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
59
59
|
# the `transport` parameter.
|
60
60
|
#
|
61
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
|
62
|
+
# given API version does not support the given transport of the FunctionService service.
|
63
63
|
# You can determine whether the method will succeed by calling
|
64
|
-
# {Google::Cloud::Functions.
|
64
|
+
# {Google::Cloud::Functions.function_service_available?}.
|
65
65
|
#
|
66
|
-
# ## About
|
66
|
+
# ## About FunctionService
|
67
67
|
#
|
68
|
-
#
|
68
|
+
# Google Cloud Functions is used to deploy functions that are executed by
|
69
|
+
# Google in response to various events. Data connected with that event is
|
70
|
+
# passed to a function as the input data.
|
71
|
+
#
|
72
|
+
# A **function** is a resource which describes a function that should be
|
73
|
+
# executed and how it is triggered.
|
69
74
|
#
|
70
75
|
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
71
|
-
# Defaults to `:
|
76
|
+
# Defaults to `:v2`.
|
72
77
|
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
73
78
|
# @return [::Object] A client object for the specified version.
|
74
79
|
#
|
75
|
-
def self.
|
80
|
+
def self.function_service version: :v2, transport: :grpc, &block
|
76
81
|
require "google/cloud/functions/#{version.to_s.downcase}"
|
77
82
|
|
78
83
|
package_name = Google::Cloud::Functions
|
79
84
|
.constants
|
80
85
|
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
81
86
|
.first
|
82
|
-
service_module = Google::Cloud::Functions.const_get(package_name).const_get(:
|
87
|
+
service_module = Google::Cloud::Functions.const_get(package_name).const_get(:FunctionService)
|
83
88
|
service_module = service_module.const_get(:Rest) if transport == :rest
|
84
89
|
service_module.const_get(:Client).new(&block)
|
85
90
|
end
|
86
91
|
|
87
92
|
##
|
88
|
-
# Determines whether the
|
89
|
-
# If true, you can retrieve a client object by calling {Google::Cloud::Functions.
|
93
|
+
# Determines whether the FunctionService service is supported by the current client.
|
94
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::Functions.function_service}.
|
90
95
|
# If false, that method will raise an exception. This could happen if the given
|
91
|
-
# API version does not exist or does not support the
|
92
|
-
# or if the versioned client gem needs an update to support the
|
96
|
+
# API version does not exist or does not support the FunctionService service,
|
97
|
+
# or if the versioned client gem needs an update to support the FunctionService service.
|
93
98
|
#
|
94
99
|
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
95
|
-
# Defaults to `:
|
100
|
+
# Defaults to `:v2`.
|
96
101
|
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
97
102
|
# @return [boolean] Whether the service is available.
|
98
103
|
#
|
99
|
-
def self.
|
104
|
+
def self.function_service_available? version: :v2, transport: :grpc
|
100
105
|
require "google/cloud/functions/#{version.to_s.downcase}"
|
101
106
|
package_name = Google::Cloud::Functions
|
102
107
|
.constants
|
@@ -104,8 +109,8 @@ module Google
|
|
104
109
|
.first
|
105
110
|
return false unless package_name
|
106
111
|
service_module = Google::Cloud::Functions.const_get package_name
|
107
|
-
return false unless service_module.const_defined? :
|
108
|
-
service_module = service_module.const_get :
|
112
|
+
return false unless service_module.const_defined? :FunctionService
|
113
|
+
service_module = service_module.const_get :FunctionService
|
109
114
|
if transport == :rest
|
110
115
|
return false unless service_module.const_defined? :Rest
|
111
116
|
service_module = service_module.const_get :Rest
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-functions
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-
|
10
|
+
date: 2025-02-13 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: google-cloud-core
|
@@ -24,25 +24,19 @@ dependencies:
|
|
24
24
|
- !ruby/object:Gem::Version
|
25
25
|
version: '1.6'
|
26
26
|
- !ruby/object:Gem::Dependency
|
27
|
-
name: google-cloud-functions-
|
27
|
+
name: google-cloud-functions-v2
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|
29
29
|
requirements:
|
30
|
-
- - "
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
version: '0.13'
|
33
|
-
- - "<"
|
30
|
+
- - "~>"
|
34
31
|
- !ruby/object:Gem::Version
|
35
|
-
version:
|
32
|
+
version: '1.0'
|
36
33
|
type: :runtime
|
37
34
|
prerelease: false
|
38
35
|
version_requirements: !ruby/object:Gem::Requirement
|
39
36
|
requirements:
|
40
|
-
- - "
|
41
|
-
- !ruby/object:Gem::Version
|
42
|
-
version: '0.13'
|
43
|
-
- - "<"
|
37
|
+
- - "~>"
|
44
38
|
- !ruby/object:Gem::Version
|
45
|
-
version:
|
39
|
+
version: '1.0'
|
46
40
|
description: The Cloud Functions API manages lightweight user-provided functions executed
|
47
41
|
in response to events.
|
48
42
|
email: googleapis-packages@google.com
|
@@ -75,7 +69,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
75
69
|
- !ruby/object:Gem::Version
|
76
70
|
version: '0'
|
77
71
|
requirements: []
|
78
|
-
rubygems_version: 3.6.
|
72
|
+
rubygems_version: 3.6.3
|
79
73
|
specification_version: 4
|
80
74
|
summary: API Client library for the Cloud Functions API
|
81
75
|
test_files: []
|