Get snow conditions from Slovenian Environment Agency (ARSO) via push notification.
Ruby
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
config
lib
spec
.gitignore
.rspec
.ruby-gemset
.ruby-version
Gemfile
Gemfile.lock
Procfile
Procfile.development
README.md

README.md

snow-conditions

Get snow conditions from Slovenian Environment Agency (ARSO) via push notification.

Service uses Nokogiri for parsing HTML, HTTParty as lib for fetching content. Clockworks for doing its magic in loop. Push notifications are dispatched via Pushover and everything is running on Heroku with Redis.

snow-conditions via Pusher

Setup on Heroku

  1. Create new project on Heroku.

  2. Add Redis To Go - Nano to Heroku your instance.

heroku addons:add redistogo
  1. Create new Pushover Application.

  2. Set Pushover User and APP keys as environment variables

heroku config:set PUSHOVER_KEY=app_key_here PUSHOVER_USER=user_key_here
  1. Scale Heroku instance to 1 worker. One worker is free.
heroku ps:scale bot=1
  1. Thats it. You should get Pushover notification in 3,... 2,... 1...

Testing

  1. Create new .env inside current folder. Set following values.
REDIS_URL=redis://127.0.0.1:6379
PUSHOVER_KEY=pushover_app_key
PUSHOVER_USER=pushover_user_key
  1. Run rspec.

Contribution

Fork. Share. Have fun.