dns-zonefile 1.0.4 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  module DNS
2
2
  module Zonefile
3
- VERSION = "1.0.4"
3
+ VERSION = "1.0.5"
4
4
  end
5
5
  end
@@ -69,6 +69,11 @@ _domainkey TXT "v=DKIM1\\;g=*\\;k=rsa\\; p=4tkw1bbkfa0ahfjgnbewr2ttkvahvfmf
69
69
  @ TXT "some other \\"message\\" goes here" ; embedded quotes
70
70
  long TXT "a multi-segment TXT record" "usually used for really long TXT records" "since each segment can only span 255 chars"
71
71
  unquoted TXT some text data
72
+
73
+ multiline TXT "A TXT record
74
+ split across multiple lines
75
+ with LF and CRLF line endings"
76
+
72
77
  @ SPF "v=spf1 a a:other.domain.com ~all"
73
78
 
74
79
  45 IN PTR @
@@ -127,7 +132,7 @@ ZONE
127
132
 
128
133
  it "should build the correct number of resource records" do
129
134
  zone = DNS::Zonefile.parse(@zonefile)
130
- zone.rr.size.should be(43)
135
+ zone.rr.size.should be(44)
131
136
  end
132
137
 
133
138
  it "should build the correct NS records" do
@@ -308,7 +313,7 @@ ZONE
308
313
  it "should build the correct TXT records" do
309
314
  zone = DNS::Zonefile.load(@zonefile)
310
315
  txt_records = zone.records_of DNS::Zonefile::TXT
311
- txt_records.size.should be(4)
316
+ txt_records.size.should be(5)
312
317
 
313
318
  txt_records.detect { |r|
314
319
  r.host == "_domainkey.example.com." && r.data == '"v=DKIM1\;g=*\;k=rsa\; p=4tkw1bbkfa0ahfjgnbewr2ttkvahvfmfizowl9s4g0h28io76ndow25snl9iumpcv0jwxr2k"'
@@ -325,6 +330,10 @@ ZONE
325
330
  txt_records.detect { |r|
326
331
  r.host == "unquoted.example.com." && r.data == 'some text data'
327
332
  }.should_not be_nil
333
+
334
+ txt_records.detect { |r|
335
+ r.host == "multiline.example.com." && r.data == "\"A TXT record\nsplit across multiple lines\nwith LF and CRLF line endings\""
336
+ }.should_not be_nil
328
337
  end
329
338
 
330
339
  it "should build the correct SPF records" do
metadata CHANGED
@@ -1,20 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dns-zonefile
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
5
- prerelease:
4
+ version: 1.0.5
6
5
  platform: ruby
7
6
  authors:
8
7
  - Craig R Webster
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2012-10-30 00:00:00.000000000 Z
11
+ date: 2015-08-25 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rspec
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
17
  - - '='
20
18
  - !ruby/object:Gem::Version
@@ -22,7 +20,6 @@ dependencies:
22
20
  type: :development
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
24
  - - '='
28
25
  - !ruby/object:Gem::Version
@@ -30,72 +27,61 @@ dependencies:
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: rake
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - ">="
36
32
  - !ruby/object:Gem::Version
37
33
  version: '0'
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ! '>='
38
+ - - ">="
44
39
  - !ruby/object:Gem::Version
45
40
  version: '0'
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: treetop
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ! '>='
45
+ - - ">="
52
46
  - !ruby/object:Gem::Version
53
47
  version: '0'
54
48
  type: :runtime
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ! '>='
52
+ - - ">="
60
53
  - !ruby/object:Gem::Version
61
54
  version: '0'
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: polyglot
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
- - - ! '>='
59
+ - - ">="
68
60
  - !ruby/object:Gem::Version
69
61
  version: '0'
70
62
  type: :runtime
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
- - - ! '>='
66
+ - - ">="
76
67
  - !ruby/object:Gem::Version
77
68
  version: '0'
78
- description: ! 'The format of a DNS Zonefile is defined in RFC 1035 section 5 and
79
- RFC
80
-
81
- 1034 section 3.6.1. To anyone who''s using BIND they''ll look very
82
-
69
+ description: |-
70
+ The format of a DNS Zonefile is defined in RFC 1035 section 5 and RFC
71
+ 1034 section 3.6.1. To anyone who's using BIND they'll look very
83
72
  familiar.
84
73
 
85
-
86
74
  This is an attempt to use Ruby parse them into an object graph which can
87
-
88
75
  be investigated programatically, manipulated, validated or printed into
89
-
90
- some canonical form.'
76
+ some canonical form.
91
77
  email:
92
78
  - craig@barkingiguana.com
93
79
  executables: []
94
80
  extensions: []
95
81
  extra_rdoc_files: []
96
82
  files:
97
- - .gitignore
98
- - .travis.yml
83
+ - ".gitignore"
84
+ - ".travis.yml"
99
85
  - Gemfile
100
86
  - LICENCE
101
87
  - README.md
@@ -114,33 +100,26 @@ files:
114
100
  - spec/spec_helper.rb
115
101
  homepage: ''
116
102
  licenses: []
103
+ metadata: {}
117
104
  post_install_message:
118
105
  rdoc_options: []
119
106
  require_paths:
120
107
  - lib
121
108
  required_ruby_version: !ruby/object:Gem::Requirement
122
- none: false
123
109
  requirements:
124
- - - ! '>='
110
+ - - ">="
125
111
  - !ruby/object:Gem::Version
126
112
  version: '0'
127
- segments:
128
- - 0
129
- hash: -1344600706130778289
130
113
  required_rubygems_version: !ruby/object:Gem::Requirement
131
- none: false
132
114
  requirements:
133
- - - ! '>='
115
+ - - ">="
134
116
  - !ruby/object:Gem::Version
135
117
  version: '0'
136
- segments:
137
- - 0
138
- hash: -1344600706130778289
139
118
  requirements: []
140
119
  rubyforge_project: dns-zonefile
141
- rubygems_version: 1.8.24
120
+ rubygems_version: 2.4.5
142
121
  signing_key:
143
- specification_version: 3
122
+ specification_version: 4
144
123
  summary: Work with zonefiles (RFC 1035 section 5 and RFC 1034 section 3.6.1)
145
124
  test_files:
146
125
  - spec/dns/zonefile_spec.rb