From 5715b04fa8aa95438d19c2de58e93b8de78b4176 Mon Sep 17 00:00:00 2001 From: harunkumars Date: Mon, 29 Apr 2024 11:41:55 +0530 Subject: [PATCH] feature(gemspec) - specify activerecord version as a range to run a test matrix on Github Actions --- Gemfile.lock | 4 ++-- gemfiles/activerecord_6.1.gemfile | 8 ++++++++ gemfiles/activerecord_7.1.gemfile | 8 ++++++++ gemfiles/activerecord_7.2.gemfile | 8 ++++++++ rich_enums.gemspec | 3 +-- 5 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 gemfiles/activerecord_6.1.gemfile create mode 100644 gemfiles/activerecord_7.1.gemfile create mode 100644 gemfiles/activerecord_7.2.gemfile diff --git a/Gemfile.lock b/Gemfile.lock index 985ba80..eb05564 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,8 +1,8 @@ PATH remote: . specs: - rich_enums (0.1.3) - activerecord (~> 6.1) + rich_enums (0.1.4) + activerecord (>= 6.1, < 8.0) GEM remote: https://rubygems.org/ diff --git a/gemfiles/activerecord_6.1.gemfile b/gemfiles/activerecord_6.1.gemfile new file mode 100644 index 0000000..511e155 --- /dev/null +++ b/gemfiles/activerecord_6.1.gemfile @@ -0,0 +1,8 @@ +source "https://rubygems.org" + +gem "activerecord", "~> 6.1" +gem "rake", "~> 12.0" +gem "rspec", "~> 3.0" + +# Specify your gem's dependencies in rich_enums.gemspec +gemspec path: "../" diff --git a/gemfiles/activerecord_7.1.gemfile b/gemfiles/activerecord_7.1.gemfile new file mode 100644 index 0000000..8cdffb0 --- /dev/null +++ b/gemfiles/activerecord_7.1.gemfile @@ -0,0 +1,8 @@ +source "https://rubygems.org" + +gem "activerecord", "~> 7.1" +gem "rake", "~> 12.0" +gem "rspec", "~> 3.0" + +# Specify your gem's dependencies in rich_enums.gemspec +gemspec path: "../" diff --git a/gemfiles/activerecord_7.2.gemfile b/gemfiles/activerecord_7.2.gemfile new file mode 100644 index 0000000..d90f9c1 --- /dev/null +++ b/gemfiles/activerecord_7.2.gemfile @@ -0,0 +1,8 @@ +source "https://rubygems.org" + +gem "activerecord", "~> 7.2" +gem "rake", "~> 12.0" +gem "rspec", "~> 3.0" + +# Specify your gem's dependencies in rich_enums.gemspec +gemspec path: "../" diff --git a/rich_enums.gemspec b/rich_enums.gemspec index 006078c..cc1b4dc 100644 --- a/rich_enums.gemspec +++ b/rich_enums.gemspec @@ -22,10 +22,9 @@ DESC spec.metadata['source_code_uri'] = 'https://github.com/betacraft/rich_enums' spec.metadata['changelog_uri'] = 'https://github.com/betacraft/rich_enums/README.md' - spec.add_runtime_dependency 'activerecord', '~> 6.1' spec.add_development_dependency 'sqlite3', '~> 1.4' spec.add_development_dependency 'temping', '~> 4.1' - + spec.add_runtime_dependency 'activerecord', '>= 6.1', '< 8.0' # Specify which files should be added to the gem when it is released. # The `git ls-files -z` loads the files in the RubyGem that have been added into git. spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do