kastner-kompress 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/kompress.gemspec +1 -1
- data/lib/kompress/job.rb +5 -0
- data/test/job_test.rb +6 -6
- metadata +1 -1
data/kompress.gemspec
CHANGED
data/lib/kompress/job.rb
CHANGED
@@ -64,6 +64,11 @@ module Kompress
|
|
64
64
|
/\.(#{Kompress::FileTypes.join("|")})/i
|
65
65
|
end
|
66
66
|
|
67
|
+
def input_file
|
68
|
+
return @input_file if @input_file.match(/^'/)
|
69
|
+
"'#{@input_file}'"
|
70
|
+
end
|
71
|
+
|
67
72
|
def temp_file
|
68
73
|
input_file.gsub(file_type_regexp, ".tmp.#{container_type}")
|
69
74
|
end
|
data/test/job_test.rb
CHANGED
@@ -28,13 +28,13 @@ describe "Kompress::Job" do
|
|
28
28
|
|
29
29
|
it "should have a thumb file" do
|
30
30
|
@job.input_file = "bob.mpg"
|
31
|
-
@job.thumb_file.should == "bob.jpg"
|
31
|
+
@job.thumb_file.should == "'bob.jpg'"
|
32
32
|
end
|
33
33
|
|
34
34
|
%w|mov wmv avi mp4 mpg mpeg MOV divx|.each do |type|
|
35
35
|
it "should replace .#{type} with .tmp.mp4" do
|
36
36
|
@job.input_file = "x.#{type}"
|
37
|
-
@job.temp_file.should == "x.tmp.mp4"
|
37
|
+
@job.temp_file.should == "'x.tmp.mp4'"
|
38
38
|
end
|
39
39
|
end
|
40
40
|
end
|
@@ -70,7 +70,7 @@ describe "A real job" do
|
|
70
70
|
:current_frame_regexp => /frame=\s*(\d+)/
|
71
71
|
}
|
72
72
|
|
73
|
-
@job = Kompress::Job.from_preset(:rad, "~/Development/Ruby/test.mov")
|
73
|
+
@job = Kompress::Job.from_preset(:rad, "~/Development/Ruby/test movie.mov")
|
74
74
|
@job.state = :running
|
75
75
|
end
|
76
76
|
|
@@ -78,7 +78,7 @@ describe "A real job" do
|
|
78
78
|
end
|
79
79
|
|
80
80
|
it "should know it's post_command" do
|
81
|
-
@job.post_command.should == "/usr/bin/qt-faststart ~/Development/Ruby/test.tmp.mp4 ~/Development/Ruby/test.mp4"
|
81
|
+
@job.post_command.should == "/usr/bin/qt-faststart '~/Development/Ruby/test movie.tmp.mp4' '~/Development/Ruby/test movie.mp4'"
|
82
82
|
end
|
83
83
|
|
84
84
|
it "should know frame rate" do
|
@@ -130,7 +130,7 @@ describe "A frozen job" do
|
|
130
130
|
end
|
131
131
|
|
132
132
|
it "should have the right post_command" do
|
133
|
-
@job.post_command.should == "/usr/bin/qt-faststart ~/Development/Ruby/test.tmp.mp4 ~/Development/Ruby/test.mp4"
|
133
|
+
@job.post_command.should == "/usr/bin/qt-faststart '~/Development/Ruby/test.tmp.mp4' '~/Development/Ruby/test.mp4'"
|
134
134
|
end
|
135
135
|
|
136
136
|
it "should have a lame kc_replacements method" do
|
@@ -147,6 +147,6 @@ describe "A frozen job" do
|
|
147
147
|
end
|
148
148
|
|
149
149
|
it "should be able to get the thumb name" do
|
150
|
-
@job.thumb_file.should == "~/Development/Ruby/test.jpg"
|
150
|
+
@job.thumb_file.should == "'~/Development/Ruby/test.jpg'"
|
151
151
|
end
|
152
152
|
end
|