From 0a0143e6035e79fefad4be5183b2fda39bb7e359 Mon Sep 17 00:00:00 2001 From: Lee Tickett Date: Tue, 13 Aug 2024 10:40:50 +0100 Subject: [PATCH 01/14] Add support for rails 7.2 --- .github/workflows/ci.yaml | 2 +- Appraisals | 6 ++++++ db-query-matchers.gemspec | 4 ++-- gemfiles/rails_7_2.gemfile | 8 ++++++++ 4 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 gemfiles/rails_7_2.gemfile diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index bed1e09..dba1069 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -13,7 +13,7 @@ jobs: strategy: matrix: ruby-version: ['3.0', '3.1', '3.2'] - gemfile: [ rails_6_1, rails_7_0, rails_7_1 ] + gemfile: [ rails_6_1, rails_7_0, rails_7_1, rails_7_2 ] experimental: [false] env: diff --git a/Appraisals b/Appraisals index d11e047..a9f6167 100644 --- a/Appraisals +++ b/Appraisals @@ -15,3 +15,9 @@ appraise "rails_7_1" do gem "activesupport", version gem "sqlite3", ">= 1.4" end + +appraise "rails_7_2" do + version = "~> 7.2.0" + gem "activesupport", version + gem "sqlite3", ">= 1.4" +end diff --git a/db-query-matchers.gemspec b/db-query-matchers.gemspec index f87323b..57814f2 100644 --- a/db-query-matchers.gemspec +++ b/db-query-matchers.gemspec @@ -19,10 +19,10 @@ Gem::Specification.new do |spec| spec.files = Dir['lib/**/*.rb'] spec.require_paths = ['lib'] - spec.add_runtime_dependency 'activesupport', '>= 4.0', "< 7.2" + spec.add_runtime_dependency 'activesupport', '>= 4.0', "< 7.3" spec.add_runtime_dependency 'rspec', '>= 3.0' - spec.add_development_dependency 'activerecord', '>= 4.0', "< 7.2" + spec.add_development_dependency 'activerecord', '>= 4.0', "< 7.3" spec.add_development_dependency 'sqlite3' spec.add_development_dependency "appraisal", "~> 2.0" diff --git a/gemfiles/rails_7_2.gemfile b/gemfiles/rails_7_2.gemfile new file mode 100644 index 0000000..e3f147c --- /dev/null +++ b/gemfiles/rails_7_2.gemfile @@ -0,0 +1,8 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "activesupport", "~> 7.2.0" +gem "sqlite3", ">= 1.4" + +gemspec path: "../" From 9f2c35ed6174b1c3d61f5f28d640a8dbfc7b3e54 Mon Sep 17 00:00:00 2001 From: Lee Tickett Date: Tue, 13 Aug 2024 10:44:00 +0100 Subject: [PATCH 02/14] Exclude rails 7.2 from ruby 3.0 tests --- .github/workflows/ci.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index dba1069..cb289f2 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -15,6 +15,9 @@ jobs: ruby-version: ['3.0', '3.1', '3.2'] gemfile: [ rails_6_1, rails_7_0, rails_7_1, rails_7_2 ] experimental: [false] + exclude: + - ruby-version: '3.0' + gemfile: rails_7_2 env: BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile From 00c3e03c9e80b9231bd0aabb20f2d8f7341b145c Mon Sep 17 00:00:00 2001 From: Lee Tickett Date: Tue, 13 Aug 2024 10:47:13 +0100 Subject: [PATCH 03/14] Remove sqlite3 from rails 7.2 --- Appraisals | 1 - gemfiles/rails_7_2.gemfile | 1 - 2 files changed, 2 deletions(-) diff --git a/Appraisals b/Appraisals index a9f6167..292e70f 100644 --- a/Appraisals +++ b/Appraisals @@ -19,5 +19,4 @@ end appraise "rails_7_2" do version = "~> 7.2.0" gem "activesupport", version - gem "sqlite3", ">= 1.4" end diff --git a/gemfiles/rails_7_2.gemfile b/gemfiles/rails_7_2.gemfile index e3f147c..7debc90 100644 --- a/gemfiles/rails_7_2.gemfile +++ b/gemfiles/rails_7_2.gemfile @@ -3,6 +3,5 @@ source "https://rubygems.org" gem "activesupport", "~> 7.2.0" -gem "sqlite3", ">= 1.4" gemspec path: "../" From e001f18cc782435f6f83ac0109048d7b67d07c58 Mon Sep 17 00:00:00 2001 From: Lee Tickett Date: Tue, 13 Aug 2024 10:49:34 +0100 Subject: [PATCH 04/14] Remove sqlite3 from rails 7.1 --- Appraisals | 1 - gemfiles/rails_7_1.gemfile | 1 - 2 files changed, 2 deletions(-) diff --git a/Appraisals b/Appraisals index 292e70f..65deae0 100644 --- a/Appraisals +++ b/Appraisals @@ -13,7 +13,6 @@ end appraise "rails_7_1" do version = "~> 7.1.0" gem "activesupport", version - gem "sqlite3", ">= 1.4" end appraise "rails_7_2" do diff --git a/gemfiles/rails_7_1.gemfile b/gemfiles/rails_7_1.gemfile index c7dd698..802ac8e 100644 --- a/gemfiles/rails_7_1.gemfile +++ b/gemfiles/rails_7_1.gemfile @@ -3,6 +3,5 @@ source "https://rubygems.org" gem "activesupport", "~> 7.1.0" -gem "sqlite3", ">= 1.4" gemspec path: "../" From 2bb87f6ee46e330d6c31113d4e0ab343400cdb64 Mon Sep 17 00:00:00 2001 From: Lee Tickett Date: Tue, 13 Aug 2024 10:59:27 +0100 Subject: [PATCH 05/14] Try force_ruby_platform --- Appraisals | 1 + gemfiles/rails_7_1.gemfile | 1 + 2 files changed, 2 insertions(+) diff --git a/Appraisals b/Appraisals index 65deae0..3b9c915 100644 --- a/Appraisals +++ b/Appraisals @@ -13,6 +13,7 @@ end appraise "rails_7_1" do version = "~> 7.1.0" gem "activesupport", version + gem "sqlite3", ">= 1.4", force_ruby_platform: true end appraise "rails_7_2" do diff --git a/gemfiles/rails_7_1.gemfile b/gemfiles/rails_7_1.gemfile index 802ac8e..7bc93da 100644 --- a/gemfiles/rails_7_1.gemfile +++ b/gemfiles/rails_7_1.gemfile @@ -3,5 +3,6 @@ source "https://rubygems.org" gem "activesupport", "~> 7.1.0" +gem "sqlite3", ">= 1.4", force_ruby_platform: true gemspec path: "../" From 5129a89aca0c17c3b2da4dd8e92e5c749296b9c1 Mon Sep 17 00:00:00 2001 From: Lee Tickett Date: Tue, 13 Aug 2024 11:00:53 +0100 Subject: [PATCH 06/14] Remove sqlite3 version from rails 7.1 --- Appraisals | 2 +- gemfiles/rails_7_1.gemfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Appraisals b/Appraisals index 3b9c915..fd130a1 100644 --- a/Appraisals +++ b/Appraisals @@ -13,7 +13,7 @@ end appraise "rails_7_1" do version = "~> 7.1.0" gem "activesupport", version - gem "sqlite3", ">= 1.4", force_ruby_platform: true + gem "sqlite3", force_ruby_platform: true end appraise "rails_7_2" do diff --git a/gemfiles/rails_7_1.gemfile b/gemfiles/rails_7_1.gemfile index 7bc93da..50c70c1 100644 --- a/gemfiles/rails_7_1.gemfile +++ b/gemfiles/rails_7_1.gemfile @@ -3,6 +3,6 @@ source "https://rubygems.org" gem "activesupport", "~> 7.1.0" -gem "sqlite3", ">= 1.4", force_ruby_platform: true +gem "sqlite3", force_ruby_platform: true gemspec path: "../" From 9a0c8871668cd8ee6bfd51c17f2e207bef32705a Mon Sep 17 00:00:00 2001 From: Lee Tickett Date: Tue, 13 Aug 2024 11:05:25 +0100 Subject: [PATCH 07/14] Remove sqlite3 from gemspec --- Appraisals | 1 - db-query-matchers.gemspec | 1 - gemfiles/rails_7_1.gemfile | 1 - 3 files changed, 3 deletions(-) diff --git a/Appraisals b/Appraisals index fd130a1..65deae0 100644 --- a/Appraisals +++ b/Appraisals @@ -13,7 +13,6 @@ end appraise "rails_7_1" do version = "~> 7.1.0" gem "activesupport", version - gem "sqlite3", force_ruby_platform: true end appraise "rails_7_2" do diff --git a/db-query-matchers.gemspec b/db-query-matchers.gemspec index 57814f2..611dc01 100644 --- a/db-query-matchers.gemspec +++ b/db-query-matchers.gemspec @@ -23,7 +23,6 @@ Gem::Specification.new do |spec| spec.add_runtime_dependency 'rspec', '>= 3.0' spec.add_development_dependency 'activerecord', '>= 4.0', "< 7.3" - spec.add_development_dependency 'sqlite3' spec.add_development_dependency "appraisal", "~> 2.0" spec.required_ruby_version = ">= 3.0" diff --git a/gemfiles/rails_7_1.gemfile b/gemfiles/rails_7_1.gemfile index 50c70c1..802ac8e 100644 --- a/gemfiles/rails_7_1.gemfile +++ b/gemfiles/rails_7_1.gemfile @@ -3,6 +3,5 @@ source "https://rubygems.org" gem "activesupport", "~> 7.1.0" -gem "sqlite3", force_ruby_platform: true gemspec path: "../" From e66a841f10fc86ca65afed12c744c1c75df0c848 Mon Sep 17 00:00:00 2001 From: Lee Tickett Date: Tue, 13 Aug 2024 11:06:53 +0100 Subject: [PATCH 08/14] Add sqlite3 dev dep back to gemspec --- db-query-matchers.gemspec | 1 + 1 file changed, 1 insertion(+) diff --git a/db-query-matchers.gemspec b/db-query-matchers.gemspec index 611dc01..57814f2 100644 --- a/db-query-matchers.gemspec +++ b/db-query-matchers.gemspec @@ -23,6 +23,7 @@ Gem::Specification.new do |spec| spec.add_runtime_dependency 'rspec', '>= 3.0' spec.add_development_dependency 'activerecord', '>= 4.0', "< 7.3" + spec.add_development_dependency 'sqlite3' spec.add_development_dependency "appraisal", "~> 2.0" spec.required_ruby_version = ">= 3.0" From 37e43632344ce881a6a7fbad5b2630b73baefc46 Mon Sep 17 00:00:00 2001 From: Lee Tickett Date: Tue, 13 Aug 2024 11:08:08 +0100 Subject: [PATCH 09/14] Hardcode sqlite3 2.0.3 for rails 7.1 --- Appraisals | 1 + gemfiles/rails_7_1.gemfile | 1 + 2 files changed, 2 insertions(+) diff --git a/Appraisals b/Appraisals index 65deae0..03ff527 100644 --- a/Appraisals +++ b/Appraisals @@ -13,6 +13,7 @@ end appraise "rails_7_1" do version = "~> 7.1.0" gem "activesupport", version + gem "sqlite3", "~> 2.0.3" end appraise "rails_7_2" do diff --git a/gemfiles/rails_7_1.gemfile b/gemfiles/rails_7_1.gemfile index 802ac8e..7fcd5c2 100644 --- a/gemfiles/rails_7_1.gemfile +++ b/gemfiles/rails_7_1.gemfile @@ -3,5 +3,6 @@ source "https://rubygems.org" gem "activesupport", "~> 7.1.0" +gem "sqlite3", "~> 2.0.3" gemspec path: "../" From d830d412ce0324e8b3f5cfad9f3acd3a5a8d7f7f Mon Sep 17 00:00:00 2001 From: Lee Tickett Date: Tue, 13 Aug 2024 11:13:16 +0100 Subject: [PATCH 10/14] Don't cache bundle --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index cb289f2..45c9877 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -30,6 +30,6 @@ jobs: uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby-version }} - bundler-cache: true + bundler-cache: false - name: Run tests run: bundle exec rake From bc462c0de9ee6a28a9e5ab65d117e3aaf0321451 Mon Sep 17 00:00:00 2001 From: Lee Tickett Date: Tue, 13 Aug 2024 11:14:59 +0100 Subject: [PATCH 11/14] This won't work --- .github/workflows/ci.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 45c9877..e7ff1df 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -31,5 +31,4 @@ jobs: with: ruby-version: ${{ matrix.ruby-version }} bundler-cache: false - - name: Run tests run: bundle exec rake From e5f4fe1a2d2ab860157f12e86bd648682ea01464 Mon Sep 17 00:00:00 2001 From: Lee Tickett Date: Tue, 13 Aug 2024 11:17:13 +0100 Subject: [PATCH 12/14] Revert --- .github/workflows/ci.yaml | 3 ++- Appraisals | 2 +- gemfiles/rails_7_1.gemfile | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index e7ff1df..cb289f2 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -30,5 +30,6 @@ jobs: uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby-version }} - bundler-cache: false + bundler-cache: true + - name: Run tests run: bundle exec rake diff --git a/Appraisals b/Appraisals index 03ff527..292e70f 100644 --- a/Appraisals +++ b/Appraisals @@ -13,7 +13,7 @@ end appraise "rails_7_1" do version = "~> 7.1.0" gem "activesupport", version - gem "sqlite3", "~> 2.0.3" + gem "sqlite3", ">= 1.4" end appraise "rails_7_2" do diff --git a/gemfiles/rails_7_1.gemfile b/gemfiles/rails_7_1.gemfile index 7fcd5c2..c7dd698 100644 --- a/gemfiles/rails_7_1.gemfile +++ b/gemfiles/rails_7_1.gemfile @@ -3,6 +3,6 @@ source "https://rubygems.org" gem "activesupport", "~> 7.1.0" -gem "sqlite3", "~> 2.0.3" +gem "sqlite3", ">= 1.4" gemspec path: "../" From 0beab27fcd49f723f47630db141517d1e8f21aef Mon Sep 17 00:00:00 2001 From: Lee Tickett Date: Tue, 13 Aug 2024 11:18:20 +0100 Subject: [PATCH 13/14] Run all checks --- .github/workflows/ci.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index cb289f2..4499e74 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -13,8 +13,8 @@ jobs: strategy: matrix: ruby-version: ['3.0', '3.1', '3.2'] - gemfile: [ rails_6_1, rails_7_0, rails_7_1, rails_7_2 ] - experimental: [false] + gemfile: [rails_6_1, rails_7_0, rails_7_1, rails_7_2] + experimental: [true] exclude: - ruby-version: '3.0' gemfile: rails_7_2 From b63b1131a0a76fcfc478e5c3da7d6089ce630732 Mon Sep 17 00:00:00 2001 From: Lee Tickett Date: Tue, 13 Aug 2024 11:21:01 +0100 Subject: [PATCH 14/14] Remove flakey rails 7.1 --- .github/workflows/ci.yaml | 4 ++-- Appraisals | 6 ------ gemfiles/rails_7_1.gemfile | 8 -------- 3 files changed, 2 insertions(+), 16 deletions(-) delete mode 100644 gemfiles/rails_7_1.gemfile diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 4499e74..36e9211 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -13,8 +13,8 @@ jobs: strategy: matrix: ruby-version: ['3.0', '3.1', '3.2'] - gemfile: [rails_6_1, rails_7_0, rails_7_1, rails_7_2] - experimental: [true] + gemfile: [rails_6_1, rails_7_0, rails_7_2] + experimental: [false] exclude: - ruby-version: '3.0' gemfile: rails_7_2 diff --git a/Appraisals b/Appraisals index 292e70f..81796a6 100644 --- a/Appraisals +++ b/Appraisals @@ -10,12 +10,6 @@ appraise "rails_7_0" do gem "sqlite3", "~> 1.4" end -appraise "rails_7_1" do - version = "~> 7.1.0" - gem "activesupport", version - gem "sqlite3", ">= 1.4" -end - appraise "rails_7_2" do version = "~> 7.2.0" gem "activesupport", version diff --git a/gemfiles/rails_7_1.gemfile b/gemfiles/rails_7_1.gemfile deleted file mode 100644 index c7dd698..0000000 --- a/gemfiles/rails_7_1.gemfile +++ /dev/null @@ -1,8 +0,0 @@ -# This file was generated by Appraisal - -source "https://rubygems.org" - -gem "activesupport", "~> 7.1.0" -gem "sqlite3", ">= 1.4" - -gemspec path: "../"