View on GitHub


Test Coverage
[![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

- [Join Slack]( (on their free plan) if you haven't already.  
You can set up a new team just for yourself to receive notifications such as this app provides.

- [Setup a Slack webhook]( where the notifications will be sent to.

## Run locally


 * [Ruby]( (best installed with [rbenv](

 * [Bundler](

 * [Heroku CLI (Command Line Interface)](

Create a `.env` file by copying the [`example.env`](example.env) and amend the environment variables in it:

BIKEPOINT_NAMES=Abbey Orchard Street, Westminster;Abbotsbury Road, Holland Park

* `SLACK_WEBHOOK_URL` use the URL provided by the [Slack webhook]( you set up in the "Getting Started" section above.

* `BIKEPOINT_NAMES` - You can keep the defaults to get up and running initially.  Then you can replace the defaults provided with a semi-colon separated list of the [docking station names]( that you would like to be notified about. (The last entry in the list does not need a semi-colon after it but will work fine either way.)

* `bundle`

* `heroku local`

  This should send a notification to Slack.

## Deploying to Heroku

heroku create --region eu
heroku config:set SLACK_WEBHOOK=put_your_slack_webhook_url_here
heroku config:set BIKEPOINT_API_URL=
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:


More information about Ruby on Heroku:

- [Getting Started with Ruby on Heroku](
- [Heroku Ruby Support](

## Run the tests locally

  Just run `rspec` from the project's root folder