Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update prompt text #158

Merged
merged 3 commits into from
Feb 1, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/tugboat/middleware/ask_for_credentials.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ def call(env)
client_key = ask "Enter your client key:"
api_key = ask "Enter your API key:"
ssh_key_path = ask "Enter your SSH key path (optional, defaults to ~/.ssh/id_rsa):"
ssh_user = ask "Enter your SSH user (optional, defaults to #{ENV['USER']}):"
ssh_user = ask "Enter your SSH user (optional, defaults to root):"
ssh_port = ask "Enter your SSH port number (optional, defaults to 22):"
say
say "To retrieve region, image, size and key ID's, you can use the corresponding tugboat command, such as `tugboat images`."
say "Defaults can be changed at any time in your ~/.tugboat configuration file."
say
region = ask "Enter your default region ID (optional, defaults to 8 (New York)):"
region = ask "Enter your default region ID (optional, defaults to 8 (New York 3)):"
image = ask "Enter your default image ID (optional, defaults to 9801950 (Ubuntu 14.04 x64)):"
size = ask "Enter your default size ID (optional, defaults to 66 (512MB)):"
ssh_key = ask "Enter your default ssh key ID (optional, defaults to none):"
Expand Down
8 changes: 4 additions & 4 deletions spec/cli/authorize_cli_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
expect($stdin).to receive(:gets).and_return(api_key)
expect($stdout).to receive(:print).with("Enter your SSH key path (optional, defaults to ~/.ssh/id_rsa): ")
expect($stdin).to receive(:gets).and_return(ssh_key_path)
expect($stdout).to receive(:print).with("Enter your SSH user (optional, defaults to #{ENV['USER']}): ")
expect($stdout).to receive(:print).with("Enter your SSH user (optional, defaults to root): ")
expect($stdin).to receive(:gets).and_return(ssh_user)
expect($stdout).to receive(:print).with("Enter your SSH port number (optional, defaults to 22): ")
expect($stdin).to receive(:gets).and_return(ssh_port)
expect($stdout).to receive(:print).with("Enter your default region ID (optional, defaults to 8 (New York)): ")
expect($stdout).to receive(:print).with("Enter your default region ID (optional, defaults to 8 (New York 3)): ")
expect($stdin).to receive(:gets).and_return(region)
expect($stdout).to receive(:print).with("Enter your default image ID (optional, defaults to 9801950 (Ubuntu 14.04 x64)): ")
expect($stdin).to receive(:gets).and_return(image)
Expand Down Expand Up @@ -68,11 +68,11 @@
expect($stdin).to receive(:gets).and_return(api_key)
expect($stdout).to receive(:print).with("Enter your SSH key path (optional, defaults to ~/.ssh/id_rsa): ")
expect($stdin).to receive(:gets).and_return(ssh_key_path)
expect($stdout).to receive(:print).with("Enter your SSH user (optional, defaults to #{ENV['USER']}): ")
expect($stdout).to receive(:print).with("Enter your SSH user (optional, defaults to root): ")
expect($stdin).to receive(:gets).and_return('')
expect($stdout).to receive(:print).with("Enter your SSH port number (optional, defaults to 22): ")
expect($stdin).to receive(:gets).and_return('')
expect($stdout).to receive(:print).with("Enter your default region ID (optional, defaults to 8 (New York)): ")
expect($stdout).to receive(:print).with("Enter your default region ID (optional, defaults to 8 (New York 3)): ")
expect($stdin).to receive(:gets).and_return('')
expect($stdout).to receive(:print).with("Enter your default image ID (optional, defaults to 9801950 (Ubuntu 14.04 x64)): ")
expect($stdin).to receive(:gets).and_return('')
Expand Down