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,428 @@
1
+ {
2
+ "type": "doc",
3
+ "content": [
4
+ {
5
+ "type": "paragraph",
6
+ "content": [
7
+ {
8
+ "type": "text",
9
+ "marks": [
10
+ {
11
+ "type": "strong"
12
+ }
13
+ ],
14
+ "text": "ADD"
15
+ }
16
+ ]
17
+ },
18
+ {
19
+ "type": "paragraph",
20
+ "content": [
21
+ {
22
+ "type": "text",
23
+ "marks": [
24
+ {
25
+ "type": "strong"
26
+ }
27
+ ],
28
+ "text": " "
29
+ }
30
+ ]
31
+ },
32
+ {
33
+ "type": "paragraph",
34
+ "content": [
35
+ {
36
+ "type": "text",
37
+ "marks": [
38
+ {
39
+ "type": "strong"
40
+ }
41
+ ],
42
+ "text": "IR17"
43
+ },
44
+ {
45
+ "type": "text",
46
+ "text": "         Kaman Hormozgan LTD, No.23, 2nd floor, 205nd Apartment, Kolahdooz St.,"
47
+ },
48
+ {
49
+ "type": "hard_break"
50
+ },
51
+ {
52
+ "type": "text",
53
+ "text": "                         P.O. Box 1951714511, Tehran, Iran."
54
+ },
55
+ {
56
+ "type": "hard_break"
57
+ },
58
+ {
59
+ "type": "text",
60
+ "text": "                         Tel.:         +98 21 2257 5923, +98 21 2257 8502, Fax: +98 21 2257 4906, "
61
+ },
62
+ {
63
+ "type": "hard_break"
64
+ },
65
+ {
66
+ "type": "text",
67
+ "text": "                         E-Mail:    "
68
+ },
69
+ {
70
+ "type": "text",
71
+ "marks": [
72
+ {
73
+ "type": "link",
74
+ "attrs": {
75
+ "href": "mailto:info@kamanhormozgan.com",
76
+ "title": null
77
+ }
78
+ }
79
+ ],
80
+ "text": "info@kamanhormozgan.com"
81
+ }
82
+ ]
83
+ },
84
+ {
85
+ "type": "paragraph",
86
+ "content": [
87
+ {
88
+ "type": "text",
89
+ "marks": [
90
+ {
91
+ "type": "strong"
92
+ }
93
+ ],
94
+ "text": "SUP"
95
+ }
96
+ ]
97
+ },
98
+ {
99
+ "type": "paragraph",
100
+ "content": [
101
+ {
102
+ "type": "text",
103
+ "marks": [
104
+ {
105
+ "type": "strong"
106
+ }
107
+ ],
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": "IR06         "
123
+ },
124
+ {
125
+ "type": "text",
126
+ "text": "Telecommunication Company of Iran (TCI), No. 504, Dr. Shariati Ave.,"
127
+ },
128
+ {
129
+ "type": "hard_break"
130
+ },
131
+ {
132
+ "type": "text",
133
+ "text": "                         Tehran, Iran."
134
+ },
135
+ {
136
+ "type": "hard_break"
137
+ },
138
+ {
139
+ "type": "text",
140
+ "text": "                         Tel.:     +98 21 8811 2973, Fax:    +98 21 8811 2973"
141
+ }
142
+ ]
143
+ },
144
+ {
145
+ "type": "paragraph",
146
+ "content": [
147
+ {
148
+ "type": "text",
149
+ "marks": [
150
+ {
151
+ "type": "strong"
152
+ }
153
+ ],
154
+ "text": "IR07"
155
+ },
156
+ {
157
+ "type": "text",
158
+ "text": "         Iran Marine Services Co., No. 135, Mirdamad Blvd.,"
159
+ },
160
+ {
161
+ "type": "hard_break"
162
+ },
163
+ {
164
+ "type": "text",
165
+ "text": "                         P.O. Box: 19116-18511, Tehran, Iran."
166
+ },
167
+ {
168
+ "type": "hard_break"
169
+ },
170
+ {
171
+ "type": "text",
172
+ "text": "                         Tel.:   +98 21 2222 2249, Fax:    +98 21 2222 0661, +98 21 2222 3380, "
173
+ },
174
+ {
175
+ "type": "hard_break"
176
+ },
177
+ {
178
+ "type": "text",
179
+ "text": "                         +98 21 2222 4389, E-Mail: "
180
+ },
181
+ {
182
+ "type": "text",
183
+ "marks": [
184
+ {
185
+ "type": "link",
186
+ "attrs": {
187
+ "href": "mailto:info@imsiran.com",
188
+ "title": null
189
+ }
190
+ }
191
+ ],
192
+ "text": "info@imsiran.com"
193
+ },
194
+ {
195
+ "type": "text",
196
+ "text": ", URL: "
197
+ },
198
+ {
199
+ "type": "text",
200
+ "marks": [
201
+ {
202
+ "type": "link",
203
+ "attrs": {
204
+ "href": "http://www.imsiran.com",
205
+ "title": null
206
+ }
207
+ }
208
+ ],
209
+ "text": "www.imsiran.com"
210
+ },
211
+ {
212
+ "type": "hard_break"
213
+ },
214
+ {
215
+ "type": "text",
216
+ "marks": [
217
+ {
218
+ "type": "em"
219
+ }
220
+ ],
221
+ "text": "                         Contact Person M. Sadeghi"
222
+ }
223
+ ]
224
+ },
225
+ {
226
+ "type": "paragraph",
227
+ "content": [
228
+ {
229
+ "type": "text",
230
+ "marks": [
231
+ {
232
+ "type": "strong"
233
+ }
234
+ ],
235
+ "text": "IR08"
236
+ },
237
+ {
238
+ "type": "text",
239
+ "text": "         Industrial Fishing Co. of Iran (IFCO), Seyde Sanati Iran Co., No. 24,"
240
+ },
241
+ {
242
+ "type": "hard_break"
243
+ },
244
+ {
245
+ "type": "text",
246
+ "text": "                         Shahid Sarparast Street, Ayatollah Taleghani Ave., Tehran, Iran."
247
+ },
248
+ {
249
+ "type": "hard_break"
250
+ },
251
+ {
252
+ "type": "text",
253
+ "text": "                         Tel.:    +98 21 6640 2155, Fax:    +98 21 6646 3700"
254
+ },
255
+ {
256
+ "type": "hard_break"
257
+ },
258
+ {
259
+ "type": "text",
260
+ "text": "                         "
261
+ },
262
+ {
263
+ "type": "text",
264
+ "marks": [
265
+ {
266
+ "type": "em"
267
+ }
268
+ ],
269
+ "text": "Contact Person: A. Tofighi"
270
+ }
271
+ ]
272
+ },
273
+ {
274
+ "type": "paragraph",
275
+ "content": [
276
+ {
277
+ "type": "text",
278
+ "marks": [
279
+ {
280
+ "type": "strong"
281
+ }
282
+ ],
283
+ "text": "IR13"
284
+ },
285
+ {
286
+ "type": "text",
287
+ "text": "         Iran Land Services Shipping Agency, No. 40, Alvand Ave., Argentine Sq.,"
288
+ },
289
+ {
290
+ "type": "hard_break"
291
+ },
292
+ {
293
+ "type": "text",
294
+ "text": "                         P.O. Box: 1516844711, Tehran, Iran."
295
+ },
296
+ {
297
+ "type": "hard_break"
298
+ },
299
+ {
300
+ "type": "text",
301
+ "text": "                         Tel.:         +98 21 8864 3400-15, Fax:  +98 21 8877 1153,"
302
+ },
303
+ {
304
+ "type": "hard_break"
305
+ },
306
+ {
307
+ "type": "text",
308
+ "text": "                         E-Mail:    "
309
+ },
310
+ {
311
+ "type": "text",
312
+ "marks": [
313
+ {
314
+ "type": "link",
315
+ "attrs": {
316
+ "href": "mailto:ils-teh@iranlandservice.com",
317
+ "title": null
318
+ }
319
+ }
320
+ ],
321
+ "text": "ils-teh@iranlandservice.com"
322
+ },
323
+ {
324
+ "type": "text",
325
+ "text": ", URL:   "
326
+ },
327
+ {
328
+ "type": "text",
329
+ "marks": [
330
+ {
331
+ "type": "link",
332
+ "attrs": {
333
+ "href": "http://www.iranlandservice.com",
334
+ "title": null
335
+ }
336
+ }
337
+ ],
338
+ "text": "www.iranlandservice.com"
339
+ }
340
+ ]
341
+ },
342
+ {
343
+ "type": "paragraph",
344
+ "content": [
345
+ {
346
+ "type": "text",
347
+ "marks": [
348
+ {
349
+ "type": "strong"
350
+ }
351
+ ],
352
+ "text": "IR14"
353
+ },
354
+ {
355
+ "type": "text",
356
+ "text": "         Dena Aria Lines Co., Unit 19, No. 9, Kashani Blvd., Sadeghieh Sq.,"
357
+ },
358
+ {
359
+ "type": "hard_break"
360
+ },
361
+ {
362
+ "type": "text",
363
+ "text": "                         P.O. Box: 1471676191, Tehran, Iran."
364
+ },
365
+ {
366
+ "type": "hard_break"
367
+ },
368
+ {
369
+ "type": "text",
370
+ "text": "                         Tel.:      +98 21 4406 3171, Fax:   +98 21 4404 6368, E-Mail: "
371
+ },
372
+ {
373
+ "type": "text",
374
+ "marks": [
375
+ {
376
+ "type": "link",
377
+ "attrs": {
378
+ "href": "mailto:info@dena-aria.com",
379
+ "title": null
380
+ }
381
+ }
382
+ ],
383
+ "text": "info@dena-aria.com"
384
+ },
385
+ {
386
+ "type": "text",
387
+ "text": ","
388
+ },
389
+ {
390
+ "type": "hard_break"
391
+ },
392
+ {
393
+ "type": "text",
394
+ "text": "                         URL:     "
395
+ },
396
+ {
397
+ "type": "text",
398
+ "marks": [
399
+ {
400
+ "type": "link",
401
+ "attrs": {
402
+ "href": "http://www.dena_aria.com",
403
+ "title": null
404
+ }
405
+ }
406
+ ],
407
+ "text": "www.dena_aria.com"
408
+ },
409
+ {
410
+ "type": "hard_break"
411
+ },
412
+ {
413
+ "type": "text",
414
+ "text": "                         "
415
+ },
416
+ {
417
+ "type": "text",
418
+ "marks": [
419
+ {
420
+ "type": "em"
421
+ }
422
+ ],
423
+ "text": "Contact Person: M. Gharaeian"
424
+ }
425
+ ]
426
+ }
427
+ ]
428
+ }
@@ -0,0 +1,208 @@
1
+ ---
2
+ type: doc
3
+ content:
4
+ - type: paragraph
5
+ content:
6
+ - type: text
7
+ marks:
8
+ - type: strong
9
+ text: ADD
10
+ - type: paragraph
11
+ content:
12
+ - type: text
13
+ marks:
14
+ - type: strong
15
+ text: " "
16
+ - type: paragraph
17
+ content:
18
+ - type: text
19
+ marks:
20
+ - type: strong
21
+ text: IR17
22
+ - type: text
23
+ text: "         Kaman Hormozgan LTD, No.23, 2nd floor, 205nd Apartment, Kolahdooz
24
+ St.,"
25
+ - type: hard_break
26
+ - type: text
27
+ text: "                         P.O. Box 1951714511, Tehran, Iran."
28
+ - type: hard_break
29
+ - type: text
30
+ text: "                         Tel.:         +98 21 2257 5923, +98 21 2257 8502,
31
+ Fax: +98 21 2257 4906, "
32
+ - type: hard_break
33
+ - type: text
34
+ text: "                         E-Mail:    "
35
+ - type: text
36
+ marks:
37
+ - type: link
38
+ attrs:
39
+ href: mailto:info@kamanhormozgan.com
40
+ title:
41
+ text: info@kamanhormozgan.com
42
+ - type: paragraph
43
+ content:
44
+ - type: text
45
+ marks:
46
+ - type: strong
47
+ text: SUP
48
+ - type: paragraph
49
+ content:
50
+ - type: text
51
+ marks:
52
+ - type: strong
53
+ text: " "
54
+ - type: paragraph
55
+ content:
56
+ - type: text
57
+ marks:
58
+ - type: strong
59
+ text: 'IR06         '
60
+ - type: text
61
+ text: Telecommunication Company of Iran (TCI), No. 504, Dr. Shariati Ave.,
62
+ - type: hard_break
63
+ - type: text
64
+ text: "                         Tehran, Iran."
65
+ - type: hard_break
66
+ - type: text
67
+ text: "                         Tel.:     +98 21 8811 2973, Fax:    +98 21 8811
68
+ 2973"
69
+ - type: paragraph
70
+ content:
71
+ - type: text
72
+ marks:
73
+ - type: strong
74
+ text: IR07
75
+ - type: text
76
+ text: "         Iran Marine Services Co., No. 135, Mirdamad Blvd.,"
77
+ - type: hard_break
78
+ - type: text
79
+ text: "                         P.O. Box: 19116-18511, Tehran, Iran."
80
+ - type: hard_break
81
+ - type: text
82
+ text: "                         Tel.:   +98 21 2222 2249, Fax:    +98 21 2222
83
+ 0661, +98 21 2222 3380, "
84
+ - type: hard_break
85
+ - type: text
86
+ text: "                         +98 21 2222 4389, E-Mail: "
87
+ - type: text
88
+ marks:
89
+ - type: link
90
+ attrs:
91
+ href: mailto:info@imsiran.com
92
+ title:
93
+ text: info@imsiran.com
94
+ - type: text
95
+ text: ", URL: "
96
+ - type: text
97
+ marks:
98
+ - type: link
99
+ attrs:
100
+ href: http://www.imsiran.com
101
+ title:
102
+ text: www.imsiran.com
103
+ - type: hard_break
104
+ - type: text
105
+ marks:
106
+ - type: em
107
+ text: "                         Contact Person M. Sadeghi"
108
+ - type: paragraph
109
+ content:
110
+ - type: text
111
+ marks:
112
+ - type: strong
113
+ text: IR08
114
+ - type: text
115
+ text: "         Industrial Fishing Co. of Iran (IFCO), Seyde Sanati Iran Co.,
116
+ No. 24,"
117
+ - type: hard_break
118
+ - type: text
119
+ text: "                         Shahid Sarparast Street, Ayatollah Taleghani Ave.,
120
+ Tehran, Iran."
121
+ - type: hard_break
122
+ - type: text
123
+ text: "                         Tel.:    +98 21 6640 2155, Fax:    +98 21 6646
124
+ 3700"
125
+ - type: hard_break
126
+ - type: text
127
+ text: "                         "
128
+ - type: text
129
+ marks:
130
+ - type: em
131
+ text: 'Contact Person: A. Tofighi'
132
+ - type: paragraph
133
+ content:
134
+ - type: text
135
+ marks:
136
+ - type: strong
137
+ text: IR13
138
+ - type: text
139
+ text: "         Iran Land Services Shipping Agency, No. 40, Alvand Ave., Argentine
140
+ Sq.,"
141
+ - type: hard_break
142
+ - type: text
143
+ text: "                         P.O. Box: 1516844711, Tehran, Iran."
144
+ - type: hard_break
145
+ - type: text
146
+ text: "                         Tel.:         +98 21 8864 3400-15, Fax:  +98 21
147
+ 8877 1153,"
148
+ - type: hard_break
149
+ - type: text
150
+ text: "                         E-Mail:    "
151
+ - type: text
152
+ marks:
153
+ - type: link
154
+ attrs:
155
+ href: mailto:ils-teh@iranlandservice.com
156
+ title:
157
+ text: ils-teh@iranlandservice.com
158
+ - type: text
159
+ text: ", URL:   "
160
+ - type: text
161
+ marks:
162
+ - type: link
163
+ attrs:
164
+ href: http://www.iranlandservice.com
165
+ title:
166
+ text: www.iranlandservice.com
167
+ - type: paragraph
168
+ content:
169
+ - type: text
170
+ marks:
171
+ - type: strong
172
+ text: IR14
173
+ - type: text
174
+ text: "         Dena Aria Lines Co., Unit 19, No. 9, Kashani Blvd., Sadeghieh
175
+ Sq.,"
176
+ - type: hard_break
177
+ - type: text
178
+ text: "                         P.O. Box: 1471676191, Tehran, Iran."
179
+ - type: hard_break
180
+ - type: text
181
+ text: "                         Tel.:      +98 21 4406 3171, Fax:   +98 21 4404
182
+ 6368, E-Mail: "
183
+ - type: text
184
+ marks:
185
+ - type: link
186
+ attrs:
187
+ href: mailto:info@dena-aria.com
188
+ title:
189
+ text: info@dena-aria.com
190
+ - type: text
191
+ text: ","
192
+ - type: hard_break
193
+ - type: text
194
+ text: "                         URL:     "
195
+ - type: text
196
+ marks:
197
+ - type: link
198
+ attrs:
199
+ href: http://www.dena_aria.com
200
+ title:
201
+ text: www.dena_aria.com
202
+ - type: hard_break
203
+ - type: text
204
+ text: "                         "
205
+ - type: text
206
+ marks:
207
+ - type: em
208
+ text: 'Contact Person: M. Gharaeian'