Skip to content

Commit d4915b4

Browse files
authored
feat: Update minimum Ruby version to 2.6 (#145)
1 parent bea1848 commit d4915b4

File tree

11 files changed

+30
-33
lines changed

11 files changed

+30
-33
lines changed

.github/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ the one above, the
2828

2929
### Useful tools
3030

31-
The Functions Framework runs on Ruby 2.5 or later. We recommend having a recent
31+
The Functions Framework runs on Ruby 2.6 or later. We recommend having a recent
3232
version of Ruby for development and testing. The CI will test against all
3333
supported versions of Ruby.
3434

.github/workflows/conformance.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
strategy:
1414
matrix:
15-
ruby-version: ["2.5", "2.6", "2.7", "3.0", "3.1"]
15+
ruby-version: ["2.6", "2.7", "3.0", "3.1"]
1616
steps:
1717
- name: Checkout code
1818
uses: actions/checkout@v3

.github/workflows/unit.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ jobs:
1313
strategy:
1414
matrix:
1515
include:
16-
- os: ubuntu-latest
17-
ruby: "2.5"
18-
flags: "--only --test-unit"
1916
- os: ubuntu-latest
2017
ruby: "2.6"
2118
flags: "--only --test-unit"

Gemfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ source "https://rubygems.org"
1616

1717
gemspec
1818

19-
gem "google-style", "~> 1.25.1"
20-
gem "minitest", "~> 5.14"
19+
gem "google-style", "~> 1.26.1"
20+
gem "minitest", "~> 5.16"
2121
gem "minitest-focus", "~> 1.2"
2222
gem "minitest-rg", "~> 5.2"
2323
gem "redcarpet", "~> 3.5" unless ::RUBY_PLATFORM == "java"

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,14 @@ requiring an HTTP server or complicated request handling logic.
4242

4343
## Supported Ruby versions
4444

45-
This library is supported on Ruby 2.5+.
45+
This library is supported on Ruby 2.6+.
4646

4747
Google provides official support for Ruby versions that are actively supported
4848
by Ruby Core—that is, Ruby versions that are either in normal maintenance or
49-
in security maintenance, and not end of life. Currently, this means Ruby 2.5
50-
and later. Older versions of Ruby _may_ still work, but are unsupported and not
51-
recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details
52-
about the Ruby support schedule.
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.
5353

5454
## Quickstart
5555

docs/deploying-functions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,8 @@ command may ask you for permission to enable the Cloud Build API for the project
147147
if it isn't already enabled.
148148

149149
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.5 through
151-
3.0.
150+
use any version of Ruby supported by the Functions Framework, from 2.6 through
151+
3.1.
152152

153153
### Deploying an image to Cloud Run
154154

docs/overview.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,14 @@ requiring an HTTP server or complicated request handling logic.
4646

4747
## Supported Ruby versions
4848

49-
This library is supported on Ruby 2.5+.
49+
This library is supported on Ruby 2.6+.
5050

5151
Google provides official support for Ruby versions that are actively supported
5252
by Ruby Core—that is, Ruby versions that are either in normal maintenance or
53-
in security maintenance, and not end of life. Currently, this means Ruby 2.5
54-
and later. Older versions of Ruby _may_ still work, but are unsupported and not
55-
recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details
56-
about the Ruby support schedule.
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.
5757

5858
## Quickstart
5959

functions_framework.gemspec

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ version = ::FunctionsFramework::VERSION
2727

2828
spec.summary = "Functions Framework for Ruby"
2929
spec.description =
30-
"The Functions Framework is an open source framework for writing" \
31-
" lightweight, portable Ruby functions that run in a serverless" \
32-
" environment. Functions written to this Framework will run on Google" \
33-
" Cloud Functions, Google Cloud Run, or any other Knative-based" \
34-
" environment."
30+
"The Functions Framework is an open source framework for writing " \
31+
"lightweight, portable Ruby functions that run in a serverless " \
32+
"environment. Functions written to this Framework will run on Google " \
33+
"Cloud Functions, Google Cloud Run, or any other Knative-based " \
34+
"environment."
3535
spec.license = "Apache-2.0"
3636
spec.homepage = "https://github.com/GoogleCloudPlatform/functions-framework-ruby"
3737

@@ -44,7 +44,7 @@ version = ::FunctionsFramework::VERSION
4444
spec.bindir = "bin"
4545
spec.executables = ["functions-framework", "functions-framework-ruby"]
4646

47-
spec.required_ruby_version = ">= 2.5.0"
47+
spec.required_ruby_version = ">= 2.6.0"
4848
spec.add_dependency "cloud_events", ">= 0.7.0", "< 2.a"
4949
spec.add_dependency "puma", ">= 4.3.0", "< 6.a"
5050
spec.add_dependency "rack", "~> 2.1"

lib/functions_framework/cli.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ def parse_args argv # rubocop:disable Metrics/MethodLength,Metrics/AbcSize
8585
@source = val
8686
end
8787
op.on "--signature-type TYPE",
88-
"Asserts that the function has the given signature type." \
89-
" Supported values are 'http' and 'cloudevent'." do |val|
88+
"Asserts that the function has the given signature type. " \
89+
"Supported values are 'http' and 'cloudevent'." do |val|
9090
@signature_type = val
9191
end
9292
op.on "-p", "--port PORT", "Set the port to listen to (defaults to 8080)" do |val|
@@ -196,8 +196,8 @@ def load_function
196196
function = ::FunctionsFramework.global_registry[@target]
197197
raise "Undefined function: #{@target.inspect}" if function.nil?
198198
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)
201201
raise "Function #{@target.inspect} does not match type #{@signature_type}"
202202
end
203203
function

lib/functions_framework/server.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ def start
8787
@server.max_threads = @config.max_threads
8888
@server.leak_stack_on_error = @config.show_error_details?
8989
@server.binder.add_tcp_listener @config.bind_addr, @config.port
90-
@config.logger.info "FunctionsFramework: Serving function #{@function.name.inspect}" \
91-
" on port #{@config.port}..."
90+
@config.logger.info "FunctionsFramework: Serving function #{@function.name.inspect} " \
91+
"on port #{@config.port}..."
9292
@server.run true
9393
end
9494
end

0 commit comments

Comments
 (0)