Skip to content

Latest commit

 

History

History
95 lines (65 loc) · 2.47 KB

README.md

File metadata and controls

95 lines (65 loc) · 2.47 KB

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.