em-udns 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  module EventMachine
2
2
  module Udns
3
- VERSION = "0.2.1"
3
+ VERSION = "0.2.2"
4
4
  end
5
5
  end
data/test/test-em-udns.rb CHANGED
@@ -73,46 +73,47 @@ EM.run do
73
73
  timer = EM::PeriodicTimer.new(0) do
74
74
  if sent == times
75
75
  timer.cancel
76
+
76
77
  else
77
78
  sent += 1
78
- end
79
-
80
- query = case type
81
- when "A"
82
- resolver.submit_A name
83
- when "AAAA"
84
- resolver.submit_AAAA name
85
- when "PTR"
86
- resolver.submit_PTR name
87
- when "MX"
88
- resolver.submit_MX name
89
- when "TXT"
90
- resolver.submit_TXT name
91
- when "SRV"
92
- resolver.submit_SRV name, service, protocol
93
- when "NAPTR"
94
- resolver.submit_NAPTR name
95
- end
96
-
97
- query.callback do |result|
98
- recv += 1
99
- puts "#{Time.now} INFO: callback: result =>"
100
- result.each do |rr|
101
- puts "- #{rr.inspect}"
79
+
80
+ query = case type
81
+ when "A"
82
+ resolver.submit_A name
83
+ when "AAAA"
84
+ resolver.submit_AAAA name
85
+ when "PTR"
86
+ resolver.submit_PTR name
87
+ when "MX"
88
+ resolver.submit_MX name
89
+ when "TXT"
90
+ resolver.submit_TXT name
91
+ when "SRV"
92
+ resolver.submit_SRV name, service, protocol
93
+ when "NAPTR"
94
+ resolver.submit_NAPTR name
102
95
  end
103
- puts "(active queries: #{resolver.active} / sent: #{sent} / recv: #{recv})"
104
- if recv == times
105
- print_info(times, time_start)
106
- exit
96
+
97
+ query.callback do |result|
98
+ recv += 1
99
+ puts "#{Time.now} INFO: callback: result =>"
100
+ result.each do |rr|
101
+ puts "- #{rr.inspect}"
102
+ end
103
+ puts "(active queries: #{resolver.active} / sent: #{sent} / recv: #{recv})"
104
+ if recv == times
105
+ print_info(times, time_start)
106
+ exit
107
+ end
107
108
  end
108
- end
109
109
 
110
- query.errback do |error|
111
- recv += 1
112
- puts "#{Time.now} INFO: errback: error => #{error.inspect} (active queries: #{resolver.active} / sent: #{sent} / recv: #{recv})"
113
- if recv == times
114
- print_info(times, time_start)
115
- exit
110
+ query.errback do |error|
111
+ recv += 1
112
+ puts "#{Time.now} INFO: errback: error => #{error.inspect} (active queries: #{resolver.active} / sent: #{sent} / recv: #{recv})"
113
+ if recv == times
114
+ print_info(times, time_start)
115
+ exit
116
+ end
116
117
  end
117
118
  end
118
119
 
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 1
9
- version: 0.2.1
8
+ - 2
9
+ version: 0.2.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - "I\xC3\xB1aki Baz Castillo"
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-07-04 00:00:00 +02:00
17
+ date: 2011-07-05 00:00:00 +02:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency