Easily Checking http status with Multi-threaded
Ruby
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bin
lib
spec
.gitignore
.rspec
.travis.yml
Gemfile
LICENSE.txt
README.md
Rakefile
http_status_checker.gemspec

README.md

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