Sha256: b131ebf57c36713349c6da7f54edae67ddfa7d095accc6e068bdd4256ace09e9

Contents?: true

Size: 493 Bytes

Versions: 1

Compression:

Stored size: 493 Bytes

Contents

require 'rake'
require 'rake/tasklib'

module Koine
  module Tasks
    class RailsMysqlDump < MysqlDump
      def initialize(*args)
        self.dependencies ||= [:environment]
        super(*args)
      end

      private

      def configuration
        config = super.reject { |k, v| v.nil? }
        rails_config.merge(config)
      end

      def rails_config
        env = Rails.env.to_s
        Rails.configuration.database_configuration[env].symbolize_keys
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
koine-db_bkp-0.1.1 lib/koine/tasks/rails_mysql_dump.rb