lib/ProMotion/helpers/console.rb in ProMotion-0.6.5 vs lib/ProMotion/helpers/console.rb in ProMotion-0.7.0
- old
+ new
@@ -6,22 +6,22 @@
GREEN_COLOR = [ "\e[0;32m", "\e[0m" ]
PURPLE_COLOR = [ "\e[0;35m", "\e[0m" ]
class << self
def log(log, with_color:color)
- return if RUBYMOTION_ENV == "test"
+ return if defined?(RUBYMOTION_ENV) && RUBYMOTION_ENV == "test"
PM.logger.deprecated "ProMotion::Console.log is deprecated. Use PM.logger (see README)"
puts color[0] + NAME + log + color[1]
end
def log(log, withColor:color)
- return if RUBYMOTION_ENV == "test"
+ return if defined?(RUBYMOTION_ENV) && RUBYMOTION_ENV == "test"
PM.logger.deprecated "ProMotion::Console.log is deprecated. Use PM.logger (see README)"
self.log(log, with_color:color)
end
def log(log)
- return if RUBYMOTION_ENV == "test"
+ return if defined?(RUBYMOTION_ENV) && RUBYMOTION_ENV == "test"
PM.logger.deprecated "ProMotion::Console.log is deprecated. Use PM.logger (see README)"
log(log, with_color: DEFAULT_COLOR)
end
end
end
\ No newline at end of file