coredns 1.0.2 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (6) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/README.md +1 -1
  4. data/lib/etcd.rb +10 -2
  5. data/lib/version.rb +1 -1
  6. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 55ff1be4c231bcd8a99c6b562c634fa8022c992fba3f8bfcad37bde2770667ed
4
- data.tar.gz: a39b23fc643e859f72b7860163b6523b308d3c9ae7291a5958d99590ae418b4e
3
+ metadata.gz: 5580d71e9ce948b905ad3cd8eee53aac28ac460565e815fdcadd3b00a25ac245
4
+ data.tar.gz: 06cfd2577e56c61280b8bb3be5900a34d0245f4beeeb3a17e3d4ae72a57436f0
5
5
  SHA512:
6
- metadata.gz: 331730795ddddd76f57c1f9a3fde975147c97dc14748cc7107ddd3ab1178882ca00d73448f4794ed3daa0752835d3b6a7efba531d52bbe58e25afeb7ba1f8a76
7
- data.tar.gz: 0bf6d41393d616e3a167fea85254209490abfdf6e19c7b54bc97d572729081e9a338e3e58db4c8209a1ef7d28e2bffc6dc18c2460a3a4d33483f45cbc949cfb9
6
+ metadata.gz: ef6d3e591c721e322d440cd5b64acae27ae93bca9d19251df0545c83c21e3a1ca7a3c3fa6eb0bae23a16304f588b8114e9ba50a9f9de65c3177b08849672324a
7
+ data.tar.gz: cc1f7cf71f649484a31e3511aa9d2063f83a0b2e429f36b87ee4e443ff230a050d7412f423e442dce1f2ab4dbff6953702f4c13f99b1bf76e346a6ef79da6cff
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- coredns (1.0)
4
+ coredns (1.0.2)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -92,5 +92,5 @@ ENV["COREDNS_VERSION"], default is "v3" (also tested v3beta)
92
92
  > coredns.domain('domain1.your.zone').show
93
93
 
94
94
  # Delete domain
95
- > coredns.domain('domain1.your.zone').delete
95
+ > coredns.domain('domain1.your.zone').delete({:params})
96
96
  ```
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(hostname)
23
- CoreDns::Etcd::DnsZone.new(self, hostname)
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CoreDns
4
- VERSION = "1.0.2"
4
+ VERSION = "1.2.0"
5
5
  end
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.2
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: 2022-07-26 00:00:00.000000000 Z
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.2.3
63
+ rubygems_version: 3.4.10
64
64
  signing_key:
65
65
  specification_version: 4
66
66
  summary: Wrapper for coredns-etcd application