lib/middleman-deploy/extension.rb in middleman-deploy-0.0.4 vs lib/middleman-deploy/extension.rb in middleman-deploy-0.0.5

- old
+ new

@@ -3,11 +3,11 @@ # Extension namespace module Middleman module Deploy - class Options < Struct.new(:method, :host, :port, :user, :path, :clean); end + class Options < Struct.new(:whatisthis, :method, :host, :port, :user, :path, :clean); end class << self def options @@options @@ -15,36 +15,15 @@ def registered(app, options_hash={}, &block) options = Options.new(options_hash) yield options if block_given? - options.method ||= :rsync options.port ||= 22 options.clean ||= false @@options = options app.send :include, Helpers - - app.after_configuration do - if (options.method == :rsync) - if (!options.host || !options.user || !options.path) - raise <<EOF - - -ERROR: middleman-deploy is not setup correctly. host, user, and path -*must* be set in config.rb. For example: - -activate :deploy do |deploy| - deploy.user = "tvaughan" - deploy.host = "www.example.com" - deploy.path = "/srv/www/site" -end - -EOF - end - end - end end alias :included :registered end