Class: Martilla::Local

Inherits:
Storage show all
Defined in:
lib/martilla/storages/local.rb

Instance Attribute Summary

Attributes inherited from Storage

#options

Instance Method Summary collapse

Methods inherited from Storage

#append_datetime_suffix, #config_error, create, #initialize, #invalid_options_msg, #output_filename, #suffix?

Methods inherited from Component

#bash

Constructor Details

This class inherits a constructor from Martilla::Storage

Instance Method Details

#persist(tmp_file:, gzip:) ⇒ Object

Raises:



3
4
5
6
7
# File 'lib/martilla/storages/local.rb', line 3

def persist(tmp_file:, gzip:)
  bash("mv #{tmp_file} #{output_filename(gzip)}")
  return nil if $?.success?
  raise Error.new("Local storage failed with code #{$?.exitstatus}")
end