mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-23 06:16:50 +00:00
Configure sqlite3 to use ~> 1.4 for rails 6+
This commit is contained in:
parent
942e10fdb8
commit
0aa1ed93a4
8
Gemfile
8
Gemfile
@ -53,7 +53,13 @@ group :bench do
|
||||
end
|
||||
|
||||
group :test do
|
||||
gem 'sqlite3', '~> 1.3.13', platform: (@windows_platforms + [:ruby])
|
||||
platforms *(@windows_platforms + [:ruby]) do
|
||||
if version == 'master' || version >= '6'
|
||||
gem 'sqlite3', '~> 1.4'
|
||||
else
|
||||
gem 'sqlite3', '~> 1.3.13'
|
||||
end
|
||||
end
|
||||
platforms :jruby do
|
||||
if version == 'master' || version >= '5'
|
||||
gem 'activerecord-jdbcsqlite3-adapter', '~> 50'
|
||||
|
||||
16
test/support/ruby_2_6_rails_4_2_patch.rb
Normal file
16
test/support/ruby_2_6_rails_4_2_patch.rb
Normal file
@ -0,0 +1,16 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
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
|
||||
end
|
||||
end
|
||||
else
|
||||
puts "Monkeypatch for ActionController::TestResponse no longer needed"
|
||||
end
|
||||
end
|
||||
@ -56,6 +56,8 @@ end
|
||||
|
||||
require 'support/rails_app'
|
||||
|
||||
require 'support/ruby_2_6_rails_4_2_patch'
|
||||
|
||||
# require "rails/test_help"
|
||||
|
||||
require 'support/serialization_testing'
|
||||
|
||||
Loading…
Reference in New Issue
Block a user