srt_validator 0.1.1 → 0.1.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
  SHA1:
3
- metadata.gz: fb8ef6acd4ba24374bc177551ce4c9a77d7b8e0c
4
- data.tar.gz: 32d3ec1eba238d4d0cd1483fa6df27059bcd9dc6
3
+ metadata.gz: 04d6d0dcbca240aba42d8a591d3ef17c43606fed
4
+ data.tar.gz: bb73363a3f1352b92aeb7a17476bae9d7ed5f0a1
5
5
  SHA512:
6
- metadata.gz: 6996581945e61eb90bb5730a2bda56ab5031aa8190e113a21f49ea37734e372905b46651580e8efd6655215c75b415dd0114db7b2e0fa46a53d2654042bc627a
7
- data.tar.gz: 4f1ce31afe5058d114c2c3418cfe577b70e34d0d1d5b8f9532ab901f7502a5c90cce5b65e596eb416db84721750f3c50a707599898d21b5f335aa824855438d6
6
+ metadata.gz: 1a752e402f6e67dd01a2b72615531718f29e36d41f5ee725928bbd948e40dc1a1fb414ac26294ad8d7c3c6620a3cb1339a77aa59e05ef539b245b4a811d9f6e3
7
+ data.tar.gz: 6d7e6ff2ba7ba47e6e919200216a4fdbcc81bb4ef18b1ff7faa07220098483648e8a49da6817bb37c1dd940973e3119b76731a5e1d84db8f5239018398aa7b86
@@ -31,7 +31,7 @@ module SrtValidator
31
31
  count += 1
32
32
  line.sequence = str.to_i
33
33
  unless count == line.sequence
34
- line.error = "#{index}, Invalid formatting of sequence index, [#{line.sequence}]"
34
+ line.error = "#{index}, sequence_number, [#{line.sequence}]"
35
35
  $stderr.puts line.error if @debug
36
36
  end
37
37
  elsif line.start_time.nil?
@@ -40,12 +40,12 @@ module SrtValidator
40
40
  line.end_time = Parser.timecode(mres["end_timecode"])
41
41
 
42
42
  if line.start_time.nil? || !last_line.empty? && last_line.end_time > line.start_time
43
- line.error = "#{index}, Invalid formatting of start timecode, [#{mres["start_timecode"]}]"
43
+ line.error = "#{index}, start_timecode, [#{mres["start_timecode"]}]"
44
44
  $stderr.puts line.error if @debug
45
45
  end
46
46
 
47
47
  if line.end_time.nil? || line.start_time > line.end_time
48
- line.error = "#{index}, Invalid formatting of end timecode, [#{mres["end_timecode"]}]"
48
+ line.error = "#{index}, end_timecode, [#{mres["end_timecode"]}]"
49
49
  $stderr.puts line.error if @debug
50
50
  end
51
51
 
@@ -55,12 +55,12 @@ module SrtValidator
55
55
 
56
56
  last_line = line
57
57
  else
58
- line.error = "#{index}, Invalid Time Line formatting, [#{str}]"
58
+ line.error = "#{index}, wrong_times, [#{str}]"
59
59
  $stderr.puts line.error if @debug
60
60
  end
61
61
  else
62
62
  if /\d{1,}:\d{1,2}:\d{1,2},\d{1,3} --> \d{1,}:\d{1,2}:\d{1,2},\d{1,3}/.match(str.strip) && /\d{1,}/.match(line.text.last)
63
- line.error = "#{index}, Probably you didn't break the line in this part of subtitle, [#{str}]"
63
+ line.error = "#{index}, break_line, [#{str}]"
64
64
  $stderr.puts line.error if @debug
65
65
  end
66
66
 
@@ -68,7 +68,7 @@ module SrtValidator
68
68
  end
69
69
  end
70
70
  rescue
71
- line.error = "#{index}, General Error, [#{str}]"
71
+ line.error = "#{index}, general_error, [#{str}]"
72
72
  $stderr.puts line.error if @debug
73
73
  end
74
74
  end
@@ -1,3 +1,3 @@
1
1
  module SrtValidator
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: srt_validator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - laerciosb
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-04-19 00:00:00.000000000 Z
11
+ date: 2017-04-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler