mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
Fix rubocop offenses
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require File.expand_path(['..', 'app'].join(File::SEPARATOR), __FILE__)
|
||||
|
||||
run Rails.application
|
||||
|
||||
@@ -2,15 +2,17 @@
|
||||
|
||||
if RUBY_VERSION >= '2.6.0'
|
||||
if Rails::VERSION::MAJOR < 5
|
||||
class ActionController::TestResponse < ActionDispatch::TestResponse
|
||||
def recycle!
|
||||
# hack to avoid MonitorMixin double-initialize error:
|
||||
@mon_mutex_owner_object_id = nil
|
||||
@mon_mutex = nil
|
||||
initialize
|
||||
module ActionController
|
||||
class TestResponse < ActionDispatch::TestResponse
|
||||
def recycle!
|
||||
# HACK: to avoid MonitorMixin double-initialize error:
|
||||
@mon_mutex_owner_object_id = nil
|
||||
@mon_mutex = nil
|
||||
initialize
|
||||
end
|
||||
end
|
||||
end
|
||||
else
|
||||
puts "Monkeypatch for ActionController::TestResponse no longer needed"
|
||||
puts 'Monkeypatch for ActionController::TestResponse no longer needed'
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user