Class | RHC::Wizard |
In: |
lib/rhc/wizard.rb
|
Parent: | Object |
DEFAULT_MAX_LENGTH | = | 16 |
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] + CONFIG_STAGES + KEY_STAGES + TEST_STAGES + NAMESPACE_STAGES + APP_STAGES + [:finalize_stage] |
auth | [RW] | |
config | [R] | |
options | [R] | |
rest_client | [R] | |
rest_client | [W] | |
user | [RW] |
Running the setup wizard may change the contents of opts and config if the create_config_stage completes successfully.
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
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.