def parse(argv)
      parser        = OptionParser.new do |o|
        o.on('-c',
             '--count COUNT',
             'Count of jobs to enqueue') do |arg|
          self.count = arg.to_i
        end
        o.on('-m',
             '--mongo MONGO_CONFIG_FILE_NAME',
             'Path and filename of config file. Default: config/mongoid.yml') do |arg|
          self.mongo_config = arg
        end
        o.on('-e',
             '--environment ENVIRONMENT',
             'The environment to run the app on (Default: RAILS_ENV || RACK_ENV || development)') do |arg|
          self.environment = arg
        end
      end
      parser.banner = 'rocketjob_perf <options>'
      parser.on_tail '-h', '--help', 'Show help' do
        puts parser
        exit 1
      end
      parser.parse! argv
    end
def parse(argv)
      parser        = OptionParser.new do |o|
        o.on('-c',
             '--count COUNT',
             'Count of jobs to enqueue') do |arg|
          self.count = arg.to_i
        end
        o.on('-m',
             '--mongo MONGO_CONFIG_FILE_NAME',
             'Path and filename of config file. Default: config/mongoid.yml') do |arg|
          self.mongo_config = arg
        end
        o.on('-e',
             '--environment ENVIRONMENT',
             'The environment to run the app on (Default: RAILS_ENV || RACK_ENV || development)') do |arg|
          self.environment = arg
        end
      end
      parser.banner = 'rocketjob_perf <options>'
      parser.on_tail '-h', '--help', 'Show help' do
        puts parser
        exit 1
      end
      parser.parse! argv
    end
Parse command line options