right_support 1.0.5 → 1.0.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -233,14 +233,16 @@ module RightSupport::Net
233
233
  return callable.respond_to?(:arity) && (callable.arity == arity)
234
234
  end
235
235
 
236
- # Log an info message with the class logger, if provided
236
+ # Log an info message with the class logger, if provided. Can't duck type because some loggers
237
+ # use fallback methods to perform their logging and don't respond_to?() :info or :error
237
238
  def log_info(*args)
238
- self.class.logger.__send__(:info, *args) if self.class.logger.respond_to?(:info)
239
+ self.class.logger.__send__(:info, *args) unless self.class.logger.nil?
239
240
  end
240
241
 
241
- # Log an error message with the class logger, if provided
242
+ # Log an error message with the class logger, if provided. Can't duck type because some loggers
243
+ # use fallback methods to perform their logging and don't respond_to?() :info or :error
242
244
  def log_error(*args)
243
- self.class.logger.__send__(:error, *args) if self.class.logger.respond_to?(:error)
245
+ self.class.logger.__send__(:error, *args) unless self.class.logger.nil?
244
246
  end
245
247
 
246
248
  end # RequestBalancer
@@ -7,8 +7,8 @@ spec = Gem::Specification.new do |s|
7
7
  s.required_ruby_version = Gem::Requirement.new(">= 1.8.7")
8
8
 
9
9
  s.name = 'right_support'
10
- s.version = '1.0.5'
11
- s.date = '2011-10-06'
10
+ s.version = '1.0.6'
11
+ s.date = '2011-10-12'
12
12
 
13
13
  s.authors = ['Tony Spataro']
14
14
  s.email = 'tony@rightscale.com'
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: right_support
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 5
10
- version: 1.0.5
9
+ - 6
10
+ version: 1.0.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - Tony Spataro
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-10-06 00:00:00 -07:00
18
+ date: 2011-10-12 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency