From 4c56c7b44d56c0050f39c949e613866b9d5134e7 Mon Sep 17 00:00:00 2001 From: Jan-Willem van der Meer Date: Wed, 20 Nov 2024 11:32:54 +0100 Subject: [PATCH] Upgrade required sqlite version to 2.2, fix json spec --- Appraisals | 1 + gemfiles/composite_primary_keys.gemfile | 2 +- gemfiles/rails_6.0.gemfile | 2 +- gemfiles/rails_6.1.gemfile | 2 +- gemfiles/rails_7.0.gemfile | 2 +- gemfiles/rails_7.1.gemfile | 2 +- gemfiles/rails_7.2.gemfile | 2 +- gemfiles/rails_8.0.gemfile | 1 + spec/dummy_app/Gemfile | 2 +- spec/rails_admin/config/fields/types/json_spec.rb | 4 ++-- 10 files changed, 11 insertions(+), 9 deletions(-) diff --git a/Appraisals b/Appraisals index dbc495d167..de0c2612ec 100644 --- a/Appraisals +++ b/Appraisals @@ -96,6 +96,7 @@ end appraise 'rails-8.0' do gem 'rails', '~> 8.0.0' + gem 'sqlite3', '~> 2.2' gem 'importmap-rails', require: false end diff --git a/gemfiles/composite_primary_keys.gemfile b/gemfiles/composite_primary_keys.gemfile index 1ebba5c55d..b8b904c754 100644 --- a/gemfiles/composite_primary_keys.gemfile +++ b/gemfiles/composite_primary_keys.gemfile @@ -48,7 +48,7 @@ group :active_record do platforms :ruby, :mswin, :mingw, :x64_mingw do gem "mysql2", ">= 0.3.14" gem "pg", ">= 1.0.0" - gem "sqlite3", "~> 1.3" + gem "sqlite3", "~> 2.2" end end diff --git a/gemfiles/rails_6.0.gemfile b/gemfiles/rails_6.0.gemfile index b57ca868df..1195b9d537 100644 --- a/gemfiles/rails_6.0.gemfile +++ b/gemfiles/rails_6.0.gemfile @@ -48,7 +48,7 @@ group :active_record do platforms :ruby, :mswin, :mingw, :x64_mingw do gem "mysql2", ">= 0.3.14" gem "pg", ">= 1.0.0" - gem "sqlite3", "~> 1.3" + gem "sqlite3", "~> 2.2" end platforms :jruby do diff --git a/gemfiles/rails_6.1.gemfile b/gemfiles/rails_6.1.gemfile index 8c4b1c44c3..766eebc64a 100644 --- a/gemfiles/rails_6.1.gemfile +++ b/gemfiles/rails_6.1.gemfile @@ -47,7 +47,7 @@ group :active_record do platforms :ruby, :mswin, :mingw, :x64_mingw do gem "mysql2", ">= 0.3.14" gem "pg", ">= 1.0.0" - gem "sqlite3", "~> 1.3" + gem "sqlite3", "~> 2.2" end platforms :jruby do diff --git a/gemfiles/rails_7.0.gemfile b/gemfiles/rails_7.0.gemfile index 36f7ff8cf6..2337e573e1 100644 --- a/gemfiles/rails_7.0.gemfile +++ b/gemfiles/rails_7.0.gemfile @@ -48,7 +48,7 @@ group :active_record do platforms :ruby, :mswin, :mingw, :x64_mingw do gem "mysql2", ">= 0.3.14" gem "pg", ">= 1.0.0" - gem "sqlite3", "~> 1.3" + gem "sqlite3", "~> 2.2" end platforms :jruby do diff --git a/gemfiles/rails_7.1.gemfile b/gemfiles/rails_7.1.gemfile index 98c7769fbc..bde08cdfaa 100644 --- a/gemfiles/rails_7.1.gemfile +++ b/gemfiles/rails_7.1.gemfile @@ -48,7 +48,7 @@ group :active_record do platforms :ruby, :mswin, :mingw, :x64_mingw do gem "mysql2", ">= 0.3.14" gem "pg", ">= 1.0.0" - gem "sqlite3", "~> 1.3" + gem "sqlite3", "~> 2.2" end end diff --git a/gemfiles/rails_7.2.gemfile b/gemfiles/rails_7.2.gemfile index f0edccff88..0713f03ca6 100644 --- a/gemfiles/rails_7.2.gemfile +++ b/gemfiles/rails_7.2.gemfile @@ -48,7 +48,7 @@ group :active_record do platforms :ruby, :mswin, :mingw, :x64_mingw do gem "mysql2", ">= 0.3.14" gem "pg", ">= 1.0.0" - gem "sqlite3", "~> 1.3" + gem "sqlite3", "~> 2.2" end end diff --git a/gemfiles/rails_8.0.gemfile b/gemfiles/rails_8.0.gemfile index 6e98f9dc61..bc6195ca01 100644 --- a/gemfiles/rails_8.0.gemfile +++ b/gemfiles/rails_8.0.gemfile @@ -11,6 +11,7 @@ gem "turbo-rails" gem "vite_rails", require: false gem "webpacker", require: false gem "webrick" +gem "sqlite3", "~> 2.2" gem "importmap-rails", require: false group :development, :test do diff --git a/spec/dummy_app/Gemfile b/spec/dummy_app/Gemfile index 5a16903ea3..5c492dd058 100644 --- a/spec/dummy_app/Gemfile +++ b/spec/dummy_app/Gemfile @@ -14,7 +14,7 @@ group :active_record do platforms :ruby, :mswin, :mingw do gem 'mysql2', '>= 0.3.14' gem 'pg', '>= 0.14' - gem 'sqlite3', '~> 1.3' + gem 'sqlite3', '~> 2.2' end gem 'paper_trail', '>= 12.0' diff --git a/spec/rails_admin/config/fields/types/json_spec.rb b/spec/rails_admin/config/fields/types/json_spec.rb index a1e0395827..a749d93025 100644 --- a/spec/rails_admin/config/fields/types/json_spec.rb +++ b/spec/rails_admin/config/fields/types/json_spec.rb @@ -24,7 +24,7 @@ it 'returns correct value for empty json' do allow(object).to receive(:json_field) { {} } actual = field.with(bindings).formatted_value - expect(actual).to match(/{\n+}/) + expect(actual).to match(/{\n*}/) end it 'retuns correct value' do @@ -72,7 +72,7 @@ it 'returns correct value for empty json' do allow(object).to receive(:json_field) { {} } actual = field.with(bindings).export_value - expect(actual).to match(/{\n+}/) + expect(actual).to match(/{\n*}/) end it 'returns correct value' do