From 96bf315855d7dd7a9d6304c0f3640714c1532466 Mon Sep 17 00:00:00 2001 From: Shinichi Maeshima Date: Thu, 23 Jan 2025 17:52:43 +0900 Subject: [PATCH 1/4] Add Rails7.2, 8.0 and Ruby 3.4 to CI matrix Also updated actions/checkout to the latest v4. --- .github/workflows/CI.yml | 44 ++++++++++++++++++++++++---------------- 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 74c380a..434df2f 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -13,27 +13,37 @@ jobs: strategy: fail-fast: false matrix: - active_record: - - '6.0' - - '6.1' - - '7.0' - - '7.1' - ruby: - - '2.7' - - '3.0' - - '3.1' - - '3.2' include: - - active_record: '5.1' - ruby: '2.7' - - active_record: '5.2' - ruby: '2.7' - - active_record: '7.1' - ruby: '3.3' + - { active_record: '5.1', ruby: '2.7' } + - { active_record: '5.2', ruby: '2.7' } + - { active_record: '6.0', ruby: '2.7' } + - { active_record: '6.0', ruby: '3.0' } + - { active_record: '6.0', ruby: '3.1' } + - { active_record: '6.0', ruby: '3.2' } + - { active_record: '6.1', ruby: '2.7' } + - { active_record: '6.1', ruby: '3.0' } + - { active_record: '6.1', ruby: '3.1' } + - { active_record: '6.1', ruby: '3.2' } + - { active_record: '7.0', ruby: '2.7' } + - { active_record: '7.0', ruby: '3.0' } + - { active_record: '7.0', ruby: '3.1' } + - { active_record: '7.0', ruby: '3.2' } + - { active_record: '7.1', ruby: '2.7' } + - { active_record: '7.1', ruby: '3.0' } + - { active_record: '7.1', ruby: '3.1' } + - { active_record: '7.1', ruby: '3.2' } + - { active_record: '7.1', ruby: '3.3' } + - { active_record: '7.2', ruby: '3.1' } + - { active_record: '7.2', ruby: '3.2' } + - { active_record: '7.2', ruby: '3.3' } + - { active_record: '7.2', ruby: '3.4' } + - { active_record: '8.0', ruby: '3.2' } + - { active_record: '8.0', ruby: '3.3' } + - { active_record: '8.0', ruby: '3.4' } env: ACTIVERECORD: ${{ matrix.active_record }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Ruby uses: ruby/setup-ruby@v1 with: From 71b586245e45e685cd5d90383ff931c3cf683976 Mon Sep 17 00:00:00 2001 From: Shinichi Maeshima Date: Thu, 23 Jan 2025 18:23:10 +0900 Subject: [PATCH 2/4] Fix CI failures for Rails 6.0 to 7.0. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The CI failures for Rails 6.0 to 7.0 are caused by changes introduced in concurrent-ruby v1.3.5. ref: [Rails 7.0.8 fails to create an app with most recent concurrent-ruby version · Issue #54260 · rails/rails](https://github.com/rails/rails/issues/54260) Update concurrent-ruby to a version below 1.3.5 to fix the tests. --- Gemfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Gemfile b/Gemfile index fa75df1..3118e7f 100644 --- a/Gemfile +++ b/Gemfile @@ -1,3 +1,5 @@ source 'https://rubygems.org' gemspec + +gem "concurrent-ruby", "< 1.3.5" From bf354d36d75e34c96b95a2718e59c9a180621992 Mon Sep 17 00:00:00 2001 From: Shinichi Maeshima Date: Thu, 23 Jan 2025 18:30:39 +0900 Subject: [PATCH 3/4] Set the sqlite3 version to 2.1.0 or higher for Rails 8.0. To run CI with Rails 8.0, sqlite3 version 2.1.0 or higher is required. --- attr_encrypted.gemspec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/attr_encrypted.gemspec b/attr_encrypted.gemspec index a556d41..c676024 100644 --- a/attr_encrypted.gemspec +++ b/attr_encrypted.gemspec @@ -42,7 +42,11 @@ Gem::Specification.new do |s| s.add_development_dependency('activerecord-jdbcsqlite3-adapter') s.add_development_dependency('jdbc-sqlite3', '< 3.8.7') # 3.8.7 is nice and broke else - s.add_development_dependency('sqlite3', '= 1.5.4') + if ENV['ACTIVERECORD'] && Gem::Version.new(ENV['ACTIVERECORD']) >= Gem::Version.new('8.0') + s.add_development_dependency('sqlite3', '> 2.1.0') + else + s.add_development_dependency('sqlite3', '= 1.5.4') + end end s.add_development_dependency('dm-sqlite-adapter') s.add_development_dependency('pry') From 515f862df44c3cf951e6cec59557506c7cfe3726 Mon Sep 17 00:00:00 2001 From: Shinichi Maeshima Date: Thu, 23 Jan 2025 18:16:15 +0900 Subject: [PATCH 4/4] Remove the unused dm-sqlite-adapter dm-sqlite-adapter is a SQLite adapter for DataMapper. https://github.com/datamapper/dm-sqlite-adapter Since support for DataMapper was dropped in version 4.1.0, this gem is no longer needed as a dependency. --- attr_encrypted.gemspec | 1 - 1 file changed, 1 deletion(-) diff --git a/attr_encrypted.gemspec b/attr_encrypted.gemspec index c676024..8dd52ec 100644 --- a/attr_encrypted.gemspec +++ b/attr_encrypted.gemspec @@ -48,7 +48,6 @@ Gem::Specification.new do |s| s.add_development_dependency('sqlite3', '= 1.5.4') end end - s.add_development_dependency('dm-sqlite-adapter') s.add_development_dependency('pry') s.add_development_dependency('simplecov') s.add_development_dependency('simplecov-rcov')