DTT (Staging > Test) [robo-dtt] - #51382
Merged
Merged
Conversation
Specifically to pick up ruby/rake#211, which is required for Rails 6.1 support; without it, we get `undefined method ``with_application' for Rake:Module (NoMethodError)` when trying to run any rails script. Specifically, I implemented this by running `bundle update rake scss_lint`, to also pick up the `scss_lint` change "Relax gem dependency constraints to allow rake 12.x" - https://github.com/sds/scss-lint/blob/master/CHANGELOG.md#0510 - https://github.com/ruby/rake/releases/tag/v12.2.0 Tested locally that this resolves for me the problems with running rake tasks on Rails 6.1 Relying on existing tests to verify that this does not otherwise result in any change to functionality.
In preparation for an update to FactoryBot 5.x (and beyond), which deprecated static attributes in favor of dynamic attributes. Update Update applied automatically by temporarily configuring my local environment to enable the `FactoryBot/AttributeDefinedStatically` lint rule: ```diff diff --git a/.rubocop.yml b/.rubocop.yml index 041a14a..594b15160a3 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -6,6 +6,7 @@ inherit_from: require: - rubocop-performance - rubocop-rails + - rubocop-rspec - rubocop-rails-accessibility - './tools/customLinters/rubocop_only_allowed_characters.rb' @@ -74,6 +75,10 @@ Style/Semicolon: Style/WordArray: MinSize: 5 +RSpec/FactoryBot/AttributeDefinedStatically: + Include: + - 'dashboard/test/factories/*.rb' + # END CODE.ORG OVERRIDES # BEGIN BLOCKLIST: Below are rules we don't plan to enable in the forseeable diff --git a/Gemfile b/Gemfile index 81ed267..917649bcb73 100644 --- a/Gemfile +++ b/Gemfile @@ -242,6 +242,7 @@ group :development, :staging, :levelbuilder do gem 'rubocop-performance', require: false gem 'rubocop-rails', require: false gem 'rubocop-rails-accessibility', require: false + gem 'rubocop-rspec', require: false gem 'scss_lint', require: false end ``` And then running `rubocop --require rubocop-rspec --only RSpec/FactoryBot/AttributeDefinedStatically --auto-correct dashboard/test/factories/*`. I then used `rubocop --only Layout/SpaceInsideBlockBraces --auto-correct dashboard/test/factories/*.rb` to automatically fix some white space errors, and manually edited `dashboard/test/factories/foorm_factories.rb` to fix up a few more. - https://thoughtbot.com/blog/deprecating-static-attributes-in-factory_bot-4-11 - https://docs.rubocop.org/rubocop-rspec/cops_rspec_factorybot.html#rspecfactorybotattributedefinedstatically
…eDefinedStatically Update FactoryBot Static Attributes to Dynamic
Update `rake` Gem to 13.0.6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.