Sha256: 79bddcef2ea1215b9d38f7a822461c4bd82621f3d5ce729e927db758da02f310

Contents?: true

Size: 869 Bytes

Versions: 2

Compression:

Stored size: 869 Bytes

Contents

module StandaloneMigrations
  class Tasks
    class << self
      def configure(options = {})
        Deprecations.new.call
        configurator = Configurator.new options
      end

      def load_tasks(options = {})
        configure(options)
        Configurator.environments_config do |proxy|
          ActiveRecord::Tasks::DatabaseTasks.database_configuration = proxy.configurations
        end
        MinimalRailtieConfig.load_tasks
        %w(
          connection
          environment
          db/new_migration
        ).each do
          |task| load "standalone_migrations/tasks/#{task}.rake"
        end
        load "active_record/railties/databases.rake"
      end
    end
  end

  class Tasks::Deprecations
    def call
      if File.directory?('db/migrations')
        puts "DEPRECATED move your migrations into db/migrate"
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
standalone_migrations-5.2.7 lib/standalone_migrations/tasks.rb
standalone_migrations-5.2.6 lib/standalone_migrations/tasks.rb