Drop Ruby 2.2 support (#30356).

git-svn-id: http://svn.redmine.org/redmine/trunk@17887 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA
2019-02-19 10:11:07 +00:00
parent 1e54627a30
commit 158392ae93
3 changed files with 4 additions and 5 deletions

View File

@@ -10,8 +10,8 @@ gem "actionpack-xml_parser"
gem "roadie-rails", "~> 1.3.0" gem "roadie-rails", "~> 1.3.0"
gem "mimemagic" gem "mimemagic"
gem "mail", "~> 2.7.1" gem "mail", "~> 2.7.1"
gem "csv", "~> 3.0.1" if RUBY_VERSION >= "2.3" && RUBY_VERSION < "2.6" gem "csv", "~> 3.0.1" if RUBY_VERSION < "2.6"
gem "nokogiri", (RUBY_VERSION >= "2.3" ? "~> 1.10.0" : "~> 1.9.1") gem "nokogiri", "~> 1.10.0"
gem "i18n", "~> 0.7.0" gem "i18n", "~> 0.7.0"
gem "rbpdf", "~> 1.19.6" gem "rbpdf", "~> 1.19.6"

View File

@@ -50,8 +50,7 @@ class ImportsController < ApplicationController
redirect_to import_mapping_path(@import) redirect_to import_mapping_path(@import)
end end
# TODO: Remove ArgumentError when support for Ruby 2.2 is dropped (#28689) rescue CSV::MalformedCSVError, EncodingError => e
rescue CSV::MalformedCSVError, ArgumentError, EncodingError => e
if e.is_a?(CSV::MalformedCSVError) && e.message !~ /Invalid byte sequence/ if e.is_a?(CSV::MalformedCSVError) && e.message !~ /Invalid byte sequence/
flash.now[:error] = l(:error_invalid_csv_file_or_settings) flash.now[:error] = l(:error_invalid_csv_file_or_settings)
else else

View File

@@ -7,7 +7,7 @@ http://www.redmine.org/
== Requirements == Requirements
* Ruby >= 2.2.2 * Ruby >= 2.3
* RubyGems * RubyGems
* Bundler >= 1.5.0 * Bundler >= 1.5.0