Skip to content

morizyun/http_status_checker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HttpStatusChecker

Build Status Code Climate Test Coverage endorse

Easily Checking http status with Multi-threaded

Features

  • Get http status
  • A threaded (fast) per host name
  • Return redirect url and errors when get http access

Installation

Add this line to your application's Gemfile:

gem 'http_status_checker'

And then execute:

$ bundle

Or install it yourself as:

$ gem install http_status_checker

Usage on Command Line

$ http_status_checker -u http://morizyun.github.io
#=> url: http://morizyun.github.io
#=> response: {:code=>"200", :is_alive=>true, :redirect_url=>nil}

Usage on Ruby Program

require 'http_status_checker'

urls = ['http://morizyun.github.io', 'http://www.yahoo.co.jp']
interval_sec = 1
HttpStatusChecker.check urls, interval_sec
#=> [{"http://morizyun.github.io"=>{:code=>"200", :is_alive=>true, :redirect_url=>nil}}, 
#=> {"http://www.yahoo.co.jp"=>{:code=>"200", :is_alive=>true, :redirect_url=>nil}}]

Contributing

  1. Fork it ( https://github.com/morizyun/http_status_checker/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

About

Easily Checking http status with Multi-threaded

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages