resolver_replace 0.0.3 → 0.1.0

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: 2d7be38119515d08fdb024771a094aebbe81ff6a
4
- data.tar.gz: 37cb391072b4c8fa64485ae7f5ae0880fb86586f
3
+ metadata.gz: 0849e908711ecb60b26aa4b5212155377e1f743e
4
+ data.tar.gz: bfa98c83be0cb27851a1be0d2ff1d4103022fbba
5
5
  SHA512:
6
- metadata.gz: 8d9ba209c965612564954dba47a1048049c55cf7dac223c52018117660142b09dac52188d4dd1f39bf1cd7d7d5380b11d82d030b2bf7ae943fe5396aed6847f8
7
- data.tar.gz: 7f57f57ad114affb76ab0868019058c84158fe44ce6b4454181e0b067c33def5570ed5b608e41d75f3846eea40fe719cdf4f2eef508479199e62db8c6c3df8df
6
+ metadata.gz: 7a8202dc08419c4c028a1b6cbee3b867a5e180346e20feb9f65722c3ec85c684e9ffb040eefadd2cf8ae1c6f77f00eda96e5d57e7f9da2b32ae0bbfa9534703f
7
+ data.tar.gz: 04d48f800cf4b2cdb57d5bdc9283e66bd3b446a785480b187c942d54b65025c7ed077a78fb77e94c564f11c865a4865550762faf00ea45513be34589d4fe05e8
@@ -1,3 +1,9 @@
1
+ ## 0.1.0 (2014/07/18)
2
+
3
+ Fixes:
4
+
5
+ * (Critical) Add nil check not to get errors in Net::HTTP#connect
6
+
1
7
  ## 0.0.3 (2014/07/17)
2
8
 
3
9
  Changes:
@@ -8,7 +8,8 @@ class << IPSocket
8
8
  # :startdoc:
9
9
  def getaddress(host)
10
10
  begin
11
- return ResolverReplace.getaddress(host).to_s
11
+ host = ResolverReplace.getaddress(host).to_s if host and host != ""
12
+ return host
12
13
  rescue ResolverReplace.error_class => e
13
14
  raise SocketError, "#{e.class} #{e.message}"
14
15
  end
@@ -20,7 +21,7 @@ class TCPSocket < IPSocket
20
21
  alias original_resolver_initialize initialize
21
22
  # :startdoc:
22
23
  def initialize(host, serv, *rest)
23
- rest[0] = IPSocket.getaddress(rest[0]) unless rest.empty?
24
+ rest[0] = IPSocket.getaddress(rest[0]) if !rest.empty? and rest[0]
24
25
  original_resolver_initialize(IPSocket.getaddress(host), serv, *rest)
25
26
  end
26
27
  end
@@ -48,7 +49,7 @@ class UDPSocket < IPSocket
48
49
  if rest.length == 2
49
50
  host, port = rest
50
51
  begin
51
- addrs = ResolverReplace.getaddresses(host)
52
+ addrs = (host and host != "") ? ResolverReplace.getaddresses(host) : []
52
53
  rescue ResolverReplace.error_class => e
53
54
  raise SocketError, "#{e.class} #{e.message}"
54
55
  end
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "resolver_replace"
7
- spec.version = "0.0.3"
7
+ spec.version = "0.1.0"
8
8
  spec.authors = ["Naotoshi Seo"]
9
9
  spec.email = ["sonots@gmail.com"]
10
10
  spec.summary = %q{Replace the DNS resolver}
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: resolver_replace
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Naotoshi Seo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-17 00:00:00.000000000 Z
11
+ date: 2014-07-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler