OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Bump ruby to 3.2.0
Christophe Bliard3967b051e873
diff --git a/.github/workflows/test-core.yml b/.github/workflows/test-core.ymlindex 59044c71635..753805ac9c2 100644--- a/.github/workflows/test-core.yml+++ b/.github/workflows/test-core.yml@@ -33,10 +33,10 @@ jobs:uses: actions/cache@v2with:path: /tmp/cache- key: ${{ runner.os }}-ruby31-core-tests-units-${{ hashFiles('**/Gemfile.lock') }}+ key: ${{ runner.os }}-ruby32-core-tests-units-${{ hashFiles('**/Gemfile.lock') }}restore-keys: |- ${{ runner.os }}-ruby31-core-tests-units-- ${{ runner.os }}-ruby31-core-tests-+ ${{ runner.os }}-ruby32-core-tests-units-+ ${{ runner.os }}-ruby32-core-tests-- name: testrun: |docker-compose -f docker-compose.ci.yml build --pull ci@@ -63,10 +63,10 @@ jobs:uses: actions/cache@v2with:path: /tmp/cache- key: ${{ runner.os }}-ruby31-core-tests-features-${{ hashFiles('**/Gemfile.lock') }}+ key: ${{ runner.os }}-ruby32-core-tests-features-${{ hashFiles('**/Gemfile.lock') }}restore-keys: |- ${{ runner.os }}-ruby31-core-tests-features-- ${{ runner.os }}-ruby31-core-tests-+ ${{ runner.os }}-ruby32-core-tests-features-+ ${{ runner.os }}-ruby32-core-tests-- name: testrun: |docker-compose -f docker-compose.ci.yml build --pull ci@@ -80,7 +80,7 @@ jobs:name: APIv3 specification (OpenAPI 3.0)if: github.repository == 'opf/openproject'runs-on: [ubuntu-latest]- steps:+ steps:- uses: actions/checkout@v2- uses: ruby/setup-ruby@v1with:diff --git a/.ruby-version b/.ruby-versionindex ef538c28109..944880fa15e 100644--- a/.ruby-version+++ b/.ruby-version@@ -1 +1 @@-3.1.2+3.2.0diff --git a/Gemfile b/Gemfileindex 388418480ae..be59bad3bd3 100644--- a/Gemfile+++ b/Gemfile@@ -28,7 +28,7 @@source 'https://rubygems.org'-ruby '~> 3.1.2'+ruby '~> 3.2.0'gem 'actionpack-xml_parser', '~> 2.0.0'gem 'activemodel-serializers-xml', '~> 1.0.1'@@ -181,7 +181,8 @@ gem 'puma', '~> 5.6'gem 'puma-plugin-statsd', '~> 2.0'gem 'rack-timeout', '~> 0.6.3', require: "rack/timeout/base"-gem 'nokogiri', '~> 1.13.10'+# TODO: remove `force_ruby_platform: true` once sparklemotion/nokogiri#2740 is done+gem 'nokogiri', '~> 1.13.10', force_ruby_platform: truegem 'carrierwave', '~> 1.3.1'gem 'carrierwave_direct', '~> 2.1.0'diff --git a/Gemfile.lock b/Gemfile.lockindex 76426b262df..e11eb40db64 100644--- a/Gemfile.lock+++ b/Gemfile.lock@@ -291,7 +291,7 @@ GEMawesome_nested_set (3.5.0)activerecord (>= 4.0.0, < 7.1)aws-eventstream (1.2.0)- aws-partitions (1.680.0)+ aws-partitions (1.684.0)aws-sdk-core (3.168.4)aws-eventstream (~> 1, >= 1.0.2)aws-partitions (~> 1, >= 1.651.0)@@ -392,7 +392,7 @@ GEMdate_validator (0.12.0)activemodel (>= 3)activesupport (>= 3)- debug (1.7.0)+ debug (1.7.1)irb (>= 1.5.0)reline (>= 0.3.1)deckar01-task_list (2.3.2)@@ -452,7 +452,7 @@ GEMnokogiri (>= 1.4.3)erbse (0.1.4)temple- erubi (1.11.0)+ erubi (1.12.0)escape_utils (1.3.0)et-orbi (1.2.7)tzinfo@@ -464,7 +464,7 @@ GEMfactory_bot_rails (6.2.0)factory_bot (~> 6.2.0)railties (>= 5.0.0)- faker (3.0.0)+ faker (3.1.0)i18n (>= 1.8.11, < 2)faraday (1.10.2)faraday-em_http (~> 1.0)@@ -563,7 +563,7 @@ GEMice_cube (0.16.4)interception (0.5)io-console (0.6.0)- irb (1.6.1)+ irb (1.6.2)reline (>= 0.3.0)iso8601 (0.13.0)jmespath (1.6.2)@@ -587,8 +587,8 @@ GEMkramdown (~> 2.0)ladle (1.0.1)open4 (~> 1.0)- launchy (2.5.0)- addressable (~> 2.7)+ launchy (2.5.2)+ addressable (~> 2.8)lefthook (1.2.6)letter_opener (1.8.1)launchy (>= 2.2, < 3)@@ -626,7 +626,7 @@ GEMmime-types-data (3.2022.0105)mini_magick (4.12.0)mini_mime (1.1.2)- mini_portile2 (2.8.0)+ mini_portile2 (2.8.1)minisyntax (0.2.5)minitest (5.16.3)msgpack (1.6.0)@@ -637,7 +637,7 @@ GEMmustermann-grape (1.0.2)mustermann (>= 1.0.0)nap (1.1.0)- net-imap (0.3.2)+ net-imap (0.3.4)datenet-protocolnet-ldap (0.17.1)@@ -730,11 +730,11 @@ GEMmulti_jsonpuma (5.6.5)nio4r (~> 2.0)- puma-plugin-statsd (2.3.0)- puma (>= 5.0, < 6)+ puma-plugin-statsd (2.4.0)+ puma (>= 5.0, < 7)raabro (1.4.0)- racc (1.6.1)- rack (2.2.4)+ racc (1.6.2)+ rack (2.2.5)rack-accept (0.4.5)rack (>= 0.4)rack-attack (6.6.1)@@ -859,9 +859,9 @@ GEMrubocop-ast (>= 1.23.0, < 2.0)ruby-progressbar (~> 1.7)unicode-display_width (>= 1.4.0, < 3.0)- rubocop-ast (1.24.0)+ rubocop-ast (1.24.1)parser (>= 3.1.1.0)- rubocop-rails (2.17.3)+ rubocop-rails (2.17.4)activesupport (>= 4.2.0)rack (>= 1.1)rubocop (>= 1.33.0, < 2.0)@@ -872,7 +872,7 @@ GEMi18niso8601ruby-ole (1.2.12.2)- ruby-prof (1.4.4)+ ruby-prof (1.4.5)ruby-progressbar (1.11.0)ruby-rc4 (0.1.5)ruby-saml (1.14.0)@@ -1165,7 +1165,7 @@ DEPENDENCIESwith_advisory_lock (~> 4.6.0)RUBY VERSION- ruby 3.1.2p20+ ruby 3.2.0p0BUNDLED WITH- 2.3.12+ 2.4.1diff --git a/docker/ci/Dockerfile b/docker/ci/Dockerfileindex 706bce308d8..3710434e81a 100644--- a/docker/ci/Dockerfile+++ b/docker/ci/Dockerfile@@ -1,4 +1,4 @@-FROM ruby:3.1.2-buster+FROM ruby:3.2.0-busterMAINTAINER [email protected]ENV NODE_VERSION="16.17.0"@@ -27,7 +27,7 @@ RUN for url in $CHROME_SOURCE_URL; do \ENV CI=trueENV RAILS_ENV=test-ENV BUNDLER_VERSION="2.3.12"+ENV BUNDLER_VERSION="2.4.1"ENV BUNDLE_WITHOUT="development:production:docker"ENV OPENPROJECT_DISABLE_DEV_ASSET_PROXY=1ENV CAPYBARA_DYNAMIC_BIND_IP=1diff --git a/docker/dev/backend/Dockerfile b/docker/dev/backend/Dockerfileindex ad2f1107d38..6f42c55d96b 100644--- a/docker/dev/backend/Dockerfile+++ b/docker/dev/backend/Dockerfile@@ -1,4 +1,4 @@-FROM ruby:3.1.2-bullseye as develop+FROM ruby:3.2.0-bullseye as developMAINTAINER [email protected]ARG DEV_UID=1000@@ -7,7 +7,7 @@ ARG DEV_GID=1001ENV USER=devENV RAILS_ENV=development-ENV BUNDLER_VERSION "2.3.12"+ENV BUNDLER_VERSION "2.4.1"# `--no-log-init` is required as a workaround to avoid disk exhaustion.#diff --git a/docker/prod/Dockerfile b/docker/prod/Dockerfileindex b72b4e4270c..b0485ffff3e 100644--- a/docker/prod/Dockerfile+++ b/docker/prod/Dockerfile@@ -1,4 +1,4 @@-FROM ruby:3.1.2-buster+FROM ruby:3.2.0-busterMAINTAINER [email protected]# Allow platform-specific additions. Valid values are: on-prem,saas,bahn@@ -8,7 +8,7 @@ ARG GITHUB_OAUTH_TOKENARG DEBIAN_FRONTEND=noninteractiveENV NODE_VERSION="16.17.0"-ENV BUNDLER_VERSION="2.3.12"+ENV BUNDLER_VERSION="2.4.1"ENV BUNDLE_PATH__SYSTEM=falseENV APP_USER=appENV APP_PATH=/appdiff --git a/docs/development/development-environment-docker/README.md b/docs/development/development-environment-docker/README.mdindex f80ff9dd51a..cebc03258bc 100644--- a/docs/development/development-environment-docker/README.md+++ b/docs/development/development-environment-docker/README.md@@ -186,7 +186,7 @@ When a dependency of the image or the base image itself is changed you may needRuby version is updated you may run into an error like the following when running `bin/compose setup`:```-Your Ruby version is 2.7.6, but your Gemfile specified ~> 3.1.2+Your Ruby version is 2.7.6, but your Gemfile specified ~> 3.2.0```This means that the current image is out-dated. You can update it like this:diff --git a/docs/development/development-environment-osx/README.md b/docs/development/development-environment-osx/README.mdindex ceab4d8bc74..7b0daeee248 100644--- a/docs/development/development-environment-osx/README.md+++ b/docs/development/development-environment-osx/README.md@@ -15,7 +15,7 @@ We'll use [homebrew](https://brew.sh/) to install most of our requirements. Plea## Install Ruby-Use [rbenv](https://github.com/rbenv/rbenv) and [ruby-build](https://github.com/rbenv/ruby-build#readme) to install Ruby. We always require the latest ruby versions, and you can check which version is required by [checking the Gemfile](https://github.com/opf/openproject/blob/dev/Gemfile#L31) for the `ruby "~> X.Y"` statement. At the time of writing, this version is "3.1.2"+Use [rbenv](https://github.com/rbenv/rbenv) and [ruby-build](https://github.com/rbenv/ruby-build#readme) to install Ruby. We always require the latest ruby versions, and you can check which version is required by [checking the Gemfile](https://github.com/opf/openproject/blob/dev/Gemfile#L31) for the `ruby "~> X.Y"` statement. At the time of writing, this version is "3.2.0"### Install rbenv and ruby-build@@ -32,20 +32,20 @@ $ rbenv init### Installing ruby-3.0With both installed, we can now install the actual ruby version 3.0. You can check available ruby versions with `rbenv install --list`.-At the time of this writing, the latest stable version is `3.1.2`, which we also require.+At the time of this writing, the latest stable version is `3.2.0`, which we also require.We suggest you install the version we require in the [Gemfile](https://github.com/opf/openproject/blob/dev/Gemfile). Search for the `ruby '~> X.Y.Z'` lineand install that version.```bash# Install the required version as read from the Gemfile-rbenv install 3.1.2+rbenv install 3.2.0```This might take a while depending on whether ruby is built from source. After it is complete, you need to tell rbenv to globally activate this version```bash-rbenv global 3.1.2+rbenv global 3.2.0```You also need to install [bundler](https://github.com/bundler/bundler/), the ruby gem bundler.@@ -116,10 +116,10 @@ You should now have an active ruby and node installation. Verify that it works w```bash$ ruby --version-ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x86_64-linux]+ruby 3.2.0 (2022-12-25 revision a528908271) [x86_64-linux]$ bundler --version-Bundler version 2.3.12+Bundler version 2.4.1node --versionv16.17.0diff --git a/docs/development/development-environment-ubuntu/README.md b/docs/development/development-environment-ubuntu/README.mdindex 64bc6cc63ff..6c02b16ee70 100644--- a/docs/development/development-environment-ubuntu/README.md+++ b/docs/development/development-environment-ubuntu/README.md@@ -26,7 +26,7 @@ sudo apt-get install git curl build-essential zlib1g-dev libyaml-dev libssl-dev## Install Ruby-Use [rbenv](https://github.com/rbenv/rbenv) and [ruby-build](https://github.com/rbenv/ruby-build#readme) to install Ruby. We always require the latest ruby versions, and you can check which version is required by [checking the Gemfile](https://github.com/opf/openproject/blob/dev/Gemfile#L31) for the `ruby "~> X.Y"` statement. At the time of writing, this version is "3.1.2"+Use [rbenv](https://github.com/rbenv/rbenv) and [ruby-build](https://github.com/rbenv/ruby-build#readme) to install Ruby. We always require the latest ruby versions, and you can check which version is required by [checking the Gemfile](https://github.com/opf/openproject/blob/dev/Gemfile#L31) for the `ruby "~> X.Y"` statement. At the time of writing, this version is "3.2.0"### Install rbenv and ruby-build@@ -57,23 +57,23 @@ ruby-build is an addon to rbenv that installs ruby versionsgit clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build```-### Installing ruby-3.0+### Installing ruby-With both installed, we can now install the actual ruby version 3.0. You can check available ruby versions with `rbenv install --list`.-At the time of this writing, the latest stable version is `3.1.2` which we also require.+With both installed, we can now install ruby. You can check available ruby versions with `rbenv install --list`.+At the time of this writing, the latest stable version is `3.2.0` which we also require.We suggest you install the version we require in the [Gemfile](https://github.com/opf/openproject/blob/dev/Gemfile). Search for the `ruby '~> X.Y.Z'` lineand install that version.```bash# Install the required version as read from the Gemfile-rbenv install 3.1.2+rbenv install 3.2.0```This might take a while depending on whether ruby is built from source. After it is complete, you need to tell rbenv to globally activate this version```bash-rbenv global 3.1.2+rbenv global 3.2.0rbenv rehash```@@ -159,10 +159,10 @@ You should now have an active ruby and node installation. Verify that it works w```bashruby --version-ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x86_64-linux]+ruby 3.2.0 (2022-12-25 revision a528908271) [x86_64-linux]bundler --version-Bundler version 2.3.12+Bundler version 2.4.1node --versionv16.13.1diff --git a/docs/installation-and-operations/installation/manual/README.md b/docs/installation-and-operations/installation/manual/README.mdindex 74b08a89931..bb1ec4447df 100644--- a/docs/installation-and-operations/installation/manual/README.md+++ b/docs/installation-and-operations/installation/manual/README.md@@ -108,16 +108,16 @@ time to finish.[openproject@host] source ~/.profile[openproject@host] git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build-[openproject@host] rbenv install 3.1.2+[openproject@host] rbenv install 3.2.0[openproject@host] rbenv rehash-[openproject@host] rbenv global 3.1.2+[openproject@host] rbenv global 3.2.0```To check our Ruby installation we run `ruby --version`. It should outputsomething very similar to:```-ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x86_64-linux]+ruby 3.2.0 (2022-12-25 revision a528908271) [x86_64-linux]```## Installation of Nodediff --git a/lib/tasks/copyright.rake b/lib/tasks/copyright.rakeindex 5bdfa3eab90..a64863b0a55 100644--- a/lib/tasks/copyright.rake+++ b/lib/tasks/copyright.rake@@ -113,7 +113,7 @@ namespace :copyright dofile_list = options[:file_list] || Dir[File.absolute_path(path) + "/**/*.#{ending}"]excluded = exluded_paths.concat(additional_excludes)- raise 'Path not found' unless Dir.exists?(path)+ raise 'Path not found' unless Dir.exist?(path)file_list.each do |file_name|# Skip 3rd party codediff --git a/lib/tasks/scm.rake b/lib/tasks/scm.rakeindex d27d46497d8..2a95d80ed82 100644--- a/lib/tasks/scm.rake+++ b/lib/tasks/scm.rake@@ -65,7 +65,7 @@ namespace :scm donextend- unless Dir.exists?(managed)+ unless Dir.exist?(managed)warn "WARNING: Managed repository path set to '#{managed}'," \" but does not exist for SCM vendor #{vendor}!"nextdiff --git a/modules/xls_export/lib/open_project/xls_export/spreadsheet_builder.rb b/modules/xls_export/lib/open_project/xls_export/spreadsheet_builder.rbindex b81edbb2654..20519e1c32f 100644--- a/modules/xls_export/lib/open_project/xls_export/spreadsheet_builder.rb+++ b/modules/xls_export/lib/open_project/xls_export/spreadsheet_builder.rb@@ -131,13 +131,13 @@ module OpenProject::XlsExportend# Add a simple row. This will default to the next row in the sequence.- # Fixnums, Dates and Times are preserved, all other types are converted- # to String as the spreadsheet gem cannot do more formats+ # Integer, Float, Date, and Time instances are preserved, all other types+ # are converted to String as the spreadsheet gem cannot do more formatsdef add_row(arr, idx = nil)idx ||= [@sheet.last_row_index + 1, 1].maxcolumn_array = []arr.each_with_index do |c, i|- value = if %w(Time Date Fixnum Float Integer).include?(c.class.name)+ value = if %w(Time Date Float Integer).include?(c.class.name)celsif c.instance_of?(BigDecimal)c.to_fdiff --git a/spec/lib/open_project/scm/adapters/git_adapter_spec.rb b/spec/lib/open_project/scm/adapters/git_adapter_spec.rbindex 671b2b1148d..c1cdf89dd83 100644--- a/spec/lib/open_project/scm/adapters/git_adapter_spec.rb+++ b/spec/lib/open_project/scm/adapters/git_adapter_spec.rb@@ -88,7 +88,7 @@ describe OpenProject::SCM::Adapters::Git dodescribe 'invalid repository' dodescribe '.check_availability!' doit 'is not available' do- expect(Dir.exists?(url)).to be false+ expect(Dir.exist?(url)).to be falseexpect(adapter).not_to be_availableexpect { adapter.check_availability! }.to raise_error(OpenProject::SCM::Exceptions::SCMUnavailable)@@ -155,7 +155,7 @@ describe OpenProject::SCM::Adapters::Git doendit 'is a valid repository' do- expect(Dir.exists?(repo_dir)).to be true+ expect(Dir.exist?(repo_dir)).to be trueout, process = Open3.capture2e('git', '--git-dir', repo_dir, 'branch')expect(process.exitstatus).to eq(0)diff --git a/spec/lib/open_project/scm/adapters/subversion_adapter_spec.rb b/spec/lib/open_project/scm/adapters/subversion_adapter_spec.rbindex 97b2a62436e..80ed8cc7ce5 100644--- a/spec/lib/open_project/scm/adapters/subversion_adapter_spec.rb+++ b/spec/lib/open_project/scm/adapters/subversion_adapter_spec.rb@@ -72,7 +72,7 @@ describe OpenProject::SCM::Adapters::Subversion dodescribe 'invalid repository' dodescribe '.check_availability!' doit 'is not available' do- expect(Dir.exists?(url)).to be false+ expect(Dir.exist?(url)).to be falseexpect(adapter).not_to be_availableexpect { adapter.check_availability! }.to raise_error(OpenProject::SCM::Exceptions::SCMUnavailable)@@ -133,11 +133,11 @@ describe OpenProject::SCM::Adapters::Subversion dodescribe '.create_empty_svn' docontext 'with valid root_url' doit 'creates the repository' do- expect(Dir.exists?(root_url)).to be true+ expect(Dir.exist?(root_url)).to be trueexpect(Dir.entries(root_url).length).to eq 2expect { adapter.create_empty_svn }.not_to raise_error- expect(Dir.exists?(root_url)).to be true+ expect(Dir.exist?(root_url)).to be trueexpect(Dir.entries(root_url).length).to be >= 5endend@@ -149,7 +149,7 @@ describe OpenProject::SCM::Adapters::Subversion doexpect { adapter.create_empty_svn }.to raise_error(OpenProject::SCM::Exceptions::CommandFailed)- expect(Dir.exists?(root_url)).to be false+ expect(Dir.exist?(root_url)).to be falseendendend@@ -172,7 +172,7 @@ describe OpenProject::SCM::Adapters::Subversion doendit 'is a valid repository' do- expect(Dir.exists?(repo_dir)).to be true+ expect(Dir.exist?(repo_dir)).to be trueout, process = Open3.capture2e('svn', 'info', url)expect(process.exitstatus).to eq(0)diff --git a/spec/support/scm/relocate_repository.rb b/spec/support/scm/relocate_repository.rbindex 82a2cc3c511..fcb7330428a 100644--- a/spec/support/scm/relocate_repository.rb+++ b/spec/support/scm/relocate_repository.rb@@ -26,7 +26,7 @@ shared_examples_for 'repository can be relocated' do |vendor|it 'relocates when project identifier is updated' docurrent_path = repository.root_urlexpect(repository.root_url).to eq(repository.managed_repository_path)- expect(Dir.exists?(repository.managed_repository_path)).to be true+ expect(Dir.exist?(repository.managed_repository_path)).to be true# Rename the projectproject.update!(identifier: 'somenewidentifier')@@ -39,7 +39,7 @@ shared_examples_for 'repository can be relocated' do |vendor|expect(current_path).not_to eq(repository.root_url)expect(repository.url).to eq(repository.managed_repository_url)- expect(Dir.exists?(repository.managed_repository_path)).to be true+ expect(Dir.exist?(repository.managed_repository_path)).to be trueendenddiff --git a/spec/workers/scm/create_local_repository_job_spec.rb b/spec/workers/scm/create_local_repository_job_spec.rbindex dd4f056b071..b0a6267630d 100644--- a/spec/workers/scm/create_local_repository_job_spec.rb+++ b/spec/workers/scm/create_local_repository_job_spec.rb@@ -62,7 +62,7 @@ describe SCM::CreateLocalRepositoryJob doshared_examples 'creates a directory with mode' do |expected|it 'creates the directory' dosubject- expect(Dir.exists?(repository.root_url)).to be true+ expect(Dir.exist?(repository.root_url)).to be truefile_mode = File.stat(repository.root_url).modeexpect(sprintf("%o", file_mode)).to end_with(expected)