Commit 9fe715c5 authored by Sean McGivern's avatar Sean McGivern

Merge branch 'switch-rails-ee' into 'master'

[EE] Switch to Rails 5

See merge request gitlab-org/gitlab-ee!7222
parents c75ae20e 53270429
This diff is collapsed.
# --- 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)
...@@ -151,8 +154,8 @@ GEM ...@@ -151,8 +154,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)
...@@ -403,7 +406,7 @@ GEM ...@@ -403,7 +406,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)
...@@ -499,6 +502,7 @@ GEM ...@@ -499,6 +502,7 @@ GEM
net-ntp (2.1.3) net-ntp (2.1.3)
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)
...@@ -627,7 +631,7 @@ GEM ...@@ -627,7 +631,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)
...@@ -645,31 +649,36 @@ GEM ...@@ -645,31 +649,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)
...@@ -760,8 +769,7 @@ GEM ...@@ -760,8 +769,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
...@@ -878,8 +886,6 @@ GEM ...@@ -878,8 +886,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)
...@@ -942,6 +948,9 @@ GEM ...@@ -942,6 +948,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
...@@ -957,7 +966,7 @@ PLATFORMS ...@@ -957,7 +966,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)
...@@ -992,7 +1001,7 @@ DEPENDENCIES ...@@ -992,7 +1001,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)
...@@ -1117,9 +1126,10 @@ DEPENDENCIES ...@@ -1117,9 +1126,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)
...@@ -1172,7 +1182,6 @@ DEPENDENCIES ...@@ -1172,7 +1182,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.rails4 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)
...@@ -154,8 +151,8 @@ GEM ...@@ -154,8 +151,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)
...@@ -406,7 +403,7 @@ GEM ...@@ -406,7 +403,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)
...@@ -482,9 +479,9 @@ GEM ...@@ -482,9 +479,9 @@ GEM
memoizable (0.4.2) memoizable (0.4.2)
thread_safe (~> 0.3, >= 0.3.1) thread_safe (~> 0.3, >= 0.3.1)
method_source (0.9.0) method_source (0.9.0)
mime-types (3.1) mime-types (3.2.2)
mime-types-data (~> 3.2015) mime-types-data (~> 3.2015)
mime-types-data (3.2016.0521) mime-types-data (3.2018.0812)
mimemagic (0.3.0) mimemagic (0.3.0)
mini_magick (4.8.0) mini_magick (4.8.0)
mini_mime (1.0.1) mini_mime (1.0.1)
...@@ -502,7 +499,6 @@ GEM ...@@ -502,7 +499,6 @@ GEM
net-ntp (2.1.3) net-ntp (2.1.3)
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)
...@@ -631,7 +627,7 @@ GEM ...@@ -631,7 +627,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.11)
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)
...@@ -649,36 +645,31 @@ GEM ...@@ -649,36 +645,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)
...@@ -769,7 +760,8 @@ GEM ...@@ -769,7 +760,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
...@@ -886,6 +878,8 @@ GEM ...@@ -886,6 +878,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)
...@@ -948,9 +942,6 @@ GEM ...@@ -948,9 +942,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
...@@ -966,7 +957,7 @@ PLATFORMS ...@@ -966,7 +957,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)
...@@ -1001,7 +992,7 @@ DEPENDENCIES ...@@ -1001,7 +992,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)
...@@ -1126,10 +1117,9 @@ DEPENDENCIES ...@@ -1126,10 +1117,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)
...@@ -1182,6 +1172,7 @@ DEPENDENCIES ...@@ -1182,6 +1172,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)
......
# frozen_string_literal: true
class ApplicationRecord < ActiveRecord::Base
self.abstract_class = true
end
#!/usr/bin/env ruby #!/usr/bin/env ruby
# Remove this block when upgraded to rails 5.0. # Remove this block when upgraded to rails 5.0.
unless %w[1 true].include?(ENV["RAILS5"]) if %w[0 false].include?(ENV["RAILS5"])
begin begin
load File.expand_path('../spring', __FILE__) load File.expand_path('../spring', __FILE__)
rescue LoadError => e rescue LoadError => e
......
#!/usr/bin/env ruby #!/usr/bin/env ruby
# Remove this block when upgraded to rails 5.0. # Remove this block when upgraded to rails 5.0.
unless %w[1 true].include?(ENV["RAILS5"]) if %w[0 false].include?(ENV["RAILS5"])
begin begin
load File.expand_path('../spring', __FILE__) load File.expand_path('../spring', __FILE__)
rescue LoadError => e rescue LoadError => e
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# Remove these two lines below when upgraded to rails 5.0. # Remove these two lines below when upgraded to rails 5.0.
# Allow run `rspec` command as `RAILS5=1 rspec ...` instead of `BUNDLE_GEMFILE=Gemfile.rails5 rspec ...` # Allow run `rspec` command as `RAILS5=1 rspec ...` instead of `BUNDLE_GEMFILE=Gemfile.rails5 rspec ...`
gemfile = %w[1 true].include?(ENV["RAILS5"]) ? "Gemfile.rails5" : "Gemfile" gemfile = %w[0 false].include?(ENV["RAILS5"]) ? "Gemfile.rails4" : "Gemfile"
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../#{gemfile}", __dir__) ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../#{gemfile}", __dir__)
begin begin
......
#!/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"
......
---
title: Switch to Rails 5
merge_request: 21492
author:
type: other
...@@ -10,7 +10,7 @@ module Gitlab ...@@ -10,7 +10,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
......
...@@ -24,28 +24,46 @@ if defined?(ActiveRecord::ConnectionAdapters::Mysql2Adapter) ...@@ -24,28 +24,46 @@ if defined?(ActiveRecord::ConnectionAdapters::Mysql2Adapter)
ActiveRecord::ConnectionAdapters::Mysql2Adapter.send(:prepend, MysqlSetLengthForBinaryIndex) ActiveRecord::ConnectionAdapters::Mysql2Adapter.send(:prepend, MysqlSetLengthForBinaryIndex)
end end
if Gitlab.rails5? module MysqlSetLengthForBinaryIndexAndIgnorePostgresOptionsForSchema
module MysqlSetLengthForBinaryIndexAndIgnorePostgresOptionsForSchema # This method is used in Rails 5 schema loading as t.index
# This method is used in Rails 5 schema loading as t.index def index(column_names, options = {})
def index(column_names, options = {}) # Ignore indexes that use opclasses,
options[:length] ||= {} # also see config/initializers/mysql_ignore_postgresql_options.rb
Array(column_names).each do |column_name| if options[:opclasses]
column = columns.find { |c| c.name == column_name } warn "WARNING: index on columns #{column_names} uses unsupported option, skipping."
return
if column&.type == :binary end
options[:length][column_name] = 20
end # when running rails 4 with rails 5 schema, rails 4 doesn't support multiple
end # indexes on the same set of columns. Mysql doesn't support partial indexes, so if
# an index already exists and we add another index, skip it if it's partial:
# see https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/21492#note_102821326
if !Gitlab.rails5? && indexes[column_names] && options[:where]
warn "WARNING: index on columns #{column_names} already exists and partial index is not supported, skipping."
return
end
options[:length] ||= {}
Array(column_names).each do |column_name|
column = columns.find { |c| c.name == column_name }
# Ignore indexes that use opclasses, if column&.type == :binary
# also see config/initializers/mysql_ignore_postgresql_options.rb options[:length][column_name] = 20
unless options[:opclasses]
super(column_names, options)
end end
end end
super(column_names, options)
end end
end
def mysql_adapter?
defined?(ActiveRecord::ConnectionAdapters::Mysql2Adapter) && ActiveRecord::Base.connection.is_a?(ActiveRecord::ConnectionAdapters::Mysql2Adapter)
end
if Gitlab.rails5?
if defined?(ActiveRecord::ConnectionAdapters::MySQL::TableDefinition) if defined?(ActiveRecord::ConnectionAdapters::MySQL::TableDefinition)
ActiveRecord::ConnectionAdapters::MySQL::TableDefinition.send(:prepend, MysqlSetLengthForBinaryIndexAndIgnorePostgresOptionsForSchema) ActiveRecord::ConnectionAdapters::MySQL::TableDefinition.send(:prepend, MysqlSetLengthForBinaryIndexAndIgnorePostgresOptionsForSchema)
end end
elsif mysql_adapter? && defined?(ActiveRecord::ConnectionAdapters::TableDefinition)
ActiveRecord::ConnectionAdapters::TableDefinition.send(:prepend, MysqlSetLengthForBinaryIndexAndIgnorePostgresOptionsForSchema)
end end
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -54,6 +54,7 @@ description: 'Learn how to contribute to GitLab.' ...@@ -54,6 +54,7 @@ description: 'Learn how to contribute to GitLab.'
- [Guidelines for reusing abstractions](reusing_abstractions.md) - [Guidelines for reusing abstractions](reusing_abstractions.md)
- [DeclarativePolicy framework](policies.md) - [DeclarativePolicy framework](policies.md)
- [Geo development](geo.md) - [Geo development](geo.md)
- [Switching to Rails 5](switching_to_rails5.md)
## Performance guides ## Performance guides
......
# Switching to Rails 5
GitLab switched recently to Rails 5. This is a big change (especially for backend development) and it introduces couple of temporary inconveniences.
## After the switch, I found a broken feature. What do I do?
Many fixes and tweaks were done to make our codebase compatible with Rails 5, but it's possible that not all issues were found. If you find an bug, please create an issue and assign it the ~rails5 label.
## It takes much longer to run CI pipelines that build GitLab. Why?
We are temporarily running CI pipelines with Rails 4 and 5 so that we ensure we remain compatible with Rails 4 in case we must revert back to Rails 4 from Rails 5 (this can double the duration of CI pipelines).
We might revert back to Rails 4 if we found a major issue we were unable to quickly fix.
Once we are sure we can stay with Rails 5, we will stop running CI pipelines with Rails 4.
## Can I skip running Rails 4 tests?
If you are sure that your merge request doesn't introduce any incompatibility, you can just include `norails4` anywhere in your branch name and Rails 4 tests will be skipped.
## CI is failing on my test with Rails 4. How can I debug it?
You can run specs locally with Rails 4 using the following command:
```sh
BUNDLE_GEMFILE=Gemfile.rails4 RAILS5=0 bundle exec rspec ...
```
# encoding: UTF-8
# This file is auto-generated from the current state of the database. Instead # This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to # of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition. # incrementally modify your database, and then regenerate this schema definition.
...@@ -16,41 +15,39 @@ ActiveRecord::Schema.define(version: 20180806020615) do ...@@ -16,41 +15,39 @@ ActiveRecord::Schema.define(version: 20180806020615) do
# These are extensions that must be enabled in order to support this database # These are extensions that must be enabled in order to support this database
enable_extension "plpgsql" enable_extension "plpgsql"
create_table "event_log_states", primary_key: "event_id", force: :cascade do |t| create_table "event_log_states", primary_key: "event_id", id: :bigint, force: :cascade do |t|
end end
create_table "file_registry", force: :cascade do |t| create_table "file_registry", force: :cascade do |t|
t.string "file_type", null: false t.string "file_type", null: false
t.integer "file_id", null: false t.integer "file_id", null: false
t.integer "bytes", limit: 8 t.bigint "bytes"
t.string "sha256" t.string "sha256"
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.boolean "success", default: false, null: false t.boolean "success", default: false, null: false
t.integer "retry_count" t.integer "retry_count"
t.datetime "retry_at" t.datetime "retry_at"
t.boolean "missing_on_primary", default: false, null: false t.boolean "missing_on_primary", default: false, null: false
t.index ["file_type", "file_id"], name: "index_file_registry_on_file_type_and_file_id", unique: true, using: :btree
t.index ["file_type"], name: "index_file_registry_on_file_type", using: :btree
t.index ["retry_at"], name: "index_file_registry_on_retry_at", using: :btree
t.index ["success"], name: "index_file_registry_on_success", using: :btree
end end
add_index "file_registry", ["file_type", "file_id"], name: "index_file_registry_on_file_type_and_file_id", unique: true, using: :btree
add_index "file_registry", ["file_type"], name: "index_file_registry_on_file_type", using: :btree
add_index "file_registry", ["retry_at"], name: "index_file_registry_on_retry_at", using: :btree
add_index "file_registry", ["success"], name: "index_file_registry_on_success", using: :btree
create_table "job_artifact_registry", force: :cascade do |t| create_table "job_artifact_registry", force: :cascade do |t|
t.datetime_with_timezone "created_at" t.datetime_with_timezone "created_at"
t.datetime_with_timezone "retry_at" t.datetime_with_timezone "retry_at"
t.integer "bytes", limit: 8 t.bigint "bytes"
t.integer "artifact_id" t.integer "artifact_id"
t.integer "retry_count" t.integer "retry_count"
t.boolean "success" t.boolean "success"
t.string "sha256" t.string "sha256"
t.boolean "missing_on_primary", default: false, null: false t.boolean "missing_on_primary", default: false, null: false
t.index ["artifact_id"], name: "index_job_artifact_registry_on_artifact_id", using: :btree
t.index ["retry_at"], name: "index_job_artifact_registry_on_retry_at", using: :btree
t.index ["success"], name: "index_job_artifact_registry_on_success", using: :btree
end end
add_index "job_artifact_registry", ["artifact_id"], name: "index_job_artifact_registry_on_artifact_id", using: :btree
add_index "job_artifact_registry", ["retry_at"], name: "index_job_artifact_registry_on_retry_at", using: :btree
add_index "job_artifact_registry", ["success"], name: "index_job_artifact_registry_on_success", using: :btree
create_table "project_registry", force: :cascade do |t| create_table "project_registry", force: :cascade do |t|
t.integer "project_id", null: false t.integer "project_id", null: false
t.datetime "last_repository_synced_at" t.datetime "last_repository_synced_at"
...@@ -82,26 +79,24 @@ ActiveRecord::Schema.define(version: 20180806020615) do ...@@ -82,26 +79,24 @@ ActiveRecord::Schema.define(version: 20180806020615) do
t.boolean "wiki_missing_on_primary" t.boolean "wiki_missing_on_primary"
t.integer "repository_verification_retry_count" t.integer "repository_verification_retry_count"
t.integer "wiki_verification_retry_count" t.integer "wiki_verification_retry_count"
t.index ["last_repository_successful_sync_at"], name: "idx_project_registry_synced_repositories_partial", where: "((resync_repository = false) AND (repository_retry_count IS NULL) AND (repository_verification_checksum_sha IS NOT NULL))", using: :btree
t.index ["last_repository_successful_sync_at"], name: "index_project_registry_on_last_repository_successful_sync_at", using: :btree
t.index ["last_repository_synced_at"], name: "index_project_registry_on_last_repository_synced_at", using: :btree
t.index ["project_id"], name: "idx_project_registry_on_repo_checksums_and_failure_partial", where: "((repository_verification_checksum_sha IS NULL) AND (last_repository_verification_failure IS NULL))", using: :btree
t.index ["project_id"], name: "idx_project_registry_on_repository_failure_partial", where: "(last_repository_verification_failure IS NOT NULL)", using: :btree
t.index ["project_id"], name: "idx_project_registry_on_wiki_checksums_and_failure_partial", where: "((wiki_verification_checksum_sha IS NULL) AND (last_wiki_verification_failure IS NULL))", using: :btree
t.index ["project_id"], name: "idx_project_registry_on_wiki_failure_partial", where: "(last_wiki_verification_failure IS NOT NULL)", using: :btree
t.index ["project_id"], name: "idx_repository_checksum_mismatch", where: "(repository_checksum_mismatch = true)", using: :btree
t.index ["project_id"], name: "idx_wiki_checksum_mismatch", where: "(wiki_checksum_mismatch = true)", using: :btree
t.index ["project_id"], name: "index_project_registry_on_project_id", unique: true, using: :btree
t.index ["repository_retry_at"], name: "index_project_registry_on_repository_retry_at", using: :btree
t.index ["repository_retry_count"], name: "idx_project_registry_failed_repositories_partial", where: "((repository_retry_count > 0) OR (last_repository_verification_failure IS NOT NULL) OR repository_checksum_mismatch)", using: :btree
t.index ["repository_retry_count"], name: "idx_project_registry_pending_repositories_partial", where: "((repository_retry_count IS NULL) AND (last_repository_successful_sync_at IS NOT NULL) AND ((resync_repository = true) OR ((repository_verification_checksum_sha IS NULL) AND (last_repository_verification_failure IS NULL))))", using: :btree
t.index ["repository_verification_checksum_sha"], name: "idx_project_registry_on_repository_checksum_sha_partial", where: "(repository_verification_checksum_sha IS NULL)", using: :btree
t.index ["resync_repository"], name: "index_project_registry_on_resync_repository", using: :btree
t.index ["resync_wiki"], name: "index_project_registry_on_resync_wiki", using: :btree
t.index ["wiki_retry_at"], name: "index_project_registry_on_wiki_retry_at", using: :btree
t.index ["wiki_verification_checksum_sha"], name: "idx_project_registry_on_wiki_checksum_sha_partial", where: "(wiki_verification_checksum_sha IS NULL)", using: :btree
end end
add_index "project_registry", ["last_repository_successful_sync_at"], name: "idx_project_registry_synced_repositories_partial", where: "((resync_repository = false) AND (repository_retry_count IS NULL) AND (repository_verification_checksum_sha IS NOT NULL))", using: :btree
add_index "project_registry", ["last_repository_successful_sync_at"], name: "idx_unsynced_repositories_partial", where: "(last_repository_successful_sync_at IS NULL)", using: :btree
add_index "project_registry", ["last_repository_successful_sync_at"], name: "index_project_registry_on_last_repository_successful_sync_at", using: :btree
add_index "project_registry", ["last_repository_synced_at"], name: "index_project_registry_on_last_repository_synced_at", using: :btree
add_index "project_registry", ["project_id"], name: "idx_project_registry_on_repo_checksums_and_failure_partial", where: "((repository_verification_checksum_sha IS NULL) AND (last_repository_verification_failure IS NULL))", using: :btree
add_index "project_registry", ["project_id"], name: "idx_project_registry_on_repository_failure_partial", where: "(last_repository_verification_failure IS NOT NULL)", using: :btree
add_index "project_registry", ["project_id"], name: "idx_project_registry_on_wiki_checksums_and_failure_partial", where: "((wiki_verification_checksum_sha IS NULL) AND (last_wiki_verification_failure IS NULL))", using: :btree
add_index "project_registry", ["project_id"], name: "idx_project_registry_on_wiki_failure_partial", where: "(last_wiki_verification_failure IS NOT NULL)", using: :btree
add_index "project_registry", ["project_id"], name: "idx_repository_checksum_mismatch", where: "(repository_checksum_mismatch = true)", using: :btree
add_index "project_registry", ["project_id"], name: "idx_wiki_checksum_mismatch", where: "(wiki_checksum_mismatch = true)", using: :btree
add_index "project_registry", ["project_id"], name: "index_project_registry_on_project_id", unique: true, using: :btree
add_index "project_registry", ["repository_retry_at"], name: "index_project_registry_on_repository_retry_at", using: :btree
add_index "project_registry", ["repository_retry_count"], name: "idx_project_registry_failed_repositories_partial", where: "((repository_retry_count > 0) OR (last_repository_verification_failure IS NOT NULL) OR repository_checksum_mismatch)", using: :btree
add_index "project_registry", ["repository_retry_count"], name: "idx_project_registry_pending_repositories_partial", where: "((repository_retry_count IS NULL) AND (last_repository_successful_sync_at IS NOT NULL) AND ((resync_repository = true) OR ((repository_verification_checksum_sha IS NULL) AND (last_repository_verification_failure IS NULL))))", using: :btree
add_index "project_registry", ["repository_verification_checksum_sha"], name: "idx_project_registry_on_repository_checksum_sha_partial", where: "(repository_verification_checksum_sha IS NULL)", using: :btree
add_index "project_registry", ["resync_repository"], name: "index_project_registry_on_resync_repository", using: :btree
add_index "project_registry", ["resync_wiki"], name: "index_project_registry_on_resync_wiki", using: :btree
add_index "project_registry", ["wiki_retry_at"], name: "index_project_registry_on_wiki_retry_at", using: :btree
add_index "project_registry", ["wiki_verification_checksum_sha"], name: "idx_project_registry_on_wiki_checksum_sha_partial", where: "(wiki_verification_checksum_sha IS NULL)", using: :btree
end end
#!/usr/bin/env bash
echo -e "=> Checking if Gemfile.rails4.lock is up-to-date...\\n"
cp Gemfile.rails4.lock Gemfile.rails4.lock.orig
BUNDLE_GEMFILE=Gemfile.rails4 bundle install "$BUNDLE_INSTALL_FLAGS"
diff -u Gemfile.rails4.lock.orig Gemfile.rails4.lock >/dev/null 2>&1
if [ $? == 1 ]
then
diff -u Gemfile.rails4.lock.orig Gemfile.rails4.lock
echo -e "\\n✖ ERROR: Gemfile.rails4.lock is not up-to-date!
Please run 'BUNDLE_GEMFILE=Gemfile.rails4 bundle install'\\n" >&2
exit 1
fi
echo "✔ Gemfile.rails4.lock is up-to-date"
exit 0
#!/usr/bin/env bash
echo -e "=> Checking if Gemfile.rails5.lock is up-to-date...\\n"
cp Gemfile.rails5.lock Gemfile.rails5.lock.orig
BUNDLE_GEMFILE=Gemfile.rails5 bundle install "$BUNDLE_INSTALL_FLAGS"
diff -u Gemfile.rails5.lock.orig Gemfile.rails5.lock >/dev/null 2>&1
if [ $? == 1 ]
then
diff -u Gemfile.rails5.lock.orig Gemfile.rails5.lock
echo -e "\\n✖ ERROR: Gemfile.rails5.lock is not up-to-date!
Please run 'BUNDLE_GEMFILE=Gemfile.rails5 bundle install'\\n" >&2
exit 1
fi
echo "✔ Gemfile.rails5.lock is up-to-date"
exit 0
...@@ -1338,7 +1338,12 @@ describe Gitlab::Database::MigrationHelpers do ...@@ -1338,7 +1338,12 @@ describe Gitlab::Database::MigrationHelpers do
end end
describe '#index_exists_by_name?' do describe '#index_exists_by_name?' do
it 'returns true if an index exists' do # TODO: remove rails5-only after removing rails4 tests
# rails 4 can not handle multiple indexes on the same column set if
# index was added by 't.index' - t.index is used by default in schema.rb in
# rails 5. Let's run this test only in rails 5 env:
# see https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/21492#note_113602758
it 'returns true if an index exists', :rails5 do
expect(model.index_exists_by_name?(:projects, 'index_projects_on_path')) expect(model.index_exists_by_name?(:projects, 'index_projects_on_path'))
.to be_truthy .to be_truthy
end end
......
...@@ -240,7 +240,12 @@ describe Gitlab::GithubImport::Importer::PullRequestImporter, :clean_gitlab_redi ...@@ -240,7 +240,12 @@ describe Gitlab::GithubImport::Importer::PullRequestImporter, :clean_gitlab_redi
.and_return(user.id) .and_return(user.id)
end end
it 'returns the existing merge request' do # TODO: remove rails5-only after removing rails4 tests
# rails 4 can not handle multiple indexes on the same column set if
# index was added by 't.index' - t.index is used by default in schema.rb in
# rails 5. Let's run this test only in rails 5 env:
# see https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/21492#note_113602758
it 'returns the existing merge request', :rails5 do
mr1, exists1 = importer.create_merge_request mr1, exists1 = importer.create_merge_request
mr2, exists2 = importer.create_merge_request mr2, exists2 = importer.create_merge_request
......
...@@ -237,6 +237,10 @@ RSpec.configure do |config| ...@@ -237,6 +237,10 @@ RSpec.configure do |config|
example.run if Gitlab::Database.mysql? example.run if Gitlab::Database.mysql?
end end
config.around(:each, :rails5) do |example|
example.run if Gitlab.rails5?
end
# This makes sure the `ApplicationController#can?` method is stubbed with the # This makes sure the `ApplicationController#can?` method is stubbed with the
# original implementation for all view specs. # original implementation for all view specs.
config.before(:each, type: :view) do config.before(:each, type: :view) do
......
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