dns_one 0.4.49 → 0.4.50

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: 31952ea93dc7ece574b2a235f1dca11504c4e892
4
- data.tar.gz: 9aa0c8f73e8255825d711f94cb574ae84d15ac98
3
+ metadata.gz: 118a9ea3ff72f1a77e5735b7b1511e567e154772
4
+ data.tar.gz: 264c158771706188c9ebb91edc52e48da536d260
5
5
  SHA512:
6
- metadata.gz: 33bda4530037b8037b897a1ec3d2c9a86cfc20d84837b176171c531dbc15447646837848d4a0b85df41730df16d5a2a2916c1647d3bc73ad351f03604a4c1d5a
7
- data.tar.gz: 4d12197f714963e6512dae88d456ce914cd16c2fad47f0359b0b9d373780bb858b10b6163c6e2fd192a17e103ab32e5e93c79440ad2d34a81bbeb49bdfebb579
6
+ metadata.gz: 3367a5ec3b62bd03e79d1b1c5421acfec1a5133a3751cd1f77ba8a3ed54e2b934acaf04af088902c6d9c1f23b1e32a9b2a2058660f96d915c2da762e85a8dae8
7
+ data.tar.gz: 2adcd0aaad8da4bb9d8634fbe19647365b2a67e3d9466cac1aca94530d95ffb3be0a6517488fffced37bf0c5669401dca0dff54cd734d1d58e354b2c71ec5b08
@@ -22,7 +22,7 @@ module DnsOne; module Backend; class HTTPBell < Base
22
22
  def update
23
23
  last_id = @last_id || 0
24
24
 
25
- url = @conf[:update_cache_url].sub '$id', last_id.to_s
25
+ url = @conf[:http_bell_url].sub '$id', last_id.to_s
26
26
 
27
27
  recs = `curl #{url}`
28
28
  .split("\n")
@@ -33,7 +33,7 @@ module DnsOne; module Backend; class HTTPBell < Base
33
33
  recs.each do |rec|
34
34
  id, domain = rec
35
35
  id = id.to_i
36
- @domains[domain] = @conf[:update_cache_record_set]
36
+ @domains[domain] = @conf[:http_bell_record_set]
37
37
  if !@last_id || @last_id < id
38
38
  @last_id = id
39
39
  end
@@ -43,11 +43,11 @@ module DnsOne; module Backend; class HTTPBell < Base
43
43
  end
44
44
 
45
45
  def listen_updater_bell
46
- unless @conf[:update_cache_bell_port]
46
+ unless @conf[:http_bell_bell_port]
47
47
  return
48
48
  end
49
49
  require "socket"
50
- dts = TCPServer.new '0.0.0.0', @conf[:update_cache_bell_port]
50
+ dts = TCPServer.new '0.0.0.0', @conf[:http_bell_bell_port]
51
51
  Thread.new do
52
52
  loop do
53
53
  Thread.start(dts.accept) do |s|
@@ -1,3 +1,3 @@
1
1
  module DnsOne
2
- VERSION = "0.4.49"
2
+ VERSION = "0.4.50"
3
3
  end
@@ -83,9 +83,9 @@ module DnsOne; class ZoneSearch
83
83
  Util.die "Domain list file #{file} not found."
84
84
  end
85
85
  Backend::File.new file
86
- elsif @conf[:backend][:update_cache_url]
87
- unless @conf[:backend][:update_cache_record_set]
88
- Util.die "backend.update_cache_record_set not set."
86
+ elsif @conf[:backend][:http_bell_url]
87
+ unless @conf[:backend][:http_bell_record_set]
88
+ Util.die "backend.http_bell_record_set not set."
89
89
  end
90
90
  Backend::HTTPBell.new @conf[:backend]
91
91
  else
data/util/sample_conf.yml CHANGED
@@ -8,7 +8,6 @@ config:
8
8
  backend:
9
9
  ##############
10
10
  # DB backend #
11
- ##############
12
11
  database: db_name
13
12
  username: db_user
14
13
  password: db_pass
@@ -26,11 +25,15 @@ backend:
26
25
  query: SELECT 'my_set_1' FROM domains WHERE url = $domain LIMIT 1
27
26
  # query: SELECT domains.record_set FROM domains WHERE domain_name = $domain LIMIT 1
28
27
 
29
- # or...
28
+ #####################
29
+ # HTTP Bell backend #
30
+
31
+ http_bell_url: https://dnsapi.mysite.com/dns/fetch_since?id=$id
32
+ http_bell_record_set: my_set_1
33
+ http_bell_bell_port: 27861
30
34
 
31
35
  ################
32
36
  # File backend #
33
- ################
34
37
 
35
38
  # file: /etc/dns_one/domains.csv
36
39
 
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.4.49
4
+ version: 0.4.50
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Lobato