johnboyes / santander-cycles

Get notifications on Slack for specific Santander Cycles docking station availability in London. Simple Ruby app.
0 stars 0 forks source link
heroku london notifications ruby santander-cycles slack

CircleCI Code Climate

santander-cycles

Get notifications on Slack for specific Santander Cycles docking station availability in London.

Example use case: you use the same bike docking stations every day to and from work; by deploying this app on Heroku you can set up (free) scheduled daily notifications on Slack with the number of bikes and spaces available at those specific docking stations.

Simple Ruby app.

Getting Started

Run locally

Prerequisites:

Create a .env file by copying the example.env and amend the environment variables in it:

SLACK_WEBHOOK_URL=put_your_slack_webhook_url_here
BIKEPOINT_API_URL=https://api.tfl.gov.uk/bikepoint
BIKEPOINT_NAMES=Abbey Orchard Street, Westminster;Abbotsbury Road, Holland Park

Then:

Deploying to Heroku

heroku create --region eu
heroku config:set SLACK_WEBHOOK=put_your_slack_webhook_url_here
heroku config:set BIKEPOINT_API_URL=https://api.tfl.gov.uk/bikepoint
heroku config:set BIKEPOINT_NAMES=put_the_names_from_your_.env_file_here
git push heroku master

Alternatively, you can deploy your own copy of the app using the web-based flow:

Deploy

More information about Ruby on Heroku:

Run the tests locally

Just run rspec from the project's root folder