This is a Ruby on Rails web app that scrapes once a day isittheweekend.com to find out if today is the weekend and sends an update to all subscribers via SMS using the Vonage SMS API.
- Ruby on Rails
- A Vonage account
- A Vonage phone number
To install this application:
- Clone this repository locally
- Run
bundle install
andrake db:migrate
from the command line
To use this application:
- Set up a Vonage account
- Purchase a Vonage phone number
- Start your ngrok server from the command line
- Update your number's webhook address in the Vonage Dashboard to your ngrok URL
- i.e.
https://my-ngrok-url.ngrok.io/webhooks/event
- i.e.
- Copy the
.env.sample
file to.env
and fill in the values for the variablesVONAGE_API_KEY
: Your Vonage API keyVONAGE_API_SECRET
: Your Vonage API secretFROM_NUMBER
: Your Vonage provisioned phone number
- Run
whenever --update-crontab
from the command line to set up the daily scraping task - Start your Rails server
- Visit
localhost:3000
in your browser and add your phone number on the form - As long as your web server is running you will receive a once-daily SMS message
- Click the
Deploy to Heroku
button on the top - Set up the environment variables when prompted and complete set up
- Once it is set up, schedule the Rake
scraper:check_site_update
task using the Heroku Scheduler
This project is under the MIT License