canvas-lms/gems
Cody Cutrer 69e5ebc777 bundle update rubocop
and apply new cop 99% Style/SuperArguments

and a couple Layout/EmptyComment and Style/ArgumentsForwarding that
are found by fixes in those cops

Change-Id: Icc0af9c8065f035bca43868b564f73e8776052f2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/348626
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jake Oeding <jake.oeding@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Build-Review: Cody Cutrer <cody@instructure.com>
2024-05-30 16:20:52 +00:00
..
activesupport-suspend_callbacks Revert "Revert "bundle update --bundler"" 2024-05-29 16:33:13 +00:00
acts_as_list Revert "Revert "bundle update --bundler"" 2024-05-29 16:33:13 +00:00
adheres_to_policy Revert "Revert "bundle update --bundler"" 2024-05-29 16:33:13 +00:00
attachment_fu rename `File.mime_type?` as `File.mime_type` 2024-04-24 19:24:46 +00:00
autoextend Revert "Revert "bundle update --bundler"" 2024-05-29 16:33:13 +00:00
bookmarked_collection bundle update rubocop 2024-05-30 16:20:52 +00:00
broadcast_policy Revert "Revert "bundle update --bundler"" 2024-05-29 16:33:13 +00:00
canvas_breach_mitigation Revert "Revert "bundle update --bundler"" 2024-05-29 16:33:13 +00:00
canvas_cache bundle update rubocop 2024-05-30 16:20:52 +00:00
canvas_cassandra Revert "Revert "bundle update --bundler"" 2024-05-29 16:33:13 +00:00
canvas_color Revert "Revert "bundle update --bundler"" 2024-05-29 16:33:13 +00:00
canvas_crummy Revert "Revert "bundle update --bundler"" 2024-05-29 16:33:13 +00:00
canvas_dynamodb Revert "Revert "bundle update --bundler"" 2024-05-29 16:33:13 +00:00
canvas_errors Revert "Revert "bundle update --bundler"" 2024-05-29 16:33:13 +00:00
canvas_ext Revert "Revert "bundle update --bundler"" 2024-05-29 16:33:13 +00:00
canvas_http Revert "Revert "bundle update --bundler"" 2024-05-29 16:33:13 +00:00
canvas_kaltura Revert "Revert "bundle update --bundler"" 2024-05-29 16:33:13 +00:00
canvas_mimetype_fu Revert "Revert "bundle update --bundler"" 2024-05-29 16:33:13 +00:00
canvas_panda_pub Revert "Revert "bundle update --bundler"" 2024-05-29 16:33:13 +00:00
canvas_partman Revert "Revert "bundle update --bundler"" 2024-05-29 16:33:13 +00:00
canvas_quiz_statistics Revert "Revert "bundle update --bundler"" 2024-05-29 16:33:13 +00:00
canvas_sanitize Revert "Revert "bundle update --bundler"" 2024-05-29 16:33:13 +00:00
canvas_security Revert "Revert "bundle update --bundler"" 2024-05-29 16:33:13 +00:00
canvas_slug Revert "Revert "bundle update --bundler"" 2024-05-29 16:33:13 +00:00
canvas_sort Revert "Revert "bundle update --bundler"" 2024-05-29 16:33:13 +00:00
canvas_stringex Revert "Revert "bundle update --bundler"" 2024-05-29 16:33:13 +00:00
canvas_text_helper Revert "Revert "bundle update --bundler"" 2024-05-29 16:33:13 +00:00
canvas_time Revert "Revert "bundle update --bundler"" 2024-05-29 16:33:13 +00:00
canvas_unzip Revert "Revert "bundle update --bundler"" 2024-05-29 16:33:13 +00:00
config_file Revert "Revert "bundle update --bundler"" 2024-05-29 16:33:13 +00:00
csv_diff Revert "Revert "bundle update --bundler"" 2024-05-29 16:33:13 +00:00
diigo Revert "Revert "bundle update --bundler"" 2024-05-29 16:33:13 +00:00
dr_diff Revert "Revert "bundle update --bundler"" 2024-05-29 16:33:13 +00:00
dynamic_settings bundle update rubocop 2024-05-30 16:20:52 +00:00
event_stream bundle update rubocop 2024-05-30 16:20:52 +00:00
google_drive Revert "Revert "bundle update --bundler"" 2024-05-29 16:33:13 +00:00
html_text_helper Revert "Revert "bundle update --bundler"" 2024-05-29 16:33:13 +00:00
i18n_extraction Revert "Revert "bundle update --bundler"" 2024-05-29 16:33:13 +00:00
i18n_tasks Revert "Revert "bundle update --bundler"" 2024-05-29 16:33:13 +00:00
incoming_mail_processor Revert "Revert "bundle update --bundler"" 2024-05-29 16:33:13 +00:00
json_token Revert "Revert "bundle update --bundler"" 2024-05-29 16:33:13 +00:00
legacy_multipart Revert "Revert "bundle update --bundler"" 2024-05-29 16:33:13 +00:00
live_events Revert "Revert "bundle update --bundler"" 2024-05-29 16:33:13 +00:00
lti-advantage Revert "Revert "bundle update --bundler"" 2024-05-29 16:33:13 +00:00
lti_outbound Revert "Revert "bundle update --bundler"" 2024-05-29 16:33:13 +00:00
paginated_collection Revert "Revert "bundle update --bundler"" 2024-05-29 16:33:13 +00:00
plugins bundle update rubocop 2024-05-30 16:20:52 +00:00
request_context Revert "Revert "bundle update --bundler"" 2024-05-29 16:33:13 +00:00
rubocop-canvas bundle update rubocop 2024-05-30 16:20:52 +00:00
stringify_ids Revert "Revert "bundle update --bundler"" 2024-05-29 16:33:13 +00:00
tatl_tael Revert "Revert "bundle update --bundler"" 2024-05-29 16:33:13 +00:00
turnitin_api Revert "Revert "bundle update --bundler"" 2024-05-29 16:33:13 +00:00
twitter Revert "Revert "bundle update --bundler"" 2024-05-29 16:33:13 +00:00
utf8_cleaner Revert "Revert "bundle update --bundler"" 2024-05-29 16:33:13 +00:00
workflow bundle update rubocop 2024-05-30 16:20:52 +00:00
README.md Remove auditor cassandra support 2023-04-03 15:40:22 +00:00
gemfile_prefix.rb add Rails 7.1 lockfiles for embedded gems 2024-02-14 22:30:10 +00:00
test_all_gems.sh remove broken vendored gems html reports 2021-06-15 16:53:17 +00:00

README.md

Gems

This folder is a place to extract modular functionality from canvas. Canvas's Gemfile arrangement is enabled to read gems from this path locally without installing from a remote source. This is valuable for a few reasons:

  • it prevents circular dependencies (bundler won't allow it)
  • modularized code cannot bind to specific domain concepts on canvas models
  • gems can have their specs run independently, without needing to load all of canvas, saving iteration time
  • it allows for eventual build optimization via only running specs for the transitive closure of parents depending on a gem where a change is.

There are some tradeoffs:

  • spreads canvas over more subdirectories, giving some mental overhad to traversing the entire codebase.
  • modular tests necessarily don't test integration with canvas concepts, so solid integration tests in the app are still a requirement.
  • total SERIALIZED build time goes up because each gem loads it's specs in a new process rather than all running within an already booted canvas process.

[TODO] eventually write more on whether we feel like those tradeoffs are good ones, and what the best practices are to leverage this pattern for max-gain/min-pain.

Testing

To test all the gems:

cd gems
./test_all_gems.sh

To test an individual gem

Run ./test.sh inside the gem's folder. This is basically the same as:

cd gems/google_drive
bundle
rspec