lib/arli/lock/file.rb in arli-0.8.3 vs lib/arli/lock/file.rb in arli-0.9.0

- old
+ new

@@ -15,13 +15,13 @@ :file, :format def initialize(config: Arli.config) self.config = config - self.lock_file_path = "#{config.arlifile.path}/#{config.arlifile.lock_name}" self.format = config.arlifile.lock_format self.formatter = set_formatter(format) + self.lock_file_path = "#{config.arlifile.path}/#{config.arlifile.name}.#{formatter.extension}" self.file = ::File.open(lock_file_path, 'w') append(formatter.header) end @@ -39,10 +39,9 @@ def close append(formatter.footer) ensure file.close - FileUtils.cp(lock_file_path, "#{lock_file_path}.#{format}") end def append(line = nil) return unless line line.end_with?("\n") ? file.print(line) : file.puts(line)