Sha256: 0ea286a2f9ac37da072ab3f1bb45fb029dc311417eee4bba4b820d1616786bb5
Contents?: true
Size: 756 Bytes
Versions: 34
Compression:
Stored size: 756 Bytes
Contents
require_relative 'paths' module SshHelper include Paths private def path_to_ssh "#{Dir.home}/.ssh" end def path_to_jenkins_ssh "#{path_to_environment}/ssh" end def path_to_backup_ssh "#{path_to_backup}/ssh" end public def move_ssh_to_backup FileUtils::mv(path_to_ssh, path_to_backup_ssh, :force => true) end def restore_backup_ssh FileUtils::mv(path_to_backup_ssh, path_to_ssh, :force => true) end def copy_jenkins_ssh FileUtils::cp_r("#{path_to_jenkins_ssh}/.", path_to_ssh) FileUtils::chmod(0700, "#{path_to_ssh}/id_rsa_ololo") end def remove_local_ssh FileUtils::rm_r(path_to_ssh) end end
Version data entries
34 entries across 34 versions & 1 rubygems