プロジェクト

全般

プロフィール

Vote #81708

完了

Ruby 3.1 support

Admin Redmine さんが3年以上前に追加. 3年以上前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Ruby support_33
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
33
version_id:
155
issue_org_id:
36205
author_id:
123153
assigned_to_id:
332
comments:
11
status_id:
5
tracker_id:
2
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

net/* libraries were gemified, see https://bugs.ruby-lang.org/issues/5481


diff --git a/Gemfile b/Gemfile
index 949fe86d2..624d40216 100644
--- a/Gemfile
+++ b/Gemfile
@@ -26,6 +26,12 @@ gem 'tzinfo-data', platforms: [:mingw, :x64_mingw, :mswin]
 gem 'rotp'
 gem 'rqrcode'
 
+unless Gem.ruby_version < Gem::Version.new('3.1.0')
+  gem 'net-smtp', '~> 0.3.0'
+  gem 'net-imap', '~> 0.2.2'
+  gem 'net-pop', '~> 0.1.1'
+end
+
 # Optional gem for LDAP authentication
 group :ldap do
   gem 'net-ldap', '~> 0.17.0'

journals

Pavel Rosický wrote:
> net/* libraries were gemified, see https://bugs.ruby-lang.org/issues/5481

Thank you for submitting the patch. I added some additional changes as attached to pass tests.

--------------------------------------------------------------------------------
Setting the target version 5.0.0.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
net-smtp, net-imap, and net-pop can be described in Gemfile even if the version of Ruby is older than 3.1.

I think using the same version of gems for all Ruby versions will make it easier to maintain Redmine.

<pre><code class="diff">
Index: Gemfile
===================================================================
--- Gemfile (revision 21293)
+++ Gemfile (working copy)
@@ -18,6 +18,9 @@
gem "rbpdf", "~> 1.20.0"
gem 'addressable'
gem 'rubyzip', '~> 2.3.0'
+gem 'net-smtp', '~> 0.3.0'
+gem 'net-imap', '~> 0.2.2'
+gem 'net-pop', '~> 0.1.1'

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :x64_mingw, :mswin]
</pre></code>
--------------------------------------------------------------------------------
It seems that Ruby 2.5 is the minimum supported version for these gems and their dependencies. So I think it's ok
--------------------------------------------------------------------------------
I have committed r21293, r21294, and r21296 and the trunk now passes all tests with Ruby 3.1.

I will commit the following patch after Rails officially supports Ruby 3.1.

<pre><code class="diff">
diff --git a/Gemfile b/Gemfile
index 73ac9707d..b3f153d22 100644
--- a/Gemfile
+++ b/Gemfile
@@ -1,6 +1,6 @@
source 'https://rubygems.org'

-ruby '>= 2.5.0', '< 3.1.0'
+ruby '>= 2.5.0', '< 3.2.0'
gem 'bundler', '>= 1.12.0'

gem 'rails', '6.1.4.1'
diff --git a/doc/INSTALL b/doc/INSTALL
index c0d823b3e..958e54118 100644
--- a/doc/INSTALL
+++ b/doc/INSTALL
@@ -7,7 +7,7 @@ http://www.redmine.org/

== Requirements

-* Ruby 2.5, 2.6, 2.7, 3.0
+* Ruby 2.5, 2.6, 2.7, 3.0, 3.1
* Bundler >= 1.12.0

* A database:
</code></pre>
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
The trunk r21329 passes the tests with Ruby 3.1.0.

The following warning is displayed at startup due to "Thor":https://rubygems.org/gems/thor 1.1.0 but should be resolved in the future release of Thor. See https://github.com/rails/thor/pull/761.

<pre>
Calling `DidYouMean::SPELL_CHECKERS.merge!(error_name => spell_checker)' has been deprecated. Please call `DidYouMean.correct_error(error_name, spell_checker)' instead.
</pre>
--------------------------------------------------------------------------------
this change caused a small regression with starttls_auto, but it should be fixed in the mail gem https://github.com/mikel/mail/pull/1435
--------------------------------------------------------------------------------


related_issues

relates,Closed,36226, Psych 4: Psych::DisallowedClass exception when unserializing a setting value
relates,Closed,35435,Psych 4: aliases in database.yml cause Psych::BadAlias exception
relates,Closed,36360,IssuesSystemTest fails with ArgumentError in Ruby 3.1
blocks,Closed,35025,Update capybara to 3.36

Admin Redmine さんが3年以上前に更新

  • カテゴリRuby support_33 にセット
  • 対象バージョン5.0.0_155 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0