Class RHC::Wizard
In: lib/rhc/wizard.rb
Parent: Object

Methods

Included Modules

HighLine::SystemExtensions RHC::Helpers RHC::SSHHelpers RHC::GitHelpers RHC::CartridgeHelpers RHC::ServerHelpers

Constants

DEFAULT_MAX_LENGTH = 16
SERVER_STAGES = [ :server_stage, ]
CONFIG_STAGES = [ :login_stage, :create_config_stage, ]
KEY_STAGES = [ :config_ssh_key_stage, :upload_ssh_key_stage, ]
TEST_STAGES = [ :install_client_tools_stage, :setup_test_stage, ]
NAMESPACE_STAGES = [ :config_namespace_stage, ]
APP_STAGES = [ :show_app_info_stage, ]
STAGES = [:greeting_stage] + SERVER_STAGES + CONFIG_STAGES + KEY_STAGES + TEST_STAGES + NAMESPACE_STAGES + APP_STAGES + [:finalize_stage]

Attributes

auth  [RW] 
config  [R] 
options  [R] 
rest_client  [R] 
rest_client  [W] 
servers  [R] 
user  [RW] 

Public Class methods

Running the setup wizard may change the contents of opts and config if the create_config_stage completes successfully.

Public Instance methods

Public: Runs the setup wizard to make sure ~/.openshift and ~/.ssh are correct

Examples

 wizard.run()
 # => true

Returns nil on failure or true on success

Protected Instance methods

clear SSH key cache

given the base name and the maximum length, find a name that does not clash with what is in opts[:keys]

Alert the user that they should manually install tools if they are not currently available

Unix Tools:

 git

Windows Tools:

 msysgit (Git for Windows)
 TortoiseGIT (Windows Explorer integration)

Perform basic tests to ensure that setup is sane search for private methods starting with "test_" and execute them in alphabetical order NOTE: The order itself is not important—the tests should be independent. However, the hash order is unpredictable in Ruby 1.8, and is preserved in 1.9. There are two similar tests that can fail under the same conditions, and this makes the spec results inconsistent between 1.8 and 1.9. Thus, we force an order with sort to ensure spec passage on both.

return true if the account has the public key defined by RHC::Config::ssh_pub_key_file_path

cache SSH keys from the REST client

tests for specific user errors

test connectivity an app

[Validate]