Skip to content

Commit

Permalink
add thor tasks for cookbook actions
Browse files Browse the repository at this point in the history
  • Loading branch information
doitian committed Dec 21, 2012
1 parent cb3468e commit 2dd8d0b
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tasks/cookbook.thor
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
class Cookbook < Thor
desc "create NAME [OPTIONS]", "run `knife cookbook create [OPTIONS]`"
def create(name, *args)
system 'bundle', 'exec', 'knife', 'cookbook', 'create', name, *args
end

desc "search QUERY [OPTIONS]", "run `knife cookbook site search QUERY [OPTIONS]`"
def search(query, *args)
system 'bundle', 'exec', 'knife', 'cookbook', 'site', 'search', query, *args
end

desc "download COOKBOOK [OPTIONS]", "run `knife cookbook site download COOKBOOK [OPTIONS]`"
def download(cookbook, *args)
system 'bundle', 'exec', 'knife', 'cookbook', 'site', 'download', cookbook, *args
end

desc "install COOKBOOK [OPTIONS]", "run `knife cookbook site install COOKBOOK [OPTIONS]`"
def install(cookbook, *args)
system 'bundle', 'exec', 'knife', 'cookbook', 'site', 'install', cookbook, *args
end
end

0 comments on commit 2dd8d0b

Please sign in to comment.