Feature #25538 ยป 0001-Dropped-Ruby-2.1-and-earlier-support.patch
| Gemfile | ||
|---|---|---|
|
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"
|
||
| ... | ... | |
|
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")
|
||
| test/unit/initializers/patches_test.rb | ||
|---|---|---|
|
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
|
||
| ... | ... | |
|
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
|
||