Sha256: 9ebf04b54ccedaa772bbaf014eb7fe845d3336d7d2be2f13df8c80ec15bda6a3
Contents?: true
Size: 836 Bytes
Versions: 12
Compression:
Stored size: 836 Bytes
Contents
require 'rubygems' require 'bundler/setup' $LOAD_PATH.unshift(File.dirname(__FILE__)) $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) require 'quebert' require 'quebert/logging' require 'logger' include Quebert Quebert.config.logger = Logger.new('/dev/null') # Shhh... def clean_file(path, contents=nil, &block) FileUtils.remove_entry(path) if File.exists?(path) FileUtils.mkdir_p(File.dirname(path)) begin File.open(path, 'w'){|f| f.write(contents == :empty ? nil : contents) } unless contents.nil? block.call ensure FileUtils.remove_entry(path) if File.exists?(path) and path != './' # Yeah! This has happened before :( end end Dir[File.join(File.dirname(__FILE__), 'support/*.rb')].each {|file| require file } Quebert.serializers.register 'ActiveRecord::Base', Serializer::ActiveRecord
Version data entries
12 entries across 12 versions & 1 rubygems