Sha256: 067cc30c1e3c2d3d482a4bf6405e29c44a83850bc68d38a4c2dc8c4c67f780c9
Contents?: true
Size: 690 Bytes
Versions: 1
Compression:
Stored size: 690 Bytes
Contents
require "zonesync/provider" require "zonesync/diff" require "zonesync/logger" require "zonesync/cli" module Zonesync def self.call zonefile: "Zonefile", credentials:, dry_run: false Sync.new({ provider: "Filesystem", path: zonefile }, credentials).call(dry_run: dry_run) end class Sync < Struct.new(:source, :destination) def call dry_run: false source = Provider.from(self.source) destination = Provider.from(self.destination) operations = Diff.call(from: destination, to: source) operations.each do |method, args| Logger.log(method, args, dry_run: dry_run) destination.send(method, args) unless dry_run end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
zonesync-0.3.0 | lib/zonesync.rb |