https://github.com/printercu/rails-template-80
Rails template to wrap lines at 80 chars.
https://github.com/printercu/rails-template-80
Last synced: about 1 year ago
JSON representation
Rails template to wrap lines at 80 chars.
- Host: GitHub
- URL: https://github.com/printercu/rails-template-80
- Owner: printercu
- Created: 2016-12-04T09:41:07.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-12-04T09:49:28.000Z (over 9 years ago)
- Last Synced: 2025-01-20T06:43:38.141Z (over 1 year ago)
- Language: Ruby
- Homepage:
- Size: 1.95 KB
- Stars: 0
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# «80-chars lines» Rails template
Add this to `rails new` command:
```
-m https://raw.githubusercontent.com/printercu/rails-template-80/master/template.rb
```
## Why
If you use linters like rubocop, they usually check for maximum line length.
Fresh-baked rails app contains several files with very long lines
which trigger linter warnings.
Rails team rejects any PRs that going to fix it.
Thanks to app templates, this can be fixed automatically in the new app.
## How
Template just replaces matching lines similar to `patch`,
but ignores any missing lines to replace. So it will work for multiple versions
of Rails.
## Contributing
- Fork, clone, `bundle install`.
- Edit.
- Run `rake` and check rubocop's output.
- _Optionally._ Add `NEW_ARGS='--edge --smth-else'` to `rake` command
to create rails app with specific args.
- Submit PR.
## License
MIT