https://github.com/sunny/rateaux
A few useful rake tasks for Rails
https://github.com/sunny/rateaux
Last synced: 2 months ago
JSON representation
A few useful rake tasks for Rails
- Host: GitHub
- URL: https://github.com/sunny/rateaux
- Owner: sunny
- License: mit
- Created: 2013-05-14T17:12:39.000Z (about 12 years ago)
- Default Branch: main
- Last Pushed: 2025-03-20T19:23:57.000Z (4 months ago)
- Last Synced: 2025-04-24T04:49:15.163Z (2 months ago)
- Language: Ruby
- Homepage:
- Size: 93.8 KB
- Stars: 17
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: MIT-LICENSE
Awesome Lists containing this project
README
# Rateaux
This is a collection of useful Rake tasks for Ruby on Rails applications.

_[Hay Rake](https://www.flickr.com/photos/49708076@N05/23047850374/) photo by Larry Lamb_
## Install
Add these lines to your app's Gemfile:
```ruby
# Rake tasks for Rails
gem "rateaux"
```Then call `bundle install`.
## Tasks
### DB Truncate
Delete all data from the current database.
```sh
$ rake db:truncate
```### DB Drop tables
Delete all data and tables from the current database. This is similar to
`db:drop` but it does not drop the database itself.```sh
$ rake db:drop_tables
```### Checkout
Remove migrations then checkout a git branch.
```sh
$ rake checkout new_branch_name
```This will:
1. Roll back any migrations on your current branch which do not exist on the
other branch
2. Discard any changes to the db/schema.rb file
3. Check out the other branch
4. Run any new migrations existing in the other branch
5. Update your test database### Cache clear
Empty the Rails cache store.
```sh
$ rake cache:clear
```### Sidekiq flush
Empty Sidekiq’s queues.
```sh
$ rake sidekiq:flush
```### Assets Copy Non Digested
Copy assets files with a digest (for example `application-d45e…565.css`)
to their non-digested form (for example `application.css`).```sh
$ rake assets:copy_non_digested
```### DB schema view
View the database structure.
```sh
$ rake db:schema:view
```### Frozen string literal
Add the `# frozen_string_literal: true` header to all Ruby files in the project.
```sh
$ rake add_frozen_string_literal_headers
```## The name
In French _rateaux_ means _rakes_.