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

Adds flavour text for listing global images #167

Merged
merged 1 commit into from
Jul 18, 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
3 changes: 3 additions & 0 deletions lib/tugboat/middleware/list_images.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ def call(env)
my_images = ocean.images.list :filter => "my_images"
if env["user_show_global_images"]
global = ocean.images.list :filter => "global"
else
say "Listing Your Images"
say "(Use `tugboat images list --global` to show all images)"
end

say "My Images:"
Expand Down
4 changes: 4 additions & 0 deletions spec/cli/images_cli_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
@cli.images

expect($stdout.string).to eq <<-eos
Listing Your Images
(Use `tugboat images list --global` to show all images)
My Images:
NYTD Backup 1-18-2012 (id: 466, distro: Ubuntu)
NLP Final (id: 478, distro: Ubuntu)
Expand All @@ -26,6 +28,8 @@
@cli.images

expect($stdout.string).to eq <<-eos
Listing Your Images
(Use `tugboat images list --global` to show all images)
My Images:
No images found
eos
Expand Down