Check if a website is up and running or not using isitup.org API.
Add this line to your application's Gemfile:
And then execute:
Or install it yourself as:
$ gem install is_down
$ is_down www.facebook.com www.facebook.com is up
require 'is_down' puts IsDown.is_down?("www.facebook.com") # false puts IsDown.is_up?("www.facebook.com") # true
On Windows, Ruby may raise an SSL error ("certificate verify failed"). To fix it:
- Download a cacert from https://curl.haxx.se/docs/caextract.html
- Set an environment variable 'SSL_CERT_FILE' to the path of the downloaded file.
- Fork this repo
- Make your changes
- Make a PR
Bug reports and pull requests are welcome on GitHub at https://github.com/Gr3atWh173/is_down. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
The gem is available as open source under the terms of the MIT License.
Code of Conduct
Everyone interacting in the IsDown project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.