lib/stars/client.rb in stars-0.5.2 vs lib/stars/client.rb in stars-0.5.3
- old
+ new
@@ -42,10 +42,15 @@
# Returns nothing.
def display(service=nil)
Stars.config.prompt_for_service if Stars.installed_services.empty?
if service && service != 'add'
- posts = service.constantize.posts
+ if Stars.services.include? service
+ posts = service.constantize.posts
+ else
+ puts "Service \"#{service}\" is unknown."
+ exit
+ end
else
posts = Stars.installed_services.collect{ |service|
service.constantize.posts }.flatten
end
@posts = Post.filter(posts)