Top Level Namespace
- Extended by:
- Enumerable
- Includes:
- Log4r
Defined Under Namespace
Modules: Ap4r, PostgresPR, ReliableMsg Classes: CreateTableForSaf, IRM, Mysql, Object, PGconn, ReliableMsgQueueAndTopic, TestSaf
Instance Method Summary collapse
Instance Method Details
#each(&block) ⇒ Object
–
65 66 67 |
# File 'lib/ap4r/util/irm.rb', line 65 def each(&block) Ap4r::Configuration.services.each(&block) end |
#main(args) ⇒ Object
224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 |
# File 'lib/ap4r/mongrel_ap4r.rb', line 224 def main(args) cmd_name = args.shift begin # TODO not all commands are implemented 2007/04/16 by shinohara if %w(help version start stop restart reload).include? cmd_name cmd_name = ::Ap4r::Mongrel::Command::PREFIX + cmd_name end command = GemPlugin::Manager.instance.create("/commands/#{cmd_name}", :argv => args) rescue OptionParser::InvalidOption STDERR.puts "#$! for command '#{cmd_name}'" STDERR.puts "Try #{cmd_name} -h to get help." return false rescue STDERR.puts "ERROR RUNNING '#{cmd_name}': #$!" STDERR.puts "Use help command to get help" return false end if not command.done_validating if not command.validate STDERR.puts "#{cmd_name} reported an error. Use mongrel_rails #{cmd_name} -h to get help." return false else command.run end end return true end |