A boilerplate for developing RESTful APIs with Ruby on Rails.
Branch: master
Clone or download
Latest commit 1112c44 Aug 12, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci Update Ruby version in CircleCI configuration Jun 9, 2018
.github Add GH PR template Dec 5, 2017
app
bin Add default ping controller Dec 5, 2016
config Remove Devise locales Sep 26, 2017
db Use pgcrypto for PostgreSQL UUIDs May 11, 2017
lib Initial commit Nov 18, 2016
log Initial commit Nov 18, 2016
public Document authentication endpoint Dec 18, 2016
spec Migrate to FactoryBot Nov 28, 2017
tmp Initial commit Nov 18, 2016
vendor/assets Initial commit Nov 18, 2016
.gitignore Add default ping controller Dec 5, 2016
.rspec Setup testing tools Nov 19, 2016
.rubocop.yml Update gems Aug 12, 2018
.ruby-version Update gems Jun 9, 2018
CHANGELOG.md Add changelog Dec 5, 2017
Dockerfile Update Ruby version in Dockerfile Jun 9, 2018
Gemfile Fix coding style issues Jun 9, 2018
Gemfile.lock Update gems Aug 12, 2018
LICENSE.txt Add MIT license Dec 18, 2016
Procfile Run Puma with 'puma' command to make Scout work Nov 28, 2017
Procfile.development Run Puma with 'puma' command to make Scout work Nov 28, 2017
README.md Update readme Sep 26, 2017
Rakefile Fix coding style issues Jun 9, 2018
config.ru Fix coding style issues May 11, 2017
docker-compose.yml Add Docker and Compose configuration Sep 26, 2017

README.md

Pragma/Rails Starter

This is a boilerplate for developing RESTful APIs with Ruby on Rails.

Usage

To use the boilerplate, simply clone this repo:

$ git clone git://github.com/pragmarb/pragma-rails-starter.git my-project
$ cd my-project

You will also need to configure the application and the database:

$ cp config/database.example.yml config/database.yml
$ cp config/application.example.yml config/application.yml

Once you're done with the configuration, you can setup the database:

$ rake db:setup

Run the application with:

$ foreman s -f Procfile.development

Updates

You can keep the starter up to date even after you start development on the application by adding it as a separate repo:

$ git remote add upstream git://github.com/pragmarb/pragma-rails-starter.git
$ git fetch upstream
$ git merge upstream master

Dependencies

  • Ruby 2.3
  • PostgreSQL
  • Rails 5

Included tools

The following tools are included and configured in the boilerplate:

Testing

RSpec is configured for testing. To run the tests:

$ bin/rspec

In the tests, you have access to the #last_response and #parsed_response methods which return, respectively, the last response object and the parsed body of the response.

Deployment

The application is already configured for deployment on Heroku, including a release command that runs DB migrations.

Provided that you have the Heroku CLI installed, deploying a new app should be as simple as:

$ heroku create
$ figaro heroku
$ git push heroku master

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/pragmarb/pragma-rails-starter.

License

This software is available as open source under the terms of the MIT License.