asciidoctor-rfc 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (130) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +5 -0
  3. data/.oss-guides.rubocop.yml +1077 -0
  4. data/.rspec +1 -0
  5. data/.rubocop.yml +19 -1063
  6. data/.travis.yml +3 -2
  7. data/Guardfile +22 -0
  8. data/README.adoc +1151 -0
  9. data/Rakefile +1 -1
  10. data/asciidoctor-rfc.gemspec +20 -3
  11. data/bin/asciidoctor-rfc2 +15 -0
  12. data/bin/asciidoctor-rfc3 +15 -0
  13. data/bin/rspec +0 -1
  14. data/lib/asciidoctor-rfc.rb +4 -0
  15. data/lib/asciidoctor/rfc/common/base.rb +218 -0
  16. data/lib/asciidoctor/rfc/common/front.rb +120 -0
  17. data/lib/asciidoctor/rfc/v2/base.rb +341 -0
  18. data/lib/asciidoctor/rfc/v2/blocks.rb +192 -0
  19. data/lib/asciidoctor/rfc/v2/converter.rb +64 -0
  20. data/lib/asciidoctor/rfc/v2/front.rb +69 -0
  21. data/lib/asciidoctor/rfc/v2/inline_anchor.rb +102 -0
  22. data/lib/asciidoctor/rfc/v2/lists.rb +134 -0
  23. data/lib/asciidoctor/rfc/v2/table.rb +112 -0
  24. data/lib/asciidoctor/rfc/v2/validate.rb +738 -0
  25. data/lib/asciidoctor/rfc/v2/validate2.rng +716 -0
  26. data/lib/asciidoctor/rfc/v3/base.rb +358 -0
  27. data/lib/asciidoctor/rfc/v3/blocks.rb +203 -0
  28. data/lib/asciidoctor/rfc/v3/converter.rb +64 -0
  29. data/lib/asciidoctor/rfc/v3/front.rb +115 -0
  30. data/lib/asciidoctor/rfc/v3/inline_anchor.rb +90 -0
  31. data/lib/asciidoctor/rfc/v3/lists.rb +190 -0
  32. data/lib/asciidoctor/rfc/v3/svg.rng +9081 -0
  33. data/lib/asciidoctor/rfc/v3/table.rb +65 -0
  34. data/lib/asciidoctor/rfc/v3/validate.rb +2168 -0
  35. data/lib/asciidoctor/rfc/v3/validate.rng +2143 -0
  36. data/lib/asciidoctor/rfc/version.rb +2 -2
  37. data/spec/asciidoctor/rfc/v2/appendix_spec.rb +124 -0
  38. data/spec/asciidoctor/rfc/v2/area_spec.rb +60 -0
  39. data/spec/asciidoctor/rfc/v2/author_spec.rb +444 -0
  40. data/spec/asciidoctor/rfc/v2/comments_spec.rb +316 -0
  41. data/spec/asciidoctor/rfc/v2/crossref_spec.rb +205 -0
  42. data/spec/asciidoctor/rfc/v2/date_spec.rb +166 -0
  43. data/spec/asciidoctor/rfc/v2/dlist_spec.rb +108 -0
  44. data/spec/asciidoctor/rfc/v2/document_spec.rb +161 -0
  45. data/spec/asciidoctor/rfc/v2/example_spec.rb +50 -0
  46. data/spec/asciidoctor/rfc/v2/front_spec.rb +75 -0
  47. data/spec/asciidoctor/rfc/v2/image_spec.rb +81 -0
  48. data/spec/asciidoctor/rfc/v2/indexterm_spec.rb +66 -0
  49. data/spec/asciidoctor/rfc/v2/inline_formatting_spec.rb +177 -0
  50. data/spec/asciidoctor/rfc/v2/keyword_spec.rb +63 -0
  51. data/spec/asciidoctor/rfc/v2/listing_spec.rb +59 -0
  52. data/spec/asciidoctor/rfc/v2/literal_spec.rb +53 -0
  53. data/spec/asciidoctor/rfc/v2/olist_spec.rb +147 -0
  54. data/spec/asciidoctor/rfc/v2/paragraph_spec.rb +68 -0
  55. data/spec/asciidoctor/rfc/v2/preamble_spec.rb +140 -0
  56. data/spec/asciidoctor/rfc/v2/quote_spec.rb +24 -0
  57. data/spec/asciidoctor/rfc/v2/references_spec.rb +96 -0
  58. data/spec/asciidoctor/rfc/v2/section_spec.rb +260 -0
  59. data/spec/asciidoctor/rfc/v2/sidebar_spec.rb +32 -0
  60. data/spec/asciidoctor/rfc/v2/table_spec.rb +293 -0
  61. data/spec/asciidoctor/rfc/v2/ulist_spec.rb +96 -0
  62. data/spec/asciidoctor/rfc/v2/workgroup_spec.rb +60 -0
  63. data/spec/asciidoctor/rfc/v3/appendix_spec.rb +130 -0
  64. data/spec/asciidoctor/rfc/v3/area_spec.rb +63 -0
  65. data/spec/asciidoctor/rfc/v3/author_spec.rb +540 -0
  66. data/spec/asciidoctor/rfc/v3/comments_spec.rb +308 -0
  67. data/spec/asciidoctor/rfc/v3/crossref_spec.rb +269 -0
  68. data/spec/asciidoctor/rfc/v3/date_spec.rb +149 -0
  69. data/spec/asciidoctor/rfc/v3/dlist_spec.rb +121 -0
  70. data/spec/asciidoctor/rfc/v3/document_spec.rb +109 -0
  71. data/spec/asciidoctor/rfc/v3/example_spec.rb +34 -0
  72. data/spec/asciidoctor/rfc/v3/front_spec.rb +43 -0
  73. data/spec/asciidoctor/rfc/v3/image_spec.rb +81 -0
  74. data/spec/asciidoctor/rfc/v3/indexterm_spec.rb +69 -0
  75. data/spec/asciidoctor/rfc/v3/inline_formatting_spec.rb +319 -0
  76. data/spec/asciidoctor/rfc/v3/keyword_spec.rb +33 -0
  77. data/spec/asciidoctor/rfc/v3/link_spec.rb +34 -0
  78. data/spec/asciidoctor/rfc/v3/listing_spec.rb +59 -0
  79. data/spec/asciidoctor/rfc/v3/literal_spec.rb +51 -0
  80. data/spec/asciidoctor/rfc/v3/olist_spec.rb +168 -0
  81. data/spec/asciidoctor/rfc/v3/paragraph_spec.rb +73 -0
  82. data/spec/asciidoctor/rfc/v3/preamble_spec.rb +112 -0
  83. data/spec/asciidoctor/rfc/v3/quote_spec.rb +91 -0
  84. data/spec/asciidoctor/rfc/v3/references_spec.rb +147 -0
  85. data/spec/asciidoctor/rfc/v3/section_spec.rb +198 -0
  86. data/spec/asciidoctor/rfc/v3/series_info_spec.rb +151 -0
  87. data/spec/asciidoctor/rfc/v3/sidebar_spec.rb +30 -0
  88. data/spec/asciidoctor/rfc/v3/table_spec.rb +275 -0
  89. data/spec/asciidoctor/rfc/v3/ulist_spec.rb +74 -0
  90. data/spec/asciidoctor/rfc/v3/workgroup_spec.rb +33 -0
  91. data/spec/examples/davies-template-bare-06.adoc +361 -0
  92. data/spec/examples/davies-template-bare-06.xml.orig +426 -0
  93. data/spec/examples/example-v2.adoc +181 -0
  94. data/spec/examples/example-v2.xml +675 -0
  95. data/spec/examples/example-v3.adoc +185 -0
  96. data/spec/examples/example-v3.xml +1009 -0
  97. data/spec/examples/mib-doc-template-xml-06.adoc +596 -0
  98. data/spec/examples/mib-doc-template-xml-06.xml.orig +654 -0
  99. data/spec/examples/rfc1149.md +76 -0
  100. data/spec/examples/rfc1149.md.2.xml +94 -0
  101. data/spec/examples/rfc1149.md.3.xml +93 -0
  102. data/spec/examples/rfc1149.md.adoc +65 -0
  103. data/spec/examples/rfc2100.md +149 -0
  104. data/spec/examples/rfc2100.md.2.xml +169 -0
  105. data/spec/examples/rfc2100.md.3.xml +163 -0
  106. data/spec/examples/rfc2100.md.adoc +136 -0
  107. data/spec/examples/rfc3514.md +203 -0
  108. data/spec/examples/rfc3514.md.2.xml +238 -0
  109. data/spec/examples/rfc3514.md.3.xml +258 -0
  110. data/spec/examples/rfc3514.md.adoc +324 -0
  111. data/spec/examples/rfc5841.md +342 -0
  112. data/spec/examples/rfc5841.md.2.xml +393 -0
  113. data/spec/examples/rfc5841.md.3.xml +449 -0
  114. data/spec/examples/rfc5841.md.adoc +414 -0
  115. data/spec/examples/rfc6350.adoc +3499 -0
  116. data/spec/examples/rfc6350.bib +763 -0
  117. data/spec/examples/rfc748.md +79 -0
  118. data/spec/examples/rfc748.md.2.xml +116 -0
  119. data/spec/examples/rfc748.md.3.xml +109 -0
  120. data/spec/examples/rfc748.md.adoc +80 -0
  121. data/spec/examples/rfc7511.md +257 -0
  122. data/spec/examples/rfc7511.md.2.xml +300 -0
  123. data/spec/examples/rfc7511.md.3.xml +347 -0
  124. data/spec/examples/rfc7511.md.adoc +417 -0
  125. data/spec/spec_helper.rb +115 -5
  126. metadata +274 -9
  127. data/.hound.yml +0 -3
  128. data/README.md +0 -84
  129. data/lib/asciidoctor/rfc.rb +0 -7
  130. data/spec/asciidoctor-rfc/.keep +0 -0
@@ -0,0 +1,417 @@
1
+ = Scenic Routing for IPv6
2
+ Maximilian Wilhelm <max@rfc2324.org>
3
+ :doctype: internet-draft
4
+ :abbrev: Scenic Routing for IPv6
5
+ :status: info
6
+ :name: rfc-7511
7
+ :ipr: trust200902
8
+ :area: Internet
9
+ :workgroup: Network Working Group
10
+ :revdate: 2015-04-01T00:00:00Z
11
+ :forename_initials: M.
12
+ :phone: +49 176 62 05 94 27
13
+ :city: Paderborn, NRW
14
+ :country: Germany
15
+ :smart-quotes: false
16
+
17
+ [abstract]
18
+ This document specifies a new routing scheme for the current version
19
+ of the Internet Protocol version 6 (IPv6) in the spirit of "Green
20
+ IT", whereby packets will be routed to get as much fresh-air time as
21
+ possible.
22
+
23
+ == Introduction
24
+
25
+ In times of Green IT, a lot of effort is put into reducing the energy
26
+ consumption of routers, switches, servers, hosts, etc., to preserve
27
+ our environment. This document looks at Green IT from a different
28
+ angle and focuses on network packets being routed and switched around
29
+ the world.
30
+
31
+ Most likely, no one ever thought about the millions of packets being
32
+ disassembled into bits every second and forced through copper wires
33
+ or being shot through dark fiber lines by powerful lasers at
34
+ continuously increasing speeds. Although RFC 5841 <<RFC5841>> provided
35
+ some thoughts about Packet Moods and began to represent them as a TCP
36
+ option, this doesn't help the packets escape their torturous routine.
37
+
38
+ This document defines another way to deal with Green IT for traffic
39
+ and network engineers and will hopefully aid the wellbeing of a
40
+ myriad of network packets around the world. It proposes Scenic
41
+ Routing, which incorporates the green-ness of a network path into the
42
+ routing decision. A routing engine implementing Scenic Routing
43
+ should therefore choose paths based on Avian IP Carriers <<RFC1149>>
44
+ and/or wireless technologies so the packets will get out of the
45
+ miles/kilometers of dark fibers that are in the ground and get as
46
+ much fresh-air time and sunlight as possible.
47
+
48
+ As of the widely known acceptance of the current version of the
49
+ Internet Protocol (IPv6), this document only focuses on version 6 and
50
+ ignores communication still based on Vintage IP <<RFC0791>>.
51
+
52
+ === Conventions and Terminology
53
+
54
+ The key words "**MUST**", "**MUST NOT**", "**REQUIRED**", "**SHALL**", "**SHALL NOT**",
55
+ "**SHOULD**", "**SHOULD NOT**", "**RECOMMENDED**", "**MAY**", and "**OPTIONAL**" in this
56
+ document are to be interpreted as described in RFC 2119 <<RFC2119>>.
57
+
58
+ Additionally, the key words "**MIGHT**", "**COULD**", "**MAY WISH TO**",
59
+ "**WOULD PROBABLY**", "**SHOULD CONSIDER**", and "**MUST (BUT WE KNOW YOU WON'T)**" in
60
+ this document are to interpreted as described in RFC 6919 <<RFC6919>>.
61
+
62
+ == Scenic Routing
63
+
64
+ Scenic Routing can be enabled with a new option for IPv6 datagrams.
65
+
66
+ [[scenic-routing-option-sro]]
67
+ === Scenic Routing Option (SRO)
68
+
69
+ The Scenic Routing Option (SRO) is placed in the IPv6 Hop-by-Hop
70
+ Options Header that must be examined by every node along a packet's
71
+ delivery path <<RFC2460>>.
72
+
73
+ The SRO can be included in any IPv6 datagram, but multiple SROs
74
+ **MUST NOT** be present in the same IPv6 datagram. The SRO has no alignment
75
+ requirement.
76
+
77
+ If the SRO is set for a packet, every node en route from the packet
78
+ source to the packet's final destination **MUST** preserve the option.
79
+
80
+ The following Hop-by-Hop Option is proposed according to the
81
+ specification in <<RFC2460,4.2 of>>.
82
+
83
+ [#fig-scenic-routing-option-layout]
84
+ .Scenic Routing Option Layout
85
+ ====
86
+ ....
87
+ 0 1 2 3
88
+ 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
89
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
90
+ | Option Type | Option Length |
91
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
92
+ | SRO Param | |
93
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
94
+ ....
95
+ ====
96
+
97
+ Option Type::
98
+ +
99
+ --
100
+ {blank}
101
+
102
+ 8-bit identifier of the type of option. The option identifier
103
+ 0x0A (On Air) is proposed for Scenic Routing.
104
+
105
+ [#fig-option-type]
106
+ .Scenic Routing Option Type
107
+ ====
108
+ ....
109
+ HEX act chg rest
110
+ --- --- --- -----
111
+ 0A 00 0 01010 Scenic Routing
112
+ ....
113
+ ====
114
+
115
+ The highest-order two bits are set to 00 so any node not
116
+ implementing Scenic Routing will skip over this option and
117
+ continue processing the header. The third-highest-order bit
118
+ indicates that the SRO does not change en route to the packet's
119
+ final destination.
120
+ --
121
+
122
+ Option Length:: {blank}
123
+ +
124
+ --
125
+ {blank}
126
+
127
+ 8-bit unsigned integer. The length of the option in octets
128
+ (excluding the Option Type and Option Length fields). The value
129
+ **MUST** be greater than 0.
130
+ --
131
+
132
+ SRO Param::
133
+ +
134
+ --
135
+ {blank}
136
+
137
+ 8-bit identifier indicating Scenic Routing parameters encoded as a bit string.
138
+
139
+ [#fig-bit-string-layout]
140
+ .SRO Param Bit String Layout
141
+ ====
142
+ ....
143
+ +-+-+-+-+-+-+-+-+
144
+ | SR A W AA X Y |
145
+ +-+-+-+-+-+-+-+-+
146
+ ....
147
+ ====
148
+
149
+ The highest-order two bits (SR) define the urgency of Scenic
150
+ Routing:
151
+
152
+ [empty]
153
+ * 00 - Scenic Routing **MUST NOT** be used for this packet.
154
+ * 01 - Scenic Routing **MIGHT** be used for this packet.
155
+ * 10 - Scenic Routing **SHOULD** be used for this packet.
156
+ * 11 - Scenic Routing **MUST** be used for this packet.
157
+
158
+ The following BIT (A) defines if Avian IP Carriers should be used:
159
+
160
+ [empty]
161
+ * 0 - Don't use Avian IP Carrier links (maybe the packet is
162
+ afraid of pigeons).
163
+ * 1 - Avian IP Carrier links may be used.
164
+
165
+ The following BIT (W) defines if wireless links should be used:
166
+
167
+ [empty]
168
+ * 0 - Don't use wireless links (maybe the packet is afraid of
169
+ radiation).
170
+ * 1 - Wireless links may be used.
171
+
172
+ The following two bits (AA) define the affinity for link types:
173
+
174
+ [empty]
175
+ * 00 - No affinity.
176
+ * 01 - Avian IP Carriers **SHOULD** be preferred.
177
+ * 10 - Wireless links **SHOULD** be preferred.
178
+ * 11 - RESERVED
179
+
180
+ The lowest-order two bits (XY) are currently unused and reserved
181
+ for future use.
182
+ --
183
+
184
+ == Implications
185
+
186
+ === Routing Implications
187
+
188
+ If Scenic Routing is requested for a packet, the path with the known
189
+ longest Avian IP Carrier and/or wireless portion **MUST** be used.
190
+
191
+ Backbone operators who desire to be fully compliant with Scenic
192
+ Routing **MAY WISH TO** -- well, they **SHOULD** -- have separate MPLS paths
193
+ ready that provide the most fresh-air time for a given path and are
194
+ to be used when Scenic Routing is requested by a packet. If such a
195
+ path exists, the path MUST be used in favor of any other path, even
196
+ if another path is considered cheaper according to the path costs
197
+ used regularly, without taking Scenic Routing into account.
198
+
199
+ === Implications for Hosts
200
+
201
+ Host systems implementing this option of receiving packets with
202
+ Scenic Routing requested **MUST** honor this request and **MUST** activate
203
+ Scenic Routing for any packets sent back to the originating host for
204
+ the current connection.
205
+
206
+ If Scenic Routing is requested for connections of local origin, the
207
+ host MUST obey the request and route the packet(s) over a wireless
208
+ link or use Avian IP Carriers (if available and as requested within
209
+ the SRO Params).
210
+
211
+ System administrators **MIGHT** want to configure sensible default
212
+ parameters for Scenic Routing, when Scenic Routing has been widely
213
+ adopted by operating systems. System administrators **SHOULD** deploy
214
+ Scenic Routing information where applicable.
215
+
216
+ === Proxy Servers
217
+
218
+ If a host is running a proxy server or any other packet-relaying
219
+ application, an application implementing Scenic Routing **MUST** set the
220
+ same SRO Params on the outgoing packet as seen on the incoming
221
+ packet.
222
+
223
+ Developers **SHOULD CONSIDER** Scenic Routing when designing and
224
+ implementing any network service.
225
+
226
+ == Security Considerations
227
+
228
+ The security considerations of RFC 6214 <<RFC6214>> apply for links
229
+ provided by Avian IP Carriers.
230
+
231
+ General security considerations of wireless communication apply for
232
+ links using wireless technologies.
233
+
234
+ As the user is able to influence where flows and packets are being
235
+ routed within the network, this **MIGHT** influence traffic-engineering
236
+ considerations and network operators **MAY WISH TO** take this into
237
+ account before enabling Scenic Routing on their devices.
238
+
239
+ == IANA Considerations
240
+
241
+ This document defines a new IPv6 Hop-by-Hop Option, the Scenic
242
+ Routing Option, described in <<scenic-routing-option-sro>>.
243
+ If this work is standardized, IANA is requested to assign a value from the "Destination Options and
244
+ Hop-by-Hop Options" registry for the purpose of Scenic Routing.
245
+
246
+ There are no IANA actions requested at this time.
247
+
248
+ == Related Work
249
+
250
+ As Scenic Routing is heavily dependent on network paths and routing
251
+ information, it might be worth looking at designing extensions for
252
+ popular routing protocols like BGP or OSPF to leverage the full
253
+ potential of Scenic Routing in large networks built upon lots of
254
+ wireless links and/or Avian IP Carriers. When incorporating
255
+ information about links compatible with Scenic Routing, the routing
256
+ algorithms could easily calculate the optimal paths providing the
257
+ most fresh-air time for a packet for any given destination.
258
+
259
+ This would even allow preference for wireless paths going alongside
260
+ popular or culturally important places. This way, the packets don't
261
+ only avoid the dark fibers, but they get to see the world outside of
262
+ the Internet and are exposed to different cultures around the globe,
263
+ which may help build an understanding of cultural differences and
264
+ promote acceptance of these differences.
265
+
266
+ [bibliography]
267
+ == Normative References
268
+ ++++
269
+ <reference anchor="RFC2119" target="https://www.rfc-editor.org/info/rfc2119">
270
+ <front>
271
+ <title>
272
+ Key words for use in RFCs to Indicate Requirement Levels
273
+ </title>
274
+ <author initials="S." surname="Bradner" fullname="S. Bradner">
275
+ <organization/>
276
+ </author>
277
+ <date year="1997" month="March"/>
278
+ <abstract>
279
+ <t>
280
+ 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.
281
+ </t>
282
+ </abstract>
283
+ </front>
284
+ <seriesInfo name="BCP" value="14"/>
285
+ <seriesInfo name="RFC" value="2119"/>
286
+ <seriesInfo name="DOI" value="10.17487/RFC2119"/>
287
+ </reference>
288
+
289
+ <reference anchor="RFC2460" target="https://www.rfc-editor.org/info/rfc2460">
290
+ <front>
291
+ <title>Internet Protocol, Version 6 (IPv6) Specification</title>
292
+ <author initials="S." surname="Deering" fullname="S. Deering">
293
+ <organization/>
294
+ </author>
295
+ <author initials="R." surname="Hinden" fullname="R. Hinden">
296
+ <organization/>
297
+ </author>
298
+ <date year="1998" month="December"/>
299
+ <abstract>
300
+ <t>
301
+ This document specifies version 6 of the Internet Protocol (IPv6), also sometimes referred to as IP Next Generation or IPng. [STANDARDS-TRACK]
302
+ </t>
303
+ </abstract>
304
+ </front>
305
+ <seriesInfo name="RFC" value="2460"/>
306
+ <seriesInfo name="DOI" value="10.17487/RFC2460"/>
307
+ </reference>
308
+
309
+ <reference anchor="RFC5841" target="https://www.rfc-editor.org/info/rfc5841">
310
+ <front>
311
+ <title>TCP Option to Denote Packet Mood</title>
312
+ <author initials="R." surname="Hay" fullname="R. Hay">
313
+ <organization/>
314
+ </author>
315
+ <author initials="W." surname="Turkal" fullname="W. Turkal">
316
+ <organization/>
317
+ </author>
318
+ <date year="2010" month="April"/>
319
+ <abstract>
320
+ <t>
321
+ This document proposes a new TCP option to denote packet mood. This document is not an Internet Standards Track specification; it is published for informational purposes.
322
+ </t>
323
+ </abstract>
324
+ </front>
325
+ <seriesInfo name="RFC" value="5841"/>
326
+ <seriesInfo name="DOI" value="10.17487/RFC5841"/>
327
+ </reference>
328
+
329
+ <reference anchor="RFC6214" target="https://www.rfc-editor.org/info/rfc6214">
330
+ <front>
331
+ <title>Adaptation of RFC 1149 for IPv6</title>
332
+ <author initials="B." surname="Carpenter" fullname="B. Carpenter">
333
+ <organization/>
334
+ </author>
335
+ <author initials="R." surname="Hinden" fullname="R. Hinden">
336
+ <organization/>
337
+ </author>
338
+ <date year="2011" month="April"/>
339
+ <abstract>
340
+ <t>
341
+ This document specifies a method for transmission of IPv6 datagrams over the same medium as specified for IPv4 datagrams in RFC 1149. This document is not an Internet Standards Track specification; it is published for informational purposes.
342
+ </t>
343
+ </abstract>
344
+ </front>
345
+ <seriesInfo name="RFC" value="6214"/>
346
+ <seriesInfo name="DOI" value="10.17487/RFC6214"/>
347
+ </reference>
348
+
349
+ <reference anchor="RFC6919" target="https://www.rfc-editor.org/info/rfc6919">
350
+ <front>
351
+ <title>
352
+ Further Key Words for Use in RFCs to Indicate Requirement Levels
353
+ </title>
354
+ <author initials="R." surname="Barnes" fullname="R. Barnes">
355
+ <organization/>
356
+ </author>
357
+ <author initials="S." surname="Kent" fullname="S. Kent">
358
+ <organization/>
359
+ </author>
360
+ <author initials="E." surname="Rescorla" fullname="E. Rescorla">
361
+ <organization/>
362
+ </author>
363
+ <date year="2013" month="April"/>
364
+ <abstract>
365
+ <t>
366
+ RFC 2119 defines a standard set of key words for describing requirements of a specification. Many IETF documents have found that these words cannot accurately capture the nuanced requirements of their specification. This document defines additional key words that can be used to address alternative requirements scenarios. Authors who follow these guidelines should incorporate this phrase near the beginning of their document:
367
+ </t>
368
+ <t>
369
+ The key words "MUST (BUT WE KNOW YOU WON\'T)", "SHOULD CONSIDER", "REALLY SHOULD NOT", "OUGHT TO", "WOULD PROBABLY", "MAY WISH TO", "COULD", "POSSIBLE", and "MIGHT" in this document are to be interpreted as described in RFC 6919.
370
+ </t>
371
+ </abstract>
372
+ </front>
373
+ <seriesInfo name="RFC" value="6919"/>
374
+ <seriesInfo name="DOI" value="10.17487/RFC6919"/>
375
+ </reference>
376
+ ++++
377
+
378
+ [bibliography]
379
+ == Informative References
380
+ ++++
381
+ <reference anchor="RFC0791" target="https://www.rfc-editor.org/info/rfc791">
382
+ <front>
383
+ <title>Internet Protocol</title>
384
+ <author initials="J." surname="Postel" fullname="J. Postel">
385
+ <organization/>
386
+ </author>
387
+ <date year="1981" month="September"/>
388
+ </front>
389
+ <seriesInfo name="STD" value="5"/>
390
+ <seriesInfo name="RFC" value="791"/>
391
+ <seriesInfo name="DOI" value="10.17487/RFC0791"/>
392
+ </reference>
393
+
394
+ <reference anchor="RFC1149" target="https://www.rfc-editor.org/info/rfc1149">
395
+ <front>
396
+ <title>
397
+ Standard for the transmission of IP datagrams on avian carriers
398
+ </title>
399
+ <author initials="D." surname="Waitzman" fullname="D. Waitzman">
400
+ <organization/>
401
+ </author>
402
+ <date year="1990" month="April"/>
403
+ <abstract>
404
+ <t>
405
+ This memo describes an experimental method for the encapsulation of IP datagrams in avian carriers. This specification is primarily useful in Metropolitan Area Networks. This is an experimental, not recommended standard.
406
+ </t>
407
+ </abstract>
408
+ </front>
409
+ <seriesInfo name="RFC" value="1149"/>
410
+ <seriesInfo name="DOI" value="10.17487/RFC1149"/>
411
+ </reference>
412
+ ++++
413
+
414
+ == Acknowledgements
415
+
416
+ The author wishes to thank all those poor friends who were kindly
417
+ forced to read this document and that provided some nifty comments.
data/spec/spec_helper.rb CHANGED
@@ -1,11 +1,121 @@
1
- require "bundler/setup"
1
+ require "simplecov"
2
+ SimpleCov.start do
3
+ add_filter "/spec/"
4
+ end
5
+
6
+ require "asciidoctor"
2
7
  require "asciidoctor/rfc"
3
8
 
9
+ require "timecop"
10
+
11
+ require "rspec/matchers"
12
+ require "equivalent-xml"
13
+
14
+ # This file was generated by the `rspec --init` command. Conventionally, all
15
+ # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
16
+ # The generated `.rspec` file contains `--require spec_helper` which will cause
17
+ # this file to always be loaded, without a need to explicitly require it in any
18
+ # files.
19
+ #
20
+ # Given that it is always loaded, you are encouraged to keep this file as
21
+ # light-weight as possible. Requiring heavyweight dependencies from this file
22
+ # will add to the boot time of your test suite on EVERY test run, even for an
23
+ # individual file that may not need all of that loaded. Instead, consider making
24
+ # a separate helper file that requires the additional dependencies and performs
25
+ # the additional setup, and require it from the spec files that actually need
26
+ # it.
27
+ #
28
+ # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
4
29
  RSpec.configure do |config|
5
- # Enable flags like --only-failures and --next-failure
6
- config.example_status_persistence_file_path = ".rspec_status"
30
+ # rspec-expectations config goes here. You can use an alternate
31
+ # assertion/expectation library such as wrong or the stdlib/minitest
32
+ # assertions if you prefer.
33
+ config.expect_with :rspec do |expectations|
34
+ # This option will default to `true` in RSpec 4. It makes the `description`
35
+ # and `failure_message` of custom matchers include text for helper methods
36
+ # defined using `chain`, e.g.:
37
+ # be_bigger_than(2).and_smaller_than(4).description
38
+ # # => "be bigger than 2 and smaller than 4"
39
+ # ...rather than:
40
+ # # => "be bigger than 2"
41
+ expectations.include_chain_clauses_in_custom_matcher_descriptions = true
42
+ end
43
+
44
+ # rspec-mocks config goes here. You can use an alternate test double
45
+ # library (such as bogus or mocha) by changing the `mock_with` option here.
46
+ config.mock_with :rspec do |mocks|
47
+ # Prevents you from mocking or stubbing a method that does not exist on
48
+ # a real object. This is generally recommended, and will default to
49
+ # `true` in RSpec 4.
50
+ mocks.verify_partial_doubles = true
51
+ end
52
+
53
+ # This option will default to `:apply_to_host_groups` in RSpec 4 (and will
54
+ # have no way to turn it off -- the option exists only for backwards
55
+ # compatibility in RSpec 3). It causes shared context metadata to be
56
+ # inherited by the metadata hash of host groups and examples, rather than
57
+ # triggering implicit auto-inclusion in groups with matching metadata.
58
+ config.shared_context_metadata_behavior = :apply_to_host_groups
59
+
60
+ # The settings below are suggested to provide a good initial experience
61
+ # with RSpec, but feel free to customize to your heart's content.
62
+
63
+ # This allows you to limit a spec run to individual examples or groups
64
+ # you care about by tagging them with `:focus` metadata. When nothing
65
+ # is tagged with `:focus`, all examples get run. RSpec also provides
66
+ # aliases for `it`, `describe`, and `context` that include `:focus`
67
+ # metadata: `fit`, `fdescribe` and `fcontext`, respectively.
68
+ # config.filter_run_when_matching :focus
69
+
70
+ # Allows RSpec to persist some state between runs in order to support
71
+ # the `--only-failures` and `--next-failure` CLI options. We recommend
72
+ # you configure your source control system to ignore this file.
73
+ # config.example_status_persistence_file_path = "spec/examples.txt"
74
+
75
+ # Limits the available syntax to the non-monkey patched syntax that is
76
+ # recommended. For more details, see:
77
+ # - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/
78
+ # - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
79
+ # - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode
80
+ # config.disable_monkey_patching!
81
+
82
+ # This setting enables warnings. It's recommended, but in some cases may
83
+ # be too noisy due to issues in dependencies.
84
+ # config.warnings = true
85
+
86
+ # Many RSpec users commonly either run the entire suite or an individual
87
+ # file, and it's useful to allow more verbose output when running an
88
+ # individual spec file.
89
+ # if config.files_to_run.one?
90
+ # # Use the documentation formatter for detailed output,
91
+ # # unless a formatter has already been configured
92
+ # # (e.g. via a command-line flag).
93
+ # config.default_formatter = "doc"
94
+ # end
95
+
96
+ # Print the 10 slowest examples and example groups at the
97
+ # end of the spec run, to help surface which specs are running
98
+ # particularly slow.
99
+ # config.profile_examples = 10
100
+
101
+ # Run specs in random order to surface order dependencies. If you find an
102
+ # order dependency and want to debug it, you can fix the order by providing
103
+ # the seed, which is printed after each run.
104
+ # --seed 1234
105
+ # config.order = :random
106
+
107
+ # Seed global randomization in this process using the `--seed` CLI option.
108
+ # Setting this allows you to use `--seed` to deterministically reproduce
109
+ # test failures related to randomization by passing the same `--seed` value
110
+ # as the one that triggered the failure.
111
+ # Kernel.srand config.seed
7
112
 
8
- config.expect_with :rspec do |c|
9
- c.syntax = :expect
113
+ # NOTE: we're working with timestamped documents. If we don't freeze time
114
+ # we'll have a bad time matching the headers.
115
+ config.around(:example) do |example|
116
+ # we won't use time=0, since we want to confirm meaningful time value
117
+ Timecop.freeze Time.at(946702800).utc
118
+ example.run
119
+ Timecop.return
10
120
  end
11
121
  end