canvas-lms/gems
Cody Cutrer eaca556b81 RuboCop: Style/NumericLiterals
[skip-stages=Flakey]

auto-corrected

Change-Id: I88363d87d5a70be941aa81b4ffe5306ce7506b98
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/279207
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>
Migration-Review: Cody Cutrer <cody@instructure.com>
2021-11-24 23:31:34 +00:00
..
activesupport-suspend_callbacks RuboCop: Style/IfInsideElse, Style/SoleNestedConditional 2021-11-23 14:28:35 +00:00
acts_as_list RuboCop: Style/RedundantSelf 2021-11-20 16:41:21 +00:00
adheres_to_policy RuboCop: Style/BlockDelimiters, Style/Lambda 2021-11-23 21:30:47 +00:00
attachment_fu RuboCop: Style/MultilineIfModifier 2021-11-23 14:30:24 +00:00
autoextend RuboCop: Style/CommentAnnotation 2021-11-21 00:50:46 +00:00
bookmarked_collection rubocop: default to error severity 2021-11-23 21:31:26 +00:00
broadcast_policy RuboCop: Style/BlockDelimiters, Style/Lambda 2021-11-23 21:30:47 +00:00
canvas_breach_mitigation RuboCop: Style/SymbolArray, Style/WordArray 2021-11-23 14:30:08 +00:00
canvas_cache RuboCop: Style/BlockDelimiters, Style/Lambda 2021-11-23 21:30:47 +00:00
canvas_cassandra rubocop: default to error severity 2021-11-23 21:31:26 +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/NumericLiterals 2021-11-24 23:31:34 +00:00
canvas_errors RuboCop: Style/SymbolArray, Style/WordArray 2021-11-23 14:30:08 +00:00
canvas_ext RuboCop: Security 2021-11-20 21:09:11 +00:00
canvas_http rubocop: default to error severity 2021-11-23 21:31:26 +00:00
canvas_i18nliner Add typescript support 2021-08-18 18:21:17 +00:00
canvas_kaltura RuboCop: Style/NumericLiterals 2021-11-24 23:31:34 +00:00
canvas_mimetype_fu RuboCop: Style/UnlessElse 2021-11-20 21:08:55 +00:00
canvas_panda_pub RuboCop: Style/RedundantSelf 2021-11-20 16:41:21 +00:00
canvas_partman RuboCop: Style/BlockDelimiters, Style/Lambda 2021-11-23 21:30:47 +00:00
canvas_quiz_statistics RuboCop: RSpec/LetBeforeExamples, RSpec/LeadingSubject 2021-11-24 23:30:52 +00:00
canvas_sanitize RuboCop: Style/SymbolArray, Style/WordArray 2021-11-23 14:30:08 +00:00
canvas_security RuboCop: Style/NumericLiterals 2021-11-24 23:31:34 +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/BlockDelimiters, Style/Lambda 2021-11-23 21:30:47 +00:00
canvas_text_helper RuboCop: Style/RedundantFileExtensionInRequire 2021-11-19 01:40:50 +00:00
canvas_time RuboCop: Security 2021-11-20 21:09:11 +00:00
canvas_unzip RuboCop: Style/NumericLiterals 2021-11-24 23:31:34 +00:00
config_file RuboCop: Style/SymbolArray, Style/WordArray 2021-11-23 14:30:08 +00:00
csv_diff RuboCop: Style/BlockDelimiters, Style/Lambda 2021-11-23 21:30:47 +00:00
diigo RuboCop: Style/RedundantSelf 2021-11-20 16:41:21 +00:00
dr_diff RuboCop: Style/Next 2021-11-23 14:29:04 +00:00
dynamic_settings RuboCop: Style/GlobalStdStream 2021-11-21 00:50:35 +00:00
event_stream RuboCop: Style/NumericLiterals 2021-11-24 23:31:34 +00:00
google_drive RuboCop: Style/BlockDelimiters, Style/Lambda 2021-11-23 21:30:47 +00:00
html_text_helper RuboCop: Style/RedundantFileExtensionInRequire 2021-11-19 01:40:50 +00:00
i18n_extraction RuboCop: Style/SymbolArray, Style/WordArray 2021-11-23 14:30:08 +00:00
i18n_tasks RuboCop: Style/BlockDelimiters, Style/Lambda 2021-11-23 21:30:47 +00:00
incoming_mail_processor RuboCop: RSpec/LetBeforeExamples, RSpec/LeadingSubject 2021-11-24 23:30:52 +00:00
json_token RuboCop: Style/RedundantSelf 2021-11-20 16:41:21 +00:00
linked_in RuboCop: Style/MethodCallWithoutArgsParentheses 2021-11-18 23:07:30 +00:00
live_events RuboCop: Style/BlockDelimiters, Style/Lambda 2021-11-23 21:30:47 +00:00
lti-advantage RuboCop: Style/NumericLiterals 2021-11-24 23:31:34 +00:00
lti_outbound RuboCop: RSpec/LetBeforeExamples, RSpec/LeadingSubject 2021-11-24 23:30:52 +00:00
multipart RuboCop: Style/RedundantFileExtensionInRequire 2021-11-19 01:40:50 +00:00
paginated_collection RuboCop: Style grab bag 2021-11-20 03:04:04 +00:00
plugins RuboCop: Style/NumericLiterals 2021-11-24 23:31:34 +00:00
request_context RuboCop: Style/NumericLiterals 2021-11-24 23:31:34 +00:00
rubocop-canvas RuboCop: RSpec/VoidExpect 2021-11-23 21:31:50 +00:00
stringify_ids RuboCop: Style/SymbolArray, Style/WordArray 2021-11-23 14:30:08 +00:00
tatl_tael RuboCop: RSpec/LetBeforeExamples, RSpec/LeadingSubject 2021-11-24 23:30:52 +00:00
turnitin_api RuboCop: RSpec/LetBeforeExamples, RSpec/LeadingSubject 2021-11-24 23:30:52 +00:00
twitter RuboCop: RSpec/LetBeforeExamples, RSpec/LeadingSubject 2021-11-24 23:30:52 +00:00
utf8_cleaner rubocop: default to error severity 2021-11-23 21:31:26 +00:00
workflow RuboCop: Style/RedundantSelf 2021-11-20 16:41:21 +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