Sha256: 713ea7f4cbf5991e0a4a03df1f66a9b81b2cca5fd133a1f07bbd05e7c33ef20c

Contents?: true

Size: 978 Bytes

Versions: 6

Compression:

Stored size: 978 Bytes

Contents

# coding: utf-8
# frozen_string_literal: true

module Stealth
  module Migrations
    class Tasks

      class << self
        def configure
          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.rb", with: configurator.seeds
        end

        def load_tasks
          configure

          Configurator.environments_config do |proxy|
            ActiveRecord::Tasks::DatabaseTasks.database_configuration = proxy.configurations
          end

          RailtieConfig.load_tasks

          # %w(
          #   connection
          #   environment
          #   db/new_migration
          # ).each do
          #   |task| load "stealth/migrations/tasks/#{task}.rake"
          # end

          load "active_record/railties/databases.rake"
        end
      end

    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
stealth-1.0.4 lib/stealth/migrations/tasks.rb
stealth-1.0.3 lib/stealth/migrations/tasks.rb
stealth-1.0.2 lib/stealth/migrations/tasks.rb
stealth-1.0.1 lib/stealth/migrations/tasks.rb
stealth-1.0.0 lib/stealth/migrations/tasks.rb
stealth-1.0.0.rc1 lib/stealth/migrations/tasks.rb