canvas-lms/gems
Cody Cutrer c1a8612e12 rubocop: Style/RedundantRegexpEscape
Change-Id: Idf4e1cee69240eebcbeab56f909c7aa21eea6f62
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315122
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2023-04-10 14:12:01 +00:00
..
activesupport-suspend_callbacks Boot on rails 7.0 2022-06-06 13:55:46 +00:00
acts_as_list RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
adheres_to_policy RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
attachment_fu rubocop: Style/RedundantRegexpEscape 2023-04-10 14:12:01 +00:00
autoextend Drop rails 6.1 support 2023-02-14 21:47:03 +00:00
bookmarked_collection RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
broadcast_policy RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
bundler_lockfile_extensions prove that filtered dependencies are pinned 2023-02-06 20:04:47 +00:00
canvas_breach_mitigation RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
canvas_cache Safer jobs moves 2022-09-01 19:29:17 +00:00
canvas_cassandra RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
canvas_color RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
canvas_crummy RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
canvas_dynamodb RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
canvas_errors Upgrade Sentry SDKs 2022-01-10 16:58:07 +00:00
canvas_ext RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
canvas_http Add PATCH support to CanvasHttp 2023-02-23 16:57:48 +00:00
canvas_kaltura stop using deprecated URI.* methods 2022-12-14 15:18:20 +00:00
canvas_mimetype_fu add support for iWork files in RCE and files UI 2023-03-21 15:46:27 +00:00
canvas_panda_pub RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
canvas_partman Revert "Revert "Introduce guardrails for excessive db modifications"" 2023-03-08 15:00:09 +00:00
canvas_quiz_statistics Fix quiz statistics issue when displaying answer formula 2022-03-28 21:12:41 +00:00
canvas_sanitize Prevent data-method partial CSRF 2022-10-27 15:33:30 +00:00
canvas_security fix canvas_security for ruby 3.x 2022-12-12 16:59:18 +00:00
canvas_slug RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
canvas_sort RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
canvas_stringex RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
canvas_text_helper RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
canvas_time RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
canvas_unzip Stop duplicating files on repeat cartridge imports 2022-02-03 15:07:56 +00:00
config_file RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
csv_diff fix csv_diff specs for ruby 3.x 2022-12-12 16:58:02 +00:00
diigo RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
dr_diff Use Gergich output for TypeScript errors 2023-02-02 23:34:05 +00:00
dynamic_settings remove spammy log 2023-02-22 15:47:34 +00:00
event_stream Remove auditor cassandra support 2023-04-03 15:40:22 +00:00
google_drive handle masqueradors in /collaborations 2023-02-13 17:15:27 +00:00
html_text_helper Replace our homegrown link finder with twitter-text 2022-08-19 17:01:10 +00:00
i18n_extraction Eliminate tableless jankiness 2022-11-28 17:50:51 +00:00
i18n_tasks rubocop: Style/RedundantRegexpEscape 2023-04-10 14:12:01 +00:00
incoming_mail_processor Downgrade mail gem 2022-12-21 20:08:15 +00:00
json_token RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
linked_in RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
live_events remove "LiveEvent context is empty" backtrace from logs 2023-02-22 22:29:57 +00:00
lti-advantage add canvas_environment to LTI 1.3 login request 2023-03-30 22:45:17 +00:00
lti_outbound Add flag indicating acceptance of "prioritizeNonToolGrade" data 2022-04-27 00:52:53 +00:00
multipart stop using deprecated URI.* methods 2022-12-14 15:18:20 +00:00
paginated_collection RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
plugins Arrange for AccountReports to run in the right locale 2023-02-21 16:49:53 +00:00
request_context Add Sentry trace ID to X-Canvas-Meta response header 2022-02-15 23:48:15 +00:00
rubocop-canvas Fix vendored gems 2023-04-03 17:11:23 +00:00
stringify_ids RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
tatl_tael Fix specs for ruby 3.1 2022-12-21 16:30:15 +00:00
turnitin_api better errors / stats for Turnitin errors 2023-02-01 15:01:04 +00:00
twitter RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
utf8_cleaner RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
workflow Add enum-style references for model workflow state 2022-04-26 19:55:34 +00:00
README.md Remove auditor cassandra support 2023-04-03 15:40:22 +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