Skip to content

Commit

Permalink
Coffeemaker expects now a logger.
Browse files Browse the repository at this point in the history
To maintain previous bahviour null logger is used by default.
  • Loading branch information
mostlyobvious committed Feb 9, 2013
1 parent a909311 commit 008ea6b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion lib/muzang/bot.rb
Expand Up @@ -2,6 +2,7 @@
require 'coffeemaker/bot'
require 'active_support/inflector/inflections'
require 'active_support/inflector/methods'
require 'logger'

module Muzang
class Bot
Expand Down Expand Up @@ -47,7 +48,8 @@ def default_options
irc_host: 'localhost',
irc_port: 6667,
nick: 'DRUG-bot',
channels: ['#test']
channels: ['#test'],
logger: Logger.new('/dev/null')
}
end
end
Expand Down
2 changes: 1 addition & 1 deletion muzang.gemspec
Expand Up @@ -18,5 +18,5 @@ Gem::Specification.new do |s|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
s.require_paths = ["lib"]

s.add_runtime_dependency "coffeemaker", "~> 0.1.0"
s.add_runtime_dependency "coffeemaker", "~> 0.1.2"
end
1 change: 1 addition & 0 deletions spec/muzang_spec.rb
Expand Up @@ -7,6 +7,7 @@
@connection = Class.new { include Coffeemaker::Bot::Irc::Connection }.new
@connection.on_connect = @muzang.bot.irc.on_connect
@connection.on_message = @muzang.bot.irc.on_message
@connection.logger = @muzang.bot.irc.logger
@connection.stub(:send_data)
@connection
end
Expand Down

0 comments on commit 008ea6b

Please sign in to comment.