From 443258cfb41a3e915eb87453892850de81a80ee3 Mon Sep 17 00:00:00 2001 From: MAEDA Go Date: Fri, 7 Apr 2017 17:29:01 +0900 Subject: [PATCH] Dropped Ruby 2.1 and earlier support. --- Gemfile | 11 +++++------ test/unit/initializers/patches_test.rb | 8 ++------ 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/Gemfile b/Gemfile index 7ad1cb14a..0d8fc5b16 100644 --- a/Gemfile +++ b/Gemfile @@ -5,19 +5,18 @@ if Gem::Version.new(Bundler::VERSION) < Gem::Version.new('1.5.0') end gem "rails", "4.2.8" -gem "addressable", "2.4.0" if RUBY_VERSION < "2.0" +gem "addressable" gem "jquery-rails", "~> 3.1.4" gem "coderay", "~> 1.1.1" gem "request_store", "1.0.5" -gem "mime-types", (RUBY_VERSION >= "2.0" ? "~> 3.0" : "~> 2.99") +gem "mime-types", "~> 3.0" gem "protected_attributes" gem "actionpack-xml_parser" gem "roadie-rails" gem "mimemagic" -gem "nokogiri", (RUBY_VERSION >= "2.1" ? ">= 1.7.0" : "~> 1.6.8") +gem "nokogiri", ">= 1.7.0" gem "i18n", "~> 0.7.0" -gem "ffi", "1.9.14", :platforms => :mingw if RUBY_VERSION < "2.0" # Request at least rails-html-sanitizer 1.0.3 because of security advisories gem "rails-html-sanitizer", ">= 1.0.3" @@ -65,10 +64,10 @@ if File.exist?(database_file) when /postgresql/ gem "pg", "~> 0.18.1", :platforms => [:mri, :mingw, :x64_mingw] when /sqlite3/ - gem "sqlite3", (RUBY_VERSION < "2.0" && RUBY_PLATFORM =~ /mingw/ ? "1.3.12" : "~>1.3.12"), + gem "sqlite3", "~>1.3.12", :platforms => [:mri, :mingw, :x64_mingw] when /sqlserver/ - gem "tiny_tds", (RUBY_VERSION >= "2.0" ? "~> 1.0.5" : "~> 0.7.0"), :platforms => [:mri, :mingw, :x64_mingw] + gem "tiny_tds", "~> 1.0.5", :platforms => [:mri, :mingw, :x64_mingw] gem "activerecord-sqlserver-adapter", :platforms => [:mri, :mingw, :x64_mingw] else warn("Unknown database adapter `#{adapter}` found in config/database.yml, use Gemfile.local to load your own database gems") diff --git a/test/unit/initializers/patches_test.rb b/test/unit/initializers/patches_test.rb index 85d623407..9a4f35103 100644 --- a/test/unit/initializers/patches_test.rb +++ b/test/unit/initializers/patches_test.rb @@ -50,9 +50,7 @@ class PatchesTest < ActiveSupport::TestCase def test_indifferent_select hash = ActiveSupport::HashWithIndifferentAccess.new(@symbols).select { |_ ,v| v == 1 } assert_equal({ 'a' => 1 }, hash) - assert_instance_of ((Rails::VERSION::MAJOR < 4 && RUBY_VERSION < "2.1") ? - Hash : ActiveSupport::HashWithIndifferentAccess), - hash + assert_instance_of ActiveSupport::HashWithIndifferentAccess, hash end def test_indifferent_select_bang @@ -79,9 +77,7 @@ class PatchesTest < ActiveSupport::TestCase assert_equal @keys, @ordered_hash.select { true }.map(&:first) new_ordered_hash = @ordered_hash.select { true } assert_equal @keys, new_ordered_hash.map(&:first) - assert_instance_of ((Rails::VERSION::MAJOR < 4 && RUBY_VERSION < "2.1") ? - Hash : ActiveSupport::OrderedHash), - new_ordered_hash + assert_instance_of ActiveSupport::OrderedHash, new_ordered_hash end def test_reject -- 2.11.0 (Apple Git-81)