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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 28b605a11d97398a0fdcbcffc5428d473a665cc4
4
- data.tar.gz: 3cf70fdc28474f749365aef71ddb059ee2794348
3
+ metadata.gz: 213debdfa6129fcf1c65a3bf73edbd3c3ef292f2
4
+ data.tar.gz: c24156b69b44ce13dabab5faa27901827f0a6ad1
5
5
  SHA512:
6
- metadata.gz: 0d80a0bff0cc8d4f07f1323d8162c690b767c4cf90a5a6aef8fdf5f43681442505e4216cc28423a66f03c1183a41ef9cf2009f26bb4d9ef05b04f09f2f876196
7
- data.tar.gz: 852239f8bd36937df9c042005ea3406da5db441f5db3e3c9bf08e44b3c9ab549d11fad7a80fe654c483ecf38e0e395b9fb70b24245ad3895e925c7dede1d4954
6
+ metadata.gz: 7af61011348f2cb1b71766676efcb184d40825324960f3ffb1e88299d4dd41c4b6f2af0e2a5069ad6dea5dd34a7289ec5cf7325f0f2b281232528f1e349a57e8
7
+ data.tar.gz: 238a21999e3d73cfa83969e8689368cd268f97bbcfe74e5025538082bfd18be2e866f50496af11a888131a8623696cc93d1b6da83938554f7db8b885ce1c6124
@@ -4,14 +4,22 @@ module BibleRef
4
4
  class Parser < Parslet::Parser
5
5
  rule(:refs) do
6
6
  (
7
- (ref_range | ref) >>
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
 
@@ -1,3 +1,3 @@
1
1
  module BibleRef
2
- VERSION = '1.1.2'
2
+ VERSION = '1.1.3'
3
3
  end
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.2
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-23 00:00:00.000000000 Z
11
+ date: 2017-05-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parslet