coredns 1.0.1 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -1
- data/README.md +1 -1
- data/lib/etcd/dns_zone.rb +1 -1
- data/lib/etcd/domain.rb +1 -1
- data/lib/etcd.rb +10 -2
- data/lib/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8a4c7ff802b7253b55229b164cc204da10755e64e20892cc30b9fd71c88dfa69
|
4
|
+
data.tar.gz: fccf62fc7990b4a4dcf0406ef8dd2af70059d048643d9b869f015c0abc20d87e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e880296a9d647302e262f0e69ecfa5e07801211eddc94d37b7d8756699937ae91bf4a1f5c2dce784275dbaa8966a4c7dcf38868b77957ba9e3dbd3042334cd0b
|
7
|
+
data.tar.gz: c21419d3d99c0a38591f4cd5dbe82c611249598d6398ad2f959820a72cdd96af36d2d79d2775357d3e243afde3150fef039743c362f89572c070e89422037852
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
data/lib/etcd/dns_zone.rb
CHANGED
@@ -28,7 +28,7 @@ class CoreDns::Etcd::DnsZone < CoreDns::Etcd::Domain
|
|
28
28
|
|
29
29
|
def parent_zone
|
30
30
|
@namespace = @namespace.split(".")[1..].join(".")
|
31
|
-
return nil if @namespace.empty?
|
31
|
+
return nil if @namespace.empty? || !@namespace.include?(".")
|
32
32
|
|
33
33
|
zone_hash = @client.zone(@namespace).show
|
34
34
|
return @client.zone(@namespace) if zone_hash
|
data/lib/etcd/domain.rb
CHANGED
@@ -15,7 +15,7 @@ module CoreDns
|
|
15
15
|
data = HashWithIndifferentAccessCustom.new(data).attributes
|
16
16
|
hostname = nil
|
17
17
|
if data[:name]
|
18
|
-
hostname = "#{data.delete(:name)}.#{@namespace}./#{@client.prefix}".split(".").reverse.join("/")
|
18
|
+
hostname = "#{data.delete(:name)}.#{@namespace}./#{@client.prefix}".split(".").compact.reverse.join("/")
|
19
19
|
elsif data[:host]
|
20
20
|
hostname = list.select { |record| record["host"] == data[:host] }[0]["hostname"]
|
21
21
|
end
|
data/lib/etcd.rb
CHANGED
@@ -16,11 +16,19 @@ class CoreDns::Etcd
|
|
16
16
|
end
|
17
17
|
|
18
18
|
def domain(hostname)
|
19
|
+
unless hostname.empty?
|
20
|
+
raise RuntimeError.new "Invalid hostname" unless hostname.match?(/\A(?:(?!-)(?!.*--)[a-zA-Z0-9_][a-zA-Z0-9-_]{1,62}\.)+[a-zA-Z]{2,}\z/)
|
21
|
+
end
|
22
|
+
|
19
23
|
CoreDns::Etcd::Domain.new(self, hostname)
|
20
24
|
end
|
21
25
|
|
22
|
-
def zone(
|
23
|
-
|
26
|
+
def zone(domain)
|
27
|
+
unless domain.empty?
|
28
|
+
raise RuntimeError.new "Invalid domain" unless domain.match? /\A(?:(?!-)(?!.*--)[a-zA-Z0-9-]{1,63}\.)+[a-zA-Z]{2,}\z/
|
29
|
+
end
|
30
|
+
|
31
|
+
CoreDns::Etcd::DnsZone.new(self, domain)
|
24
32
|
end
|
25
33
|
|
26
34
|
private
|
data/lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: coredns
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aliaksei Hrechushkin
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-10-31 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Gem which provide simple way to control DNS records.
|
14
14
|
email:
|
@@ -60,7 +60,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
requirements: []
|
63
|
-
rubygems_version: 3.
|
63
|
+
rubygems_version: 3.4.21
|
64
64
|
signing_key:
|
65
65
|
specification_version: 4
|
66
66
|
summary: Wrapper for coredns-etcd application
|