Sha256: 34113001ca43cf3c64d2d2d815603cb070e80a84f68d70e78dfb85c186e7cb00
Contents?: true
Size: 865 Bytes
Versions: 3
Compression:
Stored size: 865 Bytes
Contents
module Dumper module Database class Base include Dumper::Utility::ObjectFinder attr_accessor :tmpdir, :filename def initialize(stack = nil) @stack = stack end 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 File.exist? tmpdir end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
dumper-0.3.0 | lib/dumper/database/base.rb |
dumper-0.2.2 | lib/dumper/database/base.rb |
dumper-0.2.0 | lib/dumper/database/base.rb |