File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
main/ruby/jruby/rack/rails Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 22
33module JRuby ::Rack
44 class RailsLogger < JRuby ::Rack ::Logger
5- include ActiveSupport ::LoggerSilence
5+ include ActiveSupport ::LoggerSilence if defined? ( ActiveSupport :: LoggerSilence )
66 end
77end
Original file line number Diff line number Diff line change 185185 unwrap_logger = "logger = Rails.logger.broadcasts.first;"
186186 end
187187
188- # sanity check logger-silence works:
189- should_eval_as_eql_to "#{ unwrap_logger } logger.silence { logger.warn('from-integration-spec') }" , true
190-
191- should_eval_as_eql_to "#{ unwrap_logger } logger.real_logger.is_a?(org.jruby.rack.logging.ServletContextLogger)" , true
188+ if Rails ::VERSION ::STRING >= '6.0'
189+ # sanity check logger-silence works:
190+ should_eval_as_not_nil "#{ unwrap_logger } defined?(logger.silence)"
191+ should_eval_as_eql_to "#{ unwrap_logger } logger.silence { logger.warn('from-integration-spec') }" , true
192+ should_eval_as_eql_to "#{ unwrap_logger } logger.real_logger.is_a?(org.jruby.rack.logging.ServletContextLogger)" , true
193+ end
192194 end
193195
194196 it "sets up public_path" do
You can’t perform that action at this time.
0 commit comments