プロジェクト

全般

プロフィール

Vote #78230

完了

Ruby 2.4 support

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

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

0%

予定工数:
category_id:
33
version_id:
119
issue_org_id:
25048
author_id:
49691
assigned_to_id:
1
comments:
15
status_id:
5
tracker_id:
2
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明


journals

--------------------------------------------------------------------------------
Ruby on Rails 4.2.8 that is compatible with Ruby 2.4 will be released next week.

http://weblog.rubyonrails.org/2017/2/10/Rails-4-2-8-rc1-has-been-released/
> If no regressions are found, expect the final release on Wednesday, February 15, 2017.
--------------------------------------------------------------------------------
Rails 4.2.8 has been released.
http://weblog.rubyonrails.org/2017/2/21/Rails-4-2-8-has-been-released/

--------------------------------------------------------------------------------
Rails 4.2.8 on Ruby 2.4 tests fail.

<pre>
1) Failure:
QueryTest#test_issue_count_by_list_custom_field_group [/REDMINE/WORK-DIR-NO-RAID/hg-workdir/bb-my-work-clean/test/unit/query_test.rb:1591]:
Expected: ["Fixnum"]
Actual: ["Integer"]

2) Failure:
QueryTest#test_issue_count_by_association_group [/REDMINE/WORK-DIR-NO-RAID/hg-workdir/bb-my-work-clean/test/unit/query_test.rb:1582]:
Expected: ["Fixnum"]
Actual: ["Integer"]

3) Failure:
QueryTest#test_issue_count_by_date_custom_field_group [/REDMINE/WORK-DIR-NO-RAID/hg-workdir/bb-my-work-clean/test/unit/query_test.rb:1600]:
Expected: ["Fixnum"]
Actual: ["Integer"]

4) Error:
Redmine::CipheringTest#test_ciphered_password_with_no_cipher_key_configured_should_be_returned_ciphered:
ArgumentError: key must be 32 bytes
lib/redmine/ciphering.rb:32:in `key='
lib/redmine/ciphering.rb:32:in `encrypt_text'
lib/redmine/ciphering.rb:100:in `write_ciphered_attribute'
app/models/repository.rb:92:in `password='
test/unit/lib/redmine/ciphering_test.rb:67:in `block in test_ciphered_password_with_no_cipher_key_configured_should_be_returned_ciphered'
lib/redmine/configuration.rb:77:in `with'
test/unit/lib/redmine/ciphering_test.rb:66:in `test_ciphered_password_with_no_cipher_key_configured_should_be_returned_ciphered'

5) Error:
Redmine::CipheringTest#test_encrypt_all:
ArgumentError: key must be 32 bytes
lib/redmine/ciphering.rb:32:in `key='
lib/redmine/ciphering.rb:32:in `encrypt_text'
lib/redmine/ciphering.rb:100:in `write_ciphered_attribute'
app/models/repository.rb:92:in `password='
lib/redmine/ciphering.rb:74:in `block (2 levels) in encrypt_all'
lib/redmine/ciphering.rb:72:in `block in encrypt_all'
lib/redmine/ciphering.rb:71:in `encrypt_all'
test/unit/lib/redmine/ciphering_test.rb:87:in `block in test_encrypt_all'
lib/redmine/configuration.rb:77:in `with'
test/unit/lib/redmine/ciphering_test.rb:86:in `test_encrypt_all'

6) Error:
Redmine::CipheringTest#test_password_should_be_encrypted:
ArgumentError: key must be 32 bytes
lib/redmine/ciphering.rb:32:in `key='
lib/redmine/ciphering.rb:32:in `encrypt_text'
lib/redmine/ciphering.rb:100:in `write_ciphered_attribute'
app/models/repository.rb:92:in `password='
test/unit/lib/redmine/ciphering_test.rb:24:in `block in test_password_should_be_encrypted'
lib/redmine/configuration.rb:77:in `with'
test/unit/lib/redmine/ciphering_test.rb:23:in `test_password_should_be_encrypted'

7) Error:
Redmine::CipheringTest#test_decrypt_all:
ArgumentError: key must be 32 bytes
lib/redmine/ciphering.rb:32:in `key='
lib/redmine/ciphering.rb:32:in `encrypt_text'
lib/redmine/ciphering.rb:100:in `write_ciphered_attribute'
app/models/repository.rb:92:in `password='
test/unit/lib/redmine/ciphering_test.rb:97:in `block in test_decrypt_all'
lib/redmine/configuration.rb:77:in `with'
test/unit/lib/redmine/ciphering_test.rb:96:in `test_decrypt_all'

4364 runs, 25207 assertions, 3 failures, 4 errors, 3 skips

</pre>
--------------------------------------------------------------------------------
We have to use Nokogiri >= 1.7.0 to fix "FixNum is deprecated" warning. (https://github.com/sparklemotion/nokogiri/issues/1565)

<pre><code class="diff">
diff --git a/Gemfile b/Gemfile
index bb8ba53..f9a5dbc 100644
--- a/Gemfile
+++ b/Gemfile
@@ -15,7 +15,7 @@ gem "actionpack-xml_parser"
gem "roadie-rails"
gem "mimemagic"

-gem "nokogiri", "~> 1.6.8"
+gem "nokogiri", (RUBY_VERSION >= "2.1" ? ">= 1.7.0" : "~> 1.6.8")
gem "i18n", "~> 0.7.0"

# Request at least rails-html-sanitizer 1.0.3 because of security advisories
</code></diff>
--------------------------------------------------------------------------------
This is a patch to support ruby 2.4: attachment:ruby-2_4-support.diff

* Fixed "Fixnum is deprecated" warning from nokogiri
* s/FixNum/Integer/ in test/unit/query_test.rb
* Fixed "key must be 32 bytes" error from OpenSSL::Cipher
--------------------------------------------------------------------------------
Go MAEDA wrote:
> This is a patch to support ruby 2.4: attachment:ruby-2_4-support.diff

Sorry, I withdraw this patch. I have found compatibility problem in Redmine::Ciphering.encrypt_text / Redmine::Ciphering.decrypt_text.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Updated patches.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Fix committed and ruby2.4 added to the "CI server":http://www.redmine.org/builds/index.html, thanks.
--------------------------------------------------------------------------------
Tests pass on the CI server.
--------------------------------------------------------------------------------

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

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

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


related_issues

relates,Closed,25460,Redmine 3.3.2 db:migrate terminate with cryptic error message
copied_to,Closed,21668,Ruby 2.3 support

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

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

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

いいね!0
いいね!0