Fix rubocop config filename

This commit is contained in:
Ryan W
2021-09-26 15:07:00 -07:00
parent 06b2f716ba
commit ea2aca8106
2 changed files with 161 additions and 0 deletions
+114
View File
@@ -0,0 +1,114 @@
require:
- rubocop-rails
AllCops:
TargetRubyVersion: 3.0.2
TargetRailsVersion: 7.0.0
DisabledByDefault: true
Exclude:
- "bin/**/*"
- "vendor/**/*"
- "public/**/*"
- "node_modules/**/*"
Bundler:
Enabled: true
Layout/EmptyLineAfterMagicComment:
Enabled: true
Layout/TrailingEmptyLines:
Enabled: true
Layout/TrailingWhitespace:
Enabled: true
Lint/BinaryOperatorWithIdenticalOperands:
Enabled: true
Lint/CircularArgumentReference:
Enabled: true
Lint/Debugger:
Enabled: true
Lint/DeprecatedClassMethods:
Enabled: true
Lint/DuplicateMethods:
Enabled: false
Lint/DuplicateHashKey:
Enabled: true
Lint/EachWithObjectArgument:
Enabled: true
Lint/ElseLayout:
Enabled: true
Lint/EmptyEnsure:
Enabled: true
Lint/EmptyInterpolation:
Enabled: true
Lint/EnsureReturn:
Enabled: true
Lint/FloatOutOfRange:
Enabled: true
Lint/FormatParameterMismatch:
Enabled: true
Lint/LiteralAsCondition:
Enabled: true
Lint/LiteralInInterpolation:
Enabled: true
Lint/Loop:
Enabled: true
Lint/NextWithoutAccumulator:
Enabled: true
Lint/RandOne:
Enabled: true
Lint/RequireParentheses:
Enabled: true
Lint/RescueException:
Enabled: true
Lint/RedundantStringCoercion:
Enabled: false
Lint/RedundantCopDisableDirective:
Enabled: true
Lint/RedundantSplatExpansion:
Enabled: false
Lint/UnreachableCode:
Enabled: true
Lint/UselessSetterCall:
Enabled: true
Lint/Void:
Enabled: true
Naming/ClassAndModuleCamelCase:
Enabled: true
# Security/Eval:
# Enabled: false
# Security/JSONLoad:
# Enabled: true
# Security/MarshalLoad:
# Enabled: true
# Security/Open:
# Enabled: false
# Security/YAMLLoad:
# Enabled: false
# Style/EndBlock:
# Enabled: true
# Style/HashSyntax:
# Enabled: true
# Style/StringLiterals:
# Enabled: true
# EnforcedStyle: "double_quotes"
# Exclude:
# - "config/**/*.rb"
# - Rakefile
# Style/CaseEquality:
# Enabled: true
# Style/ClassMethods:
# Enabled: true
# Style/ClassVars:
# Enabled: true
# Style/CollectionMethods:
# Enabled: true
# PreferredMethods:
# collect: "map"
# collect!: "map!"
# inject: "reduce"
# detect: "find"
# find_all: "select"
+47
View File
@@ -0,0 +1,47 @@
# Rails 7 on Docker demo application
![Ruby](https://github.com/ryanwi/rails7-on-docker/workflows/Ruby/badge.svg)
This app demonstrates Rails 7 with PostgreSQL, import maps, turbo, stimulus and hotwire, all running in Docker.
## Initial setup
```
docker compose build
docker compose run --rm web bin/rails db:setup
```
## Running the Rails app
```
docker compose up
```
## Running the Rails console
When the app is already running with `docker-compose` up, attach to the container:
```
docker compose exec web bin/rails c
```
When no container running yet, start up a new one:
```
docker compose run --rm web bin/rails c
```
## Running tests
```
docker compose run --rm web bundle exec rspec
```
## Updating gems
```
docker compose run --rm web bundle update
docker compose up --build
```
## Credits/References
### Rails with Docker
* https://docs.docker.com/compose/rails/
* https://pragprog.com/book/ridocker/docker-for-rails-developers
* https://evilmartians.com/chronicles/ruby-on-whales-docker-for-ruby-rails-development
### Rails 7 with importmaps