kastner-kompress 0.0.6 → 0.0.7

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.
data/kompress.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "kompress"
3
- s.version = "0.0.6"
3
+ s.version = "0.0.7"
4
4
  s.date = "2008-09-14"
5
5
  s.summary = "Kompress - kompress videos and see progress"
6
6
  s.email = "kastner@gmail.com"
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kastner-kompress
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Erik Kastner