Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hummusonrails/corona-hebrew-checker
Get updates when there are new health advisory notices by SMS
https://github.com/hummusonrails/corona-hebrew-checker
coronavirus covid-19 israel rails ruby sms
Last synced: 29 days ago
JSON representation
Get updates when there are new health advisory notices by SMS
- Host: GitHub
- URL: https://github.com/hummusonrails/corona-hebrew-checker
- Owner: hummusonrails
- License: mit
- Created: 2020-03-04T05:39:41.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-19T17:43:53.000Z (almost 2 years ago)
- Last Synced: 2024-10-27T16:41:37.231Z (3 months ago)
- Topics: coronavirus, covid-19, israel, rails, ruby, sms
- Language: Ruby
- Homepage: https://israeli-corona-diff-checker.herokuapp.com/
- Size: 96.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Corona Virus Health Advisory Diff Checker with SMS
[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy)
This is a Ruby on Rails application that uses the [Nexmo SMS API](https://developer.nexmo.com) to check the [Israeli Ministry of Health](https://www.health.gov.il/Subjects/disease/corona/Pages/default.aspx) Corona Virus status page for any diffs in the past 24 hours. If there is a diff it sends out an update message by SMS to all those subscribed.
* Users can add themselves to the SMS list by visiting the top-level domain of the app and filling out the form.
* Users can remove themselves from the list by responding with the number `1`.## Installation and Usage
To use this application locally:
* Clone the repository locally
* Run `bundle install`
* Run `rake db:migrate`
* To setup the cron job locally on your machine run `whenever --update-crontab`
* To start the Rails server run `bundle exec rails s`** Note: The Nexmo SMS API needs an externally accessible URL to send data to and interact with. For development purposes, [ngrok](https://ngrok.io) is a good tool. **
To use this application on Herokuu:
* 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](https://devcenter.heroku.com/articles/scheduler)### Environment Variables
The app leverages three environment variables, which you need to provide the values for. As always, please do not commit your `.env` file to version control.
* NEXMO_API_KEY
* NEXMO_API_SECRET
* FROM_NUMBERYou can obtain your Nexmo API credentials and provision a Nexmo virtual phone number from within the [Nexmo Dashboard](https://dashboard.nexmo.com).
### Webhooks
The app has one route that is a webhook for the SMS API: `/webhooks/event`. From within the Nexmo Dashboard you can edit your virtual phone number settings to provide an *externally accessible* URL to the API. For example, if you are using ngrok, you would submit something like: `https://my-ngrok-url.ngrok.io/webhooks/event`.
## License
This app is licensed under the [MIT License](LICENSE.txt)