http_status_checker 0.0.9 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -1
- data/README.md +11 -5
- data/http_status_checker.gemspec +1 -0
- data/lib/http_status_checker.rb +1 -1
- data/lib/http_status_checker/base.rb +1 -1
- data/lib/http_status_checker/version.rb +1 -1
- data/spec/http_status_checker/base_spec.rb +1 -2
- metadata +15 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 22ef65c136b6eda46dfc0355b0568bcaac9377f2
|
4
|
+
data.tar.gz: 089b81cceedad49b06ed255eb52fd3b276c0ec22
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 92974f4e00c1f4344318e139402da46109123631fb1e17db18b432f76e0b8ac1a0d4f96d89663118abcb61fd41c2ec46e8a3f3d550237365865844b6ee1bf504
|
7
|
+
data.tar.gz: 1db50c138353d1367ca5bf9fb7e535573a1b2dcee7a65564c47b146c4b50497595eef6afe11868434966e9a7bfa2413b23c6ba79844764078225ad04dd7bc2a8
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# HttpStatusChecker
|
1
|
+
# HttpStatusChecker [![Build Status](https://travis-ci.org/morizyun/http_status_checker.svg)](https://travis-ci.org/morizyun/http_status_checker) [![Code Climate](https://codeclimate.com/github/morizyun/http_status_checker/badges/gpa.svg)](https://codeclimate.com/github/morizyun/http_status_checker) [![Test Coverage](https://codeclimate.com/github/morizyun/http_status_checker/badges/coverage.svg)](https://codeclimate.com/github/morizyun/http_status_checker)
|
2
2
|
|
3
3
|
Easily Checking http status by http header with Multi-threaded
|
4
4
|
|
@@ -24,15 +24,21 @@ Or install it yourself as:
|
|
24
24
|
|
25
25
|
$ gem install http_status_checker
|
26
26
|
|
27
|
-
## Usage Command Line
|
27
|
+
## Usage on Command Line
|
28
28
|
|
29
|
-
$ http_status_checker http://morizyun.github.io
|
29
|
+
$ http_status_checker -u http://morizyun.github.io
|
30
|
+
#=> url: http://morizyun.github.io
|
31
|
+
#=> response: {:code=>"200", :is_alive=>true, :redirect_url=>nil}
|
30
32
|
|
31
|
-
## Usage Ruby Program
|
33
|
+
## Usage on Ruby Program
|
32
34
|
|
33
35
|
require 'http_status_checker'
|
34
36
|
|
35
|
-
|
37
|
+
urls = ['http://morizyun.github.io', 'http://www.yahoo.co.jp']
|
38
|
+
interval_sec = 1
|
39
|
+
HttpStatusChecker.check urls, interval_sec
|
40
|
+
#=> [{"http://morizyun.github.io"=>{:code=>"200", :is_alive=>true, :redirect_url=>nil}},
|
41
|
+
#=> {"http://www.yahoo.co.jp"=>{:code=>"200", :is_alive=>true, :redirect_url=>nil}}]
|
36
42
|
|
37
43
|
## Contributing
|
38
44
|
|
data/http_status_checker.gemspec
CHANGED
@@ -21,6 +21,7 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.required_ruby_version = '>= 1.9.3'
|
22
22
|
spec.add_dependency 'thor'
|
23
23
|
spec.add_dependency 'parallel'
|
24
|
+
spec.add_dependency 'domainatrix'
|
24
25
|
spec.add_development_dependency 'bundler', '~> 1.7'
|
25
26
|
spec.add_development_dependency 'rake'
|
26
27
|
spec.add_development_dependency 'rspec'
|
data/lib/http_status_checker.rb
CHANGED
@@ -104,8 +104,7 @@ describe HttpStatusChecker::Connection do
|
|
104
104
|
context 'when post 2urls' do
|
105
105
|
it 'returns host with urls array in hash' do
|
106
106
|
host_hash = HttpStatusChecker.__send__(:to_host_hash, [valid_url, redirect_url])
|
107
|
-
expect(host_hash['
|
108
|
-
expect(host_hash['yahoo.co.jp'.to_sym]).to eq([redirect_url])
|
107
|
+
expect(host_hash['yahoo'.to_sym]).to eq([valid_url, redirect_url])
|
109
108
|
end
|
110
109
|
end
|
111
110
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: http_status_checker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- morizyun
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: domainatrix
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: bundler
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|