Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/stratigos/gasprices

:blue_car: Rails 4 Demo API Application Which Lists Today's Gas Prices in the USA
https://github.com/stratigos/gasprices

Last synced: about 1 month ago
JSON representation

:blue_car: Rails 4 Demo API Application Which Lists Today's Gas Prices in the USA

Awesome Lists containing this project

README

        

== README

This application displays today's gas prices for each state in the USA.
An input field allows for selecting the gas price for a single state.

Ruby: ruby 2.0.0p598 (2014-11-13 revision 48408) [x86_64-linux]

Rails: 4.2.1

DB: PostgreSQL v 9.3.6

Initialize Dependencies: bundle install

Initialize Database: ./bin/rake db:migrate

* To connect to the db, set the following environment params (db username):
DEV_PG_DB_USER
TEST_PG_DB_USER

* See config/database.yml for information on password and schema name configuration.

Run application: bundle exec puma -C config/puma.rb
* Connect locally at: http://localhost:3000 (see config/puma.rb)

Tests: run Minitest with ./bin/rake

Deployment instructions:

* Deployed through free tier of Heroku Ruby/PG dynos.
* login to heroku: heroku login (heroku create to create dyno on Heroku for the first time)
* push app to heroku: git push heroku master (heroku ps:scale web=1 to create first web dyno)
* to initialize database: heroku run rake db:migrate
* to view application in web browser: heroku open
* puma webserver is run by Heroku on every push via ./Procfile

Please see LICENSE.md