Skip to content

Commit

Permalink
Update dependencies to drop Ruby 3.0 and fix dependabot
Browse files Browse the repository at this point in the history
Dependabot has not been running successfully in this repository due to
the way we were specifying the Rails versions in the Gemfile. We were
using the Gemfile to set the Rails versions from an environment variable
to allow us to test against specific versions, but Dependabot was
checking the Gemfile and, not having those env vars, was failing to
determine an appropriate version to use and erroring.

The Rails version specifications have now been moved fully to the
gemspec and are configured so that if no env var is present to set a
specific Rails version, it will use the version range that was
previously specified in the gemspec.

Also drop support for EOL Ruby 3.0 and add Rails 7.2 to the test matrix
to ensure compatibility
  • Loading branch information
Tabby committed Oct 10, 2024
1 parent 3a2c572 commit 30a2a68
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ jobs:
tests:
strategy:
matrix:
ruby-version: [3.0, 3.1, 3.2, 3.3]
rails-version: [6.1, 7.0, 7.1]
ruby-version: [3.1, 3.2, 3.3]
rails-version: [6.1, 7.0, 7.1, 7.2]
runs-on: ubuntu-latest
env:
RAILS_VERSION: ${{ matrix.rails-version }}
Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.2
3.3.4
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
# v1.5.0

- Drop support for EOL Ruby 3.0
- Add support for Rails 7.2
- Fix Dependabot updates

# v1.4.0

- Update cops to use `Base` rather than `Cop` as a base class as the latter has been deprecated

# v1.3.1

- Update gc_ruboconfig development dependency to v5.0.0
Expand Down
3 changes: 0 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,3 @@ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }

# Specify your gem's dependencies in anony.gemspec
gemspec

gem "activerecord", "~> #{ENV['RAILS_VERSION']}" if ENV["RAILS_VERSION"]
gem "activesupport", "~> #{ENV['RAILS_VERSION']}" if ENV["RAILS_VERSION"]
11 changes: 8 additions & 3 deletions anony.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
end
spec.require_paths = ["lib"]

spec.required_ruby_version = ">= 3.0"
spec.required_ruby_version = ">= 3.1"

spec.add_development_dependency "bundler", "~> 2"
spec.add_development_dependency "gc_ruboconfig", "~> 5.0.0"
Expand All @@ -36,7 +36,12 @@ Gem::Specification.new do |spec|
# For integration testing
spec.add_development_dependency "sqlite3", "~> 1.6.1"

spec.add_dependency "activerecord", RAILS_VERSION_LOWER_BOUND, RAILS_VERSION_UPPER_BOUND
spec.add_dependency "activesupport", RAILS_VERSION_LOWER_BOUND, RAILS_VERSION_UPPER_BOUND
if ENV["RAILS_VERSION"]
spec.add_dependency "activerecord", "~> #{ENV['RAILS_VERSION']}"
spec.add_dependency "activesupport", "~> #{ENV['RAILS_VERSION']}"
else
spec.add_dependency "activerecord", RAILS_VERSION_LOWER_BOUND, RAILS_VERSION_UPPER_BOUND
spec.add_dependency "activesupport", RAILS_VERSION_LOWER_BOUND, RAILS_VERSION_UPPER_BOUND
end
spec.metadata["rubygems_mfa_required"] = "true"
end
2 changes: 1 addition & 1 deletion lib/anony/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module Anony
VERSION = "1.4.0"
VERSION = "1.5.0"
end

0 comments on commit 30a2a68

Please sign in to comment.