scripref 1.1.0 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Changelog +6 -0
- data/LICENSE +1 -1
- data/lib/scripref/bookname.rb +1 -1
- data/lib/scripref/english.rb +1 -1
- data/lib/scripref/formatter.rb +6 -1
- data/lib/scripref/german.rb +1 -1
- data/lib/scripref/include.rb +1 -1
- data/lib/scripref/parser.rb +1 -1
- data/lib/scripref/processor.rb +1 -1
- data/lib/scripref.rb +10 -10
- data/regtest/formatter.rb +4 -1
- data/regtest/parser.rb +4 -1
- data/regtest/processor.rb +4 -1
- data/scripref.gemspec +1 -0
- data/test/test_bookname.rb +1 -1
- data/test/test_english.rb +1 -1
- data/test/test_formatter.rb +6 -1
- data/test/test_german.rb +13 -13
- data/test/test_helper.rb +1 -1
- data/test/test_integration.rb +1 -1
- data/test/test_parser.rb +1 -1
- data/test/test_passage.rb +2 -1
- data/test/test_pipelining.rb +2 -2
- data/test/test_processor.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 307a7c3809c70de6386b29d42030f15f11500fbbcb4610eda7ce3316a10413d9
|
4
|
+
data.tar.gz: bf6c3dbe9bf855fdc9be762e5aca9e356b586276341e1b770506e0ae39aeaf69
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 10045f4c2a5b3faae38ace17eab90c256ad1bfdb01ffea1dafc9bb8b0e58617c38c1eff92d8ab9f06b54efb8cd6b671e417667f6cc68efac5d994988a9561e7e
|
7
|
+
data.tar.gz: 6a5eb88141c66149b450ff9eb847475fd5f446050520bb9b7cce2dac99dd3d6a74b4e38a7a815e5a07663673435fe156e6630830e8ae47e6ae030c460d2e3a9b
|
data/Changelog
CHANGED
data/LICENSE
CHANGED
data/lib/scripref/bookname.rb
CHANGED
data/lib/scripref/english.rb
CHANGED
data/lib/scripref/formatter.rb
CHANGED
data/lib/scripref/german.rb
CHANGED
data/lib/scripref/include.rb
CHANGED
data/lib/scripref/parser.rb
CHANGED
data/lib/scripref/processor.rb
CHANGED
data/lib/scripref.rb
CHANGED
@@ -5,16 +5,16 @@ require 'delegate'
|
|
5
5
|
|
6
6
|
module Scripref
|
7
7
|
|
8
|
-
VERSION = '1.1.
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
8
|
+
VERSION = '1.1.2'
|
9
|
+
|
10
|
+
require_relative 'scripref/bookname'
|
11
|
+
require_relative 'scripref/bookorder'
|
12
|
+
require_relative 'scripref/english'
|
13
|
+
require_relative 'scripref/formatter'
|
14
|
+
require_relative 'scripref/german'
|
15
|
+
require_relative 'scripref/parser'
|
16
|
+
require_relative 'scripref/passage'
|
17
|
+
require_relative 'scripref/processor'
|
18
18
|
|
19
19
|
class Token < DelegateClass(String)
|
20
20
|
def initialize *args
|
data/regtest/formatter.rb
CHANGED
data/regtest/parser.rb
CHANGED
data/regtest/processor.rb
CHANGED
data/scripref.gemspec
CHANGED
data/test/test_bookname.rb
CHANGED
data/test/test_english.rb
CHANGED
data/test/test_formatter.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
|
-
|
4
|
+
require_relative 'test_helper'
|
5
5
|
|
6
6
|
class TestFormatter < Test::Unit::TestCase
|
7
7
|
|
@@ -168,6 +168,11 @@ class TestFormatter < Test::Unit::TestCase
|
|
168
168
|
assert_formated_text_for_ast text, [pass(text: t1, b1: :Ruth, c1: 2, v1: 5, b2: :Ruth, c2: 2, v2: 5), semi, pass(text: t2, b1: :Mark, c1: 4, b2: :Mark, c2: 4)]
|
169
169
|
end
|
170
170
|
|
171
|
+
def test_two_refs_with_book_with_only_one_chapter
|
172
|
+
text = 'Obadja 3.5'
|
173
|
+
assert_formated_text_for_ast text, [pass(text: text, b1: :Obad, c1: 1, v1: 3, b2: :Obad, c2: 1, v2: 3), pass(b1: :Obad, c1: 1, v1: 5, b2: :Obad, c2: 1, v2: 5)]
|
174
|
+
end
|
175
|
+
|
171
176
|
######################################################################
|
172
177
|
# mixed variants of more than one passage
|
173
178
|
######################################################################
|
data/test/test_german.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
|
-
|
4
|
+
require_relative 'test_helper'
|
5
5
|
|
6
6
|
class TestGerman < Test::Unit::TestCase
|
7
7
|
|
@@ -32,21 +32,21 @@ class TestGerman < Test::Unit::TestCase
|
|
32
32
|
assert_match book_re, 'Off'
|
33
33
|
end
|
34
34
|
|
35
|
-
def
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
35
|
+
def test_book2osis_id
|
36
|
+
assert_osis_book_id :Gen, '1. Mose'
|
37
|
+
assert_osis_book_id :Matt, 'Matthäus'
|
38
|
+
assert_osis_book_id :Rev, 'Offenbarung'
|
39
|
+
assert_osis_book_id :Gen, '1. Mo'
|
40
|
+
assert_osis_book_id :Gen, '1.Mo'
|
41
|
+
assert_osis_book_id :Gen, '1M'
|
42
|
+
assert_osis_book_id :Matt, 'Mat'
|
43
|
+
assert_osis_book_id :Phil, 'Phil'
|
44
|
+
assert_osis_book_id :Rev, 'Off'
|
45
45
|
end
|
46
46
|
|
47
|
-
def
|
47
|
+
def assert_osis_book_id id, str
|
48
48
|
@parser ||= Scripref::Parser.new(Scripref::German)
|
49
|
-
assert_equal
|
49
|
+
assert_equal id, @parser.parse(str).first.b1
|
50
50
|
end
|
51
51
|
|
52
52
|
end
|
data/test/test_helper.rb
CHANGED
data/test/test_integration.rb
CHANGED
data/test/test_parser.rb
CHANGED
data/test/test_passage.rb
CHANGED
data/test/test_pipelining.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
|
-
|
4
|
+
require_relative 'test_helper'
|
5
5
|
|
6
6
|
class TestPipelining < Test::Unit::TestCase
|
7
7
|
|
@@ -17,7 +17,7 @@ class TestPipelining < Test::Unit::TestCase
|
|
17
17
|
end
|
18
18
|
|
19
19
|
def test_left_to_right
|
20
|
-
|
20
|
+
require_relative '../lib/scripref/pipelining'
|
21
21
|
text = 'Hebräer 13,8'
|
22
22
|
parser = Parser.new(German)
|
23
23
|
formatter = Formatter.new(English)
|
data/test/test_processor.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scripref
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
platform: ruby
|
6
|
-
original_platform: ''
|
7
6
|
authors:
|
8
7
|
- Jan Friedrich
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-01-03 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: rake
|
@@ -92,7 +91,8 @@ files:
|
|
92
91
|
- test/test_pipelining.rb
|
93
92
|
- test/test_processor.rb
|
94
93
|
homepage: https://github.com/janfri/scripref
|
95
|
-
licenses:
|
94
|
+
licenses:
|
95
|
+
- MIT
|
96
96
|
metadata:
|
97
97
|
homepage_uri: https://github.com/janfri/scripref
|
98
98
|
source_code_uri: https://github.com/janfri/scripref
|
@@ -110,7 +110,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
110
110
|
- !ruby/object:Gem::Version
|
111
111
|
version: '0'
|
112
112
|
requirements: []
|
113
|
-
rubygems_version: 3.
|
113
|
+
rubygems_version: 3.7.0.dev
|
114
114
|
specification_version: 4
|
115
115
|
summary: Library for parsing scripture references in real texts.
|
116
116
|
test_files: []
|