dns_one 0.5.20 → 0.5.21
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dns_one/backend/http_bell.rb +7 -1
- data/lib/dns_one/util.rb +5 -2
- data/lib/dns_one/version.rb +1 -1
- data/util/sample_conf.yml +1 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6b5bf92c0bc4710f4e54db5721a0c586935e1835
|
4
|
+
data.tar.gz: 300f3e270ddab9889fdea647596a19a53189f3f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 132013f5c4eb8889695674b6180ab5f6380727ca4d71da16af4c752c7b89cabd5002b4da39bf04408a0b83e47f435b0b7bb20d64192a41fedba9e2eec17070d0
|
7
|
+
data.tar.gz: 162dfddae488f15de7d105109e958fd65da3c6048fb48194b904f31ab9005b9b849485be85a75cbedf99efdeb2cd42c3775c6ba6b0a988866e7b0fdc0eb00c7c
|
@@ -47,7 +47,7 @@ module DnsOne; module Backend; class HTTPBell < Base
|
|
47
47
|
|
48
48
|
url = @conf[:http_bell_url].sub '$id', last_id.to_s
|
49
49
|
|
50
|
-
recs = `curl #{url}`
|
50
|
+
recs = `curl #{curl_opts} '#{url}'`
|
51
51
|
.split(/\n+/)
|
52
52
|
.map{ |r|
|
53
53
|
id, domain = r.strip.split /\s+/
|
@@ -62,6 +62,12 @@ module DnsOne; module Backend; class HTTPBell < Base
|
|
62
62
|
recs
|
63
63
|
end
|
64
64
|
|
65
|
+
def curl_opts
|
66
|
+
if Global.conf.http_bell_insecure
|
67
|
+
'--insecure'
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
65
71
|
def log_update point, recs = nil
|
66
72
|
case point
|
67
73
|
when :start
|
data/lib/dns_one/util.rb
CHANGED
@@ -58,8 +58,11 @@ module DnsOne; class Util
|
|
58
58
|
def init_logger logdev, level = Logger::WARN, shift_age = 10, shift_size = 2**20
|
59
59
|
if logdev.is_a? String
|
60
60
|
begin
|
61
|
-
|
62
|
-
|
61
|
+
if File.exists? logdev
|
62
|
+
File.writable? logdev
|
63
|
+
else
|
64
|
+
FileUtils.mkdir_p File.dirname(logdev)
|
65
|
+
end
|
63
66
|
rescue => e
|
64
67
|
$stderr.puts "#{e.desc}\nCannot open log file #{logdev}. Will use STDOUT."
|
65
68
|
logdev = $stdout
|
data/lib/dns_one/version.rb
CHANGED
data/util/sample_conf.yml
CHANGED