Mercurial > vim-piecrust
changeset 3:af8514b79c04 default tip
Fix for PieCrust 1.0-rc1.
Added very simple `Pcprepare` command.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Thu, 14 Mar 2013 22:15:58 -0700 |
parents | 0595eed8abef |
children | |
files | plugin/piecrust.vim |
diffstat | 1 files changed, 14 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/plugin/piecrust.vim Tue May 15 17:08:28 2012 -0700 +++ b/plugin/piecrust.vim Thu Mar 14 22:15:58 2013 -0700 @@ -113,9 +113,8 @@ if a:0 == 1 && type(a:1) == type([]) let l:arg_list = a:1 endif - let l:chef_command = g:piecrust_chef_executable . ' ' . a:command - let l:chef_command = l:chef_command . ' --root=' . shellescape(s:stripslash(self.root_dir)) - let l:chef_command = l:chef_command . ' ' . join(l:arg_list, ' ') + let l:chef_command = g:piecrust_chef_executable . ' --root=' . shellescape(s:stripslash(self.root_dir)) + let l:chef_command = l:chef_command . ' ' . a:command . ' ' . join(l:arg_list, ' ') call s:trace("Running Chef command: " . l:chef_command) return system(l:chef_command) endfunction @@ -224,6 +223,18 @@ " }}} +" Pcprepare {{{ + +function! s:PcPrepare(type, slug) abort + let l:website = s:piecrust_website() + let l:output = l:website.RunCommand('prepare', type, slug) + call s:trace(l:output) +endfunction + +call s:AddMainCommand("-nargs=* Pcprepare :call s:PcPrepare(<f-args>)") + +" }}} + " Pcposturl {{{ function! s:PcPostUrl(path) abort