pdns-client 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pdns/client.rb +4 -3
- data/lib/pdns/client/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4ebba94e761d2a3e111ce4112dd909b07f27ca8f584000577fcb94df1b82afce
|
4
|
+
data.tar.gz: be876ff6db52cfede08c8327b3c6f030297039e6231154a93e0596a2042bdf87
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bad3ddfef2fdd3ec686225c295e87b6c025907b2fa05f0585493fa9f65d5df1563c1e784b882cd088078eaf3905c1110e399e74080cedb878acb35720e09887a
|
7
|
+
data.tar.gz: 5fb34d4696ad9142cad80854f057b63f98cc92bf27ee5b2821e8b9dd8429818b30636e1bbc9fffac7e9f608ea3fb75a335cb834f69eb09846038edd93ae2ddfc
|
data/lib/pdns/client.rb
CHANGED
@@ -69,7 +69,8 @@ module Pdns
|
|
69
69
|
{"records" => dapi_compatible}
|
70
70
|
end
|
71
71
|
|
72
|
-
def upsert_record(zone_name, lvalue, type,
|
72
|
+
def upsert_record(zone_name, lvalue, type, rvalues, ttl = 60)
|
73
|
+
rvalues = [rvalues].flatten
|
73
74
|
unwrap {
|
74
75
|
http.patch(@url + "api/v1/servers/localhost/zones/#{zone_name}", json: {
|
75
76
|
"rrsets": [
|
@@ -78,7 +79,7 @@ module Pdns
|
|
78
79
|
"type": type,
|
79
80
|
"ttl": ttl,
|
80
81
|
"changetype": "REPLACE",
|
81
|
-
"records":
|
82
|
+
"records": rvalues.map do |rvalue|
|
82
83
|
{
|
83
84
|
"content": rvalue,
|
84
85
|
"disabled": false,
|
@@ -86,7 +87,7 @@ module Pdns
|
|
86
87
|
"type": type,
|
87
88
|
"priority": 0
|
88
89
|
}
|
89
|
-
|
90
|
+
end
|
90
91
|
}
|
91
92
|
]
|
92
93
|
})
|
data/lib/pdns/client/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pdns-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sheldon Hearn
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-03-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: http
|