Sha256: f0b856cea6f0fce0767382746102d3d410c94425e5e5cbb714f3a6e740d55458

Contents?: true

Size: 553 Bytes

Versions: 2

Compression:

Stored size: 553 Bytes

Contents

# frozen_string_literal: true

module Backup
  module Syncer
    module RSync
      class Local < Base
        def perform!
          log!(:started)

          create_dest_path!
          run("#{rsync_command} #{paths_to_push} '#{dest_path}'")

          log!(:finished)
        end

        private

        # Expand path, since this is local and shell-quoted.
        def dest_path
          @dest_path ||= File.expand_path(path)
        end

        def create_dest_path!
          FileUtils.mkdir_p dest_path
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
backupii-0.1.0.pre.alpha.2 lib/backup/syncer/rsync/local.rb
backupii-0.1.0.pre.alpha.1 lib/backup/syncer/rsync/local.rb