From 41a0641fe457bf2f4b7b2236c3fcdb3be5a4f6f4 Mon Sep 17 00:00:00 2001 From: "murilo.paiva" Date: Wed, 23 Mar 2022 09:42:50 -0600 Subject: [PATCH] Upgrade Rollcall to Rails 6.0 closes CAS-635 Test plan: - Everything shines. Change-Id: I748325584af5ff7661c235a6a2d9c6d96ed4c2c6 Reviewed-on: https://gerrit.instructure.com/c/rollcall-attendance/+/287798 Reviewed-by: Murilo Paiva Reviewed-by: Reis Joao Reviewed-by: Ricardo Oliveira Reviewed-by: Augusto Barreira Product-Review: Reis Joao Product-Review: Ricardo Oliveira Product-Review: Augusto Barreira QA-Review: Pedro Gutierrez Tested-by: Service Cloud Jenkins --- Gemfile | 10 +- Gemfile.lock | 183 ++++++++++++++------------- app/controllers/badges_controller.rb | 2 +- 3 files changed, 102 insertions(+), 93 deletions(-) diff --git a/Gemfile b/Gemfile index 4b79c7f..4d858ec 100644 --- a/Gemfile +++ b/Gemfile @@ -19,15 +19,15 @@ source 'https://rubygems.org' gem 'bundler', '>= 1.7.10' -gem 'rails', '~> 5.2.6' +gem 'rails', '6.0.4.2' gem 'rack', '~> 2.1' gem 'bootsnap', '~> 1.0', require: false gem 'thin', '~> 1.0' gem 'ims-lti', '~> 1.0', require: 'ims' -gem 'lti_provider_engine', '~> 1.1.0', require: 'lti_provider' -gem 'canvas_oauth_engine', '~> 2.1.3', require: 'canvas_oauth' +gem 'lti_provider_engine', '~> 1.2.0', require: 'lti_provider' +gem 'canvas_oauth_engine', '~> 2.2.0', require: 'canvas_oauth' gem 'httparty', '~> 0.15' gem 'aws-sdk-s3', '~> 1.0' @@ -41,7 +41,7 @@ gem 'resque-retry', '~> 1.0' gem 'resque-sentry', '~> 1.0' gem 'chronic', '~> 0.10' gem 'json', '~> 2.0' -gem 'responders', '~> 2.0' +gem 'responders', '3.0.1' gem 'sentry-raven', '~> 2.0' gem 'inst_statsd', '~> 2.1.4' @@ -71,7 +71,7 @@ group :development, :test do gem 'rspec-collection_matchers' gem 'jasmine-rails' gem 'phantomjs', '1.9.7.1' - gem 'guard-jasmine', '~> 2.0' + gem 'guard-jasmine', '1.19.2' # We can relax this brakeman dependency after we have deployed a hybrid # cookie serializer and allowed a chance for cookies to be stored as JSON. gem 'brakeman', '4.5.1', require: false diff --git a/Gemfile.lock b/Gemfile.lock index 84781b8..8706aba 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,50 +1,63 @@ GEM remote: https://rubygems.org/ specs: - actioncable (5.2.6) - actionpack (= 5.2.6) + actioncable (6.0.4.2) + actionpack (= 6.0.4.2) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailer (5.2.6) - actionpack (= 5.2.6) - actionview (= 5.2.6) - activejob (= 5.2.6) + actionmailbox (6.0.4.2) + actionpack (= 6.0.4.2) + activejob (= 6.0.4.2) + activerecord (= 6.0.4.2) + activestorage (= 6.0.4.2) + activesupport (= 6.0.4.2) + mail (>= 2.7.1) + actionmailer (6.0.4.2) + actionpack (= 6.0.4.2) + actionview (= 6.0.4.2) + activejob (= 6.0.4.2) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (5.2.6) - actionview (= 5.2.6) - activesupport (= 5.2.6) + actionpack (6.0.4.2) + actionview (= 6.0.4.2) + activesupport (= 6.0.4.2) rack (~> 2.0, >= 2.0.8) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionview (5.2.6) - activesupport (= 5.2.6) + rails-html-sanitizer (~> 1.0, >= 1.2.0) + actiontext (6.0.4.2) + actionpack (= 6.0.4.2) + activerecord (= 6.0.4.2) + activestorage (= 6.0.4.2) + activesupport (= 6.0.4.2) + nokogiri (>= 1.8.5) + actionview (6.0.4.2) + activesupport (= 6.0.4.2) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.0, >= 1.0.3) - activejob (5.2.6) - activesupport (= 5.2.6) + rails-html-sanitizer (~> 1.1, >= 1.2.0) + activejob (6.0.4.2) + activesupport (= 6.0.4.2) globalid (>= 0.3.6) - activemodel (5.2.6) - activesupport (= 5.2.6) - activerecord (5.2.6) - activemodel (= 5.2.6) - activesupport (= 5.2.6) - arel (>= 9.0) - activestorage (5.2.6) - actionpack (= 5.2.6) - activerecord (= 5.2.6) + activemodel (6.0.4.2) + activesupport (= 6.0.4.2) + activerecord (6.0.4.2) + activemodel (= 6.0.4.2) + activesupport (= 6.0.4.2) + activestorage (6.0.4.2) + actionpack (= 6.0.4.2) + activejob (= 6.0.4.2) + activerecord (= 6.0.4.2) marcel (~> 1.0.0) - activesupport (5.2.6) + activesupport (6.0.4.2) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 0.7, < 2) minitest (~> 5.1) tzinfo (~> 1.1) + zeitwerk (~> 2.2, >= 2.2.2) addressable (2.7.0) public_suffix (>= 2.0.2, < 5.0) - arel (9.0.0) aroi (1.0.0) activerecord (>= 5.2) activesupport (>= 5.2) @@ -74,10 +87,11 @@ GEM brakeman (4.5.1) builder (3.2.4) byebug (11.1.3) - canvas_oauth_engine (2.1.3) + canvas_oauth_engine (2.2.0) httparty (>= 0.17.0) link_header (= 0.0.8) - rails (>= 4.2, < 5.3) + rails (>= 4.2, <= 6.1.4.2) + sprockets (= 3.7.2) capybara (2.18.0) addressable mini_mime (>= 0.1.3) @@ -91,8 +105,7 @@ GEM capybara-webkit (1.15.1) capybara (>= 2.3, < 4.0) json - childprocess (0.9.0) - ffi (~> 1.0, >= 1.0.11) + childprocess (4.1.0) chronic (0.10.2) coderay (1.1.3) coffee-rails (5.0.0) @@ -102,7 +115,7 @@ GEM coffee-script-source execjs coffee-script-source (1.12.2) - concurrent-ruby (1.1.8) + concurrent-ruby (1.1.10) connection_pool (2.2.3) crack (0.4.5) rexml @@ -171,8 +184,8 @@ GEM font-awesome-rails (4.7.0.7) railties (>= 3.2, < 7) formatador (0.2.5) - globalid (0.4.2) - activesupport (>= 4.2.0) + globalid (1.0.0) + activesupport (>= 5.0) guard (2.16.2) formatador (>= 0.2.4) listen (>= 2.7, < 4.0) @@ -183,13 +196,11 @@ GEM shellany (~> 0.0) thor (>= 0.18.1) guard-compat (1.2.1) - guard-jasmine (2.1.0) - childprocess (~> 0.5) - guard (~> 2.14) - guard-compat (~> 1.2) - jasmine (~> 2.4) - multi_json (~> 1.12) - thor (~> 0.19) + guard-jasmine (1.19.2) + childprocess + guard (>= 2.0.0) + multi_json + thor tilt guard-rspec (4.7.3) guard (~> 2.1) @@ -199,7 +210,7 @@ GEM httparty (0.18.1) mime-types (~> 3.0) multi_xml (>= 0.5.2) - i18n (1.8.10) + i18n (1.10.0) concurrent-ruby (~> 1.0) ims-lti (1.2.4) builder (>= 1.0, < 4.0) @@ -208,11 +219,6 @@ GEM aroi (>= 0.0.7) dogstatsd-ruby (~> 4.2) statsd-ruby (~> 1.0) - jasmine (2.99.0) - jasmine-core (>= 2.99.0, < 3.0.0) - phantomjs - rack (>= 1.2.1) - rake jasmine-core (2.99.2) jasmine-rails (0.15.0) jasmine-core (>= 1.3, < 4.0) @@ -235,26 +241,26 @@ GEM listen (3.5.1) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) - loofah (2.9.1) + loofah (2.15.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) - lti_provider_engine (1.1.0) + lti_provider_engine (1.2.0) ims-lti (~> 1.2) - rails (>= 4.2, < 5.3) + rails (>= 4.2, <= 6.1.4.2) lumberjack (1.2.8) mail (2.7.1) mini_mime (>= 0.1.1) - marcel (1.0.1) + marcel (1.0.2) method_source (1.0.0) middleware (0.1.0) mime-types (3.3.1) mime-types-data (~> 3.2015) mime-types-data (3.2021.0225) - mini_mime (1.1.0) - mini_portile2 (2.5.1) + mini_mime (1.1.2) + mini_portile2 (2.8.0) mini_racer (0.3.1) libv8 (~> 8.4.255) - minitest (5.14.4) + minitest (5.15.0) momentjs-rails (2.20.1) railties (>= 3.1) mono_logger (1.1.1) @@ -267,9 +273,9 @@ GEM ruby2_keywords (~> 0.0.1) mysql2 (0.5.3) nenv (0.3.0) - nio4r (2.5.7) - nokogiri (1.11.3) - mini_portile2 (~> 2.5.0) + nio4r (2.5.8) + nokogiri (1.13.3) + mini_portile2 (~> 2.8.0) racc (~> 1.4) notiffany (0.1.3) nenv (~> 0.1) @@ -293,24 +299,26 @@ GEM coderay (~> 1.1) method_source (~> 1.0) public_suffix (4.0.6) - racc (1.5.2) + racc (1.6.0) rack (2.2.3) rack-protection (2.1.0) rack rack-test (1.1.0) rack (>= 1.0, < 3) - rails (5.2.6) - actioncable (= 5.2.6) - actionmailer (= 5.2.6) - actionpack (= 5.2.6) - actionview (= 5.2.6) - activejob (= 5.2.6) - activemodel (= 5.2.6) - activerecord (= 5.2.6) - activestorage (= 5.2.6) - activesupport (= 5.2.6) + rails (6.0.4.2) + actioncable (= 6.0.4.2) + actionmailbox (= 6.0.4.2) + actionmailer (= 6.0.4.2) + actionpack (= 6.0.4.2) + actiontext (= 6.0.4.2) + actionview (= 6.0.4.2) + activejob (= 6.0.4.2) + activemodel (= 6.0.4.2) + activerecord (= 6.0.4.2) + activestorage (= 6.0.4.2) + activesupport (= 6.0.4.2) bundler (>= 1.3.0) - railties (= 5.2.6) + railties (= 6.0.4.2) sprockets-rails (>= 2.0.0) rails-backbone (0.7.2) coffee-script (~> 2.2.0) @@ -323,16 +331,16 @@ GEM rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) - rails-html-sanitizer (1.3.0) + rails-html-sanitizer (1.4.2) loofah (~> 2.3) - railties (5.2.6) - actionpack (= 5.2.6) - activesupport (= 5.2.6) + railties (6.0.4.2) + actionpack (= 6.0.4.2) + activesupport (= 6.0.4.2) method_source rake (>= 0.8.7) - thor (>= 0.19.0, < 2.0) + thor (>= 0.20.3, < 2.0) rainbow (3.0.0) - rake (13.0.3) + rake (13.0.6) rb-fsevent (0.10.4) rb-inotify (0.10.1) ffi (~> 1.0) @@ -349,9 +357,9 @@ GEM redis (~> 4.0) request_store (1.5.0) rack (>= 1.4) - responders (2.4.1) - actionpack (>= 4.2.0, < 6.0) - railties (>= 4.2.0, < 6.0) + responders (3.0.1) + actionpack (>= 5.0) + railties (>= 5.0) resque (1.27.4) mono_logger (~> 1.0) multi_json (~> 1.0) @@ -445,9 +453,9 @@ GEM rack (> 1, < 3) sprockets-helpers (1.4.0) sprockets (>= 2.2) - sprockets-rails (3.2.2) - actionpack (>= 4.0) - activesupport (>= 4.0) + sprockets-rails (3.4.2) + actionpack (>= 5.2) + activesupport (>= 5.2) sprockets (>= 3.0.0) statsd-ruby (1.5.0) syck (1.4.0) @@ -459,7 +467,7 @@ GEM daemons (~> 1.0, >= 1.0.9) eventmachine (~> 1.0, >= 1.0.4) rack (>= 1, < 3) - thor (0.20.3) + thor (1.2.1) thread_safe (0.3.6) tilt (2.0.10) tzinfo (1.2.9) @@ -473,12 +481,13 @@ GEM addressable (>= 2.3.6) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) - websocket-driver (0.7.3) + websocket-driver (0.7.5) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) will_paginate (3.1.8) xpath (3.2.0) nokogiri (~> 1.8) + zeitwerk (2.5.4) PLATFORMS ruby @@ -489,7 +498,7 @@ DEPENDENCIES brakeman (= 4.5.1) bundler (>= 1.7.10) byebug - canvas_oauth_engine (~> 2.1.3) + canvas_oauth_engine (~> 2.2.0) capybara (= 2.18.0) capybara-screenshot capybara-webkit (= 1.15.1) @@ -500,7 +509,7 @@ DEPENDENCIES database_cleaner factory_bot_rails font-awesome-rails (~> 4.7.0) - guard-jasmine (~> 2.0) + guard-jasmine (= 1.19.2) guard-rspec httparty (~> 0.15) ims-lti (~> 1.0) @@ -510,7 +519,7 @@ DEPENDENCIES jquery-ui-rails (~> 6.0) json (~> 2.0) jwt (~> 1.5.4) - lti_provider_engine (~> 1.1.0) + lti_provider_engine (~> 1.2.0) mini_racer (~> 0.2) minitest momentjs-rails (~> 2.11, >= 2.11.1) @@ -519,13 +528,13 @@ DEPENDENCIES pg (~> 1.0) phantomjs (= 1.9.7.1) rack (~> 2.1) - rails (~> 5.2.6) + rails (= 6.0.4.2) rails-backbone (~> 0.7.2) rails-controller-testing react-rails (~> 1.7) redis (~> 4.0) redis-objects (~> 1.0) - responders (~> 2.0) + responders (= 3.0.1) resque (~> 1.0) resque-retry (~> 1.0) resque-scheduler (~> 4.3.0) diff --git a/app/controllers/badges_controller.rb b/app/controllers/badges_controller.rb index 100251f..30bd8b3 100644 --- a/app/controllers/badges_controller.rb +++ b/app/controllers/badges_controller.rb @@ -52,7 +52,7 @@ def update (load_and_authorize_course(badge.course_id) || load_and_authorize_account(badge.account_id, tool_consumer_instance_guid) ) - badge.update_attributes(update_badge_params) + badge.update(update_badge_params) respond_with badge else head :not_acceptable