Class: VagrantPlugins::Solidus::Site::Run

Inherits:
Subcommand
  • Object
show all
Defined in:
lib/vagrant-solidus/site/run.rb

Constant Summary

Constants included from VagrantPlugins::Solidus::SiteHelpers

VagrantPlugins::Solidus::SiteHelpers::BASE_PORT, VagrantPlugins::Solidus::SiteHelpers::BASE_UTILS_PORT, VagrantPlugins::Solidus::SiteHelpers::DEFAULT_NODE_VERSION, VagrantPlugins::Solidus::SiteHelpers::DEFAULT_NPM_VERSION, VagrantPlugins::Solidus::SiteHelpers::PROVISION_ID, VagrantPlugins::Solidus::SiteHelpers::SITE_STATUS_WATCHER_POLLING_FREQUENCY, VagrantPlugins::Solidus::SiteHelpers::SITE_TEMPLATE_GIT_TAG, VagrantPlugins::Solidus::SiteHelpers::SITE_TEMPLATE_GIT_URL

Instance Method Summary collapse

Methods included from VagrantPlugins::Solidus::SiteHelpers

#build_site, #clone_site_template, #create_site_from_template, #directory_exists?, #fail, #find_port, #follow_site_log, #guest_exec, #help_command_line_option, #host_exec, #install_pow_site, #install_site_dependencies, #install_site_node, #install_site_node_packages, #install_site_service, #ip_address, #load_site, #log, #log_callback, #log_site_log_tail, #log_site_urls, #node_command, #node_version, #npm_version, #pow_installed?, #provisioned!, #provisioned?, #quiet_command_line_option, #save_site, #set_site_ports, #site_commands_arguments, #site_name_command_line_option, #site_responding?, #site_service_name, #site_start_command_line_options, #site_started?, #site_template_command_line_options, #site_watcher_service_name, #sites, #solidus_server_service_name, #start_site_service, #start_site_watcher, #stop_site, #stop_site_service, #uninstall_pow_site, #uninstall_site_service, #validate_site, #wait_for_site_watcher_to_stop, #wait_until_guest_directory_exists, #with_log, #with_mutex

Instance Method Details

#executeObject



18
19
20
21
22
23
24
25
# File 'lib/vagrant-solidus/site/run.rb', line 18

def execute
  with_running_vm do
    guest_exec(:log_all, "cd #{@site_guest_path} && #{node_command} #{@guest_command}")
  end

  # Command's exit status
  @last_exit_code
end

#parse_argumentsObject



7
8
9
10
11
12
13
14
15
16
# File 'lib/vagrant-solidus/site/run.rb', line 7

def parse_arguments
  extra_argv = parse_argv(1..Float::INFINITY) do |opts|
    opts.banner << " <command>"
    opts.separator "Run a command in the context of the site."
    opts.separator ""
    site_name_command_line_option(opts)
  end

  @guest_command = extra_argv.join(' ')
end