Skip to content

Commit

Permalink
Added search capability
Browse files Browse the repository at this point in the history
  • Loading branch information
garethr committed May 8, 2011
1 parent ada0743 commit 6a112da
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/vagrantboxes/command.rb
Expand Up @@ -12,6 +12,9 @@ class Command < Vagrant::Command::GroupBase
desc "search [TERM]", "Find a box"
def search(term=nil)
url = "#{ENDPOINT}/boxes.json"
if term
url = "#{url}?q=#{term}"
end
resp = Net::HTTP.get_response(URI.parse(url))
data = resp.body

Expand Down

0 comments on commit 6a112da

Please sign in to comment.