Skip to content

Commit b6ccb89

Browse files
authored
Merge pull request #336 from rails/rm-upgrade-ruby
Upgrade ruby to 3.4.5
2 parents c2b3b08 + cf89db2 commit b6ccb89

File tree

10 files changed

+19
-15
lines changed

10 files changed

+19
-15
lines changed

.devcontainer/Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# [Choice] Ruby version (use -bullseye variants on local arm64/Apple Silicon): 3, 3.1, 3.0, 2, 2.7, 2.6, 3-bullseye, 3.1-bullseye, 3.0-bullseye, 2-bullseye, 2.7-bullseye, 2.6-bullseye, 3-buster, 3.1-buster, 3.0-buster, 2-buster, 2.7-buster, 2.6-buster
2-
ARG VARIANT="3.3.4"
2+
ARG VARIANT="3.4.5"
33
FROM ghcr.io/rails/devcontainer/images/ruby:${VARIANT}
44

55
# Default value to allow debug server to serve content over GitHub Codespace's port forwarding service
66
# The value is a comma-separated list of allowed domains
77
ENV RAILS_DEVELOPMENT_HOSTS=".githubpreview.dev"
88

99
# [Optional] Uncomment this section to install additional OS packages.
10-
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
11-
&& apt-get -y install --no-install-recommends cmake pkg-config
10+
RUN sudo apt-get update && export DEBIAN_FRONTEND=noninteractive \
11+
&& sudo apt-get -y install --no-install-recommends cmake pkg-config
1212

1313
# [Optional] Uncomment this line to install additional gems.
1414
# RUN gem install <your-gem-names-here>
@@ -17,4 +17,4 @@ RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
1717
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1
1818

1919
# Donwload rails repository locally to do calculations on the repository
20-
RUN git clone --mirror https://github.com/rails/rails.git
20+
RUN sudo git clone --mirror https://github.com/rails/rails.git

.devcontainer/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ services:
99
# Update 'VARIANT' to pick a version of Ruby: 3, 3.1, 3.0, 2, 2.7, 2.6
1010
# Append -bullseye or -buster to pin to an OS version.
1111
# Use -bullseye variants on local arm64/Apple Silicon.
12-
VARIANT: "3.3.4"
12+
VARIANT: "3.4.5"
1313

1414
volumes:
1515
- ..:/workspaces:cached

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
- name: Set up Ruby
3939
uses: ruby/setup-ruby@v1
4040
with:
41-
ruby-version: 3.3.4
41+
ruby-version: 3.4.5
4242
bundler-cache: true
4343

4444
- name: Run tests

.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.3.4
1+
3.4.5

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# * .ruby-version (used by CircleCI).
55
# * Install the version by hand in the server (uses RVM).
66
#
7-
FROM ruby:3.3.4-alpine3.20
7+
FROM ruby:3.4.5-alpine3.22
88

99
# LANG as recommended in the Encoding section of https://hub.docker.com/_/ruby/.
1010
ENV LANG C.UTF-8

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ruby '3.3.4'
1+
ruby '3.4.5'
22

33
source 'https://rubygems.org'
44
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ DEPENDENCIES
296296
web-console (>= 3.3.0)
297297

298298
RUBY VERSION
299-
ruby 3.3.4p94
299+
ruby 3.4.5p51
300300

301301
BUNDLED WITH
302302
2.5.17

app/models/commit.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen-string-literal: true
2+
13
class Commit < ApplicationRecord
24
has_many :contributions, dependent: :destroy
35
has_many :contributors, through: :contributions
@@ -196,7 +198,7 @@ def cache_diff(repo)
196198
# git show, and is an expensive operation. So, we do this only for those
197199
# commits where this is needed, and cache the result in the database.
198200
def extract_changelog
199-
changelog = ''
201+
changelog = +''
200202
in_changelog = false
201203
diff.each_line do |line|
202204
if line =~ /^diff --git/

config/deploy/production.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
set :puma_workers, 1
99
set :puma_phased_restart, true
1010

11-
set :rvm_ruby_version, '3.3.4'
11+
set :rvm_ruby_version, '3.4.5'
1212
set :rvm_custom_path, '/home/rails/.rvm'
1313

1414
namespace :deploy do

test/models/commit_test.rb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen-string-literal: true
2+
13
require 'test_helper'
24
require 'ostruct'
35

@@ -22,7 +24,7 @@ def test_import
2224
tcomm = Time.current
2325
tauth = 1.day.ago
2426

25-
message = <<-MSG.strip_heredoc
27+
message = +<<-MSG.strip_heredoc
2628
\u{1f4a3}
2729
2830
We are relying on hash inequality in tests
@@ -32,8 +34,8 @@ def test_import
3234
sha1 = "b5ed79468289c15a685a82694dcf1adf773c91d#{i}"
3335
rugged_commit = OpenStruct.new
3436
rugged_commit.oid = sha1
35-
rugged_commit.author = {name: 'Juanjo', email: '[email protected]', time: tauth}
36-
rugged_commit.committer = {name: 'David', email: '[email protected]', time: tcomm}
37+
rugged_commit.author = {name: +'Juanjo', email: +'[email protected]', time: tauth}
38+
rugged_commit.committer = {name: +'David', email: +'[email protected]', time: tcomm}
3739
rugged_commit.message = message
3840
rugged_commit.parents = parents
3941

0 commit comments

Comments
 (0)