Sha256: a87dd873807c9d4808e39e8905432e6a801d40285b29b887f04c8ca84e9a8d53

Contents?: true

Size: 854 Bytes

Versions: 11

Compression:

Stored size: 854 Bytes

Contents

module StandaloneMigrations
  class Tasks
    class << self
      def configure(options = {})
        Deprecations.new.call
        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

11 entries across 11 versions & 3 rubygems

Version Path
standalone_migrations-8.0.0 lib/standalone_migrations/tasks.rb
standalone_migrations-7.2.0 lib/standalone_migrations/tasks.rb
standalone_migrations-7.1.3 lib/standalone_migrations/tasks.rb
standalone_migrations-7.1.2 lib/standalone_migrations/tasks.rb
standalone_migrations-7.1.1 lib/standalone_migrations/tasks.rb
standalone_migrations_sp-7.1.1 lib/standalone_migrations/tasks.rb
cairn-7.1.1 lib/standalone_migrations/tasks.rb
cairn-7.1.0 lib/standalone_migrations/tasks.rb
standalone_migrations-7.1.0 lib/standalone_migrations/tasks.rb
standalone_migrations-6.1.0 lib/standalone_migrations/tasks.rb
standalone_migrations-6.0.0 lib/standalone_migrations/tasks.rb