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.
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Expansions
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: expansions
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: