class NdrDevSupport::RakeCI::CommitCop::RenamedMigration
This cop checks for renamed migrations that change timestamp
Public Instance Methods
Source
# File lib/ndr_dev_support/rake_ci/commit_cop/renamed_migration.rb, line 10 def check(changes) renamed_migrations = changes[:renamed].select(&migration_file?) return if renamed_migrations.all? do |old_file, new_file| File.basename(old_file)[0, 14] == File.basename(new_file)[0, 14] end attachment(:danger, 'Renamed Migration', 'Migrations should not change timestamp') end