lib/rsync_cron/options.rb in rsync_cron-1.0.7 vs lib/rsync_cron/options.rb in rsync_cron-1.0.8
- old
+ new
@@ -4,11 +4,11 @@
DEFAULT = {
rsh: "ssh",
bwlimit: BANDWITH_LIMIT,
exclude: "'DfsrPrivate'"
}
- FLAGS = %w[v r t z p L]
+ FLAGS = %w[noatime verbose archive compress]
def initialize(data: DEFAULT, flags: FLAGS)
@data = data.to_h
@flags = flags.to_a
end
@@ -22,10 +22,10 @@
self
end
private def flags
return if @flags.empty?
- "-#{@flags.join}"
+ @flags.map { |flag| "--#{flag}" }.join(" ")
end
private def data
return if @data.empty?
@data.reduce([]) do |acc, (opt, val)|