wesabot 1.1.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -17,7 +17,7 @@ module Campfire
17
17
  self.room = data[:room]
18
18
  self.verbose = data[:verbose] || false
19
19
  self.datauri = data[:datauri]
20
- self.logger = data[:logger] || data[:logfile] || Logger.new(STDOUT)
20
+ self.logger = data[:logger] || data[:logfile] || Logger.new(STDERR)
21
21
  self.google_api_key = data[:google_api_key]
22
22
  self.ssl_verify = data[:ssl_verify] != false
23
23
  self.config_dir = data[:config_dir]
@@ -20,6 +20,7 @@ module Campfire
20
20
  config_dir = bot.config.config_dir || self.class.directory
21
21
  filepath = File.join(config_dir, "#{name}.yml")
22
22
  if File.exists?(filepath)
23
+ logger.debug "loading config file: #{filepath}"
23
24
  self.config = YAML.load_file(filepath)
24
25
  else
25
26
  self.config = {}
@@ -67,6 +68,10 @@ module Campfire
67
68
  bot.logger
68
69
  end
69
70
 
71
+ def self.logger
72
+ self.bot.logger
73
+ end
74
+
70
75
  HALT = 1 # returned by a command when command processing should halt (continues by default)
71
76
 
72
77
  def self.load_all(bot)
@@ -95,8 +100,9 @@ module Campfire
95
100
  paths.each do |path|
96
101
  begin
97
102
  path.match(/(.*?)\.rb$/) && (require $1)
103
+ logger.debug "loaded plugin #{$1}"
98
104
  rescue Exception => e
99
- $stderr.puts "Unable to load #{path}: #{e.class}: #{e.message}\n\t#{e.backtrace.join("\n\t")}"
105
+ logger.error "Unable to load #{path}: #{e.class}: #{e.message}\n\t#{e.backtrace.join("\n\t")}"
100
106
  end
101
107
  end
102
108
  end
@@ -1,3 +1,3 @@
1
1
  module Campfire
2
- VERSION = "1.1.0"
2
+ VERSION = "1.1.1"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wesabot
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 17
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 1
9
- - 0
10
- version: 1.1.0
9
+ - 1
10
+ version: 1.1.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Brad Greenlee
@@ -17,7 +17,7 @@ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
19
 
20
- date: 2011-09-14 00:00:00 Z
20
+ date: 2011-09-15 00:00:00 Z
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
23
23
  name: tinder