bible_ref 1.1.2 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bible_ref/parser.rb +13 -5
- data/lib/bible_ref/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 213debdfa6129fcf1c65a3bf73edbd3c3ef292f2
|
4
|
+
data.tar.gz: c24156b69b44ce13dabab5faa27901827f0a6ad1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7af61011348f2cb1b71766676efcb184d40825324960f3ffb1e88299d4dd41c4b6f2af0e2a5069ad6dea5dd34a7289ec5cf7325f0f2b281232528f1e349a57e8
|
7
|
+
data.tar.gz: 238a21999e3d73cfa83969e8689368cd268f97bbcfe74e5025538082bfd18be2e866f50496af11a888131a8623696cc93d1b6da83938554f7db8b885ce1c6124
|
data/lib/bible_ref/parser.rb
CHANGED
@@ -4,14 +4,22 @@ module BibleRef
|
|
4
4
|
class Parser < Parslet::Parser
|
5
5
|
rule(:refs) do
|
6
6
|
(
|
7
|
-
|
8
|
-
(
|
9
|
-
separator >>
|
10
|
-
(ref_range | verse_range | ref | verse)
|
11
|
-
).repeat
|
7
|
+
chapter_range | chapter_and_verse_range
|
12
8
|
).as(:refs)
|
13
9
|
end
|
14
10
|
|
11
|
+
rule(:chapter_range) do
|
12
|
+
chapter >> (separator >> chapter).repeat
|
13
|
+
end
|
14
|
+
|
15
|
+
rule(:chapter_and_verse_range) do
|
16
|
+
(ref_range | ref | chapter) >>
|
17
|
+
(
|
18
|
+
separator >>
|
19
|
+
(ref_range | verse_range | ref | verse)
|
20
|
+
).repeat
|
21
|
+
end
|
22
|
+
|
15
23
|
rule(:ref_range) { (ref.as(:from) >> str("-") >> (ref | verse).as(:to)).as(:range) }
|
16
24
|
rule(:verse_range) { (verse.as(:from) >> str("-") >> verse.as(:to)).as(:range) }
|
17
25
|
|
data/lib/bible_ref/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bible_ref
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tim Morgan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-05-
|
11
|
+
date: 2017-05-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: parslet
|