dns_one 0.5.2 → 0.5.3

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: f9206825fe1eb6344f4cd249a168c07679cc69b7
4
- data.tar.gz: a964aae110849dc8c8a24b47f5a3150a64420177
3
+ metadata.gz: a2e177edc18b9dee7569ef4f36ffe951cc8e37ec
4
+ data.tar.gz: 2d30c670b7da2f45f598c4b61fe9793b45bf793b
5
5
  SHA512:
6
- metadata.gz: abadb5a25fc5914b895084e87df22d704a7e12e77121a2e734ccc1384b38e3e10f280896691da7b6e0b2781c545b7138353b8c3044690acc6a03249b1b508ddd
7
- data.tar.gz: a2912743e8eb8b131a65a2742928cca9765946462090ed068ce43213eda91a2208c92a48646a61ca54263e0a7ec5d1450c6939e4330ad873945b08424b3b652c
6
+ metadata.gz: 20cb2fa761289854fc132714969986ec8be21e4e4bef50e7cfada2c90690b14a2c2fc049b15ce7efe9fc8f24353ad31fd75ec242dce24eb8bcc62f0d64690250
7
+ data.tar.gz: 6bac3289e65ac4b4bdc9973d650b0220280bc705f76a1a8844f0574887c9a7a9ed7f5bf4e1a8c96733573ad51cf06746b1936b1fc0e64b59f94f79c676095d2e
@@ -89,14 +89,15 @@ module DnsOne; class Server
89
89
  log_result[:cache] ||= 0
90
90
  log_result[:cache] += 1 if from_cache
91
91
 
92
+ rcode_uc = Util.const_underscore rcode
92
93
  log_result[:rcode] ||= {}
93
- log_result[:rcode][rcode] ||= 0
94
- log_result[:rcode][rcode] += 1
94
+ log_result[:rcode][rcode_uc] ||= 0
95
+ log_result[:rcode][rcode_uc] += 1
95
96
 
96
- req_resource = Util.last_mod t.resource_class
97
+ req_resource = Util.last_mod(t.resource_class).downcase
97
98
  log_result[:req_resource] ||= {}
98
99
  log_result[:req_resource][req_resource] ||= 0
99
- log_result[:req_resource][req_resource] += 1
100
+ log_result[:req_resource][req_resource] += 1
100
101
  }
101
102
  end
102
103
 
@@ -75,7 +75,7 @@ module DnsOne; class Stat
75
75
  Resolv::DNS::RCode.constants.map{|c|
76
76
  [
77
77
  Resolv::DNS::RCode.const_get(c),
78
- const_underscore(c)
78
+ Util.const_underscore(c)
79
79
  ]
80
80
  }
81
81
  ]
@@ -149,16 +149,6 @@ module DnsOne; class Stat
149
149
  DB_FNAME
150
150
  end
151
151
 
152
- def const_underscore name
153
- name = name.to_s.dup
154
- name.gsub!('::', '/')
155
- name.gsub!(/([A-Z\d]+)([A-Z][a-z])/,'\1_\2')
156
- name.gsub!(/([a-z\d])([A-Z])/,'\1_\2')
157
- name.tr!("-", "_")
158
- name.downcase!
159
- name
160
- end
161
-
162
152
  def rsql *sql
163
153
  t0 = Time.now if META_STAT_ON
164
154
  res = @db.execute *sql
@@ -53,4 +53,14 @@ module DnsOne; class Util
53
53
  end
54
54
  end
55
55
 
56
+ def const_underscore name
57
+ name = name.to_s.dup
58
+ name.gsub!('::', '/')
59
+ name.gsub!(/([A-Z\d]+)([A-Z][a-z])/,'\1_\2')
60
+ name.gsub!(/([a-z\d])([A-Z])/,'\1_\2')
61
+ name.tr!("-", "_")
62
+ name.downcase!
63
+ name
64
+ end
65
+
56
66
  end; end
@@ -1,3 +1,3 @@
1
1
  module DnsOne
2
- VERSION = "0.5.2"
2
+ VERSION = "0.5.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dns_one
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Lobato