scripref 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e62a77dfe3ad29cd0a26f5321ca555364a9031e7f366509b6de98d2537fc3894
4
- data.tar.gz: 2cea8d7e4c6bb09c74509f0a95a656e5d9bc4b5079fe8a47e24697c51804c1c2
3
+ metadata.gz: 18851c425f1c4a9504ede784a43a46d80a668c9059bc000d6f866b6ce3a5ffe2
4
+ data.tar.gz: e7cdaa42c34785fd755dc747247ea100ca757c9fed062cca691060c8c5288c3b
5
5
  SHA512:
6
- metadata.gz: e5ea83b84641277e5e01d04dc31e0381d66f547ef44117692713d23db8f880ee674db96458be0709776029be7b99ec913859675ba289096eed3689d11bdb352b
7
- data.tar.gz: cde42713e59b183d3c605fe2cee0ce0667802b90dd79a115f538480053bb1b71eda0ba554c64b9772c58536dfd4ce2eb11b1e778e08877a556cba38e2afe73d7
6
+ metadata.gz: 01c5874544e15524587022c02e5e3002fa170f07889248f1937410671f94e03db239ec8fd5cfd47db8dee687c7b41b9ba56a4fb8fd12ebffb6f050b3a64eb2c3
7
+ data.tar.gz: 1745d52b620f5b71e9f12627a9b797f668f160e914de8869ab05c692218b87567aa08ff4eae6b2d04e9cad36dd43c1d868d5c8ac4f4b47cfcfeb19e41eea1063
data/Changelog CHANGED
@@ -1,3 +1,6 @@
1
+ 1.1.0
2
+ Adapt German abbreviations.
3
+
1
4
  1.0.0
2
5
  Major release with following two incompatible changes:
3
6
  Use OSIS abbreviations for books.
data/Rakefile CHANGED
@@ -2,19 +2,9 @@ require 'rim/tire'
2
2
  require 'rim/regtest'
3
3
  require 'rim/version'
4
4
 
5
- $:.unshift File.dirname(__FILE__) + '/lib'
6
- require 'scripref'
7
-
8
5
  Rim.setup do
9
- name 'scripref'
10
- authors 'Jan Friedrich'
11
- email 'janfri26@gmail.com'
12
- homepage 'https://github.com/janfri/scripref'
13
- version Scripref::VERSION
14
- summary 'Library for parsing scripture references in real texts.'
15
6
  if feature_loaded? 'rim/irb'
16
7
  irb_requires %w(scripref scripref/include scripref/pipelining)
17
8
  end
18
- ruby_version '>=2.5.0'
19
9
  test_warning false
20
10
  end
@@ -20,15 +20,15 @@ module Scripref
20
20
  END
21
21
 
22
22
  book_abbrevs = <<-END.strip.split(/,\s*/).map {|e| e.split('|')}
23
- 1.Mo|1Mo|1M, 2.Mo|2Mo|2M, 3.Mo|3Mo|3M, 4.Mo|4Mo|4M, 5.Mo|5Mo|5M, Jos, Ri,
24
- Ruth, 1.Sam|1Sam|1Sm, 2.Sam|2Sam|2Sm, 1.Kön|1Kön|1Kö, 2.Kön|2Kön|2Kö,
25
- 1.Chr|1Chr|1Ch, 2.Chr|2Chr|2Ch, Esr, Neh, Est, Hi, Ps, Spr, Pred,
23
+ 1. Mos|1Mo|1M, 2. Mos|2Mo|2M, 3. Mos|3Mo|3M, 4. Mos|4Mo|4M, 5. Mos|5Mo|5M, Jos, Ri,
24
+ Ruth, 1. Sam|1Sam|1Sm, 2. Sam|2Sam|2Sm, 1. Kön|1Kön|1Kö, 2. Kön|2Kön|2Kö,
25
+ 1. Chr|1Chr|1Ch, 2. Chr|2Chr|2Ch, Esr, Neh, Est, Hi, Ps, Spr, Pred,
26
26
  Hohel|Hoh|Hl, Jes, Jer, Klag, Hes, Dan, Hos, Joel, Amos|Am, Obad|Ob,
27
27
  Jona|Jon, Mich|Mi, Nah, Hab, Zef, Hag, Sach, Mal, Mat|Mt, Mar|Mr, Luk|Lk,
28
- Joh|Jh, Apg, Röm|Rö, 1.Ko|1Ko, 2.Ko|2Ko, Gal, Eph, Phil, Kol,
29
- 1.Thes|1Thes|1Th, 2.Thes|2Thes|2Th, 1.Tim, 2.Tim, Tit, Philem|Phm, Heb,
30
- Jak, 1.Pet|1Pet|1Pe, 2.Pet|2Pet|2Pe, 1.Joh|1Joh|1Jo, 2.Joh|2Joh|2Jo,
31
- 3.Joh|3Joh|3Jo, Jud, Off
28
+ Joh|Jh, Apg, Röm|Rö, 1. Kor|1Ko, 2. Kor|2Ko, Gal, Eph, Phil, Kol,
29
+ 1. Thes|1Thes|1Th, 2. Thes|2Thes|2Th, 1. Tim|1Tim, 2. Tim|2Tim, Tit, Philem|Phm, Heb,
30
+ Jak, 1. Pet|1Pet|1Pe, 2. Pet|2Pet|2Pe, 1. Joh|1Joh|1Jo, 2. Joh|2Joh|2Jo,
31
+ 3. Joh|3Joh|3Jo, Jud, Off
32
32
  END
33
33
 
34
34
  # Array of book names.
data/lib/scripref.rb CHANGED
@@ -5,7 +5,7 @@ require 'delegate'
5
5
 
6
6
  module Scripref
7
7
 
8
- VERSION = '1.0.0'
8
+ VERSION = '1.1.0'
9
9
 
10
10
  autoload :Bookname, 'scripref/bookname'
11
11
  autoload :Bookorder, 'scripref/bookorder'
data/regtest/formatter.rb CHANGED
@@ -5,10 +5,10 @@ require 'scripref'
5
5
  include Scripref
6
6
 
7
7
  o = OpenStruct.new
8
- o.b1 = [42]
8
+ o.b1 = [:Luke]
9
9
  o.c1 = [1, nil]
10
10
  o.v1 = [2, nil]
11
- o.b2 = [43, nil]
11
+ o.b2 = [:John, nil]
12
12
  o.c2 = [3, nil]
13
13
  o.v2 = [4, nil]
14
14
 
@@ -1,352 +1,352 @@
1
1
  ---
2
2
  sample:
3
- :b1: 42
3
+ :b1: :Luke
4
4
  :c1: 1
5
5
  :v1: 2
6
- :b2: 43
6
+ :b2: :John
7
7
  :c2: 3
8
8
  :v2: 4
9
- :a1:
10
- :a2:
9
+ :a1:
10
+ :a2:
11
11
  result: Lukas 1,2-Johannes 3,4
12
12
  ---
13
13
  sample:
14
- :b1: 42
14
+ :b1: :Luke
15
15
  :c1: 1
16
16
  :v1: 2
17
- :b2: 43
17
+ :b2: :John
18
18
  :c2: 3
19
- :v2:
20
- :a1:
21
- :a2:
19
+ :v2:
20
+ :a1:
21
+ :a2:
22
22
  result: Lukas 1,2-Johannes 3
23
23
  ---
24
24
  sample:
25
- :b1: 42
25
+ :b1: :Luke
26
26
  :c1: 1
27
27
  :v1: 2
28
- :b2: 43
29
- :c2:
28
+ :b2: :John
29
+ :c2:
30
30
  :v2: 4
31
- :a1:
32
- :a2:
31
+ :a1:
32
+ :a2:
33
33
  result: Lukas 1,2-Johannes,4
34
34
  ---
35
35
  sample:
36
- :b1: 42
36
+ :b1: :Luke
37
37
  :c1: 1
38
38
  :v1: 2
39
- :b2: 43
40
- :c2:
41
- :v2:
42
- :a1:
43
- :a2:
39
+ :b2: :John
40
+ :c2:
41
+ :v2:
42
+ :a1:
43
+ :a2:
44
44
  result: Lukas 1,2-Johannes
45
45
  ---
46
46
  sample:
47
- :b1: 42
47
+ :b1: :Luke
48
48
  :c1: 1
49
49
  :v1: 2
50
- :b2:
50
+ :b2:
51
51
  :c2: 3
52
52
  :v2: 4
53
- :a1:
54
- :a2:
53
+ :a1:
54
+ :a2:
55
55
  result: Lukas 1,2-3,4
56
56
  ---
57
57
  sample:
58
- :b1: 42
58
+ :b1: :Luke
59
59
  :c1: 1
60
60
  :v1: 2
61
- :b2:
61
+ :b2:
62
62
  :c2: 3
63
- :v2:
64
- :a1:
65
- :a2:
63
+ :v2:
64
+ :a1:
65
+ :a2:
66
66
  result: Lukas 1,2-3
67
67
  ---
68
68
  sample:
69
- :b1: 42
69
+ :b1: :Luke
70
70
  :c1: 1
71
71
  :v1: 2
72
- :b2:
73
- :c2:
72
+ :b2:
73
+ :c2:
74
74
  :v2: 4
75
- :a1:
76
- :a2:
75
+ :a1:
76
+ :a2:
77
77
  result: Lukas 1,2-4
78
78
  ---
79
79
  sample:
80
- :b1: 42
80
+ :b1: :Luke
81
81
  :c1: 1
82
82
  :v1: 2
83
- :b2:
84
- :c2:
85
- :v2:
86
- :a1:
87
- :a2:
83
+ :b2:
84
+ :c2:
85
+ :v2:
86
+ :a1:
87
+ :a2:
88
88
  result: Lukas 1,2
89
89
  ---
90
90
  sample:
91
- :b1: 42
91
+ :b1: :Luke
92
92
  :c1: 1
93
- :v1:
94
- :b2: 43
93
+ :v1:
94
+ :b2: :John
95
95
  :c2: 3
96
96
  :v2: 4
97
- :a1:
98
- :a2:
97
+ :a1:
98
+ :a2:
99
99
  result: Lukas 1-Johannes 3,4
100
100
  ---
101
101
  sample:
102
- :b1: 42
102
+ :b1: :Luke
103
103
  :c1: 1
104
- :v1:
105
- :b2: 43
104
+ :v1:
105
+ :b2: :John
106
106
  :c2: 3
107
- :v2:
108
- :a1:
109
- :a2:
107
+ :v2:
108
+ :a1:
109
+ :a2:
110
110
  result: Lukas 1-Johannes 3
111
111
  ---
112
112
  sample:
113
- :b1: 42
113
+ :b1: :Luke
114
114
  :c1: 1
115
- :v1:
116
- :b2: 43
117
- :c2:
115
+ :v1:
116
+ :b2: :John
117
+ :c2:
118
118
  :v2: 4
119
- :a1:
120
- :a2:
119
+ :a1:
120
+ :a2:
121
121
  result: Lukas 1-Johannes,4
122
122
  ---
123
123
  sample:
124
- :b1: 42
124
+ :b1: :Luke
125
125
  :c1: 1
126
- :v1:
127
- :b2: 43
128
- :c2:
129
- :v2:
130
- :a1:
131
- :a2:
126
+ :v1:
127
+ :b2: :John
128
+ :c2:
129
+ :v2:
130
+ :a1:
131
+ :a2:
132
132
  result: Lukas 1-Johannes
133
133
  ---
134
134
  sample:
135
- :b1: 42
135
+ :b1: :Luke
136
136
  :c1: 1
137
- :v1:
138
- :b2:
137
+ :v1:
138
+ :b2:
139
139
  :c2: 3
140
140
  :v2: 4
141
- :a1:
142
- :a2:
141
+ :a1:
142
+ :a2:
143
143
  result: Lukas 1-3,4
144
144
  ---
145
145
  sample:
146
- :b1: 42
146
+ :b1: :Luke
147
147
  :c1: 1
148
- :v1:
149
- :b2:
148
+ :v1:
149
+ :b2:
150
150
  :c2: 3
151
- :v2:
152
- :a1:
153
- :a2:
151
+ :v2:
152
+ :a1:
153
+ :a2:
154
154
  result: Lukas 1-3
155
155
  ---
156
156
  sample:
157
- :b1: 42
157
+ :b1: :Luke
158
158
  :c1: 1
159
- :v1:
160
- :b2:
161
- :c2:
159
+ :v1:
160
+ :b2:
161
+ :c2:
162
162
  :v2: 4
163
- :a1:
164
- :a2:
163
+ :a1:
164
+ :a2:
165
165
  result: Lukas 1-4
166
166
  ---
167
167
  sample:
168
- :b1: 42
168
+ :b1: :Luke
169
169
  :c1: 1
170
- :v1:
171
- :b2:
172
- :c2:
173
- :v2:
174
- :a1:
175
- :a2:
170
+ :v1:
171
+ :b2:
172
+ :c2:
173
+ :v2:
174
+ :a1:
175
+ :a2:
176
176
  result: Lukas 1
177
177
  ---
178
178
  sample:
179
- :b1: 42
180
- :c1:
179
+ :b1: :Luke
180
+ :c1:
181
181
  :v1: 2
182
- :b2: 43
182
+ :b2: :John
183
183
  :c2: 3
184
184
  :v2: 4
185
- :a1:
186
- :a2:
185
+ :a1:
186
+ :a2:
187
187
  result: Lukas,2-Johannes 3,4
188
188
  ---
189
189
  sample:
190
- :b1: 42
191
- :c1:
190
+ :b1: :Luke
191
+ :c1:
192
192
  :v1: 2
193
- :b2: 43
193
+ :b2: :John
194
194
  :c2: 3
195
- :v2:
196
- :a1:
197
- :a2:
195
+ :v2:
196
+ :a1:
197
+ :a2:
198
198
  result: Lukas,2-Johannes 3
199
199
  ---
200
200
  sample:
201
- :b1: 42
202
- :c1:
201
+ :b1: :Luke
202
+ :c1:
203
203
  :v1: 2
204
- :b2: 43
205
- :c2:
204
+ :b2: :John
205
+ :c2:
206
206
  :v2: 4
207
- :a1:
208
- :a2:
207
+ :a1:
208
+ :a2:
209
209
  result: Lukas,2-Johannes,4
210
210
  ---
211
211
  sample:
212
- :b1: 42
213
- :c1:
212
+ :b1: :Luke
213
+ :c1:
214
214
  :v1: 2
215
- :b2: 43
216
- :c2:
217
- :v2:
218
- :a1:
219
- :a2:
215
+ :b2: :John
216
+ :c2:
217
+ :v2:
218
+ :a1:
219
+ :a2:
220
220
  result: Lukas,2-Johannes
221
221
  ---
222
222
  sample:
223
- :b1: 42
224
- :c1:
223
+ :b1: :Luke
224
+ :c1:
225
225
  :v1: 2
226
- :b2:
226
+ :b2:
227
227
  :c2: 3
228
228
  :v2: 4
229
- :a1:
230
- :a2:
229
+ :a1:
230
+ :a2:
231
231
  result: Lukas,2-3,4
232
232
  ---
233
233
  sample:
234
- :b1: 42
235
- :c1:
234
+ :b1: :Luke
235
+ :c1:
236
236
  :v1: 2
237
- :b2:
237
+ :b2:
238
238
  :c2: 3
239
- :v2:
240
- :a1:
241
- :a2:
239
+ :v2:
240
+ :a1:
241
+ :a2:
242
242
  result: Lukas,2-3
243
243
  ---
244
244
  sample:
245
- :b1: 42
246
- :c1:
245
+ :b1: :Luke
246
+ :c1:
247
247
  :v1: 2
248
- :b2:
249
- :c2:
248
+ :b2:
249
+ :c2:
250
250
  :v2: 4
251
- :a1:
252
- :a2:
251
+ :a1:
252
+ :a2:
253
253
  result: Lukas,2-4
254
254
  ---
255
255
  sample:
256
- :b1: 42
257
- :c1:
256
+ :b1: :Luke
257
+ :c1:
258
258
  :v1: 2
259
- :b2:
260
- :c2:
261
- :v2:
262
- :a1:
263
- :a2:
259
+ :b2:
260
+ :c2:
261
+ :v2:
262
+ :a1:
263
+ :a2:
264
264
  result: Lukas,2
265
265
  ---
266
266
  sample:
267
- :b1: 42
268
- :c1:
269
- :v1:
270
- :b2: 43
267
+ :b1: :Luke
268
+ :c1:
269
+ :v1:
270
+ :b2: :John
271
271
  :c2: 3
272
272
  :v2: 4
273
- :a1:
274
- :a2:
273
+ :a1:
274
+ :a2:
275
275
  result: Lukas-Johannes 3,4
276
276
  ---
277
277
  sample:
278
- :b1: 42
279
- :c1:
280
- :v1:
281
- :b2: 43
278
+ :b1: :Luke
279
+ :c1:
280
+ :v1:
281
+ :b2: :John
282
282
  :c2: 3
283
- :v2:
284
- :a1:
285
- :a2:
283
+ :v2:
284
+ :a1:
285
+ :a2:
286
286
  result: Lukas-Johannes 3
287
287
  ---
288
288
  sample:
289
- :b1: 42
290
- :c1:
291
- :v1:
292
- :b2: 43
293
- :c2:
289
+ :b1: :Luke
290
+ :c1:
291
+ :v1:
292
+ :b2: :John
293
+ :c2:
294
294
  :v2: 4
295
- :a1:
296
- :a2:
295
+ :a1:
296
+ :a2:
297
297
  result: Lukas-Johannes,4
298
298
  ---
299
299
  sample:
300
- :b1: 42
301
- :c1:
302
- :v1:
303
- :b2: 43
304
- :c2:
305
- :v2:
306
- :a1:
307
- :a2:
300
+ :b1: :Luke
301
+ :c1:
302
+ :v1:
303
+ :b2: :John
304
+ :c2:
305
+ :v2:
306
+ :a1:
307
+ :a2:
308
308
  result: Lukas-Johannes
309
309
  ---
310
310
  sample:
311
- :b1: 42
312
- :c1:
313
- :v1:
314
- :b2:
311
+ :b1: :Luke
312
+ :c1:
313
+ :v1:
314
+ :b2:
315
315
  :c2: 3
316
316
  :v2: 4
317
- :a1:
318
- :a2:
317
+ :a1:
318
+ :a2:
319
319
  result: Lukas-3,4
320
320
  ---
321
321
  sample:
322
- :b1: 42
323
- :c1:
324
- :v1:
325
- :b2:
322
+ :b1: :Luke
323
+ :c1:
324
+ :v1:
325
+ :b2:
326
326
  :c2: 3
327
- :v2:
328
- :a1:
329
- :a2:
327
+ :v2:
328
+ :a1:
329
+ :a2:
330
330
  result: Lukas-3
331
331
  ---
332
332
  sample:
333
- :b1: 42
334
- :c1:
335
- :v1:
336
- :b2:
337
- :c2:
333
+ :b1: :Luke
334
+ :c1:
335
+ :v1:
336
+ :b2:
337
+ :c2:
338
338
  :v2: 4
339
- :a1:
340
- :a2:
339
+ :a1:
340
+ :a2:
341
341
  result: Lukas-4
342
342
  ---
343
343
  sample:
344
- :b1: 42
345
- :c1:
346
- :v1:
347
- :b2:
348
- :c2:
349
- :v2:
350
- :a1:
351
- :a2:
344
+ :b1: :Luke
345
+ :c1:
346
+ :v1:
347
+ :b2:
348
+ :c2:
349
+ :v2:
350
+ :a1:
351
+ :a2:
352
352
  result: Lukas