lib/blather.rb in blather-0.3.4 vs lib/blather.rb in blather-0.4.0

- old
+ new

@@ -1,16 +1,15 @@ # Require the necessary files -require File.join(File.dirname(__FILE__), *%w[.. ext push_parser]) %w[ rubygems eventmachine - xml/libxml + nokogiri digest/md5 logger blather/core_ext/active_support - blather/core_ext/libxml + blather/core_ext/nokogiri blather/errors blather/errors/sasl_error blather/errors/stanza_error blather/errors/stream_error @@ -29,22 +28,46 @@ blather/stanza/message blather/stanza/presence blather/stanza/presence/status blather/stanza/presence/subscription + blather/stanza/pubsub + blather/stanza/pubsub/affiliations + blather/stanza/pubsub/create + blather/stanza/pubsub/event + blather/stanza/pubsub/items + blather/stanza/pubsub/publish + blather/stanza/pubsub/retract + blather/stanza/pubsub/subscribe + blather/stanza/pubsub/subscription + blather/stanza/pubsub/subscriptions + blather/stanza/pubsub/unsubscribe + + blather/stanza/pubsub_owner + blather/stanza/pubsub_owner/delete + blather/stanza/pubsub_owner/purge + blather/stream blather/stream/client blather/stream/component - blather/stream/stream_handler blather/stream/parser - blather/stream/resource - blather/stream/sasl - blather/stream/session - blather/stream/tls + blather/stream/features + blather/stream/features/resource + blather/stream/features/sasl + blather/stream/features/session + blather/stream/features/tls ].each { |r| require r } -XML.indent_tree_output = false - module Blather - LOG = Logger.new($stdout) unless const_defined?(:LOG) - LOG.level = Logger::INFO + @@logger = nil + def self.logger + unless @@logger + self.logger = Logger.new($stdout) + self.logger.level = Logger::INFO + end + @@logger + end + + def self.logger=(logger) + @@logger = logger + end end