Sha256: bc02b57bc73641bd7bfbd4d9a88a9257e6fee1aaf771eb1e9091f15888e61be2
Contents?: true
Size: 1.02 KB
Versions: 23
Compression:
Stored size: 1.02 KB
Contents
class Chouette::FileValidator attr_reader :schema, :database, :user, :password, :host def initialize(schema) @schema = schema Chouette::ActiveRecord.connection_pool.spec.config.tap do |config| @database = config[:database] @user = config[:username] @password = config[:password] @host = (config[:host] or "localhost") end end def self.chouette_command=(command) Chouette::Command.command = command end class << self deprecate :chouette_command= => "Use Chouette::Command.command =" end def chouette_command @chouette_command ||= Chouette::Command.new(:schema => schema) end def validate(file, options = {}) options = { :format => :neptune }.merge(options) command_options = { :c => "validate", :o => "line", :input_file => File.expand_path(file), :optimize_memory => true }.merge(options) logger.info "Validate #{file}" chouette_command.run! command_options end include Chouette::CommandLineSupport end
Version data entries
23 entries across 23 versions & 1 rubygems