Skip to content

Commit

Permalink
Add support for unsupported versions
Browse files Browse the repository at this point in the history
  • Loading branch information
inkstak committed Aug 27, 2024
1 parent a1c615e commit 952ddb7
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 10 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
# TODO: we should test only supported versions: https://endoflife.date/ruby
ruby-version: [ '2.7', '3.0', '3.1', '3.2', '3.3', 'head' ]

steps:
Expand Down
19 changes: 12 additions & 7 deletions Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,23 @@ end
# Supported versions of Rails:
# https://endoflife.date/rails
#
appraise "rails-6.1" do
gem "activesupport", "~> 7.0.x"
if Gem::Version.new(RUBY_VERSION) <= Gem::Version.new("3.0")
appraise "rails-6.1" do
gem "activesupport", "~> 6.1.x"
gem "sqlite3", "~> 1.4.0"
end
end

appraise "rails-7.0" do
gem "activesupport", "~> 7.0.x"
end

appraise "rails-7.1" do
gem "activesupport", "~> 7.1.x"
end
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("3.1")
appraise "rails-7.1" do
gem "activesupport", "~> 7.1.x"
end

appraise "rails-7.2" do
gem "activesupport", "~> 7.2.x"
appraise "rails-7.2" do
gem "activesupport", "~> 7.2.x"
end
end
8 changes: 6 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,9 @@ gemspec

gem "gem-release"
gem "simplecov_json_formatter"
gem "sqlite3"
gem "amazing_print"

if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("3.1")
gem "activesupport", ">= 5.0", "< 7.1"
gem "activerecord", ">= 5.0", "< 7.1"
gem "sqlite3", "~> 1.4.0"
end
2 changes: 1 addition & 1 deletion caoutsearch.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Gem::Specification.new do |s|
s.files = Dir["lib/**/*"] + %w[LICENSE README.md]
s.require_paths = ["lib"]

s.add_dependency "activesupport", ">= 5.0"
s.add_dependency "activesupport", ">= 6.1"
s.add_dependency "elasticsearch", "~> 8.x"
s.add_dependency "hashie", "~> 5.0"
s.add_dependency "multi_json", "~> 1.15"
Expand Down

0 comments on commit 952ddb7

Please sign in to comment.