async-dns 1.2.2 → 1.2.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d4ffb8685eb3a47dad14219a9ffd0fcd4193c2ab24bb04ae4b213d10513adafc
4
- data.tar.gz: 6d644f3e0ffc4654dda0e08d077f0f3bd463a7c6d3de05b2c43405e5f2a008b4
3
+ metadata.gz: 90ce09288cd9b84da0b1031b85f76c9d7d2c1fc14344b209bcb0614f35e45fb5
4
+ data.tar.gz: c14524d10c279cfc673eab95fb024b9e41280c833dbfbf1c57650e8f7b3e31db
5
5
  SHA512:
6
- metadata.gz: 638a807a5dc8f368bfba9e4ad720625aa037e9432b23faed36f3d31674eecfc6c29a68a6b28f95a728db2cc0dbe11223f6ea7e4bc24e9478aaf9ba590dbb71b4
7
- data.tar.gz: e2fd429f878abe021d95b256d1717ea0d6a38204602e1181bf4b63d935c26d935f03936c73c9f7c89586217ca8c352783d07714c17d5eec386f010fb2d6bd831
6
+ metadata.gz: e72f090a02b1f5aee4d8834460678770ffd31ff89f69a6df1236ac3893899d488ce4d91b37972e050bba3a1e38b2267253249c92e2631f7620c5ef231d67f3cd
7
+ data.tar.gz: 3d93b690bc5f9438a0464f0d0e36227f24d1ed03ebf82a436919823f9531a6f3fc09dd470504605c5ea1d13230a65c4a720871d184a8a6ce1880e82a4bec66ef
@@ -26,7 +26,7 @@ class Resolv
26
26
  # Merge the given message with this message. A number of heuristics are applied in order to ensure that the result makes sense. For example, If the current message is not recursive but is being merged with a message that was recursive, this bit is maintained. If either message is authoritive, then the result is also authoritive.
27
27
  #
28
28
  # Modifies the current message in place.
29
- def merge! (other)
29
+ def merge!(other)
30
30
  # Authoritive Answer
31
31
  @aa = @aa && other.aa
32
32
 
@@ -67,7 +67,6 @@ class Resolv
67
67
  return self.class.new(@labels + origin, absolute)
68
68
  end
69
69
 
70
-
71
70
  # Return the name, typically relative, without the specified origin suffix. If the origin is nil, don't change the name, but change it to absolute (as specified).
72
71
  def without_origin(origin, absolute = false)
73
72
  return self.class.new(@labels, absolute) if origin == nil
@@ -59,8 +59,7 @@ module Async::DNS
59
59
 
60
60
  return @server.process_query(query, options)
61
61
  rescue StandardError => error
62
- @logger.error "<> Error processing request: #{error.inspect}!"
63
- Async::DNS::log_exception(@logger, error)
62
+ @logger.error(error)
64
63
 
65
64
  return error_response(query)
66
65
  end
@@ -20,6 +20,6 @@
20
20
 
21
21
  module Async
22
22
  module DNS
23
- VERSION = '1.2.2'
23
+ VERSION = '1.2.3'
24
24
  end
25
25
  end
@@ -22,86 +22,84 @@
22
22
 
23
23
  require 'async/dns'
24
24
 
25
- module Async::DNS::ResolverPerformanceSpec
26
- describe Async::DNS::Resolver do
27
- context 'benchmark' do
28
- domains = %W{
29
- Facebook.com
30
- Twitter.com
31
- Google.com
32
- Youtube.com
33
- Wordpress.org
34
- Adobe.com
35
- Blogspot.com
36
- Wikipedia.org
37
- Linkedin.com
38
- Wordpress.com
39
- Yahoo.com
40
- Amazon.com
41
- Flickr.com
42
- Pinterest.com
43
- Tumblr.com
44
- W3.org
45
- Apple.com
46
- Myspace.com
47
- Vimeo.com
48
- Microsoft.com
49
- Youtu.be
50
- Qq.com
51
- Digg.com
52
- Baidu.com
53
- Stumbleupon.com
54
- Addthis.com
55
- Statcounter.com
56
- Feedburner.com
57
- TradeMe.co.nz
58
- Nytimes.com
59
- Reddit.com
60
- Weebly.com
61
- Bbc.co.uk
62
- Blogger.com
63
- Msn.com
64
- Macromedia.com
65
- Goo.gl
66
- Instagram.com
67
- Gov.uk
68
- Icio.us
69
- Yandex.ru
70
- Cnn.com
71
- Webs.com
72
- Google.de
73
- T.co
74
- Livejournal.com
75
- Imdb.com
76
- Mail.ru
77
- Jimdo.com
78
- }
25
+ RSpec.describe Async::DNS::Resolver , timeout: 30 do
26
+ context 'benchmark' do
27
+ domains = %W{
28
+ Facebook.com
29
+ Twitter.com
30
+ Google.com
31
+ Youtube.com
32
+ Wordpress.org
33
+ Adobe.com
34
+ Blogspot.com
35
+ Wikipedia.org
36
+ Linkedin.com
37
+ Wordpress.com
38
+ Yahoo.com
39
+ Amazon.com
40
+ Flickr.com
41
+ Pinterest.com
42
+ Tumblr.com
43
+ W3.org
44
+ Apple.com
45
+ Myspace.com
46
+ Vimeo.com
47
+ Microsoft.com
48
+ Youtu.be
49
+ Qq.com
50
+ Digg.com
51
+ Baidu.com
52
+ Stumbleupon.com
53
+ Addthis.com
54
+ Statcounter.com
55
+ Feedburner.com
56
+ TradeMe.co.nz
57
+ Nytimes.com
58
+ Reddit.com
59
+ Weebly.com
60
+ Bbc.co.uk
61
+ Blogger.com
62
+ Msn.com
63
+ Macromedia.com
64
+ Goo.gl
65
+ Instagram.com
66
+ Gov.uk
67
+ Icio.us
68
+ Yandex.ru
69
+ Cnn.com
70
+ Webs.com
71
+ Google.de
72
+ T.co
73
+ Livejournal.com
74
+ Imdb.com
75
+ Mail.ru
76
+ Jimdo.com
77
+ }
78
+
79
+ before do
80
+ require 'benchmark'
81
+ end
79
82
 
80
- before do
81
- require 'benchmark'
82
- end
83
-
84
- include_context Async::RSpec::Reactor
85
-
86
- it 'should be faster than native resolver' do
87
- Benchmark.bm(30) do |x|
88
- a = x.report("Async::DNS::Resolver") do
89
- resolver = Async::DNS::Resolver.new([[:udp, "8.8.8.8", 53], [:tcp, "8.8.8.8", 53]])
90
-
91
- resolved = domains.collect{|domain| resolver.addresses_for(domain)}
92
- end
93
-
94
- b = x.report("Resolv::DNS") do
95
- resolver = Resolv::DNS.new(:nameserver => "8.8.8.8")
83
+ include_context Async::RSpec::Reactor
84
+
85
+ it 'should be faster than native resolver' do
86
+ Benchmark.bm(30) do |x|
87
+ a = x.report("Async::DNS::Resolver") do
88
+ resolver = Async::DNS::Resolver.new([[:udp, "8.8.8.8", 53], [:tcp, "8.8.8.8", 53]])
96
89
 
97
- resolved = domains.collect do |domain|
98
- [domain, resolver.getaddresses(domain)]
99
- end
90
+ resolved = domains.collect{|domain| resolver.addresses_for(domain)}
91
+ end
92
+
93
+ b = x.report("Resolv::DNS") do
94
+ resolver = Resolv::DNS.new(:nameserver => "8.8.8.8")
95
+
96
+ resolved = domains.collect do |domain|
97
+ [domain, resolver.getaddresses(domain)]
100
98
  end
101
-
102
- # This is a regression, but not important right now.
103
- # expect(a.real).to be < b.real
104
99
  end
100
+
101
+ # This is a regression, but not important right now.
102
+ # expect(a.real).to be < b.real
105
103
  end
106
104
  end
107
105
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: async-dns
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
4
+ version: 1.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-02-24 00:00:00.000000000 Z
11
+ date: 2019-04-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: async-io
@@ -164,7 +164,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
164
164
  - !ruby/object:Gem::Version
165
165
  version: '0'
166
166
  requirements: []
167
- rubygems_version: 3.0.2
167
+ rubygems_version: 3.0.3
168
168
  signing_key:
169
169
  specification_version: 4
170
170
  summary: An easy to use DNS client resolver and server for Ruby.