Sha256: 87c5741451eb026ac0733e1eac90f390de844ea5fbe048251e382fd54e7b9c51

Contents?: true

Size: 1 KB

Versions: 17

Compression:

Stored size: 1 KB

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
          return unless defined?(ActiveRecord)

          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

17 entries across 17 versions & 1 rubygems

Version Path
stealth-2.0.0.beta7 lib/stealth/migrations/tasks.rb
stealth-2.0.0.beta6 lib/stealth/migrations/tasks.rb
stealth-2.0.0.beta5 lib/stealth/migrations/tasks.rb
stealth-2.0.0.beta4 lib/stealth/migrations/tasks.rb
stealth-2.0.0.beta3 lib/stealth/migrations/tasks.rb
stealth-2.0.0.beta2 lib/stealth/migrations/tasks.rb
stealth-2.0.0.beta1 lib/stealth/migrations/tasks.rb
stealth-1.1.6 lib/stealth/migrations/tasks.rb
stealth-1.1.5 lib/stealth/migrations/tasks.rb
stealth-1.1.4 lib/stealth/migrations/tasks.rb
stealth-1.1.3 lib/stealth/migrations/tasks.rb
stealth-1.1.2 lib/stealth/migrations/tasks.rb
stealth-1.1.1 lib/stealth/migrations/tasks.rb
stealth-1.1.0 lib/stealth/migrations/tasks.rb
stealth-1.1.0.rc3 lib/stealth/migrations/tasks.rb
stealth-1.1.0.rc2 lib/stealth/migrations/tasks.rb
stealth-1.1.0.rc1 lib/stealth/migrations/tasks.rb