google-cloud-functions 1.6.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: d828ceb8021c20bf003b7c5d2957f45e2acde113a3125737591a923952f0f66c
4
- data.tar.gz: 1b68d48350607a3267bc6b04fbd36c87c13b3854f3dd44eb755f0a4c3aaf103c
3
+ metadata.gz: 5d5b637c7d621652354e1db54578ccef905ee3b294434d97927d0235288892a1
4
+ data.tar.gz: a03d8aa071cdddb842415ffb24da12be31a0dc6e18fc4e59e4a9627357b96baa
5
5
  SHA512:
6
- metadata.gz: b3338cb304e68ccda6e256b98233b920111563a52ea922263182655d54c5b3ba4e82c40bca461efd0c4d205954e03e2ee2a6a6bcd187c8a1c56636856e3256a4
7
- data.tar.gz: 399e8bcc6bcd306096439d8da5eb417370ff126a7debe259d4ccdfcd68ef21aa28b07c26d5f7558469fc5996ad0394290aad64891c744ec859c7422f10dc4de8
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.cloud_functions_service do |config|
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.cloud_functions_service
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.cloud_functions_service
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-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-functions-v1/latest).
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-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-functions-v1/latest).
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-v1`.
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-v1`.
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
 
@@ -20,7 +20,7 @@
20
20
  module Google
21
21
  module Cloud
22
22
  module Functions
23
- VERSION = "1.6.0"
23
+ VERSION = "2.0.0"
24
24
  end
25
25
  end
26
26
  end
@@ -46,57 +46,62 @@ module Google
46
46
  module Cloud
47
47
  module Functions
48
48
  ##
49
- # Create a new client object for CloudFunctionsService.
49
+ # Create a new client object for FunctionService.
50
50
  #
51
51
  # By default, this returns an instance of
52
- # [Google::Cloud::Functions::V1::CloudFunctionsService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-functions-v1/latest/Google-Cloud-Functions-V1-CloudFunctionsService-Client)
53
- # for a gRPC client for version V1 of the API.
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 CloudFunctionsService service is
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 CloudFunctionsService service.
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.cloud_functions_service_available?}.
64
+ # {Google::Cloud::Functions.function_service_available?}.
65
65
  #
66
- # ## About CloudFunctionsService
66
+ # ## About FunctionService
67
67
  #
68
- # A service that application uses to manipulate triggers and functions.
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 `:v1`.
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.cloud_functions_service version: :v1, transport: :grpc, &block
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(:CloudFunctionsService)
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 CloudFunctionsService service is supported by the current client.
89
- # If true, you can retrieve a client object by calling {Google::Cloud::Functions.cloud_functions_service}.
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 CloudFunctionsService service,
92
- # or if the versioned client gem needs an update to support the CloudFunctionsService service.
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 `:v1`.
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.cloud_functions_service_available? version: :v1, transport: :grpc
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? :CloudFunctionsService
108
- service_module = service_module.const_get :CloudFunctionsService
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: 1.6.0
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-01-29 00:00:00.000000000 Z
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-v1
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: 2.a
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: 2.a
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.2
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: []