canvas-lms/gems
Cody Cutrer eb258d1a9b RuboCop: Performance/Casecmp
manual

Change-Id: Iea0317442d4068cc9f75f325dcedb7922f8bf95e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278330
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-11-16 16:45:36 +00:00
..
activesupport-suspend_callbacks RuboCop: Style/SafeNavigation 2021-11-16 06:36:38 +00:00
acts_as_list RuboCop: heredocs 2021-11-16 06:36:00 +00:00
adheres_to_policy RuboCop: Style/SafeNavigation 2021-11-16 06:36:38 +00:00
attachment_fu RuboCop: Style/SafeNavigation 2021-11-16 06:36:38 +00:00
autoextend RuboCop: Lint 2021-11-09 21:42:31 +00:00
bookmarked_collection RuboCop: Performance/TimesMap 2021-11-16 16:20:35 +00:00
broadcast_policy RuboCop: Style/SingleLineMethods, Style/Semicolon 2021-11-12 18:39:32 +00:00
canvas_breach_mitigation RuboCop: Style/PreferredHashMethods 2021-11-12 16:24:14 +00:00
canvas_cache RuboCop: Style/CaseLikeIf 2021-11-12 20:24:23 +00:00
canvas_cassandra RuboCop: Style/MutableConstant 2021-11-16 16:19:54 +00:00
canvas_color RuboCop: Style/SingleLineMethods, Style/Semicolon 2021-11-12 18:39:32 +00:00
canvas_crummy RuboCop: Style/SafeNavigation 2021-11-16 06:36:38 +00:00
canvas_dynamodb RuboCop: RSpec/HookArgument 2021-11-10 16:40:43 +00:00
canvas_errors RuboCop: Style/SingleLineMethods, Style/Semicolon 2021-11-12 18:39:32 +00:00
canvas_ext RuboCop: Lint/EmptyBlock 2021-11-04 21:38:32 +00:00
canvas_http RuboCop: Performance/InefficientHashSearch 2021-11-16 16:45:20 +00:00
canvas_i18nliner Add typescript support 2021-08-18 18:21:17 +00:00
canvas_kaltura RuboCop: Style/MutableConstant 2021-11-16 16:19:54 +00:00
canvas_mimetype_fu RuboCop: Style/SafeNavigation 2021-11-16 06:36:38 +00:00
canvas_panda_pub RuboCop: RSpec/HookArgument 2021-11-10 16:40:43 +00:00
canvas_partman RuboCop: Performance/MapCompact 2021-11-16 16:20:07 +00:00
canvas_quiz_statistics RuboCop: Performance/Count 2021-11-16 16:36:02 +00:00
canvas_sanitize RuboCop: Style/MutableConstant 2021-11-16 16:19:54 +00:00
canvas_security RuboCop: Performance/InefficientHashSearch 2021-11-16 16:45:20 +00:00
canvas_slug RuboCop: Lint 2021-09-29 03:38:23 +00:00
canvas_sort RuboCop: Style/Encoding 2021-09-27 20:52:15 +00:00
canvas_stringex RuboCop: Style/UnpackFirst 2021-11-11 22:10:16 +00:00
canvas_text_helper RuboCop: Style/ColonMethodCall 2021-11-11 17:39:58 +00:00
canvas_time RuboCop: Style/SlicingWithRange 2021-11-11 21:56:43 +00:00
canvas_unzip RuboCop: Style/CaseLikeIf 2021-11-12 20:24:23 +00:00
config_file RuboCop: RSpec/HookArgument 2021-11-10 16:40:43 +00:00
csv_diff RuboCop: heredocs 2021-11-16 06:36:00 +00:00
diigo RuboCop: Style/NegatedIf 2021-11-11 22:55:11 +00:00
dr_diff RuboCop: Style/IfWithBooleanLiteralBranches 2021-11-11 23:29:24 +00:00
dynamic_settings RuboCop: Style/RedundantBegin 2021-11-11 02:19:27 +00:00
event_stream RuboCop: Style/MutableConstant 2021-11-16 16:19:54 +00:00
google_drive RuboCop: Style/SafeNavigation 2021-11-16 06:36:38 +00:00
html_text_helper RuboCop: Style/MutableConstant 2021-11-16 16:19:54 +00:00
i18n_extraction RuboCop: Style/MutableConstant 2021-11-16 16:19:54 +00:00
i18n_tasks RuboCop: Performance/InefficientHashSearch 2021-11-16 16:45:20 +00:00
incoming_mail_processor RuboCop: Style/MutableConstant 2021-11-16 16:19:54 +00:00
json_token RuboCop: Style/RedundantReturn 2021-11-12 16:33:45 +00:00
linked_in RuboCop: Style/Encoding 2021-09-27 20:52:15 +00:00
live_events RuboCop: Style/SafeNavigation 2021-11-16 06:36:38 +00:00
lti-advantage RuboCop: Style/SlicingWithRange 2021-11-11 21:56:43 +00:00
lti_outbound RuboCop: Style/CaseLikeIf 2021-11-12 20:24:23 +00:00
multipart RuboCop: Style/RedundantReturn 2021-11-12 16:33:45 +00:00
paginated_collection RuboCop: Style/RedundantReturn 2021-11-12 16:33:45 +00:00
plugins RuboCop: Performance/Casecmp 2021-11-16 16:45:36 +00:00
request_context RuboCop: Style/NegatedIf 2021-11-11 22:55:11 +00:00
rubocop-canvas RuboCop: Performance/InefficientHashSearch 2021-11-16 16:45:20 +00:00
stringify_ids RuboCop: Performance/RegexpMatch 2021-11-11 22:02:06 +00:00
tatl_tael RuboCop: Style/MutableConstant 2021-11-16 16:19:54 +00:00
turnitin_api RuboCop: RSpec/HookArgument 2021-11-10 16:40:43 +00:00
twitter RuboCop: Style/NegatedIf 2021-11-11 22:55:11 +00:00
utf8_cleaner RuboCop: Style/NegatedIf 2021-11-11 22:55:11 +00:00
workflow RuboCop: Style/SafeNavigation 2021-11-16 06:36:38 +00:00
README.md extract ConfigFile to gem 2021-02-23 21:18:20 +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.
  • it gives ENGINES extracted from canvas (see the "engines" directory) a place to reference code shared with canvas without it being packaged into the canvas monolith directly.

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