lib/lita/adapter.rb in lita-0.0.1 vs lib/lita/adapter.rb in lita-1.0.0
- old
+ new
@@ -16,10 +16,16 @@
def initialize(robot)
@robot = robot
ensure_required_configs
end
+ [:run, :send_messages, :set_topic, :shut_down].each do |method|
+ define_method(method) do |*args|
+ Lita.logger.warn("This adapter has not implemented ##{method}.")
+ end
+ end
+
private
def ensure_required_configs
required_configs = self.class.required_configs
return if required_configs.nil?
@@ -29,12 +35,13 @@
required_configs.each do |key|
missing_keys << key unless Lita.config.adapter[key]
end
unless missing_keys.empty?
- raise Lita::ConfigError.new(
+ Lita.logger.fatal(
"The following keys are required on config.adapter: #{missing_keys.join(", ")}"
)
+ abort
end
end
end
end