set_defaults (Rake::RemoteTask)

    # File lib/rake_remote_task.rb, line 408
      def self.set_defaults
        @@default_env ||= {}
        self.reset

        mandatory :repository, "repository path"
        mandatory :deploy_to,  "deploy path"
        mandatory :domain,     "server domain"

        simple_set(:deploy_timestamped, true,
                   :deploy_via,         :export,
                   :keep_releases,      5,
                   :migrate_args,       "",
                   :migrate_target,     :latest,
                   :rails_env,          "production",
                   :rake_cmd,           "rake",
                   :revision,           "head",
                   :rsync_cmd,          "rsync",
                   :rsync_flags,        ['-azP', '--delete'],
                   :ssh_cmd,            "ssh",
                   :ssh_flags,          nil,
                   :sudo_cmd,           "sudo",
                   :sudo_flags,         nil)

        set(:current_release)    { File.join(releases_path, releases[-1]) }
        set(:latest_release)     { deploy_timestamped ?release_path: current_release }
        set(:previous_release)   { File.join(releases_path, releases[-2]) }
        set(:release_name)       { Time.now.utc.strftime("%Y%m%d%H%M%S") }
        set(:release_path)       { File.join(releases_path, release_name) }
        set(:releases)           { task.run("ls -x #{releases_path}").split.sort }

        set_path :current_path,  "current"
        set_path :releases_path, "releases"
        set_path :scm_path,      "scm"
        set_path :shared_path,   "shared"

        set(:sudo_password) do
          state = `stty -g`

          raise Vlad::Error, "stty(1) not found" unless $?.success?

          begin
            system "stty -echo"
            $stdout.print "sudo password: "
            $stdout.flush
            sudo_password = $stdin.gets
            $stdout.puts
          ensure
            system "stty #{state}"
          end
          sudo_password
        end
      end