net-http-follow_tail 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +12 -0
- data/lib/net/http/follow_tail.rb +2 -2
- data/lib/net/http/follow_tail/version.rb +1 -1
- metadata +2 -2
data/Rakefile
CHANGED
@@ -4,4 +4,16 @@ RSpec::Core::RakeTask.new(:spec) do |config|
|
|
4
4
|
# config.rcov = true
|
5
5
|
end
|
6
6
|
|
7
|
+
task "push-gem" do
|
8
|
+
build_output = %x{gem build net-http-follow_tail.gemspec}
|
9
|
+
puts build_output
|
10
|
+
|
11
|
+
_, built_gem = *build_output.match(/File: (\S+.gem$)/)
|
12
|
+
|
13
|
+
$stdout.write "Push to rubygems.org? "
|
14
|
+
should_push = $stdin.readline() =~ /^y/i
|
15
|
+
|
16
|
+
system "gem push #{built_gem}" unless should_push.nil?
|
17
|
+
end
|
18
|
+
|
7
19
|
task :default => :spec
|
data/lib/net/http/follow_tail.rb
CHANGED
@@ -78,7 +78,7 @@ class Net::HTTP::FollowTail
|
|
78
78
|
|
79
79
|
begin
|
80
80
|
head_response = head_request
|
81
|
-
rescue Timeout::Error, SocketError, EOFError, Errno::ETIMEDOUT, Errno::ENETUNREACH => err
|
81
|
+
rescue Timeout::Error, SocketError, EOFError, Errno::ETIMEDOUT, Errno::ENETUNREACH, Errno::EHOSTUNREACH => err
|
82
82
|
return Result.new(state: :error, method: :head, error: err)
|
83
83
|
end
|
84
84
|
|
@@ -91,7 +91,7 @@ class Net::HTTP::FollowTail
|
|
91
91
|
|
92
92
|
begin
|
93
93
|
get_response = get_request(size_now)
|
94
|
-
rescue Timeout::Error, SocketError, EOFError, Errno::ETIMEDOUT, Errno::ENETUNREACH => err
|
94
|
+
rescue Timeout::Error, SocketError, EOFError, Errno::ETIMEDOUT, Errno::ENETUNREACH, Errno::EHOSTUNREACH => err
|
95
95
|
return Result.new(state: :error, method: :get, error: err)
|
96
96
|
end
|
97
97
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: net-http-follow_tail
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-08-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: exponential-backoff
|