lib/resque/scheduler/cli.rb in resque-admin-scheduler-1.0.2 vs lib/resque/scheduler/cli.rb in resque-admin-scheduler-1.3.0

- old
+ new

@@ -1,10 +1,10 @@ # vim:fileencoding=utf-8 require 'optparse' -module Resque +module ResqueAdmin module Scheduler CLI_OPTIONS_ENV_MAPPING = { app_name: 'APP_NAME', background: 'BACKGROUND', dynamic: 'DYNAMIC_SCHEDULE', @@ -18,13 +18,13 @@ verbose: 'VERBOSE' }.freeze class Cli BANNER = <<-EOF.gsub(/ {6}/, '') - Usage: resque-scheduler [options] + Usage: resque_admin-scheduler [options] - Runs a resque scheduler process directly (rather than via rake). + Runs a resque_admin scheduler process directly (rather than via rake). EOF OPTIONS = [ { args: ['-n', '--app-name [APP_NAME]', @@ -112,24 +112,24 @@ require_relative 'env' runtime_env.setup end def run_forever - Resque::Scheduler.run + ResqueAdmin::Scheduler.run end private attr_reader :argv, :env def runtime_env - @runtime_env ||= Resque::Scheduler::Env.new(options) + @runtime_env ||= ResqueAdmin::Scheduler::Env.new(options) end def option_parser OptionParser.new do |opts| opts.banner = BANNER - opts.version = Resque::Scheduler::VERSION + opts.version = ResqueAdmin::Scheduler::VERSION OPTIONS.each do |opt| opts.on(*opt[:args], &opt[:callback].call(options)) end end end