akitaonrails-shift_subtitle 1.1.0 → 1.1.1

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.
@@ -30,13 +30,17 @@ optparse = OptionParser.new do |opts|
30
30
  end
31
31
 
32
32
  # get the input and output files
33
- options.merge!(:input_file => ARGV.first)
34
- options.merge!(:output_file => ARGV.last)
33
+ if ARGV.size > 1
34
+ options.merge!(:input_file => ARGV.first)
35
+ options.merge!(:output_file => ARGV.last)
35
36
 
36
- srt_time = SrtTime.new(options)
37
- File.open(options[:output_file], "w+") do |output|
38
- File.readlines(options[:input_file]).each do |line|
39
- output.write srt_time.convert_line(line)
37
+ srt_time = SrtTime.new(options)
38
+ File.open(options[:output_file], "w+") do |output|
39
+ File.readlines(options[:input_file]).each do |line|
40
+ output.write srt_time.convert_line(line)
41
+ end
40
42
  end
41
- end
42
- puts "Done!"
43
+ puts "Done!"
44
+ else
45
+ puts "no arguments passed, try -h"
46
+ end
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
metadata CHANGED
@@ -1,7 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: akitaonrails-shift_subtitle
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ hash: 17
5
+ prerelease:
6
+ segments:
7
+ - 1
8
+ - 1
9
+ - 1
10
+ version: 1.1.1
5
11
  platform: ruby
6
12
  authors:
7
13
  - Fabio Akita
@@ -43,21 +49,27 @@ rdoc_options: []
43
49
  require_paths:
44
50
  - lib
45
51
  required_ruby_version: !ruby/object:Gem::Requirement
52
+ none: false
46
53
  requirements:
47
54
  - - ">="
48
55
  - !ruby/object:Gem::Version
56
+ hash: 3
57
+ segments:
58
+ - 0
49
59
  version: "0"
50
- version:
51
60
  required_rubygems_version: !ruby/object:Gem::Requirement
61
+ none: false
52
62
  requirements:
53
63
  - - ">="
54
64
  - !ruby/object:Gem::Version
65
+ hash: 3
66
+ segments:
67
+ - 0
55
68
  version: "0"
56
- version:
57
69
  requirements: []
58
70
 
59
71
  rubyforge_project:
60
- rubygems_version: 1.3.5
72
+ rubygems_version: 1.4.1
61
73
  signing_key:
62
74
  specification_version: 3
63
75
  summary: Time shifter for SRT subtitles.