Skip to content

Commit

Permalink
MAP-359: Upgrade Ruby to 3.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
jimbali committed Oct 10, 2023
1 parent d90dbf1 commit 7d6bb53
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ executors:
test-executor:
docker:
# Check https://circleci.com/docs/2.0/language-ruby/ for more details
- image: circleci/ruby:2.7.3
- image: circleci/ruby:3.2.2
environment:
BUNDLER_VERSION: 2.1.4
RAILS_ENV: test
Expand Down
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@ GOVUK_NOTIFY_TEMPLATE_ID=8f2e5473-15f2-4db8-a2de-153f26a0524c

# Completely disable API authentication for local development if true.
DEV_DISABLE_AUTH=false

# Stop Postgres segfaulting on Ruby 3.x on Mac
PGGSSENCMODE="disable"
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.7.3
3.2.2
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ruby:2.7.3-alpine as build-stage
FROM ruby:3.2.2-alpine as build-stage

ENV RAILS_ENV=production
ENV RACK_ENV=production
Expand All @@ -18,7 +18,7 @@ RUN bundle install --jobs 4 --retry 3 \
&& find /usr/local/bundle/gems/ -name "*.o" -delete

############### End of Build step ###############
FROM ruby:2.7.3-alpine as swagger-build
FROM ruby:3.2.2-alpine as swagger-build

WORKDIR /app
RUN apk --update --no-cache add git build-base postgresql-dev shared-mime-info gcompat tzdata
Expand All @@ -31,7 +31,7 @@ COPY . /app
RUN SKIP_MAINTAIN_TEST_SCHEMA=true rails rswag:specs:swaggerize

############### End of Build step ###############
FROM ruby:2.7.3-alpine
FROM ruby:3.2.2-alpine

ARG APP_BUILD_DATE
ENV APP_BUILD_DATE ${APP_BUILD_DATE}
Expand Down
6 changes: 3 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ GEM
ffi (1.15.5)
fiber-annotation (0.2.0)
fiber-local (1.0.0)
finite_machine (0.14.0)
finite_machine (0.14.1)
concurrent-ruby (~> 1.0)
sync (~> 0.5)
flipper (0.28.3)
Expand Down Expand Up @@ -267,7 +267,7 @@ GEM
parallel (1.23.0)
parser (3.2.2.1)
ast (~> 2.4.1)
pg (1.5.3)
pg (1.5.4)
prometheus-client (4.2.1)
protocol-hpack (1.4.2)
protocol-http (0.24.4)
Expand Down Expand Up @@ -530,7 +530,7 @@ DEPENDENCIES
validate_url

RUBY VERSION
ruby 2.7.3p183
ruby 3.2.2p53

BUNDLED WITH
2.1.4
4 changes: 2 additions & 2 deletions app/models/move.rb
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,8 @@ def cancel(cancellation_reason:, cancellation_reason_comment: nil)
state_machine.cancel
end

def cancel!(args)
cancel(args)
def cancel!(**args)
cancel(**args)
save!
end

Expand Down
2 changes: 1 addition & 1 deletion config/initializers/gov_uk_notify.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
%w[GOVUK_NOTIFY_API_KEY GOVUK_NOTIFY_MOVE_TEMPLATE_ID GOVUK_NOTIFY_PER_TEMPLATE_ID].each do |name|
if ENV[name].blank?
Rails.logger.warn("#{name} env var is not set; emails cannot be sent")
Sentry.capture_message("#{name} env var is not set; emails cannot be sent", { level: 'warning' })
Sentry.capture_message("#{name} env var is not set; emails cannot be sent", level: 'warning')
end
end

Expand Down

0 comments on commit 7d6bb53

Please sign in to comment.