Skip to content

Commit

Permalink
Adds flavour text for listing global images
Browse files Browse the repository at this point in the history
  • Loading branch information
petems committed Jul 18, 2015
1 parent 3e538a1 commit f36b70a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/tugboat/middleware/list_images.rb
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
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

0 comments on commit f36b70a

Please sign in to comment.