http_status_checker 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 22ef65c136b6eda46dfc0355b0568bcaac9377f2
4
- data.tar.gz: 089b81cceedad49b06ed255eb52fd3b276c0ec22
3
+ metadata.gz: 5cbdc6a66055095918843952a0ef68afb194f5a1
4
+ data.tar.gz: 5026e41ea52acc0e03baecc8e3ee230d15cb4449
5
5
  SHA512:
6
- metadata.gz: 92974f4e00c1f4344318e139402da46109123631fb1e17db18b432f76e0b8ac1a0d4f96d89663118abcb61fd41c2ec46e8a3f3d550237365865844b6ee1bf504
7
- data.tar.gz: 1db50c138353d1367ca5bf9fb7e535573a1b2dcee7a65564c47b146c4b50497595eef6afe11868434966e9a7bfa2413b23c6ba79844764078225ad04dd7bc2a8
6
+ metadata.gz: 94b6079adf425c2e54300920b942f4c0b901d5144269897245c9ae1e7d0ff628382c29526ad532f216dce63d213838aa9183637ed4f1f6987f6692b0bf7ad3f7
7
+ data.tar.gz: ee492ad97647be2e0450152d92afd0c882679b88774931c8d0a37d84b94ef6833ba65fca484951d006cdaf8bc44a34658964a5fe716ef0fa443ac4c2632142fd
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
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
- Easily Checking http status by http header with Multi-threaded
3
+ Easily Checking http status with Multi-threaded
4
4
 
5
5
  ## Features
6
6
 
@@ -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 by http header with Multi-threaded}
12
- spec.description = %q{Easily Checking http status by http header with Multi-threaded}
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 = 2.freeze
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 > REDIRECT_MAX
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 } }
@@ -1,3 +1,3 @@
1
1
  module HttpStatusChecker
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
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.0
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-27 00:00:00.000000000 Z
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 by http header with Multi-threaded
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 by http header with Multi-threaded
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