A simple gem to test if you're connected to the internt
Ruby
Switch branches/tags
Nothing to show
Pull request Compare This branch is 1 commit behind dscataglini:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
.gitignore
README.rdoc
Rakefile
internet_connection.gemspec

README.rdoc

Internet Connection

Checks if it can connection to the internet by trying to resolve a hostname to an ip I couldn't think of a faster way than dsn resolve

Install

gem install internet_connection

Example:

InternetConnection.on?  => true
InternetConnection.off? => false

Notes:

If using ruby 1.9 with eventmachine please install em-resolv-replace gem for evented thread save resolvs