webvtt-ruby 0.4.0 → 0.4.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
  SHA256:
3
- metadata.gz: f4334c8feffaab4ed2438a52554ce17ebd2bd0152622adbd8445c7de99e6e14d
4
- data.tar.gz: 6de8052ac1d531bb77630c086425c3f2640295d510cd87546d357a2791d06695
3
+ metadata.gz: 378a27bdabf62c13b0446de29e0aefc7267ac38f67401f1bab668f1ea673edab
4
+ data.tar.gz: 9b68d17e5435a1ef088bc06ec1c5346cc3526dc3af5b56578c14afca6c922656
5
5
  SHA512:
6
- metadata.gz: 7cba26291e3f92b889ff2d03246873d44f07c12890dec24201bd4e13e61b286a0a2af4c22e207c37ff976d3056cd38381bd470be9894bf3ebccd3043fdfac0ab
7
- data.tar.gz: 7350a1b409e9178eea25526bb0fb2d7167b7348fb4fc19bc96a3edcf353f6aa4ae3c86f3ea31ac988925604da6def8ce621f636d73b66dd02656c0d945fb13a7
6
+ metadata.gz: 5b7e76f6306f2df4fcc2f45a194583eb288b4822f2f414723fb6b1675023adbc9ba088be5bbf6b0e6062ef13c3d649dcd0794ab5ff0bca4bbb87012f01c318e6
7
+ data.tar.gz: ea5a3ea7d52dc8f61bc1ee66fe495e1721f11c4430a1eda17a73b54fd279758eb861b716e2fda1ad5a2e1154400dde4694f83aefe8669995fee3cb0574c528d2
data/lib/webvtt/parser.rb CHANGED
@@ -172,6 +172,8 @@ module WebVTT
172
172
  @start = Timestamp.new $1
173
173
  @end = Timestamp.new $3
174
174
  @style = Hash[$5.strip.split(" ").map{|s| s.split(":").map(&:strip) }]
175
+ else
176
+ raise WebVTT::MalformedFile
175
177
  end
176
178
  @text = lines[1..-1].join("\n")
177
179
  end
data/tests/parser.rb CHANGED
@@ -251,4 +251,9 @@ The text should change)
251
251
  assert_equal 15, webvtt.cues.size
252
252
  end
253
253
 
254
+ def test_invalid_vtt_without_milliseconds
255
+ assert_raises WebVTT::MalformedFile do
256
+ vtt = WebVTT::File.new('tests/subtitles/no_milliseconds.vtt')
257
+ end
258
+ end
254
259
  end
data/webvtt-ruby.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'webvtt-ruby'
3
- s.version = '0.4.0'
3
+ s.version = '0.4.2'
4
4
  s.summary = "WebVTT parser and segmenter in ruby"
5
5
  s.description = "WebVTT parser and segmenter in ruby for HTML5 and HTTP Live Streaming (HLS)."
6
6
  s.authors = ["Bruno Celeste"]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: webvtt-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bruno Celeste
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-04-06 00:00:00.000000000 Z
11
+ date: 2024-05-17 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: WebVTT parser and segmenter in ruby for HTML5 and HTTP Live Streaming
14
14
  (HLS).