Skip to content

Commit

Permalink
Updated Rails to V6 & various code fixes following update
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminfaure committed May 9, 2022
1 parent 1d09e1d commit e540504
Show file tree
Hide file tree
Showing 15 changed files with 249 additions and 92 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ ruby '>= 2.6.3'
# ===========#

# Full-stack web application framework. (http://rubyonrails.org)
gem 'rails', '~> 5.2'
gem 'rails', '~> 6.1'

# TODO: Remove this once Rails addresses the issue with its dependency on mimemagic. Mimemagic had
# an MIT license but was using some incompatible GPL license code.
Expand Down
173 changes: 96 additions & 77 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,50 +1,68 @@
GEM
remote: https://rubygems.org/
specs:
actioncable (5.2.7)
actionpack (= 5.2.7)
actioncable (6.1.5.1)
actionpack (= 6.1.5.1)
activesupport (= 6.1.5.1)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailer (5.2.7)
actionpack (= 5.2.7)
actionview (= 5.2.7)
activejob (= 5.2.7)
actionmailbox (6.1.5.1)
actionpack (= 6.1.5.1)
activejob (= 6.1.5.1)
activerecord (= 6.1.5.1)
activestorage (= 6.1.5.1)
activesupport (= 6.1.5.1)
mail (>= 2.7.1)
actionmailer (6.1.5.1)
actionpack (= 6.1.5.1)
actionview (= 6.1.5.1)
activejob (= 6.1.5.1)
activesupport (= 6.1.5.1)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (5.2.7)
actionview (= 5.2.7)
activesupport (= 5.2.7)
rack (~> 2.0, >= 2.0.8)
actionpack (6.1.5.1)
actionview (= 6.1.5.1)
activesupport (= 6.1.5.1)
rack (~> 2.0, >= 2.0.9)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (5.2.7)
activesupport (= 5.2.7)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actiontext (6.1.5.1)
actionpack (= 6.1.5.1)
activerecord (= 6.1.5.1)
activestorage (= 6.1.5.1)
activesupport (= 6.1.5.1)
nokogiri (>= 1.8.5)
actionview (6.1.5.1)
activesupport (= 6.1.5.1)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
activejob (5.2.7)
activesupport (= 5.2.7)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
activejob (6.1.5.1)
activesupport (= 6.1.5.1)
globalid (>= 0.3.6)
activemodel (5.2.7)
activesupport (= 5.2.7)
activerecord (5.2.7)
activemodel (= 5.2.7)
activesupport (= 5.2.7)
arel (>= 9.0)
activemodel (6.1.5.1)
activesupport (= 6.1.5.1)
activerecord (6.1.5.1)
activemodel (= 6.1.5.1)
activesupport (= 6.1.5.1)
activerecord_json_validator (2.1.0)
activerecord (>= 4.2.0, < 8)
json_schemer (~> 0.2.18)
activestorage (5.2.7)
actionpack (= 5.2.7)
activerecord (= 5.2.7)
marcel (~> 1.0.0)
activesupport (5.2.7)
activestorage (6.1.5.1)
actionpack (= 6.1.5.1)
activejob (= 6.1.5.1)
activerecord (= 6.1.5.1)
activesupport (= 6.1.5.1)
marcel (~> 1.0)
mini_mime (>= 1.1.0)
activesupport (6.1.5.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
zeitwerk (~> 2.3)
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
annotate (3.2.0)
Expand All @@ -53,9 +71,8 @@ GEM
annotate_gem (0.0.14)
bundler (>= 1.1)
api-pagination (4.8.2)
arel (9.0.0)
ast (2.4.2)
autoprefixer-rails (10.4.2.0)
autoprefixer-rails (10.4.7.0)
execjs (~> 2)
bcrypt (3.1.17)
better_errors (2.9.1)
Expand All @@ -67,7 +84,7 @@ GEM
debug_inspector (>= 0.0.1)
bootsnap (1.11.1)
msgpack (~> 1.2)
brakeman (5.2.1)
brakeman (5.2.3)
builder (3.2.4)
bullet (7.0.1)
activesupport (>= 3.0.0)
Expand Down Expand Up @@ -136,7 +153,7 @@ GEM
ecma-re-validator (0.4.0)
regexp_parser (~> 2.2)
erubi (1.10.0)
excon (0.92.2)
excon (0.92.3)
execjs (2.8.1)
factory_bot (6.2.1)
activesupport (>= 5.0.0)
Expand All @@ -148,7 +165,7 @@ GEM
faraday (2.2.0)
faraday-net_http (~> 2.0)
ruby2_keywords (>= 0.0.4)
faraday-net_http (2.0.1)
faraday-net_http (2.0.2)
ffi (1.15.5)
flag_shih_tzu (0.3.23)
fog-aws (3.13.0)
Expand Down Expand Up @@ -210,7 +227,7 @@ GEM
actionview (>= 5.0.0)
activesupport (>= 5.0.0)
json (2.6.1)
json_schemer (0.2.20)
json_schemer (0.2.21)
ecma-re-validator (~> 0.3)
hana (~> 1.3)
regexp_parser (~> 2.0)
Expand All @@ -236,7 +253,7 @@ GEM
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
locale (2.1.3)
loofah (2.16.0)
loofah (2.17.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
lumberjack (1.2.8)
Expand All @@ -254,14 +271,14 @@ GEM
mini_mime (1.1.2)
mini_portile2 (2.8.0)
minitest (5.15.0)
mocha (1.13.0)
msgpack (1.5.0)
mocha (1.14.0)
msgpack (1.5.1)
multi_json (1.15.0)
multi_xml (0.6.0)
mysql2 (0.5.3)
mysql2 (0.5.4)
nenv (0.3.0)
nio4r (2.5.8)
nokogiri (1.13.3)
nokogiri (1.13.5)
mini_portile2 (~> 2.8.0)
racc (~> 1.4)
notiffany (0.1.3)
Expand All @@ -273,9 +290,9 @@ GEM
multi_json (~> 1.3)
multi_xml (~> 0.5)
rack (>= 1.2, < 3)
omniauth (2.0.4)
omniauth (2.1.0)
hashie (>= 3.4.6)
rack (>= 1.6.2, < 3)
rack (>= 2.2.3)
rack-protection
omniauth-oauth2 (1.7.2)
oauth2 (~> 1.4)
Expand All @@ -291,7 +308,7 @@ GEM
options (2.3.2)
orm_adapter (0.5.0)
parallel (1.22.1)
parser (3.1.1.0)
parser (3.1.2.0)
ast (~> 2.4.1)
pg (1.3.5)
prime (0.1.2)
Expand All @@ -303,7 +320,7 @@ GEM
pry (0.14.1)
coderay (~> 1.1)
method_source (~> 1.0)
public_suffix (4.0.6)
public_suffix (4.0.7)
puma (5.6.4)
nio4r (~> 2.0)
pundit (2.2.0)
Expand All @@ -320,18 +337,20 @@ GEM
rack
rack-test (1.1.0)
rack (>= 1.0, < 3)
rails (5.2.7)
actioncable (= 5.2.7)
actionmailer (= 5.2.7)
actionpack (= 5.2.7)
actionview (= 5.2.7)
activejob (= 5.2.7)
activemodel (= 5.2.7)
activerecord (= 5.2.7)
activestorage (= 5.2.7)
activesupport (= 5.2.7)
bundler (>= 1.3.0)
railties (= 5.2.7)
rails (6.1.5.1)
actioncable (= 6.1.5.1)
actionmailbox (= 6.1.5.1)
actionmailer (= 6.1.5.1)
actionpack (= 6.1.5.1)
actiontext (= 6.1.5.1)
actionview (= 6.1.5.1)
activejob (= 6.1.5.1)
activemodel (= 6.1.5.1)
activerecord (= 6.1.5.1)
activestorage (= 6.1.5.1)
activesupport (= 6.1.5.1)
bundler (>= 1.15.0)
railties (= 6.1.5.1)
sprockets-rails (>= 2.0.0)
rails-controller-testing (1.0.5)
actionpack (>= 5.0.1.rc1)
Expand All @@ -342,20 +361,20 @@ GEM
nokogiri (>= 1.6)
rails-html-sanitizer (1.4.2)
loofah (~> 2.3)
railties (5.2.7)
actionpack (= 5.2.7)
activesupport (= 5.2.7)
railties (6.1.5.1)
actionpack (= 6.1.5.1)
activesupport (= 6.1.5.1)
method_source
rake (>= 0.8.7)
thor (>= 0.19.0, < 2.0)
rake (>= 12.2)
thor (~> 1.0)
rainbow (3.1.1)
rake (13.0.6)
rb-fsevent (0.11.1)
rb-inotify (0.10.1)
ffi (~> 1.0)
recaptcha (5.9.0)
json
regexp_parser (2.2.1)
regexp_parser (2.3.1)
responders (3.0.1)
actionpack (>= 5.0)
railties (>= 5.0)
Expand All @@ -375,7 +394,7 @@ GEM
rspec-mocks (3.11.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.11.0)
rspec-rails (5.1.1)
rspec-rails (5.1.2)
actionpack (>= 5.2)
activesupport (>= 5.2)
railties (>= 5.2)
Expand All @@ -384,16 +403,16 @@ GEM
rspec-mocks (~> 3.10)
rspec-support (~> 3.10)
rspec-support (3.11.0)
rubocop (1.26.1)
rubocop (1.28.2)
parallel (~> 1.10)
parser (>= 3.1.0.0)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml
rubocop-ast (>= 1.16.0, < 2.0)
rubocop-ast (>= 1.17.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.16.0)
rubocop-ast (1.17.0)
parser (>= 3.1.1.0)
rubocop-i18n (3.0.0)
rubocop (~> 1.0)
Expand All @@ -406,7 +425,7 @@ GEM
rubocop (>= 1.7.0, < 2.0)
rubocop-rake (0.6.0)
rubocop (~> 1.0)
rubocop-rspec (2.9.0)
rubocop-rspec (2.10.0)
rubocop (~> 1.19)
rubocop-thread_safety (0.4.4)
rubocop (>= 0.53.0)
Expand Down Expand Up @@ -451,26 +470,25 @@ GEM
sprockets (>= 3.0.0)
text (1.3.1)
thor (1.2.1)
thread_safe (0.3.6)
tilt (2.0.10)
tomparse (0.4.2)
translation (1.31)
gettext (~> 3.2, >= 3.2.5, <= 3.4.2)
turbolinks (5.2.1)
turbolinks-source (~> 5.2)
turbolinks-source (5.2.0)
tzinfo (1.2.9)
thread_safe (~> 0.1)
tzinfo (2.0.4)
concurrent-ruby (~> 1.0)
unicode-display_width (2.1.0)
uniform_notifier (1.16.0)
uri_template (0.7.0)
warden (1.2.9)
rack (>= 2.0.9)
web-console (3.7.0)
actionview (>= 5.0)
activemodel (>= 5.0)
web-console (4.2.0)
actionview (>= 6.0.0)
activemodel (>= 6.0.0)
bindex (>= 0.4.0)
railties (>= 5.0)
railties (>= 6.0.0)
webdrivers (4.7.0)
nokogiri (~> 1.6)
rubyzip (>= 1.3.0)
Expand All @@ -488,7 +506,7 @@ GEM
websocket-driver (0.7.5)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
wicked_pdf (2.1.0)
wicked_pdf (2.6.2)
activesupport
wkhtmltopdf-binary (0.12.6.5)
xpath (3.2.0)
Expand All @@ -499,6 +517,7 @@ GEM
tomparse (>= 0.4.0)
yard
zaru (0.3.0)
zeitwerk (2.5.4)

PLATFORMS
ruby
Expand Down Expand Up @@ -554,7 +573,7 @@ DEPENDENCIES
pundit
pundit-matchers
rack-mini-profiler
rails (~> 5.2)
rails (~> 6.1)
rails-controller-testing
recaptcha
rollbar
Expand Down
1 change: 1 addition & 0 deletions app/controllers/org_admin/templates_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ def edit
'question_options.number')
.select('phases.title',
'phases.description',
'phases.modifiable',
'sections.title',
'questions.text',
'question_options.text')
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/plans_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def create
def show
@plan = Plan.includes(
template: { phases: { sections: { questions: :answers } } },
plans_guidance_groups: { guidance_group: :guidances }
guidance_groups: :guidances
).find(params[:id])
authorize @plan

Expand Down
1 change: 1 addition & 0 deletions bin/rails
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env ruby
load File.expand_path("spring", __dir__)
APP_PATH = File.expand_path('../config/application', __dir__)
require_relative '../config/boot'
require 'rails/commands'
1 change: 1 addition & 0 deletions bin/rake
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env ruby
load File.expand_path("spring", __dir__)
require_relative '../config/boot'
require 'rake'
Rake.application.run
Loading

0 comments on commit e540504

Please sign in to comment.