Sha256: 66172d39a5ee82e5e07109fcee5d507f60d53d2f6f27156384d505736d7fa66b
Contents?: true
Size: 1.05 KB
Versions: 43
Compression:
Stored size: 1.05 KB
Contents
#!/usr/bin/env ruby # == Synopsis # # epub: run the event publisher # # == Usage # # epub [OPTION] # # -h, --help: # show help # # -d, --debug: # turn on debug logging # # -c, --config filename # specify a configuration file # # -p, --publishers directory # specify the directory for finding publishers # # -v, --verbose # print info to the standard output require 'getoptlong' require 'rdoc/usage' require File.dirname(__FILE__) + '/../lib/refinery' options = {} opts = GetoptLong.new( [ '--help', '-h', GetoptLong::NO_ARGUMENT ], [ '--debug', '-d', GetoptLong::NO_ARGUMENT ], [ '--config', '-c', GetoptLong::REQUIRED_ARGUMENT], [ '--publishers', '-p', GetoptLong::REQUIRED_ARGUMENT], [ '--verbose', '-v', GetoptLong::NO_ARGUMENT] ) opts.each do |opt, arg| case opt when '--help' RDoc::usage when '--debug' options[:debug] = true when '--config' options[:config] = arg when '--publishers' options[:publishers] = arg when '--verbose' options[:verbose] = true end end Refinery::EventPublisher.new(options).run
Version data entries
43 entries across 43 versions & 2 rubygems