GitHunt
JO

joseglego/rulp-example

Testing rulp in a rails app and in a RESTful API

Rulp Example Circle CI

This is a Rails application, initially generated using Potassium by Platanus.

Local installation

Assuming you've just cloned the repo, run this script to setup the project in your
machine:

$ ./bin/setup

It assumes you have a machine equipped with Ruby, Postgresql, etc. If not, set up
your machine with boxen.

The script will do the following among other things:

  • Install the dependecies
  • Prepare your database
  • Adds heroku remotes

After the app setup is done you can run it with Heroku Local

$ heroku local

Deployment

This project is pre-configured to be (easily) deployed to Heroku servers, but needs you to have the Potassium binary installed. If you don't, then run:

$ gem install potassium

Then, make sure you are logged in to the Heroku account where you want to create the app and run

$ potassium install heroku --force

this will create the app on heroku, create a pipeline and link the app to the pipeline.

You'll still have to manually log in to the heroku dahsboard, go to the new pipeline and 'configure automatic deploys' using Github
You can run the following command to open the dashboard in the pipeline page

$ heroku pipelines:open

Hint

Remember to connect each stage to the corresponding branch:

  1. Staging -> Master
  2. Production -> Production

That's it. You should already have a running app and each time you push to the corresponding branch, the system will (hopefully) update accordingly.

Continuous Integrations

The project is setup to run tests
in CircleCI

You can also run the test locally simulating the production environment using docker.
Just make sure you have docker installed and run:

bin/cibuild

Style Guides

The style guides are enforced through a self hosted version of Hound CI. The style configuration can also be used locally
in development runing rubocop or just using the rubocop integration for your text editor of choice.

You can add custom rules to this project just adding them to the .ruby-style.yml file.

Seeds

To populate your database with initial data you can add, inside the /db/seeds.rb file, the code to generate only the necessary data to run the application.
If you need to generate data with development purposes, you can customize the lib/fake_data_loader.rb module and then to run the rake load_fake_data task from your terminal.

Internal dependencies

Rails pattern enforcing types

This projects uses Power-Types to generate Services, Commands, Utils and Values.

Languages

Ruby70.9%HTML16.1%Shell7.1%CSS3.1%JavaScript2.5%CoffeeScript0.5%

Contributors

Created January 14, 2018
Updated January 14, 2018