prosereflect 0.1.0

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.
Files changed (75) hide show
  1. checksums.yaml +7 -0
  2. data/.github/workflows/rake.yml +15 -0
  3. data/.github/workflows/release.yml +25 -0
  4. data/.gitignore +12 -0
  5. data/.rubocop.yml +1 -0
  6. data/.rubocop_todo.yml +228 -0
  7. data/CODE_OF_CONDUCT.md +132 -0
  8. data/Gemfile +10 -0
  9. data/README.adoc +268 -0
  10. data/Rakefile +12 -0
  11. data/debug_loading.rb +34 -0
  12. data/lib/prosereflect/document.rb +63 -0
  13. data/lib/prosereflect/hard_break.rb +22 -0
  14. data/lib/prosereflect/node.rb +77 -0
  15. data/lib/prosereflect/paragraph.rb +50 -0
  16. data/lib/prosereflect/parser.rb +56 -0
  17. data/lib/prosereflect/table.rb +64 -0
  18. data/lib/prosereflect/table_cell.rb +37 -0
  19. data/lib/prosereflect/table_row.rb +32 -0
  20. data/lib/prosereflect/text.rb +37 -0
  21. data/lib/prosereflect/version.rb +5 -0
  22. data/lib/prosereflect.rb +17 -0
  23. data/prosereflect.gemspec +33 -0
  24. data/sig/prosemirror.rbs +4 -0
  25. data/spec/fixtures/ituob-1000/ituob-1000-DP.json +366 -0
  26. data/spec/fixtures/ituob-1000/ituob-1000-DP.yaml +182 -0
  27. data/spec/fixtures/ituob-1000/ituob-1000-E118_IIN.json +381 -0
  28. data/spec/fixtures/ituob-1000/ituob-1000-E118_IIN.yaml +182 -0
  29. data/spec/fixtures/ituob-1000/ituob-1000-E164_ACN.json +203 -0
  30. data/spec/fixtures/ituob-1000/ituob-1000-E164_ACN.yaml +98 -0
  31. data/spec/fixtures/ituob-1000/ituob-1000-E212_MNC.json +202 -0
  32. data/spec/fixtures/ituob-1000/ituob-1000-E212_MNC.yaml +101 -0
  33. data/spec/fixtures/ituob-1000/ituob-1000-F32_TDI.json +6948 -0
  34. data/spec/fixtures/ituob-1000/ituob-1000-F32_TDI.yaml +3519 -0
  35. data/spec/fixtures/ituob-1000/ituob-1000-M1400_ICC.json +529 -0
  36. data/spec/fixtures/ituob-1000/ituob-1000-M1400_ICC.yaml +263 -0
  37. data/spec/fixtures/ituob-1000/ituob-1000-NNP.json +288 -0
  38. data/spec/fixtures/ituob-1000/ituob-1000-NNP.yaml +152 -0
  39. data/spec/fixtures/ituob-1000/ituob-1000-Q708_ISPC.json +1534 -0
  40. data/spec/fixtures/ituob-1000/ituob-1000-Q708_ISPC.yaml +789 -0
  41. data/spec/fixtures/ituob-1000/ituob-1000-Q708_SANC.json +252 -0
  42. data/spec/fixtures/ituob-1000/ituob-1000-Q708_SANC.yaml +123 -0
  43. data/spec/fixtures/ituob-1000/ituob-1000-R_SP_LM.V.json +428 -0
  44. data/spec/fixtures/ituob-1000/ituob-1000-R_SP_LM.V.yaml +208 -0
  45. data/spec/fixtures/ituob-1000/ituob-1000-T35_NA.json +621 -0
  46. data/spec/fixtures/ituob-1000/ituob-1000-T35_NA.yaml +317 -0
  47. data/spec/fixtures/ituob-1001/ituob-1001-DP.json +532 -0
  48. data/spec/fixtures/ituob-1001/ituob-1001-DP.yaml +266 -0
  49. data/spec/fixtures/ituob-1001/ituob-1001-E118_IIN.json +1093 -0
  50. data/spec/fixtures/ituob-1001/ituob-1001-E118_IIN.yaml +519 -0
  51. data/spec/fixtures/ituob-1001/ituob-1001-E164_ACN.json +449 -0
  52. data/spec/fixtures/ituob-1001/ituob-1001-E164_ACN.yaml +214 -0
  53. data/spec/fixtures/ituob-1001/ituob-1001-E164_CC.json +271 -0
  54. data/spec/fixtures/ituob-1001/ituob-1001-E164_CC.yaml +136 -0
  55. data/spec/fixtures/ituob-1001/ituob-1001-E212_MNC.json +199 -0
  56. data/spec/fixtures/ituob-1001/ituob-1001-E212_MNC.yaml +99 -0
  57. data/spec/fixtures/ituob-1001/ituob-1001-NNP.json +288 -0
  58. data/spec/fixtures/ituob-1001/ituob-1001-NNP.yaml +152 -0
  59. data/spec/fixtures/ituob-1001/ituob-1001-Q708_ISPC.json +960 -0
  60. data/spec/fixtures/ituob-1001/ituob-1001-Q708_ISPC.yaml +487 -0
  61. data/spec/prosereflect/document_spec.rb +149 -0
  62. data/spec/prosereflect/hard_break_spec.rb +51 -0
  63. data/spec/prosereflect/node_spec.rb +256 -0
  64. data/spec/prosereflect/paragraph_spec.rb +152 -0
  65. data/spec/prosereflect/parser_spec.rb +129 -0
  66. data/spec/prosereflect/table_cell_spec.rb +114 -0
  67. data/spec/prosereflect/table_row_spec.rb +77 -0
  68. data/spec/prosereflect/table_spec.rb +144 -0
  69. data/spec/prosereflect/text_spec.rb +116 -0
  70. data/spec/prosereflect/version_spec.rb +11 -0
  71. data/spec/prosereflect_spec.rb +57 -0
  72. data/spec/spec_helper.rb +21 -0
  73. data/spec/support/matchers.rb +131 -0
  74. data/spec/support/shared_examples.rb +220 -0
  75. metadata +133 -0
@@ -0,0 +1,449 @@
1
+ {
2
+ "type": "doc",
3
+ "content": [
4
+ {
5
+ "type": "table",
6
+ "content": [
7
+ {
8
+ "type": "table_row",
9
+ "content": [
10
+ {
11
+ "type": "table_cell",
12
+ "attrs": {
13
+ "colspan": 1,
14
+ "rowspan": 1,
15
+ "colwidth": null
16
+ },
17
+ "content": [
18
+ {
19
+ "type": "paragraph",
20
+ "content": [
21
+ {
22
+ "type": "text",
23
+ "marks": [
24
+ {
25
+ "type": "em"
26
+ }
27
+ ],
28
+ "text": "Country/geographical area"
29
+ }
30
+ ]
31
+ }
32
+ ]
33
+ },
34
+ {
35
+ "type": "table_cell",
36
+ "attrs": {
37
+ "colspan": 1,
38
+ "rowspan": 1,
39
+ "colwidth": null
40
+ },
41
+ "content": [
42
+ {
43
+ "type": "paragraph",
44
+ "content": [
45
+ {
46
+ "type": "text",
47
+ "marks": [
48
+ {
49
+ "type": "em"
50
+ }
51
+ ],
52
+ "text": "E.164 Country Code"
53
+ }
54
+ ]
55
+ }
56
+ ]
57
+ },
58
+ {
59
+ "type": "table_cell",
60
+ "attrs": {
61
+ "colspan": 1,
62
+ "rowspan": 1,
63
+ "colwidth": null
64
+ },
65
+ "content": [
66
+ {
67
+ "type": "paragraph",
68
+ "content": [
69
+ {
70
+ "type": "text",
71
+ "marks": [
72
+ {
73
+ "type": "em"
74
+ }
75
+ ],
76
+ "text": "Mobile telephone numbers, first digits after"
77
+ },
78
+ {
79
+ "type": "hard_break",
80
+ "marks": [
81
+ {
82
+ "type": "em"
83
+ }
84
+ ]
85
+ },
86
+ {
87
+ "type": "text",
88
+ "marks": [
89
+ {
90
+ "type": "em"
91
+ }
92
+ ],
93
+ "text": "country code"
94
+ }
95
+ ]
96
+ }
97
+ ]
98
+ }
99
+ ]
100
+ }
101
+ ]
102
+ },
103
+ {
104
+ "type": "paragraph",
105
+ "content": [
106
+ {
107
+ "type": "text",
108
+ "text": " "
109
+ }
110
+ ]
111
+ },
112
+ {
113
+ "type": "paragraph",
114
+ "content": [
115
+ {
116
+ "type": "text",
117
+ "marks": [
118
+ {
119
+ "type": "strong"
120
+ }
121
+ ],
122
+ "text": "P  6   Brazil (Federal Republic of)  LIR"
123
+ }
124
+ ]
125
+ },
126
+ {
127
+ "type": "paragraph",
128
+ "content": [
129
+ {
130
+ "type": "text",
131
+ "marks": [
132
+ {
133
+ "type": "strong"
134
+ }
135
+ ],
136
+ "text": " "
137
+ }
138
+ ]
139
+ },
140
+ {
141
+ "type": "table",
142
+ "content": [
143
+ {
144
+ "type": "table_row",
145
+ "content": [
146
+ {
147
+ "type": "table_cell",
148
+ "attrs": {
149
+ "colspan": 1,
150
+ "rowspan": 1,
151
+ "colwidth": null
152
+ },
153
+ "content": [
154
+ {
155
+ "type": "paragraph",
156
+ "content": [
157
+ {
158
+ "type": "text",
159
+ "marks": [
160
+ {
161
+ "type": "strong"
162
+ }
163
+ ],
164
+ "text": "Brazil (Federal Republic of) "
165
+ }
166
+ ]
167
+ }
168
+ ]
169
+ },
170
+ {
171
+ "type": "table_cell",
172
+ "attrs": {
173
+ "colspan": 1,
174
+ "rowspan": 1,
175
+ "colwidth": null
176
+ },
177
+ "content": [
178
+ {
179
+ "type": "paragraph",
180
+ "content": [
181
+ {
182
+ "type": "text",
183
+ "text": "55"
184
+ }
185
+ ]
186
+ }
187
+ ]
188
+ },
189
+ {
190
+ "type": "table_cell",
191
+ "attrs": {
192
+ "colspan": 1,
193
+ "rowspan": 1,
194
+ "colwidth": null
195
+ },
196
+ "content": [
197
+ {
198
+ "type": "paragraph",
199
+ "content": [
200
+ {
201
+ "type": "text",
202
+ "text": "area code + 6XXX XXXX"
203
+ },
204
+ {
205
+ "type": "hard_break"
206
+ },
207
+ {
208
+ "type": "text",
209
+ "text": "area code + 7XXX XXXX"
210
+ },
211
+ {
212
+ "type": "hard_break"
213
+ },
214
+ {
215
+ "type": "text",
216
+ "text": "area code + 8XXX XXXX"
217
+ },
218
+ {
219
+ "type": "hard_break"
220
+ },
221
+ {
222
+ "type": "text",
223
+ "text": "area code + 9XXX XXXX"
224
+ },
225
+ {
226
+ "type": "hard_break"
227
+ },
228
+ {
229
+ "type": "text",
230
+ "text": "area code + 9XXXX XXXX"
231
+ }
232
+ ]
233
+ }
234
+ ]
235
+ }
236
+ ]
237
+ }
238
+ ]
239
+ },
240
+ {
241
+ "type": "paragraph",
242
+ "content": [
243
+ {
244
+ "type": "text",
245
+ "text": " "
246
+ }
247
+ ]
248
+ },
249
+ {
250
+ "type": "paragraph",
251
+ "content": [
252
+ {
253
+ "type": "text",
254
+ "marks": [
255
+ {
256
+ "type": "strong"
257
+ }
258
+ ],
259
+ "text": "P  4   Burkina Faso  LIR"
260
+ }
261
+ ]
262
+ },
263
+ {
264
+ "type": "paragraph",
265
+ "content": [
266
+ {
267
+ "type": "text",
268
+ "marks": [
269
+ {
270
+ "type": "strong"
271
+ }
272
+ ],
273
+ "text": " "
274
+ }
275
+ ]
276
+ },
277
+ {
278
+ "type": "table",
279
+ "content": [
280
+ {
281
+ "type": "table_row",
282
+ "content": [
283
+ {
284
+ "type": "table_cell",
285
+ "attrs": {
286
+ "colspan": 1,
287
+ "rowspan": 1,
288
+ "colwidth": null
289
+ },
290
+ "content": [
291
+ {
292
+ "type": "paragraph",
293
+ "content": [
294
+ {
295
+ "type": "text",
296
+ "marks": [
297
+ {
298
+ "type": "strong"
299
+ }
300
+ ],
301
+ "text": "Burkina Faso"
302
+ }
303
+ ]
304
+ }
305
+ ]
306
+ },
307
+ {
308
+ "type": "table_cell",
309
+ "attrs": {
310
+ "colspan": 1,
311
+ "rowspan": 1,
312
+ "colwidth": null
313
+ },
314
+ "content": [
315
+ {
316
+ "type": "paragraph",
317
+ "content": [
318
+ {
319
+ "type": "text",
320
+ "text": "226"
321
+ }
322
+ ]
323
+ }
324
+ ]
325
+ },
326
+ {
327
+ "type": "table_cell",
328
+ "attrs": {
329
+ "colspan": 1,
330
+ "rowspan": 1,
331
+ "colwidth": null
332
+ },
333
+ "content": [
334
+ {
335
+ "type": "paragraph",
336
+ "content": [
337
+ {
338
+ "type": "text",
339
+ "text": "60, 68, 7"
340
+ }
341
+ ]
342
+ }
343
+ ]
344
+ }
345
+ ]
346
+ }
347
+ ]
348
+ },
349
+ {
350
+ "type": "paragraph",
351
+ "content": [
352
+ {
353
+ "type": "text",
354
+ "text": " "
355
+ }
356
+ ]
357
+ },
358
+ {
359
+ "type": "paragraph",
360
+ "content": [
361
+ {
362
+ "type": "text",
363
+ "marks": [
364
+ {
365
+ "type": "strong"
366
+ }
367
+ ],
368
+ "text": "P  8   Lebanon  LIR"
369
+ }
370
+ ]
371
+ },
372
+ {
373
+ "type": "paragraph",
374
+ "content": [
375
+ {
376
+ "type": "text",
377
+ "text": " "
378
+ }
379
+ ]
380
+ },
381
+ {
382
+ "type": "table",
383
+ "content": [
384
+ {
385
+ "type": "table_row",
386
+ "content": [
387
+ {
388
+ "type": "table_cell",
389
+ "attrs": {
390
+ "colspan": 1,
391
+ "rowspan": 1,
392
+ "colwidth": null
393
+ },
394
+ "content": [
395
+ {
396
+ "type": "paragraph",
397
+ "content": [
398
+ {
399
+ "type": "text",
400
+ "text": "Lebanon"
401
+ }
402
+ ]
403
+ }
404
+ ]
405
+ },
406
+ {
407
+ "type": "table_cell",
408
+ "attrs": {
409
+ "colspan": 1,
410
+ "rowspan": 1,
411
+ "colwidth": null
412
+ },
413
+ "content": [
414
+ {
415
+ "type": "paragraph",
416
+ "content": [
417
+ {
418
+ "type": "text",
419
+ "text": "961"
420
+ }
421
+ ]
422
+ }
423
+ ]
424
+ },
425
+ {
426
+ "type": "table_cell",
427
+ "attrs": {
428
+ "colspan": 1,
429
+ "rowspan": 1,
430
+ "colwidth": null
431
+ },
432
+ "content": [
433
+ {
434
+ "type": "paragraph",
435
+ "content": [
436
+ {
437
+ "type": "text",
438
+ "text": "3, 70, 71, 760, 761, 763-769"
439
+ }
440
+ ]
441
+ }
442
+ ]
443
+ }
444
+ ]
445
+ }
446
+ ]
447
+ }
448
+ ]
449
+ }
@@ -0,0 +1,214 @@
1
+ ---
2
+ type: doc
3
+ content:
4
+ - type: table
5
+ content:
6
+ - type: table_row
7
+ content:
8
+ - type: table_cell
9
+ attrs:
10
+ colspan: 1
11
+ rowspan: 1
12
+ colwidth:
13
+ content:
14
+ - type: paragraph
15
+ content:
16
+ - type: text
17
+ marks:
18
+ - type: em
19
+ text: Country/geographical area
20
+ - type: table_cell
21
+ attrs:
22
+ colspan: 1
23
+ rowspan: 1
24
+ colwidth:
25
+ content:
26
+ - type: paragraph
27
+ content:
28
+ - type: text
29
+ marks:
30
+ - type: em
31
+ text: E.164 Country Code
32
+ - type: table_cell
33
+ attrs:
34
+ colspan: 1
35
+ rowspan: 1
36
+ colwidth:
37
+ content:
38
+ - type: paragraph
39
+ content:
40
+ - type: text
41
+ marks:
42
+ - type: em
43
+ text: Mobile telephone numbers, first digits after
44
+ - type: hard_break
45
+ marks:
46
+ - type: em
47
+ - type: text
48
+ marks:
49
+ - type: em
50
+ text: country code
51
+ - type: paragraph
52
+ content:
53
+ - type: text
54
+ text: " "
55
+ - type: paragraph
56
+ content:
57
+ - type: text
58
+ marks:
59
+ - type: strong
60
+ text: P  6   Brazil (Federal Republic of)  LIR
61
+ - type: paragraph
62
+ content:
63
+ - type: text
64
+ marks:
65
+ - type: strong
66
+ text: " "
67
+ - type: table
68
+ content:
69
+ - type: table_row
70
+ content:
71
+ - type: table_cell
72
+ attrs:
73
+ colspan: 1
74
+ rowspan: 1
75
+ colwidth:
76
+ content:
77
+ - type: paragraph
78
+ content:
79
+ - type: text
80
+ marks:
81
+ - type: strong
82
+ text: Brazil (Federal Republic of) 
83
+ - type: table_cell
84
+ attrs:
85
+ colspan: 1
86
+ rowspan: 1
87
+ colwidth:
88
+ content:
89
+ - type: paragraph
90
+ content:
91
+ - type: text
92
+ text: '55'
93
+ - type: table_cell
94
+ attrs:
95
+ colspan: 1
96
+ rowspan: 1
97
+ colwidth:
98
+ content:
99
+ - type: paragraph
100
+ content:
101
+ - type: text
102
+ text: area code + 6XXX XXXX
103
+ - type: hard_break
104
+ - type: text
105
+ text: area code + 7XXX XXXX
106
+ - type: hard_break
107
+ - type: text
108
+ text: area code + 8XXX XXXX
109
+ - type: hard_break
110
+ - type: text
111
+ text: area code + 9XXX XXXX
112
+ - type: hard_break
113
+ - type: text
114
+ text: area code + 9XXXX XXXX
115
+ - type: paragraph
116
+ content:
117
+ - type: text
118
+ text: " "
119
+ - type: paragraph
120
+ content:
121
+ - type: text
122
+ marks:
123
+ - type: strong
124
+ text: P  4   Burkina Faso  LIR
125
+ - type: paragraph
126
+ content:
127
+ - type: text
128
+ marks:
129
+ - type: strong
130
+ text: " "
131
+ - type: table
132
+ content:
133
+ - type: table_row
134
+ content:
135
+ - type: table_cell
136
+ attrs:
137
+ colspan: 1
138
+ rowspan: 1
139
+ colwidth:
140
+ content:
141
+ - type: paragraph
142
+ content:
143
+ - type: text
144
+ marks:
145
+ - type: strong
146
+ text: Burkina Faso
147
+ - type: table_cell
148
+ attrs:
149
+ colspan: 1
150
+ rowspan: 1
151
+ colwidth:
152
+ content:
153
+ - type: paragraph
154
+ content:
155
+ - type: text
156
+ text: '226'
157
+ - type: table_cell
158
+ attrs:
159
+ colspan: 1
160
+ rowspan: 1
161
+ colwidth:
162
+ content:
163
+ - type: paragraph
164
+ content:
165
+ - type: text
166
+ text: 60, 68, 7
167
+ - type: paragraph
168
+ content:
169
+ - type: text
170
+ text: " "
171
+ - type: paragraph
172
+ content:
173
+ - type: text
174
+ marks:
175
+ - type: strong
176
+ text: P  8   Lebanon  LIR
177
+ - type: paragraph
178
+ content:
179
+ - type: text
180
+ text: " "
181
+ - type: table
182
+ content:
183
+ - type: table_row
184
+ content:
185
+ - type: table_cell
186
+ attrs:
187
+ colspan: 1
188
+ rowspan: 1
189
+ colwidth:
190
+ content:
191
+ - type: paragraph
192
+ content:
193
+ - type: text
194
+ text: Lebanon
195
+ - type: table_cell
196
+ attrs:
197
+ colspan: 1
198
+ rowspan: 1
199
+ colwidth:
200
+ content:
201
+ - type: paragraph
202
+ content:
203
+ - type: text
204
+ text: '961'
205
+ - type: table_cell
206
+ attrs:
207
+ colspan: 1
208
+ rowspan: 1
209
+ colwidth:
210
+ content:
211
+ - type: paragraph
212
+ content:
213
+ - type: text
214
+ text: 3, 70, 71, 760, 761, 763-769