Sha256: 999ded749a22889ea75ab4ebcbf6d40eaef082a5a97c2e0443b581d7473789a4
Contents?: true
Size: 1007 Bytes
Versions: 8
Compression:
Stored size: 1007 Bytes
Contents
#!/usr/bin/env ruby require 'pry' Pry.config.prompt = proc { "robi> " } command_set = Pry::CommandSet.new do block_command "start", "Start all robots working" do if defined?(Artoo::MainRobot) output.puts "Starting main robot..." Artoo::MainRobot.work! unless Artoo::MainRobot.is_running? else output.puts "Starting robots..." end Celluloid::Actor[:master].start_work end block_command "pause", "Pause all robots" do output.puts "Pausing robots..." Celluloid::Actor[:master].pause_work end block_command "continue", "Continue all robots" do output.puts "Continuing robots..." Celluloid::Actor[:master].continue_work end block_command "stop", "Stop all robots" do output.puts "Stopping robots..." Celluloid::Actor[:master].stop_work end block_command "list", "List all robots" do output.puts Celluloid::Actor[:master].robots end end Pry::Commands.import command_set ENV["ARTOO_CLI"] = 'true' require ARGV[0] Pry.start
Version data entries
8 entries across 8 versions & 1 rubygems