Sha256: e5f10aefaa915923f603d53d600a1dfffa377025f5c845396f84149ba64cdb86

Contents?: true

Size: 483 Bytes

Versions: 10

Compression:

Stored size: 483 Bytes

Contents

module SmartMachine
  class SCP < SmartMachine::Base
    def initialize
      @address  = SmartMachine.credentials.machine[:address]
      @port     = SmartMachine.credentials.machine[:port]
      @username = SmartMachine.credentials.machine[:username]
      @password = SmartMachine.credentials.machine[:password]
    end

    def upload!(local_path:, remote_path:)
      system("scp -q -P #{@port} #{local_path} #{@username}@#{@address}:#{remote_path}")
      $?
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
smartmachine-1.3.0 lib/smart_machine/scp.rb
smartmachine-1.2.3 lib/smart_machine/scp.rb
smartmachine-1.2.1 lib/smart_machine/scp.rb
smartmachine-1.2.0 lib/smart_machine/scp.rb
smartmachine-1.2.0.dev lib/smart_machine/scp.rb
smartmachine-1.1.1 lib/smart_machine/scp.rb
smartmachine-1.1.0 lib/smart_machine/scp.rb
smartmachine-1.0.1 lib/smart_machine/scp.rb
smartmachine-1.0.0 lib/smart_machine/scp.rb
smartmachine-0.9.0 lib/smart_machine/scp.rb