comparison vim/after/autoload/unite/sources/build/builders/rubber.vim @ 108:fe520b74e9d0

Add release and takeover scripts for imac
author zegervdv <zegervdv@me.com>
date Mon, 18 Aug 2014 15:23:00 +0200
parents
children
comparison
equal deleted inserted replaced
107:508b8bc6ffd5 108:fe520b74e9d0
1 "=============================================================================
2 " FILE: rubber.vim
3 " AUTHOR: Tatsuhiro Ujihisa <ujihisa at gmail.com>
4 " Last Modified: Sat Mar 9 18:01:03 PST 2013
5 "
6 " License: MIT license {{{
7 " Permission is hereby granted, free of charge, to any person obtaining
8 " a copy of this software and associated documentation files (the
9 " "Software"), to deal in the Software without restriction, including
10 " without limitation the rights to use, copy, modify, merge, publish,
11 " distribute, sublicense, and/or sell copies of the Software, and to
12 " permit persons to whom the Software is furnished to do so, subject to
13 " the following conditions:
14 "
15 " The above copyright notice and this permission notice shall be included
16 " in all copies or substantial portions of the Software.
17 "
18 " THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
19 " OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20 " MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
21 " IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
22 " CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
23 " TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
24 " SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 " }}}
26 "=============================================================================
27
28 " Variables "{{{
29 call unite#util#set_default('g:unite_builder_rubber_command', 'rubber')
30 "}}}
31
32 function! unite#sources#build#builders#rubber#define() "{{{
33 return executable(g:unite_builder_rubber_command) ?
34 \ s:builder : []
35 endfunction "}}}
36
37 let s:builder = {
38 \ 'name': 'rubber',
39 \ 'description': 'rubber builder for ebuild files',
40 \ }
41
42 function! s:builder.detect(args, context) "{{{
43 return 1
44 endfunction"}}}
45
46 function! s:builder.initialize(args, context) "{{{
47 let arg = a:args
48 return g:unite_builder_rubber_command . ' ' . arg
49 endfunction"}}}
50
51 function! s:builder.parse(string, context)
52 if empty(a:string)
53 return {}
54 endif
55 if a:context.source__builder_args[0] ==# 'manifest'
56 return s:_parse_manifest(a:string, a:context)
57 elseif a:context.source__builder_args[0] ==# 'full'
58 return s:_parse_full(a:string, a:context)
59 else
60 return {'type': 'message', 'text': printf('# %s', a:string)}
61 endif
62 endfunction
63
64 function! s:_parse_manifest(string, context)
65 return {'type': 'message', 'text': printf(' %s', a:string)}
66 endfunction
67
68 function! s:_parse_full(string, context)
69 if a:string == 'rubber scours the neighborhood...'
70 return {}
71 endif
72 return {'type': 'message', 'text': printf('* %s', a:string)}
73 endfunction
74
75 " vim: foldmethod=marker