Class: StandaloneMigrations::Tasks

Inherits:
Object
  • Object
show all
Defined in:
lib/standalone_migrations/tasks.rb

Defined Under Namespace

Classes: Deprecations

Class Method Summary collapse

Class Method Details

.configureObject



4
5
6
7
8
9
10
11
# File 'lib/standalone_migrations/tasks.rb', line 4

def configure
  Deprecations.new.call
  configurator = Configurator.new
  paths = Rails.application.config.paths
  paths.add "config/database", :with => configurator.config
  paths.add "db/migrate", :with => configurator.migrate_dir
  paths.add "db/seeds", :with => configurator.seeds
end

.load_tasksObject



13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/standalone_migrations/tasks.rb', line 13

def load_tasks
  configure
  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