functions_framework 1.2.0 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/functions_framework/server.rb +17 -6
- data/lib/functions_framework/testing.rb +1 -1
- data/lib/functions_framework/version.rb +1 -1
- metadata +15 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1c6958234b00d6168c6756c7188b698d84984628d1ff6a1fcd3bbd46fbb6a876
|
4
|
+
data.tar.gz: 5ec49e5ea07c8416ac04a336a8581cf71d26c4b2fd1048d4dc35db3e7c497bbc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 66f952df1cc33a829a48454a49508d56c8b5026e4b145cb0931c04801b85b5f5b6109d8564c54bbf2fa34bc3882d0adc6f944e22af07547de1743b5ac3a824b3
|
7
|
+
data.tar.gz: 81406729506f55f2ca5da840245f4323ca705022f877a31e28af22c41e679d5ea92f40dfca523b3e8c2a869225f5f5abe5a29aa5ff12e5e6ff0a6e9e7e0d9bea
|
data/CHANGELOG.md
CHANGED
@@ -82,10 +82,21 @@ module FunctionsFramework
|
|
82
82
|
def start
|
83
83
|
synchronize do
|
84
84
|
unless running?
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
85
|
+
# Puma >= 6.0 interprets these settings from options
|
86
|
+
options = {
|
87
|
+
min_threads: @config.min_threads,
|
88
|
+
max_threads: @config.max_threads,
|
89
|
+
environment: @config.show_error_details? ? "development" : "production"
|
90
|
+
}
|
91
|
+
# Puma::Events.stdio for Puma < 6.0; otherwise nil for Puma >= 6.0
|
92
|
+
events = ::Puma::Events.stdio if ::Puma::Events.respond_to? :stdio
|
93
|
+
@server = ::Puma::Server.new @app, events, options
|
94
|
+
if @server.respond_to? :min_threads=
|
95
|
+
# Puma < 6.0 sets server attributes for these settings
|
96
|
+
@server.min_threads = @config.min_threads
|
97
|
+
@server.max_threads = @config.max_threads
|
98
|
+
@server.leak_stack_on_error = @config.show_error_details?
|
99
|
+
end
|
89
100
|
@server.binder.add_tcp_listener @config.bind_addr, @config.port
|
90
101
|
@config.logger.info "FunctionsFramework: Serving function #{@function.name.inspect} " \
|
91
102
|
"on port #{@config.port}..."
|
@@ -377,8 +388,8 @@ module FunctionsFramework
|
|
377
388
|
content_type = "#{content_type}; charset=#{string.encoding.name.downcase}"
|
378
389
|
end
|
379
390
|
headers = {
|
380
|
-
"
|
381
|
-
"
|
391
|
+
"content-type" => content_type,
|
392
|
+
"content-length" => string.bytesize
|
382
393
|
}
|
383
394
|
[status, headers, [string]]
|
384
395
|
end
|
@@ -367,8 +367,8 @@ module FunctionsFramework
|
|
367
367
|
::Rack::QUERY_STRING => url.query,
|
368
368
|
::Rack::SERVER_NAME => url.host,
|
369
369
|
::Rack::SERVER_PORT => url.port,
|
370
|
+
::Rack::SERVER_PROTOCOL => "HTTP/1.1",
|
370
371
|
::Rack::RACK_URL_SCHEME => url.scheme,
|
371
|
-
::Rack::RACK_VERSION => ::Rack::VERSION,
|
372
372
|
::Rack::RACK_LOGGER => ::FunctionsFramework.logger,
|
373
373
|
::Rack::RACK_INPUT => ::StringIO.new,
|
374
374
|
::Rack::RACK_ERRORS => ::StringIO.new
|
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.3.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:
|
11
|
+
date: 2023-04-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cloud_events
|
@@ -39,7 +39,7 @@ dependencies:
|
|
39
39
|
version: 4.3.0
|
40
40
|
- - "<"
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version:
|
42
|
+
version: 7.a
|
43
43
|
type: :runtime
|
44
44
|
prerelease: false
|
45
45
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -49,21 +49,27 @@ dependencies:
|
|
49
49
|
version: 4.3.0
|
50
50
|
- - "<"
|
51
51
|
- !ruby/object:Gem::Version
|
52
|
-
version:
|
52
|
+
version: 7.a
|
53
53
|
- !ruby/object:Gem::Dependency
|
54
54
|
name: rack
|
55
55
|
requirement: !ruby/object:Gem::Requirement
|
56
56
|
requirements:
|
57
|
-
- - "
|
57
|
+
- - ">="
|
58
58
|
- !ruby/object:Gem::Version
|
59
59
|
version: '2.1'
|
60
|
+
- - "<"
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: 4.a
|
60
63
|
type: :runtime
|
61
64
|
prerelease: false
|
62
65
|
version_requirements: !ruby/object:Gem::Requirement
|
63
66
|
requirements:
|
64
|
-
- - "
|
67
|
+
- - ">="
|
65
68
|
- !ruby/object:Gem::Version
|
66
69
|
version: '2.1'
|
70
|
+
- - "<"
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
version: 4.a
|
67
73
|
description: The Functions Framework is an open source framework for writing lightweight,
|
68
74
|
portable Ruby functions that run in a serverless environment. Functions written
|
69
75
|
to this Framework will run on Google Cloud Functions, Google Cloud Run, or any other
|
@@ -100,10 +106,10 @@ homepage: https://github.com/GoogleCloudPlatform/functions-framework-ruby
|
|
100
106
|
licenses:
|
101
107
|
- Apache-2.0
|
102
108
|
metadata:
|
103
|
-
changelog_uri: https://googlecloudplatform.github.io/functions-framework-ruby/v1.
|
109
|
+
changelog_uri: https://googlecloudplatform.github.io/functions-framework-ruby/v1.3.0/file.CHANGELOG.html
|
104
110
|
source_code_uri: https://github.com/GoogleCloudPlatform/functions-framework-ruby
|
105
111
|
bug_tracker_uri: https://github.com/GoogleCloudPlatform/functions-framework-ruby/issues
|
106
|
-
documentation_uri: https://googlecloudplatform.github.io/functions-framework-ruby/v1.
|
112
|
+
documentation_uri: https://googlecloudplatform.github.io/functions-framework-ruby/v1.3.0
|
107
113
|
post_install_message:
|
108
114
|
rdoc_options: []
|
109
115
|
require_paths:
|
@@ -119,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
119
125
|
- !ruby/object:Gem::Version
|
120
126
|
version: '0'
|
121
127
|
requirements: []
|
122
|
-
rubygems_version: 3.
|
128
|
+
rubygems_version: 3.4.2
|
123
129
|
signing_key:
|
124
130
|
specification_version: 4
|
125
131
|
summary: Functions Framework for Ruby
|