File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change 9
9
require 'date'
10
10
11
11
12
- VIMPATCH_URL = "http://ftp.vim.org/pub/vim/patches/7.4/%s"
13
- VIMPATCH_README_URL = "http://ftp.vim.org/pub/vim/patches/7.4/README"
12
+ VIMPATCH_README_URL = "http://ftp.vim.org/pub/vim/patches/%s/README"
14
13
VIMSCRIPT_URL = "http://www.vim.org/scripts/script.php?script_id=%s"
15
14
VIMSCRIPT_LIST_URL = "http://www.vim.org/scripts/script_search_results.php?&show_me=99999"
16
15
VIM_GITHUB_COMMIT_URL = "https://github.com/vim/vim/commit/%s"
@@ -85,9 +84,18 @@ def mdescape(s)
85
84
86
85
87
86
def vimpatch_all ( )
87
+ [ ] . tap do |patches |
88
+ patches . concat vimpatch ( '7.4' )
89
+ patches . concat vimpatch ( '8.0' )
90
+ end
91
+ end
92
+
93
+ # vimpatch fetches info of patches for Vim x.x (ver)
94
+ def vimpatch ( ver )
88
95
items = [ ]
89
96
tag2sha = github_git_tags ( "vim" , "vim" )
90
- readme = httpget ( VIMPATCH_README_URL ) . entity . force_encoding ( "UTF-8" )
97
+ url = sprintf ( VIMPATCH_README_URL , ver )
98
+ readme = httpget ( url ) . entity . force_encoding ( "UTF-8" )
91
99
for line in readme . split ( /\r \n |\r |\n / )
92
100
m = line . match ( /^\s *(?#size)(\d +) (?#version)(\d \. \d \. \d {3,4}) (?#summary)(.*)$/ )
93
101
if !m
@@ -97,7 +105,6 @@ def vimpatch_all()
97
105
e [ "size" ] = m [ 1 ] . to_i
98
106
e [ "version" ] = m [ 2 ]
99
107
e [ "summary" ] = m [ 3 ]
100
- # e["url"] = sprintf(VIMPATCH_URL, e["version"])
101
108
major , minor , patchlevel = e [ "version" ] . split ( "." )
102
109
tag = "v#{ major } .#{ minor } .#{ patchlevel } "
103
110
e [ "tag" ] = tag
You can’t perform that action at this time.
0 commit comments