lib/warner.rb in warner-1.0.1 vs lib/warner.rb in warner-1.0.2
- old
+ new
@@ -1,22 +1,10 @@
require_relative "warner/version"
-if Object.const_defined?('ActiveSupport')
- module ActiveSupport
- class Deprecation
- DEFAULT_BEHAVIORS[:stderr] = -> (message, callstack) {
- $stderr.puts"\e[41;37;1m#{message}\e[0m"
- $stderr.puts callstack.join("\n ") if debug
- }
- end
- end
-end
-
class Warner
def self.colored_warning(message, callstack = nil)
if Object.const_defined?('ActiveSupport')
- # callstack ||= caller_locations(2)
ActiveSupport::Deprecation.warn message, callstack
else
warn "\e[41;37;1m[DEPRECATION WARNING]: #{message}\e[0m"
end
end