Skip to content

Commit

Permalink
Merge branch 'main' into 4217-kit-various-refactors
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmyli97 committed Jan 8, 2025
2 parents de49b6e + 456d4cd commit 192c3b0
Show file tree
Hide file tree
Showing 126 changed files with 1,983 additions and 841 deletions.
File renamed without changes.
34 changes: 10 additions & 24 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ inherit_mode:

inherit_gem:
standard: config/base.yml
standard-rails: config/base.yml
standard-performance: config/base.yml

inherit_from:
.rubocop_todo.yml
Expand All @@ -12,15 +14,17 @@ require:
- rubocop-rails
- rubocop-performance
- standard
- standard-rails
- standard-performance

AllCops:
TargetRubyVersion: 3.1.2
Exclude:
- "vendor/**/*"
- "db/schema.rb"
- "db/partners_schema.rb"
- "db/seeds.rb"
- "db/migrate/*"
- "db/partners_migrate/*"
- "bin/*"
- "lib/files/cucumber.rake"
- "lib/tasks/*"
Expand All @@ -29,26 +33,13 @@ AllCops:
- "Rakefile"
- "tmp/*"
- "node_modules/**/*"
UseCache: false

Rails:
Enabled: true
Rails/Output:
Enabled: true
Rails/Date:
Enabled: true
Rails/FilePath:
Enabled: false
Rails/FindBy:
Enabled: true
Rails/FindEach:
Enabled: true
Rails/PluralizationGrammar:
Enabled: true
Rails/ScopeArgs:
Enabled: true
Rails/TimeZone:
Enabled: true
Rails/UnknownEnv:
Environments:
- production
Expand All @@ -62,32 +53,27 @@ Rails/AfterCommitOverride:
Enabled: false
Rails/FindById:
Enabled: false
Rails/Inquiry:
Enabled: false
Rails/MailerName:
Enabled: false
Rails/MatchRoute:
Enabled: false
Rails/NegateInclude:
Enabled: false
Rails/Pluck:
Enabled: false
Rails/PluckInWhere:
Enabled: false
Rails/RenderInline:
Enabled: false
Rails/RenderPlainText:
Enabled: false
Rails/ShortI18n:
Enabled: false
Rails/SquishedSQLHeredocs:
Enabled: false
Rails/WhereExists:
Enabled: false
Rails/WhereNot:
Enabled: false
Rails/HasAndBelongsToMany:
Enabled: false
Rails/ThreeStateBooleanColumn:
Enabled: true
# FIXME: Fix our ENV variable access and remove the following config.
Rails/EnvironmentVariableAccess:
AllowReads: true

Rails/BulkChangeTable:
Exclude:
Expand Down
46 changes: 41 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,20 +53,49 @@ Make sure to install **Ubuntu** as your Linux distribution. (This should be defa
<details>
<summary> Bank Users 🏦 </summary>

Pawnee Diaper Bank
A fully set up bank with items, storage locations, donations, distributions, requests, etc.
The bank has multiple partners associated with it.
```
Organization Admin
Email: [email protected]
Email: [email protected]
Password: password!
User
Email: [email protected]
Password: password!
```

Second City Essentials Bank
A fully set up bank with items, storage locations, donations, distributions, requests, etc.
The bank has four items unique to it (named Second City Item #).
```
Organization Admin
Email: [email protected]
Password: password!
User
Email: [email protected]
Password: password!
```

SF Diaper Bank
A bank which has just been accepted and so is not fully set up. It lacks many of the records the other banks have.
```
Organization Admin
Email: [email protected]
Password: password!
User
Email: [email protected]
Password: password!
```
</details>

<details>
<summary> Partner Users 👥 </summary>

Partners in Pawnee Diaper Bank partner groups
```
Verified Partner
Email: [email protected]
Expand All @@ -87,10 +116,17 @@ Make sure to install **Ubuntu** as your Linux distribution. (This should be defa
Waiting Approval Partner
Email: [email protected]
Password: password!
Another approved partner (with all groups):
Another verified partner (in second partner group):
Email: [email protected]
Pasword: password!
Password: password!
```

Partners in Second City Essentials Bank partner group
```
Verified partner
Email: [email protected]
Password: password!
```
</details>

Expand Down Expand Up @@ -221,7 +257,7 @@ Before submitting a pull request, run all tests and lints. Fix any broken tests
- Once your first PR has been merged, all commits pushed to an open PR will also run these workflows.
#### Local testing
- Run all lints with `bin/lint`.
- Run all lints with `bin/lint`. (You can lint a single file/folder with `bin/lint {path_to_folder_or_file}`.)
- Run all tests with `bundle exec rspec`
- You can run a single test with `bundle exec rspec {path_to_test_name}_spec.rb` or on a specific line by appending `:LineNumber`
- If you need to skip a failing test, place `pending("Reason you are skipping the test")` into the `it` block rather than skipping with `xit`. This will allow rspec to deliver the error message without causing the test suite to fail.
Expand Down
10 changes: 7 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ gem "pg", "~> 1.5.7"
# Web server.
gem "puma"
# Rails web framework.
gem "rails", "7.1.3.4"
gem "rails", "7.2.2"

###### MODELS / DATABASE #######

Expand Down Expand Up @@ -100,6 +100,8 @@ gem "jwt"
gem "newrelic_rpm"
# Used to manage periodic cron-like jobs
gem "clockwork"
# Speed up app boot time by caching expensive operations
gem 'bootsnap', require: false

##### DEPENDENCY PINS ######
# These are gems that aren't used directly, only as dependencies for other gems.
Expand Down Expand Up @@ -150,14 +152,16 @@ group :development, :test do
# Debugger which supports rdbg and Shopify Ruby LSP VSCode extension
gem "debug", ">= 1.0.0"
# RSpec behavioral testing framework for Rails.
gem "rspec-rails", "~> 7.0.1"
gem "rspec-rails", "~> 7.1.0"
# Static analysis / linter.
gem "rubocop"
# Rails add-on for static analysis.
gem 'rubocop-performance'
gem "rubocop-rails", "~> 2.25.1"
# Default rules for Rubocop.
gem "standard", "~> 1.40"
gem "standard-rails"
gem "standard-performance"
# Erb linter.
gem "erb_lint"
end
Expand Down Expand Up @@ -217,4 +221,4 @@ end
# Use Redis for Action Cable
gem "redis", "~> 5.3"

gem "importmap-rails", "~> 2.0"
gem "importmap-rails", "~> 2.1"
Loading

0 comments on commit 192c3b0

Please sign in to comment.