functions_framework 1.2.0 → 1.3.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7f26316991786d4688dc35bab52d91d7df30c11fa573b5e5e9678b095d3e2047
4
- data.tar.gz: 9b900e5156d42e4acdae4a8312bc25b866202f738f84ed9e264815fb2635ef42
3
+ metadata.gz: 1c6958234b00d6168c6756c7188b698d84984628d1ff6a1fcd3bbd46fbb6a876
4
+ data.tar.gz: 5ec49e5ea07c8416ac04a336a8581cf71d26c4b2fd1048d4dc35db3e7c497bbc
5
5
  SHA512:
6
- metadata.gz: 75180c4a931148fff3490084a4a43bacbcc65089812a18b397f9781f4e5e0899db5acde266f27bbf25f325c23d18c987abb4a1671125cb8db049b77da4b05a59
7
- data.tar.gz: f7f95a82b95ab9e7b6f4f4dd16f455dac9f3ea71549401b6bc6b781b6b011741f4e9b59ef97fb444c2b0fbec718eb0f8f92895f1a2a7adbd8f404e590c22d124
6
+ metadata.gz: 66f952df1cc33a829a48454a49508d56c8b5026e4b145cb0931c04801b85b5f5b6109d8564c54bbf2fa34bc3882d0adc6f944e22af07547de1743b5ac3a824b3
7
+ data.tar.gz: 81406729506f55f2ca5da840245f4323ca705022f877a31e28af22c41e679d5ea92f40dfca523b3e8c2a869225f5f5abe5a29aa5ff12e5e6ff0a6e9e7e0d9bea
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ### 1.3.0 (2023-04-05)
4
+
5
+ #### Features
6
+
7
+ * Support for Puma 6 and Rack 3
8
+
3
9
  ### 1.2.0 (2022-08-25)
4
10
 
5
11
  * Update minimum Ruby version to 2.6
@@ -82,10 +82,21 @@ module FunctionsFramework
82
82
  def start
83
83
  synchronize do
84
84
  unless running?
85
- @server = ::Puma::Server.new @app
86
- @server.min_threads = @config.min_threads
87
- @server.max_threads = @config.max_threads
88
- @server.leak_stack_on_error = @config.show_error_details?
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
- "Content-Type" => content_type,
381
- "Content-Length" => string.bytesize
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
@@ -17,5 +17,5 @@ module FunctionsFramework
17
17
  # Version of the Ruby Functions Framework
18
18
  # @return [String]
19
19
  #
20
- VERSION = "1.2.0".freeze
20
+ VERSION = "1.3.0".freeze
21
21
  end
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.2.0
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: 2022-08-25 00:00:00.000000000 Z
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: 6.a
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: 6.a
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.2.0/file.CHANGELOG.html
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.2.0
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.3.14
128
+ rubygems_version: 3.4.2
123
129
  signing_key:
124
130
  specification_version: 4
125
131
  summary: Functions Framework for Ruby