Last active
January 16, 2022 07:03
-
-
Save smapira/cc6a50f82cea034b07f02088c06b65dd to your computer and use it in GitHub Desktop.
Makefile for new rails project
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
| # curl https://gist.github.com/smapira/cc6a50f82cea034b07f02088c06b65dd/raw --output Makefile | |
| drop-db: | |
| bundle exec rake db:drop | |
| create-db: | |
| bundle exec rake db:create | |
| migrate-db: | |
| bundle exec rake db:migrate | |
| import-seed: | |
| bundle exec rake db:seed | |
| drop-db-spring: | |
| bundle exec spring rake db:drop | |
| create-db-spring: | |
| bundle exec spring rake db:create | |
| migrate-db-spring: | |
| bundle exec spring rake db:migrate | |
| import-seed-spring: | |
| bundle exec spring rake db:seed | |
| drop-db-production: | |
| RAILS_ENV=production DISABLE_DATABASE_ENVIRONMENT_CHECK=1 bundle exec rake db:drop | |
| create-db-production: | |
| RAILS_ENV=production bundle exec rake db:create | |
| migrate-db-production: | |
| RAILS_ENV=production bundle exec rake db:migrate | |
| seed-db-production: | |
| RAILS_ENV=production bundle exec rake db:seed | |
| drop-db-test: | |
| RAILS_ENV=test bundle exec rake db:drop | |
| create-db-test: | |
| RAILS_ENV=test bundle exec rake db:create | |
| migrate-db-test: | |
| RAILS_ENV=test bundle exec rake db:migrate | |
| import-seed-test: | |
| RAILS_ENV=test bundle exec rake db:seed | |
| migrate-db-test-spring: | |
| RAILS_ENV=test bundle exec spring rake db:migrate | |
| import-seed-test-spring: | |
| RAILS_ENV=test bundle exec spring rake db:seed | |
| fetch-rubocop: | |
| curl https://gist.github.com/smapira/d07bd6464241cc559bef1548895b9af0/raw --output .rubocop.yml | |
| fetch-makefile: | |
| curl https://gist.github.com/gambala/4874e2b41a52ac043a274a61f5d7726b --output Makefile | |
| fetch-gemfile: | |
| curl https://gist.github.com/smapira/2dbc861e4212a2f86c3e0d09a7c6de27/raw --output Gemfile | |
| fetch-ignore: | |
| curl https://gist.github.com/smapira/a687e254eb10aa521cd1201c657af814/raw --output .gitignore | |
| fetch-ci: | |
| mkdir .circleci | |
| curl https://gist.github.com/smapira/b95f4cce9a78e9e256d2cb58f8c44084/raw --output .circleci/config.yml | |
| install-bundle: | |
| bundle install --path vendor/bundle --jobs 4 | |
| lint: | |
| bundle exec rubocop -a -c .rubocop.yml | |
| lint-spring: | |
| bundle exec spring rubocop -a -c .rubocop.yml | |
| security: | |
| bundle exec brakeman | |
| mailcatcher: | |
| bundle exec mailcatcher | |
| open http://localhost:1080/ | |
| install-spec: | |
| bundle exec rails g rspec:install | |
| run-console: | |
| bundle exec rails console | |
| run-server: | |
| RAILS_ENV=production bundle exec rails s -b 0.0.0.0 -p 3000 -d | |
| terminate-server: | |
| kill -9 $(cat tmp/pids/server.pid) | |
| run-listen: | |
| bundle exec rake listen_information:xml | |
| run-spring: | |
| ./bin/spring server | |
| terminate-spring: | |
| ./bin/spring stop | |
| describe-routes: | |
| bundle exec annotate --routes | |
| describe-annotates: | |
| bundle exec annotate | |
| configure-annotate: | |
| bundle exe rails generate annotate:install | |
| convert-html-slim: | |
| bundle exec html2slim app/views | |
| convert-erb-slim: | |
| bundle exec erb2slim app/views | |
| db-test: drop-db-test create-db-test migrate-db-test import-seed-test | |
| db-test-spring: migrate-db-test-spring import-seed-test-spring | |
| configure: fetch-rubocop fetch-makefile fetch-gemfile fetch-ignore fetch-ci install-bundle configure-annotate | |
| c: run-console | |
| s: run-server | |
| m: drop-db create-db migrate-db import-seed lint db-test | |
| ms: drop-db-spring create-db-spring migrate-db-spring import-seed-spring lint-spring db-test-spring |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment