rubocop: bump rubocop-rails

also fix a lint error that snuck in before it was enforced, and clean up
the api_scope_mapper_template.erb so that the generated file lints
cleanly

Change-Id: I2491fc9b9753217a6ebaf79fc2404151f9d2ecdf
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276968
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
This commit is contained in:
Cody Cutrer 2021-10-27 17:07:03 -06:00
parent 7eb97f4db5
commit c4f7a15dc3
3 changed files with 5 additions and 7 deletions

View File

@ -34,7 +34,7 @@ group :test do
gem 'unicode-display_width', '2.1.0', require: false
gem 'rubocop-canvas', require: false, path: "gems/rubocop-canvas"
gem 'rainbow', '3.0.0', require: false
gem 'rubocop-rails', '2.12.3', require: false
gem 'rubocop-rails', '2.12.4', require: false
gem 'rubocop-rake', '0.6.0', require: false
gem 'rubocop-rspec', '2.5.0', require: false
gem 'rubocop-performance', '1.11.5', require: false

View File

@ -36,7 +36,7 @@ module Quizzes
# By including this module in the root quizzes module, we'll fire off explicit
# loading for each of the constants we care about as soon as we start referencing the Quizzes module
# anywhere, which should be early enough to prevent FS read order confusion.
def self.included(base)
def self.included(_base)
Preloader.preload_quiz_questions
end
end

View File

@ -27,7 +27,6 @@
###########################################################################################
class ApiScopeMapper
SCOPE_MAP = {
<% mapping.each_with_index do |(controller, children), i| -%>
<%="#{controller}: {" %>
@ -39,9 +38,9 @@ class ApiScopeMapper
}.freeze
RESOURCE_NAMES = {
oauth2: -> {I18n.t('OAuth 2')},
peer_services: -> {I18n.t('Peer Services')},
<%=resource_lookup.map { |k, v| "#{k}: -> {I18n.t('#{v}')}"}.join(",\n " ) %>
oauth2: -> { I18n.t('OAuth 2') },
peer_services: -> { I18n.t('Peer Services') },
<%=resource_lookup.map { |k, v| "#{k}: -> { I18n.t('#{v}') }"}.join(",\n " ) %>
}.freeze
def self.lookup_resource(controller, action)
@ -52,5 +51,4 @@ class ApiScopeMapper
def self.name_for_resource(resource)
RESOURCE_NAMES[resource]&.call
end
end