Sha256: 8552a073bd81ec5582109c3661aa8d84b32fe34facda6d58bd856ce5fae2e029
Contents?: true
Size: 1.77 KB
Versions: 14
Compression:
Stored size: 1.77 KB
Contents
require "rubygems" require 'gorgon/originator' require 'gorgon/listener' require 'gorgon/worker_manager' require 'gorgon/ping_service' require 'gorgon/gem_service' require 'gorgon/version' require 'gorgon/listener_installer' require 'gorgon/settings/initial_files_creator' WELCOME_MSG = "Welcome to Gorgon #{Gorgon::VERSION}" def start o = Originator.new o.originate end def listen l = Listener.new l.listen end def manage_workers config_path = ENV["GORGON_CONFIG_PATH"] manager = WorkerManager.build config_path manager.manage # For some reason I have to 'exit' here, otherwise WorkerManager process crashes exit end def ping_listeners PingService.new.ping_listeners end def run_gem command GemService.new.run command end def init framework Settings::InitialFilesCreator.run framework end def install_listener ListenerInstaller.install end def usage #print instructions on how to use gorgon puts "\tstart - remotely runs all tests specified in gorgon.json" puts "\tlisten - starts a listener process using the settings in gorgon_listener.json" puts "\tping - pings listeners and shows hosts and gorgon's version they are running" puts "\tinit [rails] - create initial files for current project" puts "\tinstall_listener - runs gorgon listener as a daemon process" puts "\tgem command [options...] - execute the gem command on every listener and shutdown listener. e.g. 'gorgon gem install --version 1.0.0'" end puts WELCOME_MSG case ARGV[0] when nil start when "start" start when "listen" listen when "manage_workers" manage_workers when "ping" ping_listeners when "gem" ARGV.shift run_gem ARGV.join(' ') when "help" usage when "init" init ARGV[1] when "install_listener" install_listener else puts "Unknown command!" usage exit 1 end
Version data entries
14 entries across 14 versions & 1 rubygems