Sha256: 71224dfb729db7f6d600ff1df2460189eb993115ffefc9679adffc5704e3d673
Contents?: true
Size: 819 Bytes
Versions: 21
Compression:
Stored size: 819 Bytes
Contents
module Dumper module Database class Base include Dumper::Utility::ObjectFinder attr_accessor :tmpdir, :filename, :config def file_ext self.class::FILE_EXT end def dump_path "#{tmpdir}/#{filename}" end def dump_tool_path tool = self.class::DUMP_TOOL path = `which #{tool}`.chomp if path.empty? # /usr/local/mysql/bin = OSX binary, /usr/local/bin = homebrew, /usr/bin = linux dir = [ '/usr/local/mysql/bin', '/usr/local/bin', '/usr/bin' ].find do |i| File.exist?("#{i}/#{tool}") end path = "#{dir}/#{tool}" if dir end path end def finalize FileUtils.remove_entry_secure(tmpdir) if tmpdir and File.exist?(tmpdir) end end end end
Version data entries
21 entries across 21 versions & 1 rubygems