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,532 @@
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/"
29
+ },
30
+ {
31
+ "type": "hard_break",
32
+ "marks": [
33
+ {
34
+ "type": "em"
35
+ }
36
+ ]
37
+ },
38
+ {
39
+ "type": "text",
40
+ "marks": [
41
+ {
42
+ "type": "em"
43
+ }
44
+ ],
45
+ "text": "geographical area"
46
+ }
47
+ ]
48
+ }
49
+ ]
50
+ },
51
+ {
52
+ "type": "table_cell",
53
+ "attrs": {
54
+ "colspan": 1,
55
+ "rowspan": 1,
56
+ "colwidth": null
57
+ },
58
+ "content": [
59
+ {
60
+ "type": "paragraph",
61
+ "content": [
62
+ {
63
+ "type": "text",
64
+ "marks": [
65
+ {
66
+ "type": "em"
67
+ }
68
+ ],
69
+ "text": "Country code"
70
+ }
71
+ ]
72
+ }
73
+ ]
74
+ },
75
+ {
76
+ "type": "table_cell",
77
+ "attrs": {
78
+ "colspan": 1,
79
+ "rowspan": 1,
80
+ "colwidth": null
81
+ },
82
+ "content": [
83
+ {
84
+ "type": "paragraph",
85
+ "content": [
86
+ {
87
+ "type": "text",
88
+ "marks": [
89
+ {
90
+ "type": "em"
91
+ }
92
+ ],
93
+ "text": "International prefix"
94
+ }
95
+ ]
96
+ }
97
+ ]
98
+ },
99
+ {
100
+ "type": "table_cell",
101
+ "attrs": {
102
+ "colspan": 1,
103
+ "rowspan": 1,
104
+ "colwidth": null
105
+ },
106
+ "content": [
107
+ {
108
+ "type": "paragraph",
109
+ "content": [
110
+ {
111
+ "type": "text",
112
+ "marks": [
113
+ {
114
+ "type": "em"
115
+ }
116
+ ],
117
+ "text": "National prefix"
118
+ }
119
+ ]
120
+ }
121
+ ]
122
+ },
123
+ {
124
+ "type": "table_cell",
125
+ "attrs": {
126
+ "colspan": 1,
127
+ "rowspan": 1,
128
+ "colwidth": null
129
+ },
130
+ "content": [
131
+ {
132
+ "type": "paragraph",
133
+ "content": [
134
+ {
135
+ "type": "text",
136
+ "marks": [
137
+ {
138
+ "type": "em"
139
+ }
140
+ ],
141
+ "text": "National (significant) number"
142
+ }
143
+ ]
144
+ }
145
+ ]
146
+ },
147
+ {
148
+ "type": "table_cell",
149
+ "attrs": {
150
+ "colspan": 1,
151
+ "rowspan": 1,
152
+ "colwidth": null
153
+ },
154
+ "content": [
155
+ {
156
+ "type": "paragraph",
157
+ "content": [
158
+ {
159
+ "type": "text",
160
+ "marks": [
161
+ {
162
+ "type": "em"
163
+ }
164
+ ],
165
+ "text": "UTC/DST"
166
+ }
167
+ ]
168
+ }
169
+ ]
170
+ },
171
+ {
172
+ "type": "table_cell",
173
+ "attrs": {
174
+ "colspan": 1,
175
+ "rowspan": 1,
176
+ "colwidth": null
177
+ },
178
+ "content": [
179
+ {
180
+ "type": "paragraph",
181
+ "content": [
182
+ {
183
+ "type": "text",
184
+ "marks": [
185
+ {
186
+ "type": "em"
187
+ }
188
+ ],
189
+ "text": "Note"
190
+ }
191
+ ]
192
+ }
193
+ ]
194
+ }
195
+ ]
196
+ }
197
+ ]
198
+ },
199
+ {
200
+ "type": "paragraph",
201
+ "content": [
202
+ {
203
+ "type": "text",
204
+ "text": " "
205
+ }
206
+ ]
207
+ },
208
+ {
209
+ "type": "paragraph",
210
+ "content": [
211
+ {
212
+ "type": "text",
213
+ "marks": [
214
+ {
215
+ "type": "strong"
216
+ }
217
+ ],
218
+ "text": "P  3   Azerbaijan LIR"
219
+ }
220
+ ]
221
+ },
222
+ {
223
+ "type": "table",
224
+ "content": [
225
+ {
226
+ "type": "table_row",
227
+ "content": [
228
+ {
229
+ "type": "table_cell",
230
+ "attrs": {
231
+ "colspan": 1,
232
+ "rowspan": 1,
233
+ "colwidth": null
234
+ },
235
+ "content": [
236
+ {
237
+ "type": "paragraph",
238
+ "content": [
239
+ {
240
+ "type": "text",
241
+ "text": "Azerbaijan"
242
+ }
243
+ ]
244
+ }
245
+ ]
246
+ },
247
+ {
248
+ "type": "table_cell",
249
+ "attrs": {
250
+ "colspan": 1,
251
+ "rowspan": 1,
252
+ "colwidth": null
253
+ },
254
+ "content": [
255
+ {
256
+ "type": "paragraph",
257
+ "content": [
258
+ {
259
+ "type": "text",
260
+ "text": "994"
261
+ }
262
+ ]
263
+ }
264
+ ]
265
+ },
266
+ {
267
+ "type": "table_cell",
268
+ "attrs": {
269
+ "colspan": 1,
270
+ "rowspan": 1,
271
+ "colwidth": null
272
+ },
273
+ "content": [
274
+ {
275
+ "type": "paragraph",
276
+ "content": [
277
+ {
278
+ "type": "text",
279
+ "text": "00"
280
+ }
281
+ ]
282
+ }
283
+ ]
284
+ },
285
+ {
286
+ "type": "table_cell",
287
+ "attrs": {
288
+ "colspan": 1,
289
+ "rowspan": 1,
290
+ "colwidth": null
291
+ },
292
+ "content": [
293
+ {
294
+ "type": "paragraph",
295
+ "content": [
296
+ {
297
+ "type": "text",
298
+ "text": "0"
299
+ }
300
+ ]
301
+ }
302
+ ]
303
+ },
304
+ {
305
+ "type": "table_cell",
306
+ "attrs": {
307
+ "colspan": 1,
308
+ "rowspan": 1,
309
+ "colwidth": null
310
+ },
311
+ "content": [
312
+ {
313
+ "type": "paragraph",
314
+ "content": [
315
+ {
316
+ "type": "text",
317
+ "text": "9 digits"
318
+ }
319
+ ]
320
+ }
321
+ ]
322
+ },
323
+ {
324
+ "type": "table_cell",
325
+ "attrs": {
326
+ "colspan": 1,
327
+ "rowspan": 1,
328
+ "colwidth": null
329
+ },
330
+ "content": [
331
+ {
332
+ "type": "paragraph",
333
+ "content": [
334
+ {
335
+ "type": "text",
336
+ "text": "+4/+5"
337
+ }
338
+ ]
339
+ }
340
+ ]
341
+ },
342
+ {
343
+ "type": "table_cell",
344
+ "attrs": {
345
+ "colspan": 1,
346
+ "rowspan": 1,
347
+ "colwidth": null
348
+ },
349
+ "content": [
350
+ {
351
+ "type": "paragraph",
352
+ "content": [
353
+ {
354
+ "type": "text",
355
+ "text": " "
356
+ }
357
+ ]
358
+ }
359
+ ]
360
+ }
361
+ ]
362
+ }
363
+ ]
364
+ },
365
+ {
366
+ "type": "paragraph",
367
+ "content": [
368
+ {
369
+ "type": "text",
370
+ "text": " "
371
+ }
372
+ ]
373
+ },
374
+ {
375
+ "type": "paragraph",
376
+ "content": [
377
+ {
378
+ "type": "text",
379
+ "marks": [
380
+ {
381
+ "type": "strong"
382
+ }
383
+ ],
384
+ "text": "P  3   Brazil LIR"
385
+ }
386
+ ]
387
+ },
388
+ {
389
+ "type": "table",
390
+ "content": [
391
+ {
392
+ "type": "table_row",
393
+ "content": [
394
+ {
395
+ "type": "table_cell",
396
+ "attrs": {
397
+ "colspan": 1,
398
+ "rowspan": 1,
399
+ "colwidth": null
400
+ },
401
+ "content": [
402
+ {
403
+ "type": "paragraph",
404
+ "content": [
405
+ {
406
+ "type": "text",
407
+ "text": "Brazil"
408
+ }
409
+ ]
410
+ }
411
+ ]
412
+ },
413
+ {
414
+ "type": "table_cell",
415
+ "attrs": {
416
+ "colspan": 1,
417
+ "rowspan": 1,
418
+ "colwidth": null
419
+ },
420
+ "content": [
421
+ {
422
+ "type": "paragraph",
423
+ "content": [
424
+ {
425
+ "type": "text",
426
+ "text": "55"
427
+ }
428
+ ]
429
+ }
430
+ ]
431
+ },
432
+ {
433
+ "type": "table_cell",
434
+ "attrs": {
435
+ "colspan": 1,
436
+ "rowspan": 1,
437
+ "colwidth": null
438
+ },
439
+ "content": [
440
+ {
441
+ "type": "paragraph",
442
+ "content": [
443
+ {
444
+ "type": "text",
445
+ "text": "00"
446
+ }
447
+ ]
448
+ }
449
+ ]
450
+ },
451
+ {
452
+ "type": "table_cell",
453
+ "attrs": {
454
+ "colspan": 1,
455
+ "rowspan": 1,
456
+ "colwidth": null
457
+ },
458
+ "content": [
459
+ {
460
+ "type": "paragraph",
461
+ "content": [
462
+ {
463
+ "type": "text",
464
+ "text": "0"
465
+ }
466
+ ]
467
+ }
468
+ ]
469
+ },
470
+ {
471
+ "type": "table_cell",
472
+ "attrs": {
473
+ "colspan": 1,
474
+ "rowspan": 1,
475
+ "colwidth": null
476
+ },
477
+ "content": [
478
+ {
479
+ "type": "paragraph",
480
+ "content": [
481
+ {
482
+ "type": "text",
483
+ "text": "10, 11 digits"
484
+ }
485
+ ]
486
+ }
487
+ ]
488
+ },
489
+ {
490
+ "type": "table_cell",
491
+ "attrs": {
492
+ "colspan": 1,
493
+ "rowspan": 1,
494
+ "colwidth": null
495
+ },
496
+ "content": [
497
+ {
498
+ "type": "paragraph",
499
+ "content": [
500
+ {
501
+ "type": "text",
502
+ "text": "-3/-2"
503
+ }
504
+ ]
505
+ }
506
+ ]
507
+ },
508
+ {
509
+ "type": "table_cell",
510
+ "attrs": {
511
+ "colspan": 1,
512
+ "rowspan": 1,
513
+ "colwidth": null
514
+ },
515
+ "content": [
516
+ {
517
+ "type": "paragraph",
518
+ "content": [
519
+ {
520
+ "type": "text",
521
+ "text": "18"
522
+ }
523
+ ]
524
+ }
525
+ ]
526
+ }
527
+ ]
528
+ }
529
+ ]
530
+ }
531
+ ]
532
+ }