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

.configure(options = {}) ⇒ Object



4
5
6
7
# File 'lib/standalone_migrations/tasks.rb', line 4

def configure(options = {})
  Deprecations.new.call
  Configurator.new options
end

.load_tasks(options = {}) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/standalone_migrations/tasks.rb', line 9

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