Skip to content

Commit

Permalink
Improve plugin arity warning message.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rubén Caro committed May 13, 2013
1 parent c0264f0 commit 9f57ad9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/goliath/server.rb
Expand Up @@ -160,7 +160,9 @@ def load_plugins
logger.info("Loading #{name.to_s}")

if name.instance_method(:initialize).arity != 5 then
logger.info("Arity != 5 is deprecated for plugin initialization.")
logger.warn("Plugins now take 5 parameters (address, port, config, status, logger).
You appear to be using the old style 4 parameter method (port, config, status, logger).
Please update you're plugins as the 4 parameter method is deprecated.");
plugin = name.new(port, config, status, logger)
else
plugin = name.new(address, port, config, status, logger)
Expand Down

0 comments on commit 9f57ad9

Please sign in to comment.