functions_framework 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 +4 -4
- data/CHANGELOG.md +26 -21
- data/README.md +5 -5
- data/docs/deploying-functions.md +2 -2
- data/docs/overview.md +5 -5
- data/lib/functions_framework/cli.rb +4 -4
- data/lib/functions_framework/server.rb +3 -3
- data/lib/functions_framework/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7f26316991786d4688dc35bab52d91d7df30c11fa573b5e5e9678b095d3e2047
|
|
4
|
+
data.tar.gz: 9b900e5156d42e4acdae4a8312bc25b866202f738f84ed9e264815fb2635ef42
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 75180c4a931148fff3490084a4a43bacbcc65089812a18b397f9781f4e5e0899db5acde266f27bbf25f325c23d18c987abb4a1671125cb8db049b77da4b05a59
|
|
7
|
+
data.tar.gz: f7f95a82b95ab9e7b6f4f4dd16f455dac9f3ea71549401b6bc6b781b6b011741f4e9b59ef97fb444c2b0fbec718eb0f8f92895f1a2a7adbd8f404e590c22d124
|
data/CHANGELOG.md
CHANGED
|
@@ -1,48 +1,53 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
### 1.2.0 (2022-08-25)
|
|
4
|
+
|
|
5
|
+
* Update minimum Ruby version to 2.6
|
|
6
|
+
* Increase default max thread pool size to 16
|
|
7
|
+
|
|
8
|
+
### 1.1.0 (2022-01-18)
|
|
4
9
|
|
|
5
10
|
* Increase default max thread pool size to 8.
|
|
6
11
|
* Return 204 when a GET request is sent to an event function, to support health checks.
|
|
7
12
|
* Flush stdout and stderr streams at the end of each request.
|
|
8
13
|
* Format the error backtrace.
|
|
9
14
|
|
|
10
|
-
|
|
15
|
+
### 1.0.1 (2021-09-10)
|
|
11
16
|
|
|
12
17
|
* FIXED: Update legacy event conversion to set the correct types for firebase database events
|
|
13
18
|
|
|
14
|
-
|
|
19
|
+
### 1.0.0 (2021-07-07)
|
|
15
20
|
|
|
16
21
|
* Bumped the version to 1.0.
|
|
17
22
|
* Removed the "preview" notices for Google Cloud Functions since the Ruby runtime is now GA.
|
|
18
23
|
|
|
19
|
-
|
|
24
|
+
### v0.11.0 / 2021-06-28
|
|
20
25
|
|
|
21
26
|
* UPDATED: Update CloudEvents dependency to 0.5 to get fixes for JSON formatting cases
|
|
22
27
|
* FIXED: Updated Pub/Sub and Firebase event conversion logic to better align to Eventarc
|
|
23
28
|
|
|
24
|
-
|
|
29
|
+
### v0.10.0 / 2021-06-01
|
|
25
30
|
|
|
26
31
|
* ADDED: Support raw pubsub events sent by the pubsub emulator
|
|
27
32
|
* FIXED: Set proper response content-type charset when a function returns a string (plain text) or hash (JSON)
|
|
28
33
|
* FIXED: Properly handle conversion of non-ascii characters in legacy event strings
|
|
29
34
|
|
|
30
|
-
|
|
35
|
+
### v0.9.0 / 2021-03-18
|
|
31
36
|
|
|
32
37
|
* BREAKING CHANGE: Servers are configured as single-threaded in production by default, matching the current behavior of Google Cloud Functions.
|
|
33
38
|
* FIXED: Fixed conversion of Firebase events to CloudEvents to conform to the specs used by Cloud Functions and Cloud Run.
|
|
34
39
|
* FIXED: Fixed an error when reading a global set to a Minitest::Mock. This will make it easier to write tests that use mocks for global resources.
|
|
35
40
|
|
|
36
|
-
|
|
41
|
+
### v0.8.0 / 2021-03-02
|
|
37
42
|
|
|
38
43
|
* ADDED: Support for lazily-initialized globals
|
|
39
44
|
|
|
40
|
-
|
|
45
|
+
### v0.7.1 / 2021-01-26
|
|
41
46
|
|
|
42
47
|
* DOCS: Fixed several errors in the writing-functions doc samples
|
|
43
48
|
* DOCS: Updated documentation to note public release of GCF support
|
|
44
49
|
|
|
45
|
-
|
|
50
|
+
### v0.7.0 / 2020-09-25
|
|
46
51
|
|
|
47
52
|
* Now requires Ruby 2.5 or later.
|
|
48
53
|
* BREAKING CHANGE: Renamed "context" hash to "globals" and made it read-only for normal functions.
|
|
@@ -56,33 +61,33 @@
|
|
|
56
61
|
* DOCS: Expanded documentation on initialization, execution context, and shared resources.
|
|
57
62
|
* DEPRECATED: The functions-framework executable is deprecated. Use functions-framework-ruby instead.
|
|
58
63
|
|
|
59
|
-
|
|
64
|
+
### v0.6.0 / 2020-09-17
|
|
60
65
|
|
|
61
66
|
* ADDED: You can use the --version flag to print the framework version
|
|
62
67
|
* ADDED: You can use the --verify flag to verify that a given function is defined
|
|
63
68
|
* ADDED: You can now define blocks that are executed at server startup
|
|
64
69
|
|
|
65
|
-
|
|
70
|
+
### v0.5.2 / 2020-09-06
|
|
66
71
|
|
|
67
72
|
* FIXED: Use global $stderr rather than STDERR for logger
|
|
68
73
|
* DOCS: Fix instructions for deployment to Google Cloud Functions
|
|
69
74
|
|
|
70
|
-
|
|
75
|
+
### v0.5.1 / 2020-07-20
|
|
71
76
|
|
|
72
77
|
* Updated some documentation links. No functional changes.
|
|
73
78
|
|
|
74
|
-
|
|
79
|
+
### v0.5.0 / 2020-07-09
|
|
75
80
|
|
|
76
81
|
* Removed embedded CloudEvents classes and added the official CloudEvents SDK as a dependency. A `FunctionsFramework::CloudEvents` alias provides backward compatibility.
|
|
77
82
|
|
|
78
|
-
|
|
83
|
+
### v0.4.1 / 2020-07-08
|
|
79
84
|
|
|
80
85
|
* Fixed unsupported signal error on Windows.
|
|
81
86
|
* Fixed several edge case errors in legacy event conversion.
|
|
82
87
|
* Generated Content-Type headers now properly quote param values if needed.
|
|
83
88
|
* Minor documentation updates.
|
|
84
89
|
|
|
85
|
-
|
|
90
|
+
### v0.4.0 / 2020-06-29
|
|
86
91
|
|
|
87
92
|
* Dropped the legacy and largely unsupported `:event` function type. All event functions should be of type `:cloud_event`.
|
|
88
93
|
* Define the object context for function execution, and include an extensible context helper.
|
|
@@ -93,21 +98,21 @@
|
|
|
93
98
|
* Removed redundant `_string` accessors from event classes since raw forms are already available via `[]`.
|
|
94
99
|
* A variety of corrections to event-related class documentation.
|
|
95
100
|
|
|
96
|
-
|
|
101
|
+
### v0.3.1 / 2020-06-27
|
|
97
102
|
|
|
98
103
|
* Fixed crash when using "return" directly in a function block.
|
|
99
104
|
* Added a more flexible request generation helper in the testing module.
|
|
100
105
|
* Fixed several typos in the documentation.
|
|
101
106
|
|
|
102
|
-
|
|
107
|
+
### v0.3.0 / 2020-06-26
|
|
103
108
|
|
|
104
109
|
* Updated the CloudEvent data format for converted pubsub events to conform to Cloud Run's conversion.
|
|
105
110
|
|
|
106
|
-
|
|
111
|
+
### v0.2.1 / 2020-06-25
|
|
107
112
|
|
|
108
113
|
* The `--signature-type` check recognizes the legacy `event` type for `:cloud_event` functions.
|
|
109
114
|
|
|
110
|
-
|
|
115
|
+
### v0.2.0 / 2020-06-24
|
|
111
116
|
|
|
112
117
|
Significant changes:
|
|
113
118
|
|
|
@@ -126,11 +131,11 @@ Minor changes:
|
|
|
126
131
|
* Renamed a few undocumented environment variables, and added support for a logging level environment variable. All CLI flags now have associated environment variables.
|
|
127
132
|
* Several fixes to the example code, and added a new Sinatra example.
|
|
128
133
|
|
|
129
|
-
|
|
134
|
+
### v0.1.1 / 2020-02-27
|
|
130
135
|
|
|
131
136
|
* Server returns 404 when receiving a /favicon.ico or /robots.txt request.
|
|
132
137
|
* Correct a rack constant name in Testing#make_post_request
|
|
133
138
|
|
|
134
|
-
|
|
139
|
+
### v0.1.0 / 2020-01-30
|
|
135
140
|
|
|
136
141
|
* Initial release
|
data/README.md
CHANGED
|
@@ -42,14 +42,14 @@ requiring an HTTP server or complicated request handling logic.
|
|
|
42
42
|
|
|
43
43
|
## Supported Ruby versions
|
|
44
44
|
|
|
45
|
-
This library is supported on Ruby 2.
|
|
45
|
+
This library is supported on Ruby 2.6+.
|
|
46
46
|
|
|
47
47
|
Google provides official support for Ruby versions that are actively supported
|
|
48
48
|
by Ruby Core—that is, Ruby versions that are either in normal maintenance or
|
|
49
|
-
in security maintenance, and not end of life.
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
49
|
+
in security maintenance, and not end of life. Older versions of Ruby _may_
|
|
50
|
+
still work, but are unsupported and not recommended. See
|
|
51
|
+
https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby
|
|
52
|
+
support schedule.
|
|
53
53
|
|
|
54
54
|
## Quickstart
|
|
55
55
|
|
data/docs/deploying-functions.md
CHANGED
|
@@ -147,8 +147,8 @@ command may ask you for permission to enable the Cloud Build API for the project
|
|
|
147
147
|
if it isn't already enabled.
|
|
148
148
|
|
|
149
149
|
Because you provide your own Docker image when deploying to Cloud Run, you can
|
|
150
|
-
use any version of Ruby supported by the Functions Framework, from 2.
|
|
151
|
-
3.
|
|
150
|
+
use any version of Ruby supported by the Functions Framework, from 2.6 through
|
|
151
|
+
3.1.
|
|
152
152
|
|
|
153
153
|
### Deploying an image to Cloud Run
|
|
154
154
|
|
data/docs/overview.md
CHANGED
|
@@ -46,14 +46,14 @@ requiring an HTTP server or complicated request handling logic.
|
|
|
46
46
|
|
|
47
47
|
## Supported Ruby versions
|
|
48
48
|
|
|
49
|
-
This library is supported on Ruby 2.
|
|
49
|
+
This library is supported on Ruby 2.6+.
|
|
50
50
|
|
|
51
51
|
Google provides official support for Ruby versions that are actively supported
|
|
52
52
|
by Ruby Core—that is, Ruby versions that are either in normal maintenance or
|
|
53
|
-
in security maintenance, and not end of life.
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
53
|
+
in security maintenance, and not end of life. Older versions of Ruby _may_
|
|
54
|
+
still work, but are unsupported and not recommended. See
|
|
55
|
+
https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby
|
|
56
|
+
support schedule.
|
|
57
57
|
|
|
58
58
|
## Quickstart
|
|
59
59
|
|
|
@@ -85,8 +85,8 @@ module FunctionsFramework
|
|
|
85
85
|
@source = val
|
|
86
86
|
end
|
|
87
87
|
op.on "--signature-type TYPE",
|
|
88
|
-
"Asserts that the function has the given signature type." \
|
|
89
|
-
"
|
|
88
|
+
"Asserts that the function has the given signature type. " \
|
|
89
|
+
"Supported values are 'http' and 'cloudevent'." do |val|
|
|
90
90
|
@signature_type = val
|
|
91
91
|
end
|
|
92
92
|
op.on "-p", "--port PORT", "Set the port to listen to (defaults to 8080)" do |val|
|
|
@@ -196,8 +196,8 @@ module FunctionsFramework
|
|
|
196
196
|
function = ::FunctionsFramework.global_registry[@target]
|
|
197
197
|
raise "Undefined function: #{@target.inspect}" if function.nil?
|
|
198
198
|
unless @signature_type.nil? ||
|
|
199
|
-
@signature_type == "http" && function.type == :http ||
|
|
200
|
-
["cloudevent", "event"].include?(@signature_type) && function.type == :cloud_event
|
|
199
|
+
(@signature_type == "http" && function.type == :http) ||
|
|
200
|
+
(["cloudevent", "event"].include?(@signature_type) && function.type == :cloud_event)
|
|
201
201
|
raise "Function #{@target.inspect} does not match type #{@signature_type}"
|
|
202
202
|
end
|
|
203
203
|
function
|
|
@@ -87,8 +87,8 @@ module FunctionsFramework
|
|
|
87
87
|
@server.max_threads = @config.max_threads
|
|
88
88
|
@server.leak_stack_on_error = @config.show_error_details?
|
|
89
89
|
@server.binder.add_tcp_listener @config.bind_addr, @config.port
|
|
90
|
-
@config.logger.info "FunctionsFramework: Serving function #{@function.name.inspect}" \
|
|
91
|
-
"
|
|
90
|
+
@config.logger.info "FunctionsFramework: Serving function #{@function.name.inspect} " \
|
|
91
|
+
"on port #{@config.port}..."
|
|
92
92
|
@server.run true
|
|
93
93
|
end
|
|
94
94
|
end
|
|
@@ -306,7 +306,7 @@ module FunctionsFramework
|
|
|
306
306
|
# @return [Integer]
|
|
307
307
|
#
|
|
308
308
|
def max_threads
|
|
309
|
-
@max_threads ||
|
|
309
|
+
@max_threads || 16
|
|
310
310
|
end
|
|
311
311
|
|
|
312
312
|
##
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: functions_framework
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Daniel Azuma
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-
|
|
11
|
+
date: 2022-08-25 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: cloud_events
|
|
@@ -100,10 +100,10 @@ homepage: https://github.com/GoogleCloudPlatform/functions-framework-ruby
|
|
|
100
100
|
licenses:
|
|
101
101
|
- Apache-2.0
|
|
102
102
|
metadata:
|
|
103
|
-
changelog_uri: https://googlecloudplatform.github.io/functions-framework-ruby/v1.
|
|
103
|
+
changelog_uri: https://googlecloudplatform.github.io/functions-framework-ruby/v1.2.0/file.CHANGELOG.html
|
|
104
104
|
source_code_uri: https://github.com/GoogleCloudPlatform/functions-framework-ruby
|
|
105
105
|
bug_tracker_uri: https://github.com/GoogleCloudPlatform/functions-framework-ruby/issues
|
|
106
|
-
documentation_uri: https://googlecloudplatform.github.io/functions-framework-ruby/v1.
|
|
106
|
+
documentation_uri: https://googlecloudplatform.github.io/functions-framework-ruby/v1.2.0
|
|
107
107
|
post_install_message:
|
|
108
108
|
rdoc_options: []
|
|
109
109
|
require_paths:
|
|
@@ -112,14 +112,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
112
112
|
requirements:
|
|
113
113
|
- - ">="
|
|
114
114
|
- !ruby/object:Gem::Version
|
|
115
|
-
version: 2.
|
|
115
|
+
version: 2.6.0
|
|
116
116
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
117
117
|
requirements:
|
|
118
118
|
- - ">="
|
|
119
119
|
- !ruby/object:Gem::Version
|
|
120
120
|
version: '0'
|
|
121
121
|
requirements: []
|
|
122
|
-
rubygems_version: 3.3.
|
|
122
|
+
rubygems_version: 3.3.14
|
|
123
123
|
signing_key:
|
|
124
124
|
specification_version: 4
|
|
125
125
|
summary: Functions Framework for Ruby
|