diff options
Diffstat (limited to 'rubocop/batched_background_migrations.rb')
-rw-r--r-- | rubocop/batched_background_migrations.rb | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/rubocop/batched_background_migrations.rb b/rubocop/batched_background_migrations.rb deleted file mode 100644 index ce7115e5cd5..00000000000 --- a/rubocop/batched_background_migrations.rb +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -module RuboCop - class BatchedBackgroundMigrations - DICTIONARY_BASE_DIR = 'db/docs/batched_background_migrations' - - attr_reader :queued_migration_version - - class << self - def dictionary_data - @dictionary_data ||= Dir.glob("*.yml", base: DICTIONARY_BASE_DIR).each_with_object({}) do |file_name, data| - dictionary = YAML.load_file(File.join(DICTIONARY_BASE_DIR, file_name)) - - next unless dictionary['queued_migration_version'].present? - - data[dictionary['queued_migration_version'].to_s] = { - finalize_after: dictionary['finalize_after'], - finalized_by: dictionary['finalized_by'].to_s - } - end - end - end - - def initialize(queued_migration_version) - @queued_migration_version = queued_migration_version - end - - def finalized_by - self.class.dictionary_data.dig(queued_migration_version.to_s, :finalized_by) - end - end -end |