Browse Source

Drop Ruby 2.3 support (#34142).


git-svn-id: http://svn.redmine.org/redmine/trunk@20154 e93f8b46-1217-0410-a6f0-8f06a7374b81
tags/4.2.0
Go MAEDA 3 years ago
parent
commit
8018beb5f0
3 changed files with 8 additions and 10 deletions
  1. 4
    4
      Gemfile
  2. 1
    1
      doc/INSTALL
  3. 3
    5
      test/unit/query_test.rb

+ 4
- 4
Gemfile View File

source 'https://rubygems.org' source 'https://rubygems.org'


ruby '>= 2.3.0', '< 2.8.0'
ruby '>= 2.4.0', '< 2.8.0'
gem 'bundler', '>= 1.12.0' gem 'bundler', '>= 1.12.0'


gem 'rails', '5.2.4.4' gem 'rails', '5.2.4.4'
gem 'i18n', '~> 1.8.2' gem 'i18n', '~> 1.8.2'
gem "rbpdf", "~> 1.20.0" gem "rbpdf", "~> 1.20.0"
gem 'addressable' gem 'addressable'
gem 'rubyzip', (RUBY_VERSION < '2.4' ? '~> 1.3.0' : '~> 2.3.0')
gem 'rubyzip', '~> 2.3.0'


# Windows does not include zoneinfo files, so bundle the tzinfo-data gem # Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :x64_mingw, :mswin] gem 'tzinfo-data', platforms: [:mingw, :x64_mingw, :mswin]
group :test do group :test do
gem "rails-dom-testing" gem "rails-dom-testing"
gem 'mocha', '>= 1.4.0' gem 'mocha', '>= 1.4.0'
gem 'simplecov', (RUBY_VERSION < '2.4' ? '~> 0.17.0' : '~> 0.18.5'), :require => false
gem 'simplecov', '~> 0.18.5', :require => false
gem "ffi", platforms: [:mingw, :x64_mingw, :mswin] gem "ffi", platforms: [:mingw, :x64_mingw, :mswin]
# For running system tests # For running system tests
gem 'puma' gem 'puma'
gem 'capybara', (RUBY_VERSION < '2.4' ? '~> 3.15.1' : '~> 3.31.0')
gem 'capybara', '~> 3.31.0'
gem "selenium-webdriver" gem "selenium-webdriver"
# RuboCop # RuboCop
gem 'rubocop', '~> 0.81.0' gem 'rubocop', '~> 0.81.0'

+ 1
- 1
doc/INSTALL View File



== Requirements == Requirements


* Ruby 2.3, 2.4, 2.5, 2.6, 2.7 (excluding 2.7.0 and 2.7.1)
* Ruby 2.4, 2.5, 2.6, 2.7 (excluding 2.7.0 and 2.7.1)
* Bundler >= 1.12.0 * Bundler >= 1.12.0


* A database: * A database:

+ 3
- 5
test/unit/query_test.rb View File

:workflows, :journals, :workflows, :journals,
:attachments, :time_entries :attachments, :time_entries


INTEGER_KLASS = RUBY_VERSION >= "2.4" ? Integer : Fixnum

def setup def setup
User.current = nil User.current = nil
end end
count_by_group = q.result_count_by_group count_by_group = q.result_count_by_group
assert_kind_of Hash, count_by_group assert_kind_of Hash, count_by_group
assert_equal %w(NilClass User), count_by_group.keys.collect {|k| k.class.name}.uniq.sort assert_equal %w(NilClass User), count_by_group.keys.collect {|k| k.class.name}.uniq.sort
assert_equal %W(#{INTEGER_KLASS}), count_by_group.values.collect {|k| k.class.name}.uniq
assert_equal %W(Integer), count_by_group.values.collect {|k| k.class.name}.uniq
assert count_by_group.has_key?(User.find(3)) assert count_by_group.has_key?(User.find(3))
end end


count_by_group = q.result_count_by_group count_by_group = q.result_count_by_group
assert_kind_of Hash, count_by_group assert_kind_of Hash, count_by_group
assert_equal %w(NilClass String), count_by_group.keys.collect {|k| k.class.name}.uniq.sort assert_equal %w(NilClass String), count_by_group.keys.collect {|k| k.class.name}.uniq.sort
assert_equal %W(#{INTEGER_KLASS}), count_by_group.values.collect {|k| k.class.name}.uniq
assert_equal %W(Integer), count_by_group.values.collect {|k| k.class.name}.uniq
assert count_by_group.has_key?('MySQL') assert count_by_group.has_key?('MySQL')
end end


count_by_group = q.result_count_by_group count_by_group = q.result_count_by_group
assert_kind_of Hash, count_by_group assert_kind_of Hash, count_by_group
assert_equal %w(Date NilClass), count_by_group.keys.collect {|k| k.class.name}.uniq.sort assert_equal %w(Date NilClass), count_by_group.keys.collect {|k| k.class.name}.uniq.sort
assert_equal %W(#{INTEGER_KLASS}), count_by_group.values.collect {|k| k.class.name}.uniq
assert_equal %W(Integer), count_by_group.values.collect {|k| k.class.name}.uniq
end end


def test_issue_count_with_nil_group_only def test_issue_count_with_nil_group_only

Loading…
Cancel
Save