pericope 1.0.1 → 1.0.2

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: 253f3b8024997c39532e3422d136a3a6b7004c90
4
- data.tar.gz: 349285d5aab4ffde3c58952949f7a56188d9457a
3
+ metadata.gz: 8387ffedaf83411b0b4f4741beb4cdf48fd9e21e
4
+ data.tar.gz: 159b2fd94a9e3c6e9ecd927645ad98c172c62d95
5
5
  SHA512:
6
- metadata.gz: 033a047ba3b343ffa76ea7f27cb60638c1a98101d81907282a99730844aec6d272dc6add7fc04970a4e4af41dd1d39d71e1586d0b7b6ddde2b0f7474ded980da
7
- data.tar.gz: e0cc964095140274fd60d015a7a4a91d6108815b80338d87b8b409b9ca9eb4c251c86eef810ed9a120e37786d002895b2a1033c3d794154f0f1bb1a7fe2099f1
6
+ metadata.gz: e33ff3c564ddc4843da0c6e46f93b3f2296a29c6fb3829058a4a019ff927d8101aabb987f994530a3ebc51618a048e1a6ab9519f8d271e9eba1dcd6d62b7ab65
7
+ data.tar.gz: 3ea933b14e2be8993b94bc41fe6fa3dbc05050f4548c81ed39c7432a2d68c0160d4095a5e5c1350fececf71209269d962eb70a14b614464d47b1f3aa02954f4a
@@ -223,9 +223,11 @@ private
223
223
  if verse > range_end.next
224
224
  ranges << Range.new(range_begin, range_end)
225
225
  range_begin = range_end = verse
226
- else
226
+ elsif verse > range_end
227
227
  range_end = verse
228
228
  end
229
+
230
+ break if range_end.next.nil? # end of book
229
231
  end
230
232
 
231
233
  ranges << Range.new(range_begin, range_end)
@@ -21,6 +21,7 @@ class Pericope
21
21
  end
22
22
 
23
23
  def <=>(other)
24
+ raise ArgumentError, "Comparison of Pericope::Verse with #{other.class} failed" unless other.is_a?(Pericope::Verse)
24
25
  [ book, chapter, verse, letter || "a" ] <=> [ other.book, other.chapter, other.verse, other.letter || "a" ]
25
26
  end
26
27
 
@@ -1,3 +1,3 @@
1
1
  class Pericope
2
- VERSION = "1.0.1" unless defined?(::Pericope::Version)
2
+ VERSION = "1.0.2" unless defined?(::Pericope::Version)
3
3
  end
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.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bob Lail
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-09-11 00:00:00.000000000 Z
11
+ date: 2018-09-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -52,6 +52,20 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: pry
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: minitest
57
71
  requirement: !ruby/object:Gem::Requirement