mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-22 22:06:50 +00:00
Fix rubocop offenses
This commit is contained in:
parent
3715a101c2
commit
5d122f2922
4
Gemfile
4
Gemfile
@ -53,7 +53,7 @@ group :bench do
|
|||||||
end
|
end
|
||||||
|
|
||||||
group :test do
|
group :test do
|
||||||
platforms *(@windows_platforms + [:ruby]) do
|
platforms(*(@windows_platforms + [:ruby])) do
|
||||||
if version == 'master' || version >= '6'
|
if version == 'master' || version >= '6'
|
||||||
gem 'sqlite3', '~> 1.4'
|
gem 'sqlite3', '~> 1.4'
|
||||||
else
|
else
|
||||||
@ -71,7 +71,7 @@ group :test do
|
|||||||
gem 'm', '~> 1.5'
|
gem 'm', '~> 1.5'
|
||||||
gem 'pry', '>= 0.10'
|
gem 'pry', '>= 0.10'
|
||||||
gem 'byebug', '~> 8.2' if RUBY_VERSION < '2.2'
|
gem 'byebug', '~> 8.2' if RUBY_VERSION < '2.2'
|
||||||
gem 'pry-byebug', platform: :ruby
|
gem 'pry-byebug', platforms: :ruby
|
||||||
end
|
end
|
||||||
|
|
||||||
group :development, :test do
|
group :development, :test do
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require File.expand_path(['..', 'app'].join(File::SEPARATOR), __FILE__)
|
require File.expand_path(['..', 'app'].join(File::SEPARATOR), __FILE__)
|
||||||
|
|
||||||
run Rails.application
|
run Rails.application
|
||||||
|
|||||||
@ -2,15 +2,17 @@
|
|||||||
|
|
||||||
if RUBY_VERSION >= '2.6.0'
|
if RUBY_VERSION >= '2.6.0'
|
||||||
if Rails::VERSION::MAJOR < 5
|
if Rails::VERSION::MAJOR < 5
|
||||||
class ActionController::TestResponse < ActionDispatch::TestResponse
|
module ActionController
|
||||||
def recycle!
|
class TestResponse < ActionDispatch::TestResponse
|
||||||
# hack to avoid MonitorMixin double-initialize error:
|
def recycle!
|
||||||
@mon_mutex_owner_object_id = nil
|
# HACK: to avoid MonitorMixin double-initialize error:
|
||||||
@mon_mutex = nil
|
@mon_mutex_owner_object_id = nil
|
||||||
initialize
|
@mon_mutex = nil
|
||||||
|
initialize
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
puts "Monkeypatch for ActionController::TestResponse no longer needed"
|
puts 'Monkeypatch for ActionController::TestResponse no longer needed'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user