class Martilla::Scp
Public Instance Methods
enfore_retention!(gzip:)
click to toggle source
# File lib/martilla/storages/scp.rb, line 9 def enfore_retention!(gzip:) puts 'WARNING: Retention is not implemented for SCP storage. More details: https://github.com/fdoxyz/martilla/issues/12' end
persist(tmp_file:, gzip:)
click to toggle source
# File lib/martilla/storages/scp.rb, line 3 def persist(tmp_file:, gzip:) `scp -i #{identity_file} #{user}@#{host}:#{output_filename(gzip)}` return nil if $?.success? raise Error.new("SCP storage failed with code #{$?.exitstatus}") end
Private Instance Methods
host()
click to toggle source
# File lib/martilla/storages/scp.rb, line 15 def host scp_host = @options['host'] raise config_error('host') if scp_host.nil? scp_host end
identity_file()
click to toggle source
# File lib/martilla/storages/scp.rb, line 27 def identity_file file = @options['identity_file'] raise config_error('identity_file') if file.nil? file end
user()
click to toggle source
# File lib/martilla/storages/scp.rb, line 21 def user scp_user = @options['user'] raise config_error('user') if scp_user.nil? scp_user end