Skip to content

Commit 4b93058

Browse files
committed
Upgrade to Ruby 3.4, Bundler 4, fix frozen string literal warning, update workflows
- Set .ruby-version to 3.4.4 for local development - Update Bundler from 2.4.13 to 4.0.13 and update gems - Replace mutable '' with String.new in run.rb to fix Ruby 3.4 frozen string warning - Update test.yml: use ubuntu-24.04, actions/checkout@v4, Ruby 3.2/3.3/3.4 matrix - Add release.yml for trusted publishing to RubyGems.org
1 parent e210ad0 commit 4b93058

5 files changed

Lines changed: 42 additions & 11 deletions

File tree

.github/workflows/release.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Release Gem
2+
on:
3+
workflow_dispatch:
4+
branches:
5+
- master
6+
7+
jobs:
8+
push:
9+
name: Push gem to RubyGems.org
10+
runs-on: ubuntu-latest
11+
12+
permissions:
13+
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
14+
contents: write # IMPORTANT: this permission is required for `rake release` to push the release tag
15+
16+
steps:
17+
# Set up
18+
- uses: actions/checkout@v4
19+
- name: Set up Ruby
20+
uses: ruby/setup-ruby@v1
21+
with:
22+
bundler-cache: true
23+
ruby-version: ruby
24+
25+
# Release
26+
- uses: rubygems/release-gem@v1

.github/workflows/test.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,16 @@ name: CI/CD
22
on: [push]
33
jobs:
44
build:
5-
runs-on: ubuntu-latest
5+
runs-on: ubuntu-24.04
66
name: Ruby ${{ matrix.ruby }}
77
strategy:
88
matrix:
99
ruby:
10-
- "2.7.4"
11-
- "3.0.2"
12-
- "3.1.0"
13-
- "3.2.1"
10+
- "3.2"
11+
- "3.3"
12+
- "3.4"
1413
steps:
15-
- uses: actions/checkout@v3
14+
- uses: actions/checkout@v4
1615
- name: Set up Ruby
1716
uses: ruby/setup-ruby@v1
1817
with:

.ruby-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.4.4

Gemfile.lock

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,19 @@ PATH
66
GEM
77
remote: https://rubygems.org/
88
specs:
9-
minitest (5.18.0)
10-
mocha (2.0.4)
9+
drb (2.2.3)
10+
minitest (6.0.6)
11+
drb (~> 2.0)
12+
prism (~> 1.5)
13+
mocha (3.1.0)
1114
ruby2_keywords (>= 0.0.5)
12-
rake (13.0.6)
15+
prism (1.9.0)
16+
rake (13.4.2)
1317
ruby2_keywords (0.0.5)
1418

1519
PLATFORMS
1620
arm64-darwin-22
21+
arm64-darwin-25
1722
x86_64-linux
1823

1924
DEPENDENCIES
@@ -23,4 +28,4 @@ DEPENDENCIES
2328
rake
2429

2530
BUNDLED WITH
26-
2.4.13
31+
4.0.13

lib/lambda-console-ruby/run.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def handle(event)
2222

2323
def initialize(event)
2424
@event = event
25-
@body = ''
25+
@body = String.new
2626
end
2727

2828
def run

0 commit comments

Comments
 (0)