lib/middleman-deploy/methods/rsync.rb in middleman-deploy-0.2.4 vs lib/middleman-deploy/methods/rsync.rb in middleman-deploy-0.3.0

- old
+ new

@@ -1,13 +1,12 @@ module Middleman module Deploy module Methods class Rsync < Base - attr_reader :clean, :flags, :host, :path, :port, :user - def initialize(server_instance, options={}) + def initialize(server_instance, options = {}) super(server_instance, options) @clean = self.options.clean @flags = self.options.flags @host = self.options.host @@ -23,16 +22,15 @@ dest_url = "#{user}#{self.host}:#{self.path}" flags = self.flags || '-avz' command = "rsync #{flags} '-e ssh -p #{self.port}' #{self.server_instance.build_dir}/ #{dest_url}" if self.clean - command += " --delete" + command += ' --delete' end puts "## Deploying via rsync to #{dest_url} port=#{self.port}" exec command end - end end end end