Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to ruby 3.3 completely #4320

Merged
merged 1 commit into from
Jan 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax = docker/dockerfile:1.4

ARG RUBY_VERSION=3.2
ARG RUBY_VERSION=3.3

FROM ruby:${RUBY_VERSION}-alpine

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-22.04
env:
RUBYGEMS_VERSION: 3.5.3
RUBY_VERSION: 3.2.2
RUBY_VERSION: 3.3.0
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Set up Docker Buildx
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,12 @@ jobs:
version: "3.5.3"
- name: latest
version: latest
ruby_version: ["3.2.2", "3.3.0"]
ruby_version: ["3.3.0"]
tests:
- name: general
command: test
- name: system
command: test:system
exclude:
- ruby_version: "3.3.0"
rubygems: { name: latest, version: latest }
name: Rails tests ${{ matrix.tests.name }} (RubyGems ${{ matrix.rubygems.name }}, Ruby ${{ matrix.ruby_version }})
runs-on: ubuntu-22.04
env:
Expand Down
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ AllCops:
- !ruby/regexp /(vendor|bundle|bin|db|tmp|server)\/.*/
DisplayCopNames: true
DisplayStyleGuide: true
TargetRubyVersion: 3.2
TargetRubyVersion: 3.3
NewCops: enable

Rails:
Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.2.2
3.3.0
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,10 @@ Follow the instructions below on how to install Bundler and setup the database.

### Installing ruby, gem dependencies, and setting up the database

* Use Ruby 3.2.x
* Use Ruby 3.3.x
* See: [Ruby install instructions](https://www.ruby-lang.org/en/downloads/).
* `.ruby-version` is present and can be used.
* Use Rubygems 3.3.x
* Use Rubygems 3.5.x
* Install bundler:
`gem install bundler`
* Install dependencies and setup the database:
Expand Down
8 changes: 2 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# syntax = docker/dockerfile:1.4

# Make sure RUBY_VERSION matches the Ruby version in .ruby-version and Gemfile
ARG RUBY_VERSION=3.2.2
ARG RUBY_VERSION=3.3.0
ARG ALPINE_VERSION=3.18
FROM ruby:$RUBY_VERSION-alpine${ALPINE_VERSION} as base

Expand All @@ -25,11 +25,7 @@ ENV BUNDLE_APP_CONFIG=".bundle_app_config"

# Update rubygems
ARG RUBYGEMS_VERSION
RUN gem update --system ${RUBYGEMS_VERSION} --no-document && \
simi marked this conversation as resolved.
Show resolved Hide resolved
# rubygems-update is completely unused after the `gem update --system` process
gem uninstall rubygems-update -x && \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting! I think the comment above is still true, and I would expect gem uninstall rubygems-update -x to still work. I was actually considering recently that this should be the default behavior and no rubygems-update gem should be left around. Maybe some rubygems regression?

# Remove rubygems cache files, they are unused
rm -r /usr/local/bundle/cache/ /root/.local/share/gem/
RUN gem update --system ${RUBYGEMS_VERSION} --no-document

# Throw-away build stage to reduce size of final image
FROM base as build
Expand Down