coredns 1.0.1 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +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: 5580d71e9ce948b905ad3cd8eee53aac28ac460565e815fdcadd3b00a25ac245
|
4
|
+
data.tar.gz: 06cfd2577e56c61280b8bb3be5900a34d0245f4beeeb3a17e3d4ae72a57436f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ef6d3e591c721e322d440cd5b64acae27ae93bca9d19251df0545c83c21e3a1ca7a3c3fa6eb0bae23a16304f588b8114e9ba50a9f9de65c3177b08849672324a
|
7
|
+
data.tar.gz: cc1f7cf71f649484a31e3511aa9d2063f83a0b2e429f36b87ee4e443ff230a050d7412f423e442dce1f2ab4dbff6953702f4c13f99b1bf76e346a6ef79da6cff
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
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? && hostname.match?(/\A(?:(?!-)(?!.*--)[a-zA-Z0-9_][a-zA-Z0-9-_]{1,62}\.)+[a-zA-Z]{2,}\z/)
|
20
|
+
raise RuntimeError.new "Invalid hostname"
|
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.2.0
|
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-11 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.10
|
64
64
|
signing_key:
|
65
65
|
specification_version: 4
|
66
66
|
summary: Wrapper for coredns-etcd application
|