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,366 @@
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  4   Djibouti 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": "Djibouti"
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": "253"
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": "8 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": "+3"
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
+ }
@@ -0,0 +1,182 @@
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/
20
+ - type: hard_break
21
+ marks:
22
+ - type: em
23
+ - type: text
24
+ marks:
25
+ - type: em
26
+ text: geographical area
27
+ - type: table_cell
28
+ attrs:
29
+ colspan: 1
30
+ rowspan: 1
31
+ colwidth:
32
+ content:
33
+ - type: paragraph
34
+ content:
35
+ - type: text
36
+ marks:
37
+ - type: em
38
+ text: Country code
39
+ - type: table_cell
40
+ attrs:
41
+ colspan: 1
42
+ rowspan: 1
43
+ colwidth:
44
+ content:
45
+ - type: paragraph
46
+ content:
47
+ - type: text
48
+ marks:
49
+ - type: em
50
+ text: International prefix
51
+ - type: table_cell
52
+ attrs:
53
+ colspan: 1
54
+ rowspan: 1
55
+ colwidth:
56
+ content:
57
+ - type: paragraph
58
+ content:
59
+ - type: text
60
+ marks:
61
+ - type: em
62
+ text: National prefix
63
+ - type: table_cell
64
+ attrs:
65
+ colspan: 1
66
+ rowspan: 1
67
+ colwidth:
68
+ content:
69
+ - type: paragraph
70
+ content:
71
+ - type: text
72
+ marks:
73
+ - type: em
74
+ text: National (significant) number
75
+ - type: table_cell
76
+ attrs:
77
+ colspan: 1
78
+ rowspan: 1
79
+ colwidth:
80
+ content:
81
+ - type: paragraph
82
+ content:
83
+ - type: text
84
+ marks:
85
+ - type: em
86
+ text: UTC/DST
87
+ - type: table_cell
88
+ attrs:
89
+ colspan: 1
90
+ rowspan: 1
91
+ colwidth:
92
+ content:
93
+ - type: paragraph
94
+ content:
95
+ - type: text
96
+ marks:
97
+ - type: em
98
+ text: Note
99
+ - type: paragraph
100
+ content:
101
+ - type: text
102
+ text: " "
103
+ - type: paragraph
104
+ content:
105
+ - type: text
106
+ marks:
107
+ - type: strong
108
+ text: P  4   Djibouti LIR
109
+ - type: table
110
+ content:
111
+ - type: table_row
112
+ content:
113
+ - type: table_cell
114
+ attrs:
115
+ colspan: 1
116
+ rowspan: 1
117
+ colwidth:
118
+ content:
119
+ - type: paragraph
120
+ content:
121
+ - type: text
122
+ text: Djibouti
123
+ - type: table_cell
124
+ attrs:
125
+ colspan: 1
126
+ rowspan: 1
127
+ colwidth:
128
+ content:
129
+ - type: paragraph
130
+ content:
131
+ - type: text
132
+ text: '253'
133
+ - type: table_cell
134
+ attrs:
135
+ colspan: 1
136
+ rowspan: 1
137
+ colwidth:
138
+ content:
139
+ - type: paragraph
140
+ content:
141
+ - type: text
142
+ text: '00'
143
+ - type: table_cell
144
+ attrs:
145
+ colspan: 1
146
+ rowspan: 1
147
+ colwidth:
148
+ content:
149
+ - type: paragraph
150
+ content:
151
+ - type: text
152
+ text: '0'
153
+ - type: table_cell
154
+ attrs:
155
+ colspan: 1
156
+ rowspan: 1
157
+ colwidth:
158
+ content:
159
+ - type: paragraph
160
+ content:
161
+ - type: text
162
+ text: 8 digits
163
+ - type: table_cell
164
+ attrs:
165
+ colspan: 1
166
+ rowspan: 1
167
+ colwidth:
168
+ content:
169
+ - type: paragraph
170
+ content:
171
+ - type: text
172
+ text: "+3"
173
+ - type: table_cell
174
+ attrs:
175
+ colspan: 1
176
+ rowspan: 1
177
+ colwidth:
178
+ content:
179
+ - type: paragraph
180
+ content:
181
+ - type: text
182
+ text: " "