Sha256: 0203abf075e2944721ed2dcae2161fc5c50b76456a78101a919f418f7d4ea18e

Contents?: true

Size: 530 Bytes

Versions: 5

Compression:

Stored size: 530 Bytes

Contents

require 'rake'

module PhobosDBCheckpoint
  module Tasks
    extend Rake::DSL if defined? Rake::DSL

    namespace :db do
      task :environment do
        PhobosDBCheckpoint.configure
      end

      task :load_config do
        PhobosDBCheckpoint.load_db_config
        task_db_config = Hash[PhobosDBCheckpoint.env, PhobosDBCheckpoint.db_config.merge('pool' => 1)]
        ActiveRecord::Tasks::DatabaseTasks.database_configuration = task_db_config
      end
    end

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

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
phobos_db_checkpoint-3.1.0 lib/phobos_db_checkpoint/tasks.rb
phobos_db_checkpoint-3.0.0 lib/phobos_db_checkpoint/tasks.rb
phobos_db_checkpoint-2.4.0 lib/phobos_db_checkpoint/tasks.rb
phobos_db_checkpoint-2.3.1 lib/phobos_db_checkpoint/tasks.rb
phobos_db_checkpoint-2.3.0 lib/phobos_db_checkpoint/tasks.rb