kastner-kompress 0.0.7 → 0.0.8
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 +1 -1
- data/lib/kompress/job.rb +5 -1
- data/test/job_test.rb +6 -0
- metadata +1 -1
data/kompress.gemspec
CHANGED
data/lib/kompress/job.rb
CHANGED
@@ -76,6 +76,10 @@ module Kompress
|
|
76
76
|
def output_file
|
77
77
|
input_file.gsub(file_type_regexp, ".#{container_type}")
|
78
78
|
end
|
79
|
+
|
80
|
+
%w|input output temp|.each do |f|
|
81
|
+
define_method("raw_#{f}_file".to_sym) { send("#{f}_file").gsub(/'(.*)'/, '\1') }
|
82
|
+
end
|
79
83
|
|
80
84
|
def thumb_file
|
81
85
|
input_file.gsub(file_type_regexp, ".#{thumb_type}")
|
@@ -149,7 +153,7 @@ module Kompress
|
|
149
153
|
File.unlink(state_file)
|
150
154
|
File.unlink(status_file)
|
151
155
|
File.unlink(done_file)
|
152
|
-
File.unlink(
|
156
|
+
File.unlink(raw_temp_file)
|
153
157
|
end
|
154
158
|
|
155
159
|
def write_state_to_disk
|
data/test/job_test.rb
CHANGED
@@ -112,6 +112,12 @@ describe "A real job" do
|
|
112
112
|
@job.command.should =~ /640x300/
|
113
113
|
@job.command.should.not =~ /640x480/
|
114
114
|
end
|
115
|
+
|
116
|
+
it "should have a raw version of input, output and temp" do
|
117
|
+
%w|input output temp|.each do |f|
|
118
|
+
@job.send("raw_#{f}_file").should == @job.send("#{f}_file").gsub(/'(.*)'/, '\1')
|
119
|
+
end
|
120
|
+
end
|
115
121
|
end
|
116
122
|
|
117
123
|
describe "A frozen job" do
|