lib/rspeckled/plugins/extensions/awesome_print.rb in rspeckled-1.0.4 vs lib/rspeckled/plugins/extensions/awesome_print.rb in rspeckled-1.0.5
- old
+ new
@@ -1,11 +1,15 @@
# frozen_string_literal: true
+begin
+ require 'awesome_print'
+ require 'io/console'
+rescue LoadError
+end
+
# rubocop:disable Metrics/AbcSize
# rubocop:disable Metrics/PerceivedComplexity
# rubocop:disable Metrics/CyclomaticComplexity
-require 'io/console'
-
module Kernel
def sap(*messages)
columns = if ::IO.console
::IO.console.winsize[1]
else