From 704d40c67794649c80f5bd143e42f225b81f2701 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Bi=C3=9F?= Date: Thu, 22 May 2025 14:15:47 +0200 Subject: [PATCH] Add gemfiles for activerecord 7.1 and 7.2, add ruby 3.2 and 3.3 --- .github/workflows/prs.yml | 16 ++++++++++++++-- gemfiles/Gemfile.activesupport-7.1 | 4 ++++ gemfiles/Gemfile.activesupport-7.2 | 4 ++++ lib/schema_dev/version.rb | 2 +- schema_dev.gemspec | 2 +- .../gemfiles/activerecord-7.1/Gemfile.base.erb | 4 ++++ .../gemfiles/activerecord-7.1/Gemfile.mysql2.erb | 10 ++++++++++ .../activerecord-7.1/Gemfile.postgresql.erb | 10 ++++++++++ .../activerecord-7.1/Gemfile.sqlite3.erb | 10 ++++++++++ .../gemfiles/activerecord-7.2/Gemfile.base.erb | 4 ++++ .../gemfiles/activerecord-7.2/Gemfile.mysql2.erb | 10 ++++++++++ .../activerecord-7.2/Gemfile.postgresql.erb | 10 ++++++++++ .../activerecord-7.2/Gemfile.sqlite3.erb | 10 ++++++++++ 13 files changed, 92 insertions(+), 4 deletions(-) create mode 100644 gemfiles/Gemfile.activesupport-7.1 create mode 100644 gemfiles/Gemfile.activesupport-7.2 create mode 100644 templates/gemfiles/activerecord-7.1/Gemfile.base.erb create mode 100644 templates/gemfiles/activerecord-7.1/Gemfile.mysql2.erb create mode 100644 templates/gemfiles/activerecord-7.1/Gemfile.postgresql.erb create mode 100644 templates/gemfiles/activerecord-7.1/Gemfile.sqlite3.erb create mode 100644 templates/gemfiles/activerecord-7.2/Gemfile.base.erb create mode 100644 templates/gemfiles/activerecord-7.2/Gemfile.mysql2.erb create mode 100644 templates/gemfiles/activerecord-7.2/Gemfile.postgresql.erb create mode 100644 templates/gemfiles/activerecord-7.2/Gemfile.sqlite3.erb diff --git a/.github/workflows/prs.yml b/.github/workflows/prs.yml index 34dd1ec..833549e 100644 --- a/.github/workflows/prs.yml +++ b/.github/workflows/prs.yml @@ -16,17 +16,29 @@ jobs: strategy: fail-fast: false matrix: - ruby: ['2.5', '2.6', '2.7', '3.0', '3.1'] - activesupport: ['5.2', '6.0', '6.1', '7.0'] + ruby: ['2.5', '2.6', '2.7', '3.0', '3.1', '3.2', '3.3'] + activesupport: ['5.2', '6.0', '6.1', '7.0', '7.1', '7.2'] exclude: - ruby: '2.5' activesupport: '7.0' - ruby: '2.6' activesupport: '7.0' + - ruby: '2.5' + activesupport: '7.1' + - ruby: '2.6' + activesupport: '7.1' + - ruby: '2.5' + activesupport: '7.2' + - ruby: '2.6' + activesupport: '7.2' - ruby: '3.0' activesupport: '5.2' - ruby: '3.1' activesupport: '5.2' + - ruby: '3.2' + activesupport: '5.2' + - ruby: '3.3' + activesupport: '5.2' env: BUNDLE_GEMFILE: "${{ github.workspace }}/gemfiles/Gemfile.activesupport-${{ matrix.activesupport }}" steps: diff --git a/gemfiles/Gemfile.activesupport-7.1 b/gemfiles/Gemfile.activesupport-7.1 new file mode 100644 index 0000000..42c23e6 --- /dev/null +++ b/gemfiles/Gemfile.activesupport-7.1 @@ -0,0 +1,4 @@ +base_gemfile = File.expand_path('../Gemfile.base', __FILE__) +eval File.read(base_gemfile) + +gem "activerecord", ">= 7.1", "< 7.2" diff --git a/gemfiles/Gemfile.activesupport-7.2 b/gemfiles/Gemfile.activesupport-7.2 new file mode 100644 index 0000000..a6743fe --- /dev/null +++ b/gemfiles/Gemfile.activesupport-7.2 @@ -0,0 +1,4 @@ +base_gemfile = File.expand_path('../Gemfile.base', __FILE__) +eval File.read(base_gemfile) + +gem "activerecord", ">= 7.2", "< 7.3" diff --git a/lib/schema_dev/version.rb b/lib/schema_dev/version.rb index 1d1c442..828ba1f 100644 --- a/lib/schema_dev/version.rb +++ b/lib/schema_dev/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module SchemaDev - VERSION = '4.2.0' + VERSION = '4.2.1' end diff --git a/schema_dev.gemspec b/schema_dev.gemspec index 469a793..81fe06b 100644 --- a/schema_dev.gemspec +++ b/schema_dev.gemspec @@ -21,7 +21,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = '>= 2.5.0' - gem.add_dependency 'activesupport', '>= 5.2', '< 7.1' + gem.add_dependency 'activesupport', '>= 5.2', '< 7.3' gem.add_dependency 'faraday', '~> 1.0' gem.add_dependency 'simplecov' gem.add_dependency 'simplecov-lcov', '~> 0.8.0' diff --git a/templates/gemfiles/activerecord-7.1/Gemfile.base.erb b/templates/gemfiles/activerecord-7.1/Gemfile.base.erb new file mode 100644 index 0000000..8d5ea3b --- /dev/null +++ b/templates/gemfiles/activerecord-7.1/Gemfile.base.erb @@ -0,0 +1,4 @@ +base_gemfile = File.expand_path('../../Gemfile.base', __FILE__) +eval File.read(base_gemfile) + +gem "activerecord", ">= 7.1", "< 7.2" diff --git a/templates/gemfiles/activerecord-7.1/Gemfile.mysql2.erb b/templates/gemfiles/activerecord-7.1/Gemfile.mysql2.erb new file mode 100644 index 0000000..832c90b --- /dev/null +++ b/templates/gemfiles/activerecord-7.1/Gemfile.mysql2.erb @@ -0,0 +1,10 @@ +base_gemfile = File.expand_path('../Gemfile.base', __FILE__) +eval File.read(base_gemfile), binding, base_gemfile + +platform :ruby do + gem "mysql2" +end + +platform :jruby do + gem 'activerecord-jdbcmysql-adapter' +end diff --git a/templates/gemfiles/activerecord-7.1/Gemfile.postgresql.erb b/templates/gemfiles/activerecord-7.1/Gemfile.postgresql.erb new file mode 100644 index 0000000..1716cd8 --- /dev/null +++ b/templates/gemfiles/activerecord-7.1/Gemfile.postgresql.erb @@ -0,0 +1,10 @@ +base_gemfile = File.expand_path('../Gemfile.base', __FILE__) +eval File.read(base_gemfile), binding, base_gemfile + +platform :ruby do + gem "pg" +end + +platform :jruby do + gem 'activerecord-jdbcpostgresql-adapter' +end diff --git a/templates/gemfiles/activerecord-7.1/Gemfile.sqlite3.erb b/templates/gemfiles/activerecord-7.1/Gemfile.sqlite3.erb new file mode 100644 index 0000000..3d85216 --- /dev/null +++ b/templates/gemfiles/activerecord-7.1/Gemfile.sqlite3.erb @@ -0,0 +1,10 @@ +base_gemfile = File.expand_path('../Gemfile.base', __FILE__) +eval File.read(base_gemfile), binding, base_gemfile + +platform :ruby do + gem "sqlite3" +end + +platform :jruby do + gem 'activerecord-jdbcsqlite3-adapter', '>=1.3.0.beta2' +end diff --git a/templates/gemfiles/activerecord-7.2/Gemfile.base.erb b/templates/gemfiles/activerecord-7.2/Gemfile.base.erb new file mode 100644 index 0000000..df3d47f --- /dev/null +++ b/templates/gemfiles/activerecord-7.2/Gemfile.base.erb @@ -0,0 +1,4 @@ +base_gemfile = File.expand_path('../../Gemfile.base', __FILE__) +eval File.read(base_gemfile) + +gem "activerecord", ">= 7.2", "< 7.3" diff --git a/templates/gemfiles/activerecord-7.2/Gemfile.mysql2.erb b/templates/gemfiles/activerecord-7.2/Gemfile.mysql2.erb new file mode 100644 index 0000000..832c90b --- /dev/null +++ b/templates/gemfiles/activerecord-7.2/Gemfile.mysql2.erb @@ -0,0 +1,10 @@ +base_gemfile = File.expand_path('../Gemfile.base', __FILE__) +eval File.read(base_gemfile), binding, base_gemfile + +platform :ruby do + gem "mysql2" +end + +platform :jruby do + gem 'activerecord-jdbcmysql-adapter' +end diff --git a/templates/gemfiles/activerecord-7.2/Gemfile.postgresql.erb b/templates/gemfiles/activerecord-7.2/Gemfile.postgresql.erb new file mode 100644 index 0000000..1716cd8 --- /dev/null +++ b/templates/gemfiles/activerecord-7.2/Gemfile.postgresql.erb @@ -0,0 +1,10 @@ +base_gemfile = File.expand_path('../Gemfile.base', __FILE__) +eval File.read(base_gemfile), binding, base_gemfile + +platform :ruby do + gem "pg" +end + +platform :jruby do + gem 'activerecord-jdbcpostgresql-adapter' +end diff --git a/templates/gemfiles/activerecord-7.2/Gemfile.sqlite3.erb b/templates/gemfiles/activerecord-7.2/Gemfile.sqlite3.erb new file mode 100644 index 0000000..3d85216 --- /dev/null +++ b/templates/gemfiles/activerecord-7.2/Gemfile.sqlite3.erb @@ -0,0 +1,10 @@ +base_gemfile = File.expand_path('../Gemfile.base', __FILE__) +eval File.read(base_gemfile), binding, base_gemfile + +platform :ruby do + gem "sqlite3" +end + +platform :jruby do + gem 'activerecord-jdbcsqlite3-adapter', '>=1.3.0.beta2' +end