Class: Polyrun::CLI
- Inherits:
-
Object
show all
- Includes:
- CoverageCommands, DatabaseCommands, EnvCommands, Helpers, InitCommand, PlanCommand, PrepareCommand, QueueCommand, QuickCommand, ReportCommands, RunShardsCommand, TimingCommand
- Defined in:
- lib/polyrun/cli.rb,
lib/polyrun/cli/helpers.rb,
lib/polyrun/cli/env_commands.rb,
lib/polyrun/cli/init_command.rb,
lib/polyrun/cli/plan_command.rb,
lib/polyrun/cli/queue_command.rb,
lib/polyrun/cli/quick_command.rb,
lib/polyrun/cli/prepare_recipe.rb,
lib/polyrun/cli/run_shards_run.rb,
lib/polyrun/cli/timing_command.rb,
lib/polyrun/cli/prepare_command.rb,
lib/polyrun/cli/report_commands.rb,
lib/polyrun/cli/start_bootstrap.rb,
lib/polyrun/cli/coverage_commands.rb,
lib/polyrun/cli/coverage_merge_io.rb,
lib/polyrun/cli/database_commands.rb,
lib/polyrun/cli/run_shards_command.rb,
lib/polyrun/cli/run_shards_planning.rb,
lib/polyrun/cli/run_shards_plan_options.rb,
lib/polyrun/cli/run_shards_plan_boot_phases.rb
Defined Under Namespace
Modules: CoverageCommands, CoverageMergeIo, DatabaseCommands, EnvCommands, Helpers, InitCommand, PlanCommand, PrepareCommand, PrepareRecipe, QueueCommand, QuickCommand, ReportCommands, RunShardsCommand, RunShardsPlanBootPhases, RunShardsPlanOptions, RunShardsPlanning, RunShardsRun, StartBootstrap, TimingCommand
Constant Summary
Constants included
from InitCommand
InitCommand::INIT_PROFILES
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.run(argv = ARGV) ⇒ Object
31
32
33
|
# File 'lib/polyrun/cli.rb', line 31
def self.run(argv = ARGV)
new.run(argv)
end
|
Instance Method Details
#run(argv) ⇒ Object
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
# File 'lib/polyrun/cli.rb', line 35
def run(argv)
argv = argv.dup
config_path = parse_global_cli!(argv)
return config_path if config_path.is_a?(Integer)
command = argv.shift
if command.nil?
print_help
return 0
end
Polyrun::Debug.log_kv(
command: command,
cwd: Dir.pwd,
polyrun_config: config_path,
argv_rest: argv.dup,
verbose: @verbose
)
dispatch_cli_command(command, argv, config_path)
end
|