Browse files

Made vam#DisplayAddonInfo always show homepage generated from url

Added support for repository.homepage key

branch : better-addon-info
  • Loading branch information...
1 parent c437ae9 commit 08526ce5151485129b1e6d890cc04b12e07c4517 @ZyX-I ZyX-I committed Feb 19, 2012
Showing with 12 additions and 2 deletions.
  1. +5 −2 autoload/vam.vim
  2. +7 −0 doc/vim-addon-manager.txt
@@ -279,14 +279,17 @@ fun! vam#DisplayAddonInfo(name)
call vam#Log('Plugin: '.name.((has_key(repository, 'version'))?(' version '.repository.version):('')), 'None')
if has_key(repository, 'vim_script_nr')
call vam#Log('Script number: '.repository.vim_script_nr, 'None')
- call vam#Log('Home page:'.repository.vim_script_nr, 'None')
+ call vam#Log(' page:'.repository.vim_script_nr, 'None')
+ endif
+ if has_key(repository, 'homepage')
+ call vam#Log('Home page: '.repository.homepage)
elseif repository.url =~? '^\w\+://github\.com/'
call vam#Log('Home page:'.substitute(repository.url, '^\V\w\+://\v([^/]+\/[^/]{-}%(\.git)?)%(\/|$)@=.*', '\1', ''), 'None')
elseif repository.url =~? '^\w\+://bitbucket\.org/'
call vam#Log('Home page:'.substitute(repository.url, '^\V\w\+://\v([^/]+\/[^/]+).*', '\1', ''), 'None')
call vam#Log('Source URL: '.repository.url.' (type '.get(repository, 'type', 'archive').')', 'None')
- for key in filter(keys(repository), 'v:val!~#''\vurl|vim_script_nr|version|type''')
+ for key in filter(keys(repository), 'v:val!~#''\vurl|vim_script_nr|version|type|homepage''')
call vam#Log(key.': '.string(repository[key]), 'None')
@@ -746,6 +746,13 @@ repository *addon-info-repository*
Contains addon information in case plugin does not supply its
own addon-info file.
+ vim_script_nr
+ Contains script ID.
+ homepage
+ Contains home page URL. Though it is possible to use it, VAM
+ currently is also able to use repository.url to determine
+ plugin home page (github and bitbucket sources only). May be
+ the only source of home page URL in the future.
post-install-hook *addon-info-post-install-hook*

0 comments on commit 08526ce

Please sign in to comment.