dubdubdub 0.3.3 → 0.3.4

Sign up to get free protection for your applications and to get access to all the features.
data/dubdubdub.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "dubdubdub"
8
- s.version = "0.3.3"
8
+ s.version = "0.3.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["James Hu"]
12
- s.date = "2013-01-24"
12
+ s.date = "2013-03-22"
13
13
  s.description = "A library that provides web utility methods with proxification."
14
14
  s.email = "axsuul@gmail.com"
15
15
  s.extra_rdoc_files = [
data/lib/dubdubdub.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  class DubDubDub
2
2
  # Version
3
- VERSION = "0.3.3"
3
+ VERSION = "0.3.4"
4
4
 
5
5
  attr_accessor :client
6
6
 
@@ -115,7 +115,7 @@ class DubDubDub::Client
115
115
  def handle_net_http_exceptions(&block)
116
116
  begin
117
117
  yield
118
- rescue Timeout::Error, Errno::ETIMEDOUT, Errno::EHOSTUNREACH
118
+ rescue Timeout::Error, Errno::ETIMEDOUT, Errno::EHOSTUNREACH => e
119
119
  raise DubDubDub::ResponseError.new(e, 408) # Timeout
120
120
  rescue SocketError, EOFError => e
121
121
  raise DubDubDub::ResponseError.new(e, 404) # Not found
@@ -125,7 +125,7 @@ class DubDubDub::Client
125
125
  def handle_mechanize_exceptions(&block)
126
126
  begin
127
127
  yield
128
- rescue Mechanize::RedirectLimitReachedError
128
+ rescue Mechanize::RedirectLimitReachedError => e
129
129
  raise DubDubDub::RedirectLimitReachedError
130
130
  rescue Mechanize::ResponseCodeError => e
131
131
  raise DubDubDub::ResponseError.new(e, e.response_code)
@@ -135,12 +135,11 @@ class DubDubDub::Client
135
135
  def handle_rest_client_exceptions(&block)
136
136
  begin
137
137
  yield
138
- rescue RestClient::MaxRedirectsReached
138
+ rescue RestClient::MaxRedirectsReached => e
139
139
  raise DubDubDub::RedirectLimitReachedError
140
140
  rescue RestClient::Exception => e
141
141
  code = e.response.code if e.response
142
142
  raise DubDubDub::ResponseError.new(e, code)
143
143
  end
144
-
145
144
  end
146
145
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dubdubdub
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.4
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-01-24 00:00:00.000000000 Z
12
+ date: 2013-03-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rest-client
@@ -211,7 +211,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
211
211
  version: '0'
212
212
  segments:
213
213
  - 0
214
- hash: 1726643959394672028
214
+ hash: 1417612097550344492
215
215
  required_rubygems_version: !ruby/object:Gem::Requirement
216
216
  none: false
217
217
  requirements: