Commit 547dc7ac authored by Jan Provaznik's avatar Jan Provaznik

Switch to Rails 5 by default

* updates Gemfile
* uses Rails 5 unless explicitly disabled
parent c9343960
# --- Special code for migrating to Rails 5.0 --- # --- Special code for migrating to Rails 5.0 ---
def rails5? def rails5?
%w[1 true].include?(ENV["RAILS5"]) !%w[0 false].include?(ENV["RAILS5"])
end end
gem_versions = {} gem_versions = {}
......
...@@ -4,41 +4,44 @@ GEM ...@@ -4,41 +4,44 @@ GEM
RedCloth (4.3.2) RedCloth (4.3.2)
abstract_type (0.0.7) abstract_type (0.0.7)
ace-rails-ap (4.1.2) ace-rails-ap (4.1.2)
actionmailer (4.2.10) actioncable (5.0.7)
actionpack (= 4.2.10) actionpack (= 5.0.7)
actionview (= 4.2.10) nio4r (>= 1.2, < 3.0)
activejob (= 4.2.10) websocket-driver (~> 0.6.1)
actionmailer (5.0.7)
actionpack (= 5.0.7)
actionview (= 5.0.7)
activejob (= 5.0.7)
mail (~> 2.5, >= 2.5.4) mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 1.0, >= 1.0.5) rails-dom-testing (~> 2.0)
actionpack (4.2.10) actionpack (5.0.7)
actionview (= 4.2.10) actionview (= 5.0.7)
activesupport (= 4.2.10) activesupport (= 5.0.7)
rack (~> 1.6) rack (~> 2.0)
rack-test (~> 0.6.2) rack-test (~> 0.6.3)
rails-dom-testing (~> 1.0, >= 1.0.5) rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2) rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (4.2.10) actionview (5.0.7)
activesupport (= 4.2.10) activesupport (= 5.0.7)
builder (~> 3.1) builder (~> 3.1)
erubis (~> 2.7.0) erubis (~> 2.7.0)
rails-dom-testing (~> 1.0, >= 1.0.5) rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3) rails-html-sanitizer (~> 1.0, >= 1.0.3)
activejob (4.2.10) activejob (5.0.7)
activesupport (= 4.2.10) activesupport (= 5.0.7)
globalid (>= 0.3.0) globalid (>= 0.3.6)
activemodel (4.2.10) activemodel (5.0.7)
activesupport (= 4.2.10) activesupport (= 5.0.7)
builder (~> 3.1) activerecord (5.0.7)
activerecord (4.2.10) activemodel (= 5.0.7)
activemodel (= 4.2.10) activesupport (= 5.0.7)
activesupport (= 4.2.10) arel (~> 7.0)
arel (~> 6.0) activerecord_sane_schema_dumper (1.0)
activerecord_sane_schema_dumper (0.2) rails (>= 5, < 6)
rails (>= 4, < 5) activesupport (5.0.7)
activesupport (4.2.10) concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (~> 0.7) i18n (>= 0.7, < 2)
minitest (~> 5.1) minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1) tzinfo (~> 1.1)
acts-as-taggable-on (5.0.0) acts-as-taggable-on (5.0.0)
activerecord (>= 4.2.8) activerecord (>= 4.2.8)
...@@ -49,7 +52,7 @@ GEM ...@@ -49,7 +52,7 @@ GEM
public_suffix (>= 2.0.2, < 4.0) public_suffix (>= 2.0.2, < 4.0)
aes_key_wrap (1.0.1) aes_key_wrap (1.0.1)
akismet (2.0.0) akismet (2.0.0)
arel (6.0.4) arel (7.1.4)
asana (0.6.0) asana (0.6.0)
faraday (~> 0.9) faraday (~> 0.9)
faraday_middleware (~> 0.9) faraday_middleware (~> 0.9)
...@@ -143,8 +146,8 @@ GEM ...@@ -143,8 +146,8 @@ GEM
html-pipeline html-pipeline
declarative (0.0.10) declarative (0.0.10)
declarative-option (0.1.0) declarative-option (0.1.0)
default_value_for (3.0.2) default_value_for (3.0.5)
activerecord (>= 3.2.0, < 5.1) activerecord (>= 3.2.0, < 5.2)
descendants_tracker (0.0.4) descendants_tracker (0.0.4)
thread_safe (~> 0.3, >= 0.3.1) thread_safe (~> 0.3, >= 0.3.1)
device_detector (1.0.0) device_detector (1.0.0)
...@@ -376,7 +379,7 @@ GEM ...@@ -376,7 +379,7 @@ GEM
json (~> 1.8) json (~> 1.8)
multi_xml (>= 0.5.2) multi_xml (>= 0.5.2)
httpclient (2.8.3) httpclient (2.8.3)
i18n (0.9.5) i18n (1.1.0)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
icalendar (2.4.1) icalendar (2.4.1)
ice_nine (0.11.2) ice_nine (0.11.2)
...@@ -470,6 +473,7 @@ GEM ...@@ -470,6 +473,7 @@ GEM
net-ldap (0.16.0) net-ldap (0.16.0)
net-ssh (5.0.1) net-ssh (5.0.1)
netrc (0.11.0) netrc (0.11.0)
nio4r (2.3.1)
nokogiri (1.8.4) nokogiri (1.8.4)
mini_portile2 (~> 2.3.0) mini_portile2 (~> 2.3.0)
nokogumbo (1.5.0) nokogumbo (1.5.0)
...@@ -542,7 +546,7 @@ GEM ...@@ -542,7 +546,7 @@ GEM
orm_adapter (0.5.0) orm_adapter (0.5.0)
os (1.0.0) os (1.0.0)
parallel (1.12.1) parallel (1.12.1)
parser (2.5.3.0) parser (2.5.1.2)
ast (~> 2.4.0) ast (~> 2.4.0)
parslet (1.8.2) parslet (1.8.2)
peek (1.0.1) peek (1.0.1)
...@@ -598,7 +602,7 @@ GEM ...@@ -598,7 +602,7 @@ GEM
get_process_mem (~> 0.2) get_process_mem (~> 0.2)
puma (>= 2.7, < 4) puma (>= 2.7, < 4)
pyu-ruby-sasl (0.0.3.3) pyu-ruby-sasl (0.0.3.3)
rack (1.6.11) rack (2.0.5)
rack-accept (0.4.5) rack-accept (0.4.5)
rack (>= 0.4) rack (>= 0.4)
rack-attack (4.4.1) rack-attack (4.4.1)
...@@ -616,31 +620,36 @@ GEM ...@@ -616,31 +620,36 @@ GEM
rack rack
rack-test (0.6.3) rack-test (0.6.3)
rack (>= 1.0) rack (>= 1.0)
rails (4.2.10) rails (5.0.7)
actionmailer (= 4.2.10) actioncable (= 5.0.7)
actionpack (= 4.2.10) actionmailer (= 5.0.7)
actionview (= 4.2.10) actionpack (= 5.0.7)
activejob (= 4.2.10) actionview (= 5.0.7)
activemodel (= 4.2.10) activejob (= 5.0.7)
activerecord (= 4.2.10) activemodel (= 5.0.7)
activesupport (= 4.2.10) activerecord (= 5.0.7)
bundler (>= 1.3.0, < 2.0) activesupport (= 5.0.7)
railties (= 4.2.10) bundler (>= 1.3.0)
sprockets-rails railties (= 5.0.7)
sprockets-rails (>= 2.0.0)
rails-controller-testing (1.0.2)
actionpack (~> 5.x, >= 5.0.1)
actionview (~> 5.x, >= 5.0.1)
activesupport (~> 5.x)
rails-deprecated_sanitizer (1.0.3) rails-deprecated_sanitizer (1.0.3)
activesupport (>= 4.2.0.alpha) activesupport (>= 4.2.0.alpha)
rails-dom-testing (1.0.9) rails-dom-testing (2.0.3)
activesupport (>= 4.2.0, < 5.0) activesupport (>= 4.2.0)
nokogiri (~> 1.6) nokogiri (>= 1.6)
rails-deprecated_sanitizer (>= 1.0.1)
rails-html-sanitizer (1.0.4) rails-html-sanitizer (1.0.4)
loofah (~> 2.2, >= 2.2.2) loofah (~> 2.2, >= 2.2.2)
rails-i18n (4.0.9) rails-i18n (5.1.1)
i18n (~> 0.7) i18n (>= 0.7, < 2)
railties (~> 4.0) railties (>= 5.0, < 6)
railties (4.2.10) railties (5.0.7)
actionpack (= 4.2.10) actionpack (= 5.0.7)
activesupport (= 4.2.10) activesupport (= 5.0.7)
method_source
rake (>= 0.8.7) rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0) thor (>= 0.18.1, < 2.0)
rainbow (3.0.0) rainbow (3.0.0)
...@@ -731,8 +740,7 @@ GEM ...@@ -731,8 +740,7 @@ GEM
rspec-core rspec-core
rspec-set (0.1.3) rspec-set (0.1.3)
rspec-support (3.7.1) rspec-support (3.7.1)
rspec_junit_formatter (0.2.3) rspec_junit_formatter (0.4.1)
builder (< 4)
rspec-core (>= 2, < 4, != 2.12.0) rspec-core (>= 2, < 4, != 2.12.0)
rspec_profiling (0.0.5) rspec_profiling (0.0.5)
activerecord activerecord
...@@ -849,8 +857,6 @@ GEM ...@@ -849,8 +857,6 @@ GEM
sysexits (1.2.0) sysexits (1.2.0)
temple (0.8.0) temple (0.8.0)
test-prof (0.2.5) test-prof (0.2.5)
test_after_commit (1.1.0)
activerecord (>= 3.2)
text (1.3.1) text (1.3.1)
thin (1.7.2) thin (1.7.2)
daemons (~> 1.0, >= 1.0.9) daemons (~> 1.0, >= 1.0.9)
...@@ -913,6 +919,9 @@ GEM ...@@ -913,6 +919,9 @@ GEM
hashdiff hashdiff
webpack-rails (0.9.11) webpack-rails (0.9.11)
railties (>= 3.2.0) railties (>= 3.2.0)
websocket-driver (0.6.5)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.3)
wikicloth (0.8.1) wikicloth (0.8.1)
builder builder
expression_parser expression_parser
...@@ -928,7 +937,7 @@ PLATFORMS ...@@ -928,7 +937,7 @@ PLATFORMS
DEPENDENCIES DEPENDENCIES
RedCloth (~> 4.3.2) RedCloth (~> 4.3.2)
ace-rails-ap (~> 4.1.0) ace-rails-ap (~> 4.1.0)
activerecord_sane_schema_dumper (= 0.2) activerecord_sane_schema_dumper (= 1.0)
acts-as-taggable-on (~> 5.0) acts-as-taggable-on (~> 5.0)
addressable (~> 2.5.2) addressable (~> 2.5.2)
akismet (~> 2.0) akismet (~> 2.0)
...@@ -962,7 +971,7 @@ DEPENDENCIES ...@@ -962,7 +971,7 @@ DEPENDENCIES
creole (~> 0.5.0) creole (~> 0.5.0)
database_cleaner (~> 1.5.0) database_cleaner (~> 1.5.0)
deckar01-task_list (= 2.0.0) deckar01-task_list (= 2.0.0)
default_value_for (~> 3.0.0) default_value_for (~> 3.0.5)
device_detector device_detector
devise (~> 4.4) devise (~> 4.4)
devise-two-factor (~> 3.0.0) devise-two-factor (~> 3.0.0)
...@@ -1080,9 +1089,10 @@ DEPENDENCIES ...@@ -1080,9 +1089,10 @@ DEPENDENCIES
rack-cors (~> 1.0.0) rack-cors (~> 1.0.0)
rack-oauth2 (~> 1.2.1) rack-oauth2 (~> 1.2.1)
rack-proxy (~> 0.6.0) rack-proxy (~> 0.6.0)
rails (= 4.2.10) rails (= 5.0.7)
rails-controller-testing
rails-deprecated_sanitizer (~> 1.0.3) rails-deprecated_sanitizer (~> 1.0.3)
rails-i18n (~> 4.0.9) rails-i18n (~> 5.1)
rainbow (~> 3.0) rainbow (~> 3.0)
raindrops (~> 0.18) raindrops (~> 0.18)
rblineprof (~> 0.3.6) rblineprof (~> 0.3.6)
...@@ -1135,7 +1145,6 @@ DEPENDENCIES ...@@ -1135,7 +1145,6 @@ DEPENDENCIES
state_machines-activerecord (~> 0.5.1) state_machines-activerecord (~> 0.5.1)
sys-filesystem (~> 1.1.6) sys-filesystem (~> 1.1.6)
test-prof (~> 0.2.5) test-prof (~> 0.2.5)
test_after_commit (~> 1.1)
thin (~> 1.7.0) thin (~> 1.7.0)
timecop (~> 0.8.0) timecop (~> 0.8.0)
toml-rb (~> 1.0.0) toml-rb (~> 1.0.0)
......
# BUNDLE_GEMFILE=Gemfile.rails5 bundle install
ENV["RAILS5"] = "false"
gemfile = File.expand_path("../Gemfile", __FILE__)
eval(File.read(gemfile), nil, gemfile)
...@@ -4,44 +4,41 @@ GEM ...@@ -4,44 +4,41 @@ GEM
RedCloth (4.3.2) RedCloth (4.3.2)
abstract_type (0.0.7) abstract_type (0.0.7)
ace-rails-ap (4.1.2) ace-rails-ap (4.1.2)
actioncable (5.0.7) actionmailer (4.2.10)
actionpack (= 5.0.7) actionpack (= 4.2.10)
nio4r (>= 1.2, < 3.0) actionview (= 4.2.10)
websocket-driver (~> 0.6.1) activejob (= 4.2.10)
actionmailer (5.0.7)
actionpack (= 5.0.7)
actionview (= 5.0.7)
activejob (= 5.0.7)
mail (~> 2.5, >= 2.5.4) mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0) rails-dom-testing (~> 1.0, >= 1.0.5)
actionpack (5.0.7) actionpack (4.2.10)
actionview (= 5.0.7) actionview (= 4.2.10)
activesupport (= 5.0.7) activesupport (= 4.2.10)
rack (~> 2.0) rack (~> 1.6)
rack-test (~> 0.6.3) rack-test (~> 0.6.2)
rails-dom-testing (~> 2.0) rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.2) rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (5.0.7) actionview (4.2.10)
activesupport (= 5.0.7) activesupport (= 4.2.10)
builder (~> 3.1) builder (~> 3.1)
erubis (~> 2.7.0) erubis (~> 2.7.0)
rails-dom-testing (~> 2.0) rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.3) rails-html-sanitizer (~> 1.0, >= 1.0.3)
activejob (5.0.7) activejob (4.2.10)
activesupport (= 5.0.7) activesupport (= 4.2.10)
globalid (>= 0.3.6) globalid (>= 0.3.0)
activemodel (5.0.7) activemodel (4.2.10)
activesupport (= 5.0.7) activesupport (= 4.2.10)
activerecord (5.0.7) builder (~> 3.1)
activemodel (= 5.0.7) activerecord (4.2.10)
activesupport (= 5.0.7) activemodel (= 4.2.10)
arel (~> 7.0) activesupport (= 4.2.10)
activerecord_sane_schema_dumper (1.0) arel (~> 6.0)
rails (>= 5, < 6) activerecord_sane_schema_dumper (0.2)
activesupport (5.0.7) rails (>= 4, < 5)
concurrent-ruby (~> 1.0, >= 1.0.2) activesupport (4.2.10)
i18n (>= 0.7, < 2) i18n (~> 0.7)
minitest (~> 5.1) minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1) tzinfo (~> 1.1)
acts-as-taggable-on (5.0.0) acts-as-taggable-on (5.0.0)
activerecord (>= 4.2.8) activerecord (>= 4.2.8)
...@@ -52,7 +49,7 @@ GEM ...@@ -52,7 +49,7 @@ GEM
public_suffix (>= 2.0.2, < 4.0) public_suffix (>= 2.0.2, < 4.0)
aes_key_wrap (1.0.1) aes_key_wrap (1.0.1)
akismet (2.0.0) akismet (2.0.0)
arel (7.1.4) arel (6.0.4)
asana (0.6.0) asana (0.6.0)
faraday (~> 0.9) faraday (~> 0.9)
faraday_middleware (~> 0.9) faraday_middleware (~> 0.9)
...@@ -146,8 +143,8 @@ GEM ...@@ -146,8 +143,8 @@ GEM
html-pipeline html-pipeline
declarative (0.0.10) declarative (0.0.10)
declarative-option (0.1.0) declarative-option (0.1.0)
default_value_for (3.0.5) default_value_for (3.0.2)
activerecord (>= 3.2.0, < 5.2) activerecord (>= 3.2.0, < 5.1)
descendants_tracker (0.0.4) descendants_tracker (0.0.4)
thread_safe (~> 0.3, >= 0.3.1) thread_safe (~> 0.3, >= 0.3.1)
device_detector (1.0.0) device_detector (1.0.0)
...@@ -379,7 +376,7 @@ GEM ...@@ -379,7 +376,7 @@ GEM
json (~> 1.8) json (~> 1.8)
multi_xml (>= 0.5.2) multi_xml (>= 0.5.2)
httpclient (2.8.3) httpclient (2.8.3)
i18n (1.1.0) i18n (0.9.5)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
icalendar (2.4.1) icalendar (2.4.1)
ice_nine (0.11.2) ice_nine (0.11.2)
...@@ -473,7 +470,6 @@ GEM ...@@ -473,7 +470,6 @@ GEM
net-ldap (0.16.0) net-ldap (0.16.0)
net-ssh (5.0.1) net-ssh (5.0.1)
netrc (0.11.0) netrc (0.11.0)
nio4r (2.3.1)
nokogiri (1.8.4) nokogiri (1.8.4)
mini_portile2 (~> 2.3.0) mini_portile2 (~> 2.3.0)
nokogumbo (1.5.0) nokogumbo (1.5.0)
...@@ -602,7 +598,7 @@ GEM ...@@ -602,7 +598,7 @@ GEM
get_process_mem (~> 0.2) get_process_mem (~> 0.2)
puma (>= 2.7, < 4) puma (>= 2.7, < 4)
pyu-ruby-sasl (0.0.3.3) pyu-ruby-sasl (0.0.3.3)
rack (2.0.5) rack (1.6.10)
rack-accept (0.4.5) rack-accept (0.4.5)
rack (>= 0.4) rack (>= 0.4)
rack-attack (4.4.1) rack-attack (4.4.1)
...@@ -620,36 +616,31 @@ GEM ...@@ -620,36 +616,31 @@ GEM
rack rack
rack-test (0.6.3) rack-test (0.6.3)
rack (>= 1.0) rack (>= 1.0)
rails (5.0.7) rails (4.2.10)
actioncable (= 5.0.7) actionmailer (= 4.2.10)
actionmailer (= 5.0.7) actionpack (= 4.2.10)
actionpack (= 5.0.7) actionview (= 4.2.10)
actionview (= 5.0.7) activejob (= 4.2.10)
activejob (= 5.0.7) activemodel (= 4.2.10)
activemodel (= 5.0.7) activerecord (= 4.2.10)
activerecord (= 5.0.7) activesupport (= 4.2.10)
activesupport (= 5.0.7) bundler (>= 1.3.0, < 2.0)
bundler (>= 1.3.0) railties (= 4.2.10)
railties (= 5.0.7) sprockets-rails
sprockets-rails (>= 2.0.0)
rails-controller-testing (1.0.2)
actionpack (~> 5.x, >= 5.0.1)
actionview (~> 5.x, >= 5.0.1)
activesupport (~> 5.x)
rails-deprecated_sanitizer (1.0.3) rails-deprecated_sanitizer (1.0.3)
activesupport (>= 4.2.0.alpha) activesupport (>= 4.2.0.alpha)
rails-dom-testing (2.0.3) rails-dom-testing (1.0.9)
activesupport (>= 4.2.0) activesupport (>= 4.2.0, < 5.0)
nokogiri (>= 1.6) nokogiri (~> 1.6)
rails-deprecated_sanitizer (>= 1.0.1)
rails-html-sanitizer (1.0.4) rails-html-sanitizer (1.0.4)
loofah (~> 2.2, >= 2.2.2) loofah (~> 2.2, >= 2.2.2)
rails-i18n (5.1.1) rails-i18n (4.0.9)
i18n (>= 0.7, < 2) i18n (~> 0.7)
railties (>= 5.0, < 6) railties (~> 4.0)
railties (5.0.7) railties (4.2.10)
actionpack (= 5.0.7) actionpack (= 4.2.10)
activesupport (= 5.0.7) activesupport (= 4.2.10)
method_source
rake (>= 0.8.7) rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0) thor (>= 0.18.1, < 2.0)
rainbow (3.0.0) rainbow (3.0.0)
...@@ -740,7 +731,8 @@ GEM ...@@ -740,7 +731,8 @@ GEM
rspec-core rspec-core
rspec-set (0.1.3) rspec-set (0.1.3)
rspec-support (3.7.1) rspec-support (3.7.1)
rspec_junit_formatter (0.4.1) rspec_junit_formatter (0.2.3)
builder (< 4)
rspec-core (>= 2, < 4, != 2.12.0) rspec-core (>= 2, < 4, != 2.12.0)
rspec_profiling (0.0.5) rspec_profiling (0.0.5)
activerecord activerecord
...@@ -857,6 +849,8 @@ GEM ...@@ -857,6 +849,8 @@ GEM
sysexits (1.2.0) sysexits (1.2.0)
temple (0.8.0) temple (0.8.0)
test-prof (0.2.5) test-prof (0.2.5)
test_after_commit (1.1.0)
activerecord (>= 3.2)
text (1.3.1) text (1.3.1)
thin (1.7.2) thin (1.7.2)
daemons (~> 1.0, >= 1.0.9) daemons (~> 1.0, >= 1.0.9)
...@@ -919,9 +913,6 @@ GEM ...@@ -919,9 +913,6 @@ GEM
hashdiff hashdiff
webpack-rails (0.9.11) webpack-rails (0.9.11)
railties (>= 3.2.0) railties (>= 3.2.0)
websocket-driver (0.6.5)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.3)
wikicloth (0.8.1) wikicloth (0.8.1)
builder builder
expression_parser expression_parser
...@@ -937,7 +928,7 @@ PLATFORMS ...@@ -937,7 +928,7 @@ PLATFORMS
DEPENDENCIES DEPENDENCIES
RedCloth (~> 4.3.2) RedCloth (~> 4.3.2)
ace-rails-ap (~> 4.1.0) ace-rails-ap (~> 4.1.0)
activerecord_sane_schema_dumper (= 1.0) activerecord_sane_schema_dumper (= 0.2)
acts-as-taggable-on (~> 5.0) acts-as-taggable-on (~> 5.0)
addressable (~> 2.5.2) addressable (~> 2.5.2)
akismet (~> 2.0) akismet (~> 2.0)
...@@ -971,7 +962,7 @@ DEPENDENCIES ...@@ -971,7 +962,7 @@ DEPENDENCIES
creole (~> 0.5.0) creole (~> 0.5.0)
database_cleaner (~> 1.5.0) database_cleaner (~> 1.5.0)
deckar01-task_list (= 2.0.0) deckar01-task_list (= 2.0.0)
default_value_for (~> 3.0.5) default_value_for (~> 3.0.0)
device_detector device_detector
devise (~> 4.4) devise (~> 4.4)
devise-two-factor (~> 3.0.0) devise-two-factor (~> 3.0.0)
...@@ -1089,10 +1080,9 @@ DEPENDENCIES ...@@ -1089,10 +1080,9 @@ DEPENDENCIES
rack-cors (~> 1.0.0) rack-cors (~> 1.0.0)
rack-oauth2 (~> 1.2.1) rack-oauth2 (~> 1.2.1)
rack-proxy (~> 0.6.0) rack-proxy (~> 0.6.0)
rails (= 5.0.7) rails (= 4.2.10)
rails-controller-testing
rails-deprecated_sanitizer (~> 1.0.3) rails-deprecated_sanitizer (~> 1.0.3)
rails-i18n (~> 5.1) rails-i18n (~> 4.0.9)
rainbow (~> 3.0) rainbow (~> 3.0)
raindrops (~> 0.18) raindrops (~> 0.18)
rblineprof (~> 0.3.6) rblineprof (~> 0.3.6)
...@@ -1145,6 +1135,7 @@ DEPENDENCIES ...@@ -1145,6 +1135,7 @@ DEPENDENCIES
state_machines-activerecord (~> 0.5.1) state_machines-activerecord (~> 0.5.1)
sys-filesystem (~> 1.1.6) sys-filesystem (~> 1.1.6)
test-prof (~> 0.2.5) test-prof (~> 0.2.5)
test_after_commit (~> 1.1)
thin (~> 1.7.0) thin (~> 1.7.0)
timecop (~> 0.8.0) timecop (~> 0.8.0)
toml-rb (~> 1.0.0) toml-rb (~> 1.0.0)
......
#!/usr/bin/env ruby #!/usr/bin/env ruby
def rails5? def rails5?
%w[1 true].include?(ENV["RAILS5"]) !%w[0 false].include?(ENV["RAILS5"])
end end
require "pathname" require "pathname"
......
...@@ -8,7 +8,7 @@ module Gitlab ...@@ -8,7 +8,7 @@ module Gitlab
# This method is used for smooth upgrading from the current Rails 4.x to Rails 5.0. # This method is used for smooth upgrading from the current Rails 4.x to Rails 5.0.
# https://gitlab.com/gitlab-org/gitlab-ce/issues/14286 # https://gitlab.com/gitlab-org/gitlab-ce/issues/14286
def self.rails5? def self.rails5?
ENV["RAILS5"].in?(%w[1 true]) !%w[0 false].include?(ENV["RAILS5"])
end end
class Application < Rails::Application class Application < Rails::Application
......
def rails5? def rails5?
%w[1 true].include?(ENV["RAILS5"]) !%w[0 false].include?(ENV["RAILS5"])
end end
require 'rubygems' unless rails5? require 'rubygems' unless rails5?
gemfile = rails5? ? "Gemfile.rails5" : "Gemfile" gemfile = rails5? ? "Gemfile" : "Gemfile.rails4"
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../#{gemfile}", __dir__) ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../#{gemfile}", __dir__)
# Set up gems listed in the Gemfile. # Set up gems listed in the Gemfile.
......
# Load the rails application # Load the rails application
# Remove this condition when upgraded to rails 5.0. # Remove this condition when upgraded to rails 5.0.
if %w[1 true].include?(ENV["RAILS5"]) if %w[0 false].include?(ENV["RAILS5"])
require_relative 'application'
else
require File.expand_path('application', __dir__) require File.expand_path('application', __dir__)
else
require_relative 'application'
end end
# Initialize the rails application # Initialize the rails application
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment