lib/sanford/host.rb in sanford-0.3.0 vs lib/sanford/host.rb in sanford-0.4.0
- old
+ new
@@ -23,10 +23,11 @@
option :port, Integer
option :pid_dir, Pathname, :default => Dir.pwd
option :logger, :default => proc{ Sanford::NullLogger.new }
option :verbose_logging, :default => true
option :error_proc, Proc, :default => proc{ }
+ option :setup_proc, Proc, :default => proc{ }
def initialize(host)
self.name = host.class.to_s
end
@@ -71,9 +72,13 @@
self.configuration.verbose_logging *args
end
def error(&block)
self.configuration.error_proc = block
+ end
+
+ def setup(&block)
+ self.configuration.setup_proc = block
end
def version(name, &block)
version_group = Sanford::Host::VersionGroup.new(name, &block)
@versioned_services.merge!(version_group.to_hash)