dns-zone 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/HISTORY.md +4 -0
- data/lib/dns/zone/rr/record.rb +3 -1
- data/lib/dns/zone/version.rb +1 -1
- data/test/zone_test.rb +6 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YmIzYWNlOTU4Y2E0OWY1MDczODZmNjc3ZjBlNTdlY2QzOTdjYmQ2OA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MzNkMzQyNTZhZGJkMWQ1MzVhNmNlZjc1MmI5M2I4N2ZmZjNkNWEwNw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
OTNmYjEyYjJkYmNjNDc2N2Y2ZmUxNTBjODlkZDJkM2NjYTAwYWRkNmJhOTBl
|
10
|
+
ZGI4MDcwZDVhNjkwY2VlZjIyZGNhYmJhZGFkODU4M2RjZWVlYWY3ZWQyZTFh
|
11
|
+
M2ZjYzdjZTYxZDc0NDcwMTM0NDFjZDg5YjI5YWExZGNhYTMyMDY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MDllOGJlOWIyMzhmMDk5NWM2M2YwMDM3ZDI2NzY4ZTdlYzk4NjRhNjE5Y2Fj
|
14
|
+
NDM2MjA5MjQ2MTg5NTA2NWRlMWVlZWFhZDJmOTUyNDkwOTA4NjdhMTIwYWY4
|
15
|
+
NThmOTNiMGQ0YzJiMDBjZDAyOWQ1YmQwYzg5MGNjNzA1MTEwY2Q=
|
data/HISTORY.md
CHANGED
data/lib/dns/zone/rr/record.rb
CHANGED
@@ -77,7 +77,9 @@ class DNS::Zone::RR::Record
|
|
77
77
|
|
78
78
|
# unroll records nested under other origins
|
79
79
|
unrolled_origin = options[:last_origin].sub(options[:origin], '').chomp('.') if options[:last_origin]
|
80
|
-
|
80
|
+
if unrolled_origin && !unrolled_origin.empty?
|
81
|
+
@label = @label == '@' ? unrolled_origin : "#{@label}.#{unrolled_origin}"
|
82
|
+
end
|
81
83
|
|
82
84
|
@ttl = captures[:ttl]
|
83
85
|
captures[:rdata]
|
data/lib/dns/zone/version.rb
CHANGED
data/test/zone_test.rb
CHANGED
@@ -85,6 +85,7 @@ app1 60 A 1.2.3.4
|
|
85
85
|
app2 60 A 1.2.3.5
|
86
86
|
app3 60 A 1.2.3.6
|
87
87
|
$ORIGIN another.lividpenguin.com.
|
88
|
+
@ 3600 A 1.1.1.1
|
88
89
|
app1 60 A 4.3.2.1
|
89
90
|
|
90
91
|
EOL
|
@@ -190,11 +191,13 @@ EOL
|
|
190
191
|
def test_load_multiple_origins
|
191
192
|
zone = DNS::Zone.load(ZONE_FILE_MULTIPLE_ORIGINS_EXAMPLE)
|
192
193
|
assert_equal 'lividpenguin.com.', zone.origin
|
193
|
-
assert_equal
|
194
|
+
assert_equal 12, zone.records.length, 'we should have multiple records (including SOA)'
|
194
195
|
assert_equal 'app1.sub', zone.records[7].label
|
195
196
|
assert_equal '1.2.3.4', zone.records[7].address
|
196
|
-
assert_equal '
|
197
|
-
assert_equal '
|
197
|
+
assert_equal 'another', zone.records[10].label
|
198
|
+
assert_equal '1.1.1.1', zone.records[10].address
|
199
|
+
assert_equal 'app1.another', zone.records[11].label
|
200
|
+
assert_equal '4.3.2.1', zone.records[11].address
|
198
201
|
end
|
199
202
|
|
200
203
|
def test_extract_entry_from_one_line
|