captive 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a079154405f3dbdef6ee9a4c8f48503d4bd5ab295b134a00cfed165827446d0e
4
- data.tar.gz: 757bfa85ddd1b9288b6e6e4dc9344c326f13637979b4b6ba16125ef5d5708358
3
+ metadata.gz: 030c1968b45eac6bb952f8bfd45b569820747ec338c6c6b155c6c7ba22f61a77
4
+ data.tar.gz: 8f9819a585d7633b3dab6741d0a650e555171bdbdf578fcb8cad34016c415593
5
5
  SHA512:
6
- metadata.gz: 2fab43d1785ed212a39437d97234a50c69a6dd09b6b32052fe6b9acd5e2407329f95cb93e65c8622906e50a2a12adb52c0ae75cdd00ba4d729422334dc805778
7
- data.tar.gz: 0b4d2b3fa9a9758153a6904c468591c07271ad9c9584ba7dc6d477c27616693ef28b4d883660ac504d430a757a515de445ac4773409ff4a97bd6988b5258e8ab
6
+ metadata.gz: 5d4cd22b2a652db4198de20628d68465fe84d0727e0e4db8586635b4fadcc5860e3767998a4fbd9364c3cdaf8f8a62a53d85b2faf8983c54f9ef87c754e36bfe
7
+ data.tar.gz: 3823a40e5354abff877951bd636a6e2482d38af42b281ba95ec8cd5be3fe7ba71188dea4242c790b05b7526f04c7df5d9e947403c110357e183520f625ba8887
@@ -31,8 +31,13 @@ module Captive
31
31
  next
32
32
  end
33
33
 
34
- # If its not metadata, and its not an empty line, it should be a timestamp
35
- raise InvalidSubtitle, "Invalid Time Format at line #{index}" unless time?(line)
34
+ # If its not metadata, and its not an empty line, it should be a timestamp or an identifier
35
+ unless time?(line)
36
+ # If this line is an identifier the next line should be a timecode
37
+ next if time?(lines[index + 1])
38
+
39
+ raise InvalidSubtitle, "Invalid Time Format at line #{index + 1}" unless time?(line)
40
+ end
36
41
 
37
42
  elements = line.split
38
43
  start_time = elements[0]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Captive
4
- VERSION = '1.0.1'
4
+ VERSION = '1.0.2'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: captive
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
  - mserran2