asciidoctor-rfc 0.2.0 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. checksums.yaml +4 -4
  2. data/README.adoc +116 -6
  3. data/asciidoctor-rfc.gemspec +15 -1
  4. data/lib/asciidoctor/rfc/common/base.rb +74 -7
  5. data/lib/asciidoctor/rfc/common/front.rb +1 -1
  6. data/lib/asciidoctor/rfc/v2/base.rb +87 -38
  7. data/lib/asciidoctor/rfc/v2/blocks.rb +29 -2
  8. data/lib/asciidoctor/rfc/v2/converter.rb +0 -1
  9. data/lib/asciidoctor/rfc/v2/inline_anchor.rb +2 -8
  10. data/lib/asciidoctor/rfc/v2/lists.rb +7 -4
  11. data/lib/asciidoctor/rfc/v2/table.rb +1 -1
  12. data/lib/asciidoctor/rfc/v3/base.rb +41 -43
  13. data/lib/asciidoctor/rfc/v3/blocks.rb +29 -2
  14. data/lib/asciidoctor/rfc/v3/converter.rb +0 -2
  15. data/lib/asciidoctor/rfc/v3/inline_anchor.rb +2 -6
  16. data/lib/asciidoctor/rfc/version.rb +1 -1
  17. data/spec/asciidoctor/rfc/v2/comments_spec.rb +7 -3
  18. data/spec/asciidoctor/rfc/v2/date_spec.rb +23 -0
  19. data/spec/asciidoctor/rfc/v2/dlist_spec.rb +107 -9
  20. data/spec/asciidoctor/rfc/v2/image_spec.rb +17 -0
  21. data/spec/asciidoctor/rfc/v2/inline_formatting_spec.rb +12 -0
  22. data/spec/asciidoctor/rfc/v2/listing_spec.rb +22 -0
  23. data/spec/asciidoctor/rfc/v2/literal_spec.rb +22 -2
  24. data/spec/asciidoctor/rfc/v2/preamble_spec.rb +72 -0
  25. data/spec/asciidoctor/rfc/v2/references_spec.rb +3 -1
  26. data/spec/asciidoctor/rfc/v2/table_spec.rb +104 -4
  27. data/spec/asciidoctor/rfc/v2/text_spec.rb +89 -0
  28. data/spec/asciidoctor/rfc/v2/ulist_spec.rb +40 -0
  29. data/spec/asciidoctor/rfc/v3/dlist_spec.rb +103 -1
  30. data/spec/asciidoctor/rfc/v3/image_spec.rb +18 -0
  31. data/spec/asciidoctor/rfc/v3/listing_spec.rb +26 -0
  32. data/spec/asciidoctor/rfc/v3/literal_spec.rb +20 -1
  33. data/spec/asciidoctor/rfc/v3/preamble_spec.rb +150 -0
  34. data/spec/asciidoctor/rfc/v3/references_spec.rb +35 -34
  35. data/spec/asciidoctor/rfc/v3/series_info_spec.rb +39 -0
  36. data/spec/examples/README.adoc +162 -0
  37. data/spec/examples/davies-template-bare-06.adoc +3 -0
  38. data/spec/examples/draft-ietf-core-block-xx.mkd +935 -0
  39. data/spec/examples/draft-ietf-core-block-xx.mkd.adoc +1013 -0
  40. data/spec/examples/draft-ietf-core-block-xx.xml.orig +1251 -0
  41. data/spec/examples/example-v2.adoc +6 -2
  42. data/spec/examples/example-v3.adoc +5 -1
  43. data/spec/examples/hoffmanv2.xml.adoc +247 -0
  44. data/spec/examples/hoffmanv2.xml.orig +339 -0
  45. data/spec/examples/hoffmanv3.xml.orig +346 -0
  46. data/spec/examples/mib-doc-template-xml-06.adoc +5 -1
  47. data/spec/examples/rfc2100.md.adoc +2 -3
  48. data/spec/examples/rfc3514.md.adoc +3 -2
  49. data/spec/examples/rfc5841.md.adoc +1 -1
  50. data/spec/examples/rfc748.md.adoc +7 -6
  51. data/spec/examples/rfc7511.md.adoc +15 -15
  52. data/spec/examples/skel.mkd +32 -0
  53. data/spec/examples/skel.mkd.adoc +50 -0
  54. data/spec/examples/skel.xml.orig +105 -0
  55. data/spec/examples/stupid-s.mkd +569 -0
  56. data/spec/examples/stupid-s.mkd.adoc +771 -0
  57. data/spec/examples/stupid-s.xml.orig +880 -0
  58. data/spec/spec_helper.rb +1 -1
  59. metadata +32 -4
@@ -0,0 +1,346 @@
1
+ <?xml version='1.0' encoding='US-ASCII'?>
2
+ <!DOCTYPE rfc SYSTEM 'rfc2629.dtd'>
3
+
4
+
5
+
6
+
7
+ <rfc ipr='trust200902' consensus='no' submissionType='IETF'
8
+ updates='1234, 5678' xml:lang='en'>
9
+
10
+ <front><seriesInfo name='Internet-Draft'
11
+ value='draft-example-of-xml-00'/>
12
+ <seriesInfo name='std' value=''/>
13
+ <title abbrev='XML Example'>
14
+ An Example of Using XML for an Internet Draft
15
+ </title>
16
+
17
+ <author fullname='Chris Smith' initials='C.' surname='Smith'>
18
+ <organization abbrev='EC'>ExampleCorp</organization>
19
+ <address>
20
+ <postal>
21
+ <street>123 Exemplar Way</street>
22
+ <city>Anytown</city>
23
+ <region>California</region>
24
+ <code>95060</code>
25
+ <country>US</country>
26
+ </postal>
27
+ <phone>+1 123-456-7890</phone>
28
+ +1 123-456-7890
29
+ <email>chrissmith@example.com</email>
30
+ <uri>http://www.example.com/corporate/</uri>
31
+ </address>
32
+ </author>
33
+
34
+ <!-- The following author has no organization and no postal or
35
+ phone information. -->
36
+ <author fullname='Kim Jones' initials='K.' surname='Jones'>
37
+ <organization/>
38
+ <address>
39
+ <email>jk@lmn.op</email>
40
+ </address>
41
+ </author>
42
+ <date year='2014' month='September'/>
43
+
44
+ <area>General</area>
45
+ <workgroup>Imaginary WG</workgroup>
46
+ <keyword>XML</keyword>
47
+ <keyword>Imagination</keyword>
48
+
49
+ <abstract>
50
+ <t>This is an example of an abstract. It is a short paragraph that
51
+ gives an overview of the document in order to help the
52
+ reader determine whether or not they are interested in reading
53
+ further.</t>
54
+ </abstract>
55
+
56
+ <note tile='Disclaimer'>
57
+ <t>This isn't a real RFC, just an example.</t>
58
+ </note>
59
+
60
+ </front>
61
+
62
+ <middle>
63
+
64
+ <section anchor='intro'><name>Introduction</name>
65
+
66
+ <t>This is the first paragraph of the introduction to this
67
+ document. This introduction is probably much shorter than it would
68
+ be for a real Internet Draft.</t>
69
+
70
+ <t>Something to note about this paragraph is that it has a
71
+ pointer to <xref target='protocol'/>, and one to
72
+ <xref target='haiku'/>, both of which appear later in the
73
+ document.</t>
74
+
75
+ <iref item='Introduction' subitem='verbiage' primary='true'/>
76
+
77
+ <!-- This is a comment. Comments in the XML do not appear in the
78
+ output formats. -->
79
+
80
+ <section><name>Terminology</name>
81
+
82
+ <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
83
+ NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL"
84
+ in this document are to be interpreted as described in
85
+ <xref target='RFC2119'/>.</t>
86
+
87
+ </section>
88
+
89
+ </section>
90
+ <section anchor='protocol'><name>The Protocol Being Described</name>
91
+
92
+ <t>This is a reference to <xref target='RFC6949'/>.
93
+ Actually, the reference itself is not all that interesting, but the
94
+ way that the reference is incorporated is. Note that the inclusion
95
+ of RFC 2119 was done at the top of the XML, while the information
96
+ for RFC 6949 is done directly in the references section.</t>
97
+
98
+ <t>The <eref target='http://www.ietf.org'>IETF web site</eref> is
99
+ <em>quite</em>
100
+ <strong>nice</strong>,
101
+ <tt>isn't it</tt>?
102
+ Unlike other web sites, it doesn't use
103
+ gratuitous vertical space.</t>
104
+
105
+ </section>
106
+
107
+ <section><name>Basic Lists</name>
108
+
109
+ <t>Bulleted lists are good for items that
110
+ are not ordered:
111
+
112
+ </t><ul>
113
+
114
+ <li>This is the first item.</li>
115
+
116
+ <li>This is the second item. Here comes a sub-list:
117
+
118
+ <ul>
119
+
120
+ <li>This is the first sub-item.</li>
121
+
122
+ <li><t>This is the second sub-item</t><t>
123
+ and some more detail on the second sub-item.</t></li>
124
+
125
+ </ul></li>
126
+
127
+ <li>This is the item after the sub-list.</li>
128
+
129
+ </ul><t></t>
130
+
131
+ <t>Numbered lists are good for items that are ordered:
132
+
133
+ </t><ol style='1'>
134
+
135
+ <li>This is the first item.</li>
136
+
137
+ <li>This is the second item. Here comes a sub-list, but
138
+ with letters:
139
+
140
+ <ol style='a'>
141
+
142
+ <li>This is the first sub-item.</li>
143
+
144
+ <li>This is the second sub-item</li>
145
+
146
+ </ol></li>
147
+
148
+ <li>This is the item after the sub-list.</li>
149
+
150
+ </ol><t></t>
151
+
152
+ <t>And an example of hanging indent.
153
+
154
+ </t><dl hanging='true'>
155
+
156
+ <dt>Trees</dt><dd>These are bigger plants</dd>
157
+
158
+ <dt>Lichen</dt><dd>These are smaller plants</dd>
159
+
160
+ </dl><t></t>
161
+
162
+ <t>And the always-interesting "format" for lists.
163
+
164
+ </t><ol style='--%d--'>
165
+
166
+ <li>An element that gets a funny bullet.</li>
167
+
168
+ </ol><t></t>
169
+
170
+ </section>
171
+
172
+ <section><name>Figures</name>
173
+
174
+ <t>The following is a figure with a caption.
175
+ Also, it uses the ampersand (&amp;) and less than
176
+ (&lt;) characters in the example text.</t>
177
+
178
+ <figure anchor='haiku'><name>This could be haiku</name>
179
+ <artwork type='haiku' align='left'>
180
+ The ampersand (&amp;) and
181
+ less than (&lt;) are two characters
182
+ that need escaping.
183
+ </artwork>
184
+ </figure>
185
+ <t>Here are two short figures with no titles and with
186
+ odd alignment.</t>
187
+
188
+ <figure><artwork align='center'>
189
+ This might appear in the center.
190
+ </artwork></figure>
191
+
192
+ <figure><artwork align='right'>
193
+ This might appear right-aligned.
194
+ </artwork></figure>
195
+
196
+ <t>Here is a figure that is actually pulled from somewhere else.
197
+ <cref source='cs' anchor='rememberme'>
198
+ Remember to check whether that file still exists.</cref></t>
199
+
200
+ <figure><artwork
201
+ src='http://www.example.com/~employees/chrissmith/artwork.txt'>
202
+ </artwork>
203
+ </figure>
204
+
205
+ </section>
206
+
207
+ <section><name>Tables</name>
208
+
209
+ <t>The following is a table example.</t>
210
+
211
+ <t keepWithNext='true'>These are sometimes called "inert"
212
+ gasses.</t><table title='The Noble Gases'>
213
+
214
+ <tr><th>Name</th>
215
+ <th align='center'>Symbol</th>
216
+ <th align='center'>Atomic Number</th></tr>
217
+
218
+ <tr><td>Helium</td>
219
+ <td align='center'>He</td>
220
+ <td align='center'>2</td></tr>
221
+
222
+ <tr><td>Neon</td>
223
+ <td align='center'>Ne</td>
224
+ <td align='center'>10</td></tr>
225
+
226
+ <tr><td>Argon</td>
227
+ <td align='center'>Ar</td>
228
+ <td align='center'>18</td></tr>
229
+
230
+ <tr><td>Krypton</td>
231
+ <td align='center'>Kr</td>
232
+ <td align='center'>36</td></tr>
233
+ <tr><td>Xenon</td>
234
+ <td align='center'>Xe</td>
235
+ <td align='center'>54</td></tr>
236
+
237
+ <tr><td>Radon</td>
238
+ <td align='center'>Rn</td>
239
+ <td align='center'>86</td></tr>
240
+
241
+ </table><t keepWithPrevious='true'>Source: Chemistry 101</t>
242
+
243
+
244
+ <t>The following is a right-aligned table with "full"
245
+ (but not "all") lines between cells.</t>
246
+
247
+ <table align='right' style='full'>
248
+ <tr><th>Time</th>
249
+ <th align='right'>Mood</th></tr>
250
+
251
+ <tr><td>Morning</td>
252
+ <td align='right'>Happy!</td></tr>
253
+
254
+ <tr><td>Afternoon</td>
255
+ <td align='right'>Happy!</td></tr>
256
+
257
+ <tr><td>Evening</td>
258
+ <td align='right'>Somber</td></tr>
259
+
260
+ </table>
261
+
262
+ </section>
263
+
264
+ <section anchor='IANA'><name>IANA Considerations</name>
265
+
266
+ <t>None.</t>
267
+
268
+ </section>
269
+
270
+ <section anchor='Security'><name>Security Considerations</name>
271
+
272
+ <t>There are no security considerations for an imaginary
273
+ Internet Draft.</t>
274
+
275
+ </section>
276
+
277
+ <section anchor='Acknowledgements'><name>Acknowledgements</name>
278
+
279
+ <t>Some of the things included in this draft came from
280
+ Elwyn Davies' templates.</t>
281
+ </section>
282
+
283
+ </middle>
284
+
285
+ <back>
286
+
287
+ <references><name>Normative References</name>
288
+
289
+ <reference anchor="RFC2119" target="https://www.rfc-editor.org/info/rfc2119">
290
+ <front>
291
+ <title>
292
+ Key words for use in RFCs to Indicate Requirement Levels
293
+ </title>
294
+ <author initials="S." surname="Bradner" fullname="S. Bradner">
295
+ <organization/>
296
+ </author>
297
+ <date year="1997" month="March"/>
298
+ <abstract>
299
+ <t>
300
+ In many standards track documents several words are used to signify the requirements in the specification. These words are often capitalized. This document defines these words as they should be interpreted in IETF documents. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.
301
+ </t>
302
+ </abstract>
303
+ </front>
304
+ <seriesInfo name="BCP" value="14"/>
305
+ <seriesInfo name="RFC" value="2119"/>
306
+ <seriesInfo name="DOI" value="10.17487/RFC2119"/>
307
+ </reference>
308
+ </references>
309
+
310
+ <references><name>Informative References</name>
311
+
312
+ <reference anchor='RFC6949'>
313
+ <front>
314
+ <title>RFC Series Format Requirements and Future Development</title>
315
+ <author initials='H.' surname='Flanagan' fullname='H. Flanagan'>
316
+ <organization/></author>
317
+ <author initials='N.' surname='Brownlee' fullname='N. Brownlee'>
318
+ <organization/></author>
319
+ <date year='2013' month='May'/>
320
+ </front>
321
+ <seriesInfo name='RFC' value='6949'/>
322
+ <annotation>This is a primary reference work.</annotation>
323
+ </reference>
324
+
325
+ <reference anchor='RED'
326
+ target='http://www.aciri.org/floyd/papers/early.pdf'>
327
+ <front>
328
+ <title>Random Early Detection (RED) gateways for Congestion
329
+ Avoidance</title>
330
+ <author fullname='Sally Floyd' initials='S' surname='Floyd'>
331
+ <organization>LBL</organization>
332
+ </author>
333
+ <author fullname='Van Jacobson' initials='V' surname='Jacobson'>
334
+ <organization>LBL</organization>
335
+ </author>
336
+ <date month='August' year='1993'/>
337
+ </front>
338
+ <seriesInfo
339
+ name='IEEE/ACM Transactions on Networking' value='1(4) 397--413'/>
340
+
341
+ </reference>
342
+
343
+ </references>
344
+
345
+ </back>
346
+ </rfc>
@@ -20,6 +20,11 @@ Editor name <Editor email>
20
20
  :workgroup: Internet Engineering Task Force
21
21
  :keyword: Network Management,Management Information Base,MIB,SMIv2
22
22
  :smart-quotes: false
23
+ :compact: yes
24
+ :subcompact: no
25
+ :rfcedstyle: yes
26
+ :comments: yes
27
+ :inline: yes
23
28
 
24
29
  [abstract]
25
30
 
@@ -343,7 +348,6 @@ Option #3:
343
348
  This memo includes no request to IANA.
344
349
 
345
350
  == Contributors
346
- NOTE: [TEMPLATE TODO] This optional section can be used to mention contributors to your internet draft.
347
351
 
348
352
  [bibliography]
349
353
  == Normative References
@@ -1,6 +1,6 @@
1
1
  = The Naming of Hosts
2
2
  Jay R. Ashworth <jra@scfn.thpl.lib.fl.us>
3
- :doctype: rfc
3
+ :doctype: internet-draft
4
4
  :abbrev: The Naming of Hosts
5
5
  :status: info
6
6
  :name: rfc-2100
@@ -89,7 +89,6 @@ this memo, to Andrew Lloyd-Webber, Cameron Mackintosh, and a cast of
89
89
  thousands (particularly including Terrance Mann) who drew my
90
90
  attention to the necessity, and of course, to Thomas Stearns Eliot,
91
91
  for making this all necessary.
92
- <<libes,>> <<lottor,>> <<wong,>> <<ts,>>
93
92
 
94
93
  [[security-considerations]]
95
94
  == Security Considerations
@@ -99,7 +98,7 @@ Security issues are not discussed in this memo.
99
98
  Particularly the cardiac security of certain famous poets.
100
99
 
101
100
  [bibliography]
102
- == References
101
+ == Informative References
103
102
  ++++
104
103
  <reference anchor='libes' target=''>
105
104
  <front>
@@ -15,6 +15,7 @@ Steven M. Bellovin <bellovin@acm.org>
15
15
  :city: Florham Park
16
16
  :code: NJ 07932
17
17
  :smart-quotes: false
18
+ :inline-definition-lists: true
18
19
 
19
20
  [abstract]
20
21
  Firewalls, packet filters, intrusion detection systems, and the like
@@ -59,7 +60,7 @@ The bit field is laid out as follows:
59
60
 
60
61
  Currently-assigned values are defined as follows:
61
62
 
62
- 0x0::
63
+ 0x0: ::
63
64
  +
64
65
  If the bit is set to 0, the packet has no evil intent. Hosts,
65
66
  network elements, etc., **SHOULD** assume that the packet is
@@ -67,7 +68,7 @@ If the bit is set to 0, the packet has no evil intent. Hosts,
67
68
  that this part of the spec is already implemented by many common
68
69
  desktop operating systems.)
69
70
 
70
- 0x1::
71
+ 0x1: ::
71
72
  +
72
73
  If the bit is set to 1, the packet has evil intent. Secure
73
74
  systems **SHOULD** try to defend themselves against such packets.
@@ -155,7 +155,7 @@ Applications can take advantage of the defined moods by expressing
155
155
  them in the packets. This can be done in the SYN packet sent from
156
156
  the client. All packets in the session can be then tagged with the
157
157
  mood set in the SYN packet, but this would have a per-packet
158
- performance cost (see <<performance-considerations,Performance Considerations>>).
158
+ performance cost (see <<performance-considerations>> "Performance Considerations").
159
159
 
160
160
  Each application **MUST** define the preconditions for marking packets as
161
161
  happy, sad, bored, confused, angry, apathetic, and so on. This is a
@@ -14,36 +14,37 @@ M. Crispin
14
14
 
15
15
  == Command name and code
16
16
 
17
+ [align=center]
17
18
  ....
18
19
  RANDOMLY-LOSE 256
19
20
  ....
20
21
 
21
22
  == Command meanings
22
23
 
23
- IAC WILL RANDOMLY-LOSE::
24
+ IAC WILL RANDOMLY-LOSE: ::
24
25
  +
25
26
  The sender of this command REQUESTS permission to, or confirms
26
27
  that it will, randomly lose.
27
28
 
28
- IAC WON'T RANDOMLY-LOSE::
29
+ IAC WON'T RANDOMLY-LOSE: ::
29
30
  +
30
31
  The sender of this command REFUSES to randomly lose.
31
32
 
32
- IAC DO RANDOMLY-LOSE::
33
+ IAC DO RANDOMLY-LOSE: ::
33
34
  +
34
35
  The sender of this command REQUESTS that the receiver, or grants
35
36
  the receiver permission to, randomly lose.
36
37
 
37
- IAC DON'T RANDOMLY-LOSE::
38
+ IAC DON'T RANDOMLY-LOSE: ::
38
39
  +
39
40
  The command sender DEMANDS that the receiver not randomly lose.
40
41
 
41
42
  == Default
42
43
 
43
44
  ....
44
- WON'T RANDOMLY-LOSE
45
+ WON'T RANDOMLY-LOSE
45
46
 
46
- DON'T RANDOMLY-LOSE
47
+ DON'T RANDOMLY-LOSE
47
48
  ....
48
49
 
49
50
  i.e., random lossage will not happen.