module Vx::Common::Helper::UploadShCommand

Public Instance Methods

upload_sh_command(path, content, options = {}) click to toggle source
# File lib/vx/common/helper/upload_sh_command.rb, line 8
def upload_sh_command(path, content, options = {})
  encoded = ::Base64.encode64(content).gsub("\n", '')
  "(echo #{encoded} | #{upload_sh_base64_command options}) > #{path}"
end

Private Instance Methods

upload_sh_base64_command(options) click to toggle source
# File lib/vx/common/helper/upload_sh_command.rb, line 15
def upload_sh_base64_command(options)
  %{base64 --decode}
end