Remove rails 4 support in CI, Gemfiles, bin/ and config/
Showing
# --- Special code for migrating to Rails 5.0 --- | |||
def rails5? | |||
!%w[0 false].include?(ENV["RAILS5"]) | |||
end | |||
gem_versions = {} | |||
gem_versions['activerecord_sane_schema_dumper'] = rails5? ? '1.0' : '0.2' | |||
gem_versions['rails'] = rails5? ? '5.0.7' : '4.2.11' | |||
gem_versions['rails-i18n'] = rails5? ? '~> 5.1' : '~> 4.0.9' | |||
# The 2.0.6 version of rack requires monkeypatch to be present in | |||
# `config.ru`. This can be removed once a new update for Rack | |||
# is available that contains https://github.com/rack/rack/pull/1201. | |||
gem_versions['rack'] = rails5? ? '2.0.6' : '1.6.11' | |||
# --- The end of special code for migrating to Rails 5.0 --- | |||
source 'https://rubygems.org' | source 'https://rubygems.org' | ||
gem 'rails', gem_versions['rails'] | gem 'rails', '5.0.7' | ||
gem 'rails-deprecated_sanitizer', '~> 1.0.3' | gem 'rails-deprecated_sanitizer', '~> 1.0.3' | ||
# Improves copy-on-write performance for MRI | # Improves copy-on-write performance for MRI | ||
... | @@ -28,11 +12,7 @@ gem 'responders', '~> 2.0' | ... | @@ -28,11 +12,7 @@ gem 'responders', '~> 2.0' |
gem 'sprockets', '~> 3.7.0' | gem 'sprockets', '~> 3.7.0' | ||
# Default values for AR models | # Default values for AR models | ||
if rails5? | gem 'gitlab-default_value_for', '~> 3.1.1', require: 'default_value_for' | ||
gem 'gitlab-default_value_for', '~> 3.1.1', require: 'default_value_for' | |||
else | |||
gem 'default_value_for', '~> 3.0.0' | |||
end | |||
# Supported DBs | # Supported DBs | ||
gem 'mysql2', '~> 0.4.10', group: :mysql | gem 'mysql2', '~> 0.4.10', group: :mysql | ||
... | @@ -159,7 +139,10 @@ gem 'icalendar' | ... | @@ -159,7 +139,10 @@ gem 'icalendar' |
gem 'diffy', '~> 3.1.0' | gem 'diffy', '~> 3.1.0' | ||
# Application server | # Application server | ||
gem 'rack', gem_versions['rack'] | # The 2.0.6 version of rack requires monkeypatch to be present in | ||
# `config.ru`. This can be removed once a new update for Rack | |||
# is available that contains https://github.com/rack/rack/pull/1201. | |||
gem 'rack', '2.0.6' | |||
group :unicorn do | group :unicorn do | ||
gem 'unicorn', '~> 5.1.0' | gem 'unicorn', '~> 5.1.0' | ||
... | @@ -297,7 +280,7 @@ gem 'premailer-rails', '~> 1.9.7' | ... | @@ -297,7 +280,7 @@ gem 'premailer-rails', '~> 1.9.7' |
# I18n | # I18n | ||
gem 'ruby_parser', '~> 3.8', require: false | gem 'ruby_parser', '~> 3.8', require: false | ||
gem 'rails-i18n', gem_versions['rails-i18n'] | gem 'rails-i18n', '~> 5.1' | ||
gem 'gettext_i18n_rails', '~> 1.8.0' | gem 'gettext_i18n_rails', '~> 1.8.0' | ||
gem 'gettext_i18n_rails_js', '~> 1.3' | gem 'gettext_i18n_rails_js', '~> 1.3' | ||
gem 'gettext', '~> 3.2.2', require: false, group: :development | gem 'gettext', '~> 3.2.2', require: false, group: :development | ||
... | @@ -383,7 +366,7 @@ group :development, :test do | ... | @@ -383,7 +366,7 @@ group :development, :test do |
gem 'license_finder', '~> 5.4', require: false | gem 'license_finder', '~> 5.4', require: false | ||
gem 'knapsack', '~> 1.17' | gem 'knapsack', '~> 1.17' | ||
gem 'activerecord_sane_schema_dumper', gem_versions['activerecord_sane_schema_dumper'] | gem 'activerecord_sane_schema_dumper', '1.0' | ||
gem 'stackprof', '~> 0.2.10', require: false | gem 'stackprof', '~> 0.2.10', require: false | ||
... | @@ -397,8 +380,7 @@ group :test do | ... | @@ -397,8 +380,7 @@ group :test do |
gem 'email_spec', '~> 2.2.0' | gem 'email_spec', '~> 2.2.0' | ||
gem 'json-schema', '~> 2.8.0' | gem 'json-schema', '~> 2.8.0' | ||
gem 'webmock', '~> 2.3.2' | gem 'webmock', '~> 2.3.2' | ||
gem 'rails-controller-testing' if rails5? # Rails5 only gem. | gem 'rails-controller-testing' | ||
gem 'test_after_commit', '~> 1.1' unless rails5? # Remove this gem when migrated to rails 5.0. It's been integrated to rails 5.0. | |||
gem 'sham_rack', '~> 1.3.6' | gem 'sham_rack', '~> 1.3.6' | ||
gem 'concurrent-ruby', '~> 1.1' | gem 'concurrent-ruby', '~> 1.1' | ||
gem 'test-prof', '~> 0.2.5' | gem 'test-prof', '~> 0.2.5' | ||
... | ... |
Gemfile.rails4
deleted
100644 → 0
Gemfile.rails4.lock
deleted
100644 → 0
Please register or sign in to comment