Skip to content

Commit 574df6c

Browse files
committed
Upgrade to Ruby 3.3
1 parent f26209b commit 574df6c

7 files changed

Lines changed: 15 additions & 12 deletions

File tree

.circleci/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ version: 2.1
1212
jobs:
1313
build:
1414
docker:
15-
- image: cimg/ruby:3.2.10-node
15+
- image: cimg/ruby:3.3.10-node
1616

1717
steps:
1818
- run:
@@ -99,7 +99,7 @@ jobs:
9999

100100
test:
101101
docker:
102-
- image: cimg/ruby:3.2.10-browsers
102+
- image: cimg/ruby:3.3.10-browsers
103103
environment:
104104
RAILS_ENV: test
105105
PGHOST: 127.0.0.1

.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.2.10
1+
3.3.10

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
source 'https://rubygems.org'
22
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
33

4-
ruby '3.2.10'
4+
ruby '3.3.10'
55

66
# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
77
gem 'rails', '~> 8.0'

Gemfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,7 @@ DEPENDENCIES
719719
widget_renderer!
720720

721721
RUBY VERSION
722-
ruby 3.2.10p266
722+
ruby 3.3.10p183
723723

724724
BUNDLED WITH
725-
2.7.1
725+
2.7.2

app/controllers/submissions_controller.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ def create
5050
NewRelic::Agent.notice_error(ArgumentError, error_options)
5151

5252
render json: {
53-
status: :unprocessable_entity,
53+
status: :unprocessable_content,
5454
messages: { submission: [t('errors.request.unauthorized_host')] },
55-
}, status: :unprocessable_entity and return
55+
}, status: :unprocessable_content and return
5656
end
5757

5858
# debug logging removed
@@ -139,9 +139,9 @@ def create_in_local_database(submission)
139139
end
140140
format.json do
141141
render json: {
142-
status: :unprocessable_entity,
142+
status: :unprocessable_content,
143143
messages: submission.errors,
144-
}, status: :unprocessable_entity
144+
}, status: :unprocessable_content
145145
end
146146
end
147147
end

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
{
2+
"engines": {
3+
"node": "^22.22.0"
4+
},
25
"dependencies": {
36
"@hotwired/stimulus": "^3.2.2"
47
},

spec/controllers/submissions_controller_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@
139139
it 'returns an error response indicating the field is required' do
140140
expect(response.status).to eq(422)
141141
expect(JSON.parse(response.body)['messages']).to eq({ 'answer_01' => ['is required'] })
142-
expect(JSON.parse(response.body)['status']).to eq('unprocessable_entity')
142+
expect(JSON.parse(response.body)['status']).to eq('unprocessable_content')
143143
end
144144
end
145145

@@ -152,7 +152,7 @@
152152
it 'returns an error response indicating character limit has been exceeded' do
153153
expect(response.status).to eq(422)
154154
expect(JSON.parse(response.body)['messages']).to eq({ 'answer_01' => ['exceeds character limit of 5'] })
155-
expect(JSON.parse(response.body)['status']).to eq('unprocessable_entity')
155+
expect(JSON.parse(response.body)['status']).to eq('unprocessable_content')
156156
end
157157
end
158158
end

0 commit comments

Comments
 (0)