Barebones is my personal base Rails application. After developing a
couple of Rails applications, I thought that there were some common
gems and patterns that would be nice to have out of the box.
Install the gem:
gem install barebones
Then run:
barebones [AppName]
If you don't like using any of the below gems or configurations for whatever reason, you can skip them:
- --skip-api
- --skip-resque
- --skip-sidekiq
- --skip-minitest
- --skip-factory-girl
- --skip-carrierwave
For example:
barebones [AppName] --skip-api --skip-minitest
Barebones' Gemfile includes various preconfigured gems such as:
- Puma for our default concurrent webserver. Configured to spawn on free Heroku instances out of the box.
- Carrierwave for file uploading
- Fog for AWS/Google cloud storage
- MiniMagick for image cropping/resizing and all that good stuff
- Sidekiq for background workers. This is the default option.
- Resque for background workers
- Resque-Scheduler for queueing workers in the future
- Byebug for debugging
- Pry Byebug for debugging background jobs
- Web Console for debugging views
- Awesome Print for pretty printing command line objects
- Minitest for TDD/BDD
- Minitest Reporters for customizable Minitest output formats
- Minitest Around for database setup/teardown
- Mocha for mocking and stubbing
- Database Cleaner to ensure a clean state during tests
- Jbuilder for building JSON structures
- oj for faster JSON parsing (and a faster Jbuilder)
- oj_mimic_json
- MultiJSON
- Services (Pre-made folder)
- Custom Decorator Class (A custom subclass of SimpleDelegator)
- Routes with API subdomain and version namespacing
- ApiConstraints for API version control
- Configurations/Ping endpoint to test that the API works :)
Barebones requires the latest version of Ruby (2.4.1), Rails (5.1.1), and PostgreSQL (9.4) on your local machine.
Barebones is copyright © 2015-2016 Danny Yu.
It is free software, and may be redistributed under the terms specified in the LICENSE file.