sprout 0.7.204-darwin → 0.7.205-darwin
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.
Potentially problematic release.
This version of sprout might be problematic. Click here for more details.
- data/lib/sprout/tasks/tool_task.rb +11 -10
- data/lib/sprout/version.rb +1 -1
- metadata +1 -1
@@ -573,36 +573,37 @@ module Sprout
|
|
573
573
|
|
574
574
|
# Only create the preprocessed action if one does not
|
575
575
|
# already exist. There were many being created before...
|
576
|
-
if(!ToolTask::has_preprocessed_task?(input_file))
|
577
|
-
ToolTask::add_preprocessed_task(input_file)
|
578
576
|
|
579
|
-
|
580
|
-
|
577
|
+
file input_file
|
578
|
+
file output_file => input_file do
|
579
|
+
# Couldn't return, b/c Rake complained...
|
580
|
+
if(!ToolTask::has_preprocessed_task?(output_file))
|
581
581
|
dir = File.dirname(output_file)
|
582
582
|
if(!File.exists?(dir))
|
583
583
|
FileUtils.mkdir_p(dir)
|
584
584
|
end
|
585
|
-
|
585
|
+
|
586
586
|
content = nil
|
587
587
|
# Open the input file and read its content:
|
588
588
|
File.open(input_file, 'r') do |readable|
|
589
589
|
content = readable.read
|
590
590
|
end
|
591
|
-
|
591
|
+
|
592
592
|
# Preprocess the content if it's a known text file type:
|
593
593
|
if(text_file?(input_file))
|
594
594
|
content = preprocess_content(content, belongs_to.preprocessor, input_file)
|
595
595
|
end
|
596
|
-
|
596
|
+
|
597
597
|
# Write the content to the output file:
|
598
598
|
File.open(output_file, 'w+') do |writable|
|
599
599
|
writable.write(content)
|
600
600
|
end
|
601
|
-
|
602
|
-
end
|
603
601
|
|
604
|
-
|
602
|
+
ToolTask::add_preprocessed_task(output_file)
|
603
|
+
end
|
605
604
|
end
|
605
|
+
|
606
|
+
belongs_to.prerequisites << output_file
|
606
607
|
end
|
607
608
|
|
608
609
|
def preprocess_content(content, statement, file_name)
|
data/lib/sprout/version.rb
CHANGED