Fix rubocop offenses

This commit is contained in:
Wasif Hossain 2019-04-23 02:06:12 +06:00
parent 3715a101c2
commit 5d122f2922
No known key found for this signature in database
GPG Key ID: 14C15A54E34D7803
3 changed files with 13 additions and 9 deletions

View File

@ -53,7 +53,7 @@ group :bench do
end
group :test do
platforms *(@windows_platforms + [:ruby]) do
platforms(*(@windows_platforms + [:ruby])) do
if version == 'master' || version >= '6'
gem 'sqlite3', '~> 1.4'
else
@ -71,7 +71,7 @@ group :test do
gem 'm', '~> 1.5'
gem 'pry', '>= 0.10'
gem 'byebug', '~> 8.2' if RUBY_VERSION < '2.2'
gem 'pry-byebug', platform: :ruby
gem 'pry-byebug', platforms: :ruby
end
group :development, :test do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require File.expand_path(['..', 'app'].join(File::SEPARATOR), __FILE__)
run Rails.application

View File

@ -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