Skip to content

Commit

Permalink
CHANGED: Update supported Rails version to v7.2 (#87)
Browse files Browse the repository at this point in the history
* CHANGED: Update supported Rails version to v7.2

* CHANGED: Resolve ActiveRecord migratioon issue
  • Loading branch information
tarellel authored Aug 15, 2024
1 parent 626f156 commit ccdfb7d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## Unreleased

- Upgrade gemspec to support Rails v7.2

## 0.7.0

Breaking changes:
Expand Down Expand Up @@ -57,4 +61,3 @@ Fixes:

- mandatory otp fix by @cotcomsol in #68
- remove success message by @strzibny in #69

2 changes: 1 addition & 1 deletion devise-otp.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Gem::Specification.new do |gem|
gem.files = `git ls-files`.split($/)
gem.require_paths = ["lib"]

gem.add_runtime_dependency "rails", ">= 6.1", "< 7.2"
gem.add_runtime_dependency "rails", ">= 6.1", "<= 7.2"
gem.add_runtime_dependency "devise", ">= 4.8.0", "< 5.0"
gem.add_runtime_dependency "rotp", ">= 2.0.0"

Expand Down
7 changes: 6 additions & 1 deletion test/orm/active_record.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,9 @@

migrations_path = File.expand_path("../../dummy/db/migrate/", __FILE__)

ActiveRecord::MigrationContext.new(migrations_path, ActiveRecord::SchemaMigration).migrate
if Rails.version.to_f >= 7.2
ActiveRecord::MigrationContext.new(migrations_path).migrate
else
# To support order versions of Rails (pre v7.2)
ActiveRecord::MigrationContext.new(migrations_path, ActiveRecord::SchemaMigration).migrate
end

0 comments on commit ccdfb7d

Please sign in to comment.