http_status_checker 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/http_status_checker.gemspec +2 -2
- data/lib/http_status_checker/base.rb +2 -2
- data/lib/http_status_checker/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5cbdc6a66055095918843952a0ef68afb194f5a1
|
4
|
+
data.tar.gz: 5026e41ea52acc0e03baecc8e3ee230d15cb4449
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 94b6079adf425c2e54300920b942f4c0b901d5144269897245c9ae1e7d0ff628382c29526ad532f216dce63d213838aa9183637ed4f1f6987f6692b0bf7ad3f7
|
7
|
+
data.tar.gz: ee492ad97647be2e0450152d92afd0c882679b88774931c8d0a37d84b94ef6833ba65fca484951d006cdaf8bc44a34658964a5fe716ef0fa443ac4c2632142fd
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# HttpStatusChecker [](https://travis-ci.org/morizyun/http_status_checker) [](https://codeclimate.com/github/morizyun/http_status_checker) [](https://codeclimate.com/github/morizyun/http_status_checker)
|
2
2
|
|
3
|
-
Easily Checking http status
|
3
|
+
Easily Checking http status with Multi-threaded
|
4
4
|
|
5
5
|
## Features
|
6
6
|
|
data/http_status_checker.gemspec
CHANGED
@@ -8,8 +8,8 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.version = HttpStatusChecker::VERSION
|
9
9
|
spec.authors = ['morizyun']
|
10
10
|
spec.email = ['merii.ken@gmail.com']
|
11
|
-
spec.summary = %q{Easily Checking http status
|
12
|
-
spec.description = %q{Easily Checking http status
|
11
|
+
spec.summary = %q{Easily Checking http status with Multi-threaded}
|
12
|
+
spec.description = %q{Easily Checking http status with Multi-threaded}
|
13
13
|
spec.homepage = ''
|
14
14
|
spec.license = 'MIT'
|
15
15
|
|
@@ -2,7 +2,7 @@ module HttpStatusChecker
|
|
2
2
|
module Base
|
3
3
|
THREAD_LIMIT = 5.freeze
|
4
4
|
REDIRECT_MAX = 5.freeze
|
5
|
-
RETRY_MAX =
|
5
|
+
RETRY_MAX = 3.freeze
|
6
6
|
|
7
7
|
def check(urls, wait_sec = 1)
|
8
8
|
results = []
|
@@ -34,7 +34,7 @@ module HttpStatusChecker
|
|
34
34
|
def parse_response(redirect_count, redirect_url, result, url, wait_sec)
|
35
35
|
location_url = result['location']
|
36
36
|
if !location_url.nil? && (redirect_url || url) != location_url
|
37
|
-
raise InvalidRedirectError if redirect_count
|
37
|
+
raise InvalidRedirectError if redirect_count >= REDIRECT_MAX
|
38
38
|
get_response(url, wait_sec, location_url, redirect_count + 1, 0)
|
39
39
|
elsif result.code =~ /^(2|3)[0-9]{2}$/
|
40
40
|
{ url => { code: result.code, is_alive: true, redirect_url: redirect_url } }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: http_status_checker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- morizyun
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-12-
|
11
|
+
date: 2014-12-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -122,7 +122,7 @@ dependencies:
|
|
122
122
|
- - ">="
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
|
-
description: Easily Checking http status
|
125
|
+
description: Easily Checking http status with Multi-threaded
|
126
126
|
email:
|
127
127
|
- merii.ken@gmail.com
|
128
128
|
executables:
|
@@ -179,7 +179,7 @@ rubyforge_project:
|
|
179
179
|
rubygems_version: 2.4.5
|
180
180
|
signing_key:
|
181
181
|
specification_version: 4
|
182
|
-
summary: Easily Checking http status
|
182
|
+
summary: Easily Checking http status with Multi-threaded
|
183
183
|
test_files:
|
184
184
|
- spec/http_status_checker/base_spec.rb
|
185
185
|
- spec/http_status_checker/connection_spec.rb
|