module NFAgent class Proxy attr_accessor :host, :port, :user, :password end class Config < SVUtil::Config @@proxy = Proxy.new def self.proxy @@proxy end class << self def validate unless dump_dir and File.exists?(dump_dir) and File.directory?(dump_dir) raise "Dump dir (#{dump_dir}) must exist and be a directory" end super end def process_options parse_options do |opts| opts.on("-k", "--client-key [key]", "Service client key") do |key| Config.client_key = key end opts.on("-l", "--debug-log [log-file]", "Debug Log File") do |log| Config.log_file = log end opts.on("-D", "--dump-dir [dir]", "Dump directory for failed chunks") do |dir| Config.dump_dir = dir end end end end end end