canvas-lms/gems
Cody Cutrer c6b267e12b RuboCop: Rails/Delegate
auto-corrected, with a bit of manual massaging afterwards if there were
multiple delegations to the same object to combine them into a single
call

Change-Id: Ic93ccad26b037e1f89874d36f9759e5c34435892
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278965
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>
2021-11-19 22:42:26 +00:00
..
activesupport-suspend_callbacks RuboCop: Style/RedundantFileExtensionInRequire 2021-11-19 01:40:50 +00:00
acts_as_list RuboCop: Style/RedundantPercentQ 2021-11-18 20:26:13 +00:00
adheres_to_policy RuboCop: Style/RedundantFileExtensionInRequire 2021-11-19 01:40:50 +00:00
attachment_fu RuboCop: Style/IdenticalConditionalBranches 2021-11-19 22:34:16 +00:00
autoextend RuboCop: Style/QuotedSymbols 2021-11-18 21:36:10 +00:00
bookmarked_collection RuboCop: Style/MethodCallWithoutArgsParentheses 2021-11-18 23:07:30 +00:00
broadcast_policy RuboCop: Style/ExpandPathArguments 2021-11-17 22:06:59 +00:00
canvas_breach_mitigation RuboCop: Style/RedundantFileExtensionInRequire 2021-11-19 01:40:50 +00:00
canvas_cache RuboCop: Style/ZeroLengthPredicate 2021-11-18 23:07:03 +00:00
canvas_cassandra RuboCop: Style/StructInheritance 2021-11-19 22:38:42 +00:00
canvas_color RuboCop: Style/WhenThen, Style/MultilineWhenThen 2021-11-19 22:38:24 +00:00
canvas_crummy RuboCop: Style/AndOr, Style/Not 2021-11-19 22:22:35 +00:00
canvas_dynamodb RuboCop: Style/PercentLiteralDelimiters 2021-11-18 23:05:50 +00:00
canvas_errors RuboCop: Style/TrailingCommaInArguments 2021-11-19 22:22:20 +00:00
canvas_ext RuboCop: Style/PercentLiteralDelimiters 2021-11-18 23:05:50 +00:00
canvas_http RuboCop: Style/MethodCallWithoutArgsParentheses 2021-11-18 23:07:30 +00:00
canvas_i18nliner Add typescript support 2021-08-18 18:21:17 +00:00
canvas_kaltura RuboCop: Style/ClassCheck, Style/ClassEqualityComparison 2021-11-19 22:39:31 +00:00
canvas_mimetype_fu RuboCop: Style/ClassCheck, Style/ClassEqualityComparison 2021-11-19 22:39:31 +00:00
canvas_panda_pub RuboCop: Style/TrivialAccessors 2021-11-19 22:38:51 +00:00
canvas_partman RuboCop: Style/ClassCheck, Style/ClassEqualityComparison 2021-11-19 22:39:31 +00:00
canvas_quiz_statistics RuboCop: Style/RedundantFileExtensionInRequire 2021-11-19 01:40:50 +00:00
canvas_sanitize RuboCop: Style/AndOr, Style/Not 2021-11-19 22:22:35 +00:00
canvas_security RuboCop: Rails/Delegate 2021-11-19 22:42:26 +00:00
canvas_slug RuboCop: Style/PercentLiteralDelimiters 2021-11-18 23:05:50 +00:00
canvas_sort RuboCop: Style/PercentLiteralDelimiters 2021-11-18 23:05:50 +00:00
canvas_stringex RuboCop: Style/SignalException 2021-11-19 22:24:25 +00:00
canvas_text_helper RuboCop: Style/RedundantFileExtensionInRequire 2021-11-19 01:40:50 +00:00
canvas_time RuboCop: Style/PercentLiteralDelimiters 2021-11-18 23:05:50 +00:00
canvas_unzip RuboCop: Rails/Delegate 2021-11-19 22:42:26 +00:00
config_file RuboCop: Style/PercentLiteralDelimiters 2021-11-18 23:05:50 +00:00
csv_diff RuboCop: Style/PercentLiteralDelimiters 2021-11-18 23:05:50 +00:00
diigo RuboCop: Style/MethodCallWithoutArgsParentheses 2021-11-18 23:07:30 +00:00
dr_diff RuboCop: Style/PercentLiteralDelimiters 2021-11-18 23:05:50 +00:00
dynamic_settings RuboCop: Style/PercentLiteralDelimiters 2021-11-18 23:05:50 +00:00
event_stream RuboCop: Rails/Delegate 2021-11-19 22:42:26 +00:00
google_drive Use recommended scopes for Google Drive plugin 2021-11-19 00:48:25 +00:00
html_text_helper RuboCop: Style/RedundantFileExtensionInRequire 2021-11-19 01:40:50 +00:00
i18n_extraction RuboCop: Style/PercentLiteralDelimiters 2021-11-18 23:05:50 +00:00
i18n_tasks RuboCop: Style/StructInheritance 2021-11-19 22:38:42 +00:00
incoming_mail_processor RuboCop: Style/EmptyMethod 2021-11-19 22:26:24 +00:00
json_token RuboCop: Style/WhenThen, Style/MultilineWhenThen 2021-11-19 22:38:24 +00:00
linked_in RuboCop: Style/MethodCallWithoutArgsParentheses 2021-11-18 23:07:30 +00:00
live_events rubocop: remove Rails/SmartTimeZone custom cop 2021-11-19 22:36:03 +00:00
lti-advantage RuboCop: Style/PercentLiteralDelimiters 2021-11-18 23:05:50 +00:00
lti_outbound RuboCop: Rails/Delegate 2021-11-19 22:42:26 +00:00
multipart RuboCop: Style/RedundantFileExtensionInRequire 2021-11-19 01:40:50 +00:00
paginated_collection RuboCop: Style/PercentLiteralDelimiters 2021-11-18 23:05:50 +00:00
plugins RuboCop: Style/CaseEquality 2021-11-19 22:42:08 +00:00
request_context RuboCop: Style/PercentLiteralDelimiters 2021-11-18 23:05:50 +00:00
rubocop-canvas rubocop: remove Rails/SmartTimeZone custom cop 2021-11-19 22:36:03 +00:00
stringify_ids RuboCop: Style/HashEachMethods 2021-11-19 22:29:07 +00:00
tatl_tael RuboCop: Style/RedundantArgument 2021-11-18 21:38:20 +00:00
turnitin_api RuboCop: Style/PercentLiteralDelimiters 2021-11-18 23:05:50 +00:00
twitter RuboCop: Style/MethodCallWithoutArgsParentheses 2021-11-18 23:07:30 +00:00
utf8_cleaner RuboCop: Style/PercentLiteralDelimiters 2021-11-18 23:05:50 +00:00
workflow RuboCop: Style/HashEachMethods 2021-11-19 22:29:07 +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