$34 GRAYBYTE WORDPRESS FILE MANAGER $46

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 104.21.43.35 | ADMIN IP 216.73.216.36
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/opt/alt/ruby21/lib64/ruby/2.1.0/rake/contrib/

HOME
Current File : /opt/alt/ruby21/lib64/ruby/2.1.0/rake/contrib//sshpublisher.rb
require 'rake/dsl_definition'
require 'rake/contrib/compositepublisher'

module Rake

  # Publish an entire directory to an existing remote directory using
  # SSH.
  class SshDirPublisher
    include Rake::DSL

    def initialize(host, remote_dir, local_dir)
      @host = host
      @remote_dir = remote_dir
      @local_dir = local_dir
    end

    def upload
      sh %{scp -rq #{@local_dir}/* #{@host}:#{@remote_dir}}
    end
  end

  # Publish an entire directory to a fresh remote directory using SSH.
  class SshFreshDirPublisher < SshDirPublisher
    def upload
      sh %{ssh #{@host} rm -rf #{@remote_dir}} rescue nil
      sh %{ssh #{@host} mkdir #{@remote_dir}}
      super
    end
  end

  # Publish a list of files to an existing remote directory.
  class SshFilePublisher
    include Rake::DSL

    # Create a publisher using the give host information.
    def initialize(host, remote_dir, local_dir, *files)
      @host = host
      @remote_dir = remote_dir
      @local_dir = local_dir
      @files = files
    end

    # Upload the local directory to the remote directory.
    def upload
      @files.each do |fn|
        sh %{scp -q #{@local_dir}/#{fn} #{@host}:#{@remote_dir}}
      end
    end
  end
end


Current_dir [ NOT WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
3 Mar 2024 10.53 PM
root / linksafe
0755
compositepublisher.rb
0.343 KB
23 Jun 2011 10.11 PM
root / linksafe
0644
ftptools.rb
3.32 KB
11 Oct 2013 9.35 PM
root / linksafe
0644
publisher.rb
1.785 KB
29 Jun 2011 3.09 AM
root / linksafe
0644
rubyforgepublisher.rb
0.295 KB
3 Oct 2009 3.40 PM
root / linksafe
0644
sshpublisher.rb
1.197 KB
23 Jun 2011 10.11 PM
root / linksafe
0644
sys.rb
0.1 KB
11 Oct 2013 9.35 PM
root / linksafe
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF