kronn-has_many_polymorphs 3.0.0 → 3.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -63,13 +63,15 @@ class Object
63
63
  # Logger shortcut.
64
64
  def _logger_debug s
65
65
  s = "** has_many_polymorphs: #{s}"
66
- Rails.logger.debug(s) if Rails and Rails.logger
66
+ if defined?(Rails) and Rails.respond_to?(:logger) and Rails.logger.respond_to?(:debug)
67
+ Rails.logger.debug(s)
68
+ end
67
69
  end
68
70
 
69
71
  # Logger shortcut.
70
72
  def _logger_warn s
71
73
  s = "** has_many_polymorphs: #{s}"
72
- if Rails and Rails.logger
74
+ if defined?(Rails) and Rails.respond_to?(:logger) and Rails.logger.respond_to?(:warn)
73
75
  Rails.logger.warn(s)
74
76
  else
75
77
  $stderr.puts(s)
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kronn-has_many_polymorphs
3
3
  version: !ruby/object:Gem::Version
4
- hash: 7
4
+ hash: 5
5
5
  prerelease: false
6
6
  segments:
7
7
  - 3
8
8
  - 0
9
- - 0
10
- version: 3.0.0
9
+ - 1
10
+ version: 3.0.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Evan Weaver