pericope 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/pericope.rb +4 -1
- data/lib/pericope/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 3e83923a2ccd269b6c9dc1b763c94271c317c71ce36e749c849d13efd74a073e
|
4
|
+
data.tar.gz: 601c5ecce2a6f8c58587540afee4b8314583742a6cfa7035c80affdb06393bcb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: afbbe5aec2cc1acdd7f9e31eddf34078427da6b33ffcda72426119d6eae41352a7ad9a233e80b29d32db25a29a6a752a01c2982ecf7a59fb4dfcb32c34090196
|
7
|
+
data.tar.gz: 91c99af22016b276e1d4a645cc2ebcb2e8852653443f5f134b25b1bfc0119ecac21ff80984d7c52a2cd72b14f3f6c70374d737b7577b1cf5b7de527a902dbd62
|
data/lib/pericope.rb
CHANGED
@@ -177,6 +177,8 @@ private
|
|
177
177
|
recent_chapter = 1 unless book_has_chapters?
|
178
178
|
recent_verse = nil
|
179
179
|
|
180
|
+
touched_chapters = [ recent_chapter ].compact
|
181
|
+
|
180
182
|
ranges.each_with_index.each_with_object("") do |(range, i), s|
|
181
183
|
if i > 0
|
182
184
|
if recent_chapter == range.begin.chapter
|
@@ -187,7 +189,7 @@ private
|
|
187
189
|
end
|
188
190
|
|
189
191
|
last_verse = Pericope.get_max_verse(book, range.end.chapter)
|
190
|
-
if !always_print_verse_range && range.begin.verse == 1 && range.begin.whole? && (range.end.verse > last_verse || range.end.whole? && range.end.verse == last_verse)
|
192
|
+
if !always_print_verse_range && range.begin.verse == 1 && range.begin.whole? && (range.end.verse > last_verse || range.end.whole? && range.end.verse == last_verse) && (touched_chapters - [range.begin.chapter]).none?
|
191
193
|
s << range.begin.chapter.to_s
|
192
194
|
s << "#{chapter_range_separator}#{range.end.chapter}" if range.end.chapter > range.begin.chapter
|
193
195
|
else
|
@@ -207,6 +209,7 @@ private
|
|
207
209
|
|
208
210
|
recent_chapter = range.end.chapter
|
209
211
|
recent_verse = range.end.verse if range.end.partial?
|
212
|
+
touched_chapters |= [range.begin.chapter, range.end.chapter].uniq
|
210
213
|
end
|
211
214
|
end
|
212
215
|
end
|
data/lib/pericope/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pericope
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bob Lail
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-11-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -151,7 +151,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
151
151
|
version: '0'
|
152
152
|
requirements: []
|
153
153
|
rubyforge_project:
|
154
|
-
rubygems_version: 2.6
|
154
|
+
rubygems_version: 2.7.6
|
155
155
|
signing_key:
|
156
156
|
specification_version: 4
|
157
157
|
summary: Pericope is a gem for parsing Bible references.
|