Skip to content

Commit c9a5825

Browse files
committed
Add Rails 7.2 to CI
1 parent 5851156 commit c9a5825

File tree

4 files changed

+11
-7
lines changed

4 files changed

+11
-7
lines changed

.github/workflows/test.yml

+3
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ jobs:
3636
- ruby: "3.3"
3737
env:
3838
RAILS_VERSION: "7.1"
39+
- ruby: "3.3"
40+
env:
41+
RAILS_VERSION: "7.2"
3942
### STORAGE METHOD TESTING
4043
- ruby: 3.3
4144
db_gem: "sqlite3"

.gitignore

+1-2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,5 @@ Gemfile.lock
1515
/tmp/
1616
/test/**/tmp/
1717

18-
test/dummy_app/**/*.sqlite3.db
19-
test/dummy_app/**/*.sqlite3
18+
test/dummy_app/**/*.sqlite*
2019
test/dummy_app/**/*.log

lib/active_snapshot/models/concerns/snapshots_concern.rb

+5-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@ def create_snapshot!(legacy_identifier=nil, identifier: nil, user: nil, metadata
1212
if identifier.nil? && legacy_identifier
1313
identifier = legacy_identifier
1414

15-
ActiveSupport::Deprecation.warn(LEGACY_POSITIONAL_ARGUMENT_WARNING)
15+
if ActiveSupport.version >= Gem::Version.new("7.1")
16+
ActiveSupport::Deprecation.new.warn(LEGACY_POSITIONAL_ARGUMENT_WARNING)
17+
else
18+
ActiveSupport::Deprecation.warn(LEGACY_POSITIONAL_ARGUMENT_WARNING)
19+
end
1620
end
1721

1822
snapshot = snapshots.create!({

test/test_helper.rb

+2-4
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,10 @@ class ActiveSupport::TestCase
5151
require "minitest/autorun"
5252

5353
# Run any available migration
54-
if ActiveRecord.gem_version >= Gem::Version.new("6.0")
54+
if ActiveRecord::VERSION::MAJOR == 6
5555
ActiveRecord::MigrationContext.new(File.expand_path("dummy_app/db/migrate/", __dir__), ActiveRecord::SchemaMigration).migrate
56-
elsif ActiveRecord.gem_version >= Gem::Version.new("5.2")
57-
ActiveRecord::MigrationContext.new(File.expand_path("dummy_app/db/migrate/", __dir__)).migrate
5856
else
59-
ActiveRecord::Migrator.migrate File.expand_path("dummy_app/db/migrate/", __dir__)
57+
ActiveRecord::MigrationContext.new(File.expand_path("dummy_app/db/migrate/", __dir__)).migrate
6058
end
6159

6260
require 'rspec/mocks'

0 commit comments

Comments
 (0)