Skip to content

Commit

Permalink
Changes authorize command to ask for array
Browse files Browse the repository at this point in the history
  • Loading branch information
petems committed Feb 16, 2016
1 parent 94f3347 commit ee0a74f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/tugboat/middleware/ask_for_credentials.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def call(env)
region = ask "Enter your default region (optional, defaults to nyc1):"
image = ask "Enter your default image ID or image slug (optional, defaults to ubuntu-14-04-x64):"
size = ask "Enter your default size (optional, defaults to 512mb)):"
ssh_key = ask "Enter your default ssh key IDs (optional, defaults to none, comma separated string):"
ssh_key = ask "Enter your default ssh key IDs (optional, defaults to none, array of IDs of ssh keys eg. ['1234']):"
private_networking = ask "Enter your default for private networking (optional, defaults to false):"
backups_enabled = ask "Enter your default for enabling backups (optional, defaults to false):"
ip6 = ask "Enter your default for IPv6 (optional, defaults to false):"
Expand Down
4 changes: 2 additions & 2 deletions spec/cli/authorize_cli_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
expect($stdin).to receive(:gets).and_return(image)
expect($stdout).to receive(:print).with("Enter your default size (optional, defaults to 512mb)): ")
expect($stdin).to receive(:gets).and_return(size)
expect($stdout).to receive(:print).with("Enter your default ssh key IDs (optional, defaults to none, comma separated string): ")
expect($stdout).to receive(:print).with("Enter your default ssh key IDs (optional, defaults to none, array of IDs of ssh keys eg. ['1234']): ")
expect($stdin).to receive(:gets).and_return(ssh_key_id)
expect($stdout).to receive(:print).with("Enter your default for private networking (optional, defaults to false): ")
expect($stdin).to receive(:gets).and_return(private_networking)
Expand Down Expand Up @@ -79,7 +79,7 @@
expect($stdin).to receive(:gets).and_return('')
expect($stdout).to receive(:print).with("Enter your default size (optional, defaults to 512mb)): ")
expect($stdin).to receive(:gets).and_return('')
expect($stdout).to receive(:print).with("Enter your default ssh key IDs (optional, defaults to none, comma separated string): ")
expect($stdout).to receive(:print).with("Enter your default ssh key IDs (optional, defaults to none, array of IDs of ssh keys eg. ['1234']): ")
expect($stdin).to receive(:gets).and_return('')
expect($stdout).to receive(:print).with("Enter your default for private networking (optional, defaults to false): ")
expect($stdin).to receive(:gets).and_return('')
Expand Down

0 comments on commit ee0a74f

Please sign in to comment.