diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 7e1d37ba..4b308fdc 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,5 +1,5 @@ # [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 -ARG VARIANT="3.3.4" +ARG VARIANT="3.4.5" FROM ghcr.io/rails/devcontainer/images/ruby:${VARIANT} # Default value to allow debug server to serve content over GitHub Codespace's port forwarding service @@ -7,8 +7,8 @@ FROM ghcr.io/rails/devcontainer/images/ruby:${VARIANT} ENV RAILS_DEVELOPMENT_HOSTS=".githubpreview.dev" # [Optional] Uncomment this section to install additional OS packages. -RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ - && apt-get -y install --no-install-recommends cmake pkg-config +RUN sudo apt-get update && export DEBIAN_FRONTEND=noninteractive \ + && sudo apt-get -y install --no-install-recommends cmake pkg-config # [Optional] Uncomment this line to install additional gems. # RUN gem install @@ -17,4 +17,4 @@ RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ # RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g " 2>&1 # Donwload rails repository locally to do calculations on the repository -RUN git clone --mirror https://github.com/rails/rails.git +RUN sudo git clone --mirror https://github.com/rails/rails.git diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml index 7b20fa86..d7af63dd 100644 --- a/.devcontainer/docker-compose.yml +++ b/.devcontainer/docker-compose.yml @@ -9,7 +9,7 @@ services: # Update 'VARIANT' to pick a version of Ruby: 3, 3.1, 3.0, 2, 2.7, 2.6 # Append -bullseye or -buster to pin to an OS version. # Use -bullseye variants on local arm64/Apple Silicon. - VARIANT: "3.3.4" + VARIANT: "3.4.5" volumes: - ..:/workspaces:cached diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8ca7a9a4..de2c73b8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,7 +38,7 @@ jobs: - name: Set up Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: 3.3.4 + ruby-version: 3.4.5 bundler-cache: true - name: Run tests diff --git a/.ruby-version b/.ruby-version index a0891f56..4f5e6973 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.3.4 +3.4.5 diff --git a/Dockerfile b/Dockerfile index ad45073e..5311d9bd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ # * .ruby-version (used by CircleCI). # * Install the version by hand in the server (uses RVM). # -FROM ruby:3.3.4-alpine3.20 +FROM ruby:3.4.5-alpine3.22 # LANG as recommended in the Encoding section of https://hub.docker.com/_/ruby/. ENV LANG C.UTF-8 diff --git a/Gemfile b/Gemfile index 9d2b1fb9..525b1d91 100644 --- a/Gemfile +++ b/Gemfile @@ -1,4 +1,4 @@ -ruby '3.3.4' +ruby '3.4.5' source 'https://rubygems.org' git_source(:github) { |repo| "https://github.com/#{repo}.git" } diff --git a/Gemfile.lock b/Gemfile.lock index 321031f2..34e52f37 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -296,7 +296,7 @@ DEPENDENCIES web-console (>= 3.3.0) RUBY VERSION - ruby 3.3.4p94 + ruby 3.4.5p51 BUNDLED WITH 2.5.17 diff --git a/app/models/commit.rb b/app/models/commit.rb index f9d471bc..f11380f5 100644 --- a/app/models/commit.rb +++ b/app/models/commit.rb @@ -1,3 +1,5 @@ +# frozen-string-literal: true + class Commit < ApplicationRecord has_many :contributions, dependent: :destroy has_many :contributors, through: :contributions @@ -196,7 +198,7 @@ def cache_diff(repo) # git show, and is an expensive operation. So, we do this only for those # commits where this is needed, and cache the result in the database. def extract_changelog - changelog = '' + changelog = +'' in_changelog = false diff.each_line do |line| if line =~ /^diff --git/ diff --git a/config/deploy/production.rb b/config/deploy/production.rb index 32779bd4..58852eeb 100644 --- a/config/deploy/production.rb +++ b/config/deploy/production.rb @@ -8,7 +8,7 @@ set :puma_workers, 1 set :puma_phased_restart, true -set :rvm_ruby_version, '3.3.4' +set :rvm_ruby_version, '3.4.5' set :rvm_custom_path, '/home/rails/.rvm' namespace :deploy do diff --git a/test/models/commit_test.rb b/test/models/commit_test.rb index 606b599a..1ee98e21 100644 --- a/test/models/commit_test.rb +++ b/test/models/commit_test.rb @@ -1,3 +1,5 @@ +# frozen-string-literal: true + require 'test_helper' require 'ostruct' @@ -22,7 +24,7 @@ def test_import tcomm = Time.current tauth = 1.day.ago - message = <<-MSG.strip_heredoc + message = +<<-MSG.strip_heredoc \u{1f4a3} We are relying on hash inequality in tests @@ -32,8 +34,8 @@ def test_import sha1 = "b5ed79468289c15a685a82694dcf1adf773c91d#{i}" rugged_commit = OpenStruct.new rugged_commit.oid = sha1 - rugged_commit.author = {name: 'Juanjo', email: 'juanjo@example.com', time: tauth} - rugged_commit.committer = {name: 'David', email: 'david@example.com', time: tcomm} + rugged_commit.author = {name: +'Juanjo', email: +'juanjo@example.com', time: tauth} + rugged_commit.committer = {name: +'David', email: +'david@example.com', time: tcomm} rugged_commit.message = message rugged_commit.parents = parents