Feature #25538 ยป 0001-Dropped-Ruby-2.1-and-earlier-support.patch
Gemfile | ||
---|---|---|
5 | 5 |
end |
6 | 6 | |
7 | 7 |
gem "rails", "4.2.8" |
8 |
gem "addressable", "2.4.0" if RUBY_VERSION < "2.0"
|
|
8 |
gem "addressable" |
|
9 | 9 |
gem "jquery-rails", "~> 3.1.4" |
10 | 10 |
gem "coderay", "~> 1.1.1" |
11 | 11 |
gem "request_store", "1.0.5" |
12 |
gem "mime-types", (RUBY_VERSION >= "2.0" ? "~> 3.0" : "~> 2.99")
|
|
12 |
gem "mime-types", "~> 3.0"
|
|
13 | 13 |
gem "protected_attributes" |
14 | 14 |
gem "actionpack-xml_parser" |
15 | 15 |
gem "roadie-rails" |
16 | 16 |
gem "mimemagic" |
17 | 17 | |
18 |
gem "nokogiri", (RUBY_VERSION >= "2.1" ? ">= 1.7.0" : "~> 1.6.8")
|
|
18 |
gem "nokogiri", ">= 1.7.0"
|
|
19 | 19 |
gem "i18n", "~> 0.7.0" |
20 |
gem "ffi", "1.9.14", :platforms => :mingw if RUBY_VERSION < "2.0" |
|
21 | 20 | |
22 | 21 |
# Request at least rails-html-sanitizer 1.0.3 because of security advisories |
23 | 22 |
gem "rails-html-sanitizer", ">= 1.0.3" |
... | ... | |
65 | 64 |
when /postgresql/ |
66 | 65 |
gem "pg", "~> 0.18.1", :platforms => [:mri, :mingw, :x64_mingw] |
67 | 66 |
when /sqlite3/ |
68 |
gem "sqlite3", (RUBY_VERSION < "2.0" && RUBY_PLATFORM =~ /mingw/ ? "1.3.12" : "~>1.3.12"),
|
|
67 |
gem "sqlite3", "~>1.3.12",
|
|
69 | 68 |
:platforms => [:mri, :mingw, :x64_mingw] |
70 | 69 |
when /sqlserver/ |
71 |
gem "tiny_tds", (RUBY_VERSION >= "2.0" ? "~> 1.0.5" : "~> 0.7.0"), :platforms => [:mri, :mingw, :x64_mingw]
|
|
70 |
gem "tiny_tds", "~> 1.0.5", :platforms => [:mri, :mingw, :x64_mingw]
|
|
72 | 71 |
gem "activerecord-sqlserver-adapter", :platforms => [:mri, :mingw, :x64_mingw] |
73 | 72 |
else |
74 | 73 |
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 | ||
---|---|---|
50 | 50 |
def test_indifferent_select |
51 | 51 |
hash = ActiveSupport::HashWithIndifferentAccess.new(@symbols).select { |_ ,v| v == 1 } |
52 | 52 |
assert_equal({ 'a' => 1 }, hash) |
53 |
assert_instance_of ((Rails::VERSION::MAJOR < 4 && RUBY_VERSION < "2.1") ? |
|
54 |
Hash : ActiveSupport::HashWithIndifferentAccess), |
|
55 |
hash |
|
53 |
assert_instance_of ActiveSupport::HashWithIndifferentAccess, hash |
|
56 | 54 |
end |
57 | 55 | |
58 | 56 |
def test_indifferent_select_bang |
... | ... | |
79 | 77 |
assert_equal @keys, @ordered_hash.select { true }.map(&:first) |
80 | 78 |
new_ordered_hash = @ordered_hash.select { true } |
81 | 79 |
assert_equal @keys, new_ordered_hash.map(&:first) |
82 |
assert_instance_of ((Rails::VERSION::MAJOR < 4 && RUBY_VERSION < "2.1") ? |
|
83 |
Hash : ActiveSupport::OrderedHash), |
|
84 |
new_ordered_hash |
|
80 |
assert_instance_of ActiveSupport::OrderedHash, new_ordered_hash |
|
85 | 81 |
end |
86 | 82 | |
87 | 83 |
def test_reject |