expansions 0.1.3 → 0.1.4
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/lib/core/file_merge.rb +2 -2
- data/lib/core/version.rb +1 -1
- metadata +1 -1
data/lib/core/file_merge.rb
CHANGED
@@ -22,7 +22,7 @@ module Expansions
|
|
22
22
|
|
23
23
|
def run
|
24
24
|
copy_name = "_copy_of#{File.basename(@output_file)}"
|
25
|
-
FileUtils.cp @output_file,copy_name
|
25
|
+
FileUtils.cp @output_file,copy_name if File.exist?(@output_file)
|
26
26
|
FileUtils.rm_f @output_file
|
27
27
|
File.open_for_write(@output_file) do |file|
|
28
28
|
do_merge copy_name,file
|
@@ -32,7 +32,7 @@ module Expansions
|
|
32
32
|
|
33
33
|
def do_merge(temp_file,target_file)
|
34
34
|
merge_files(@before_files,target_file)
|
35
|
-
if @read_original_contents
|
35
|
+
if @read_original_contents && File.exist?(temp_file)
|
36
36
|
File.open_for_read temp_file do|line|
|
37
37
|
target_file << line
|
38
38
|
end
|
data/lib/core/version.rb
CHANGED