From 5ea3b4729c2557f4d7a0980901f0d1924e327455 Mon Sep 17 00:00:00 2001 From: Vít Ondruch Date: Feb 24 2017 16:49:58 +0000 Subject: Update to RDoc 5.1.0. --- diff --git a/.gitignore b/.gitignore index 103bda6..285b509 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,5 @@ /rdoc-4.0.1.gem /rdoc-4.1.1.gem /rdoc-4.2.2.gem +/rdoc-5.1.0-tests.tar.xz +/rdoc-5.1.0.gem diff --git a/rubygem-rdoc-4.2.3-Fix-broken-links-to-assets.patch b/rubygem-rdoc-4.2.3-Fix-broken-links-to-assets.patch deleted file mode 100644 index 002d35b..0000000 --- a/rubygem-rdoc-4.2.3-Fix-broken-links-to-assets.patch +++ /dev/null @@ -1,222 +0,0 @@ -From 4d81a1eb22b51eef485420be897bbea937d37f28 Mon Sep 17 00:00:00 2001 -From: Alex Wood -Date: Mon, 3 Aug 2015 15:39:53 -0400 -Subject: [PATCH 1/2] Fix broken links to assets. Fixes #359. - ---- - lib/rdoc/generator/template/darkfish/_head.rhtml | 2 +- - lib/rdoc/generator/template/darkfish/css/fonts.css | 12 ++++++------ - lib/rdoc/servlet.rb | 6 +++--- - test/test_rdoc_servlet.rb | 19 +++++++++++-------- - 4 files changed, 21 insertions(+), 18 deletions(-) - -diff --git a/lib/rdoc/generator/template/darkfish/_head.rhtml b/lib/rdoc/generator/template/darkfish/_head.rhtml -index 70f1c18..2a1d0b8 100644 ---- a/lib/rdoc/generator/template/darkfish/_head.rhtml -+++ b/lib/rdoc/generator/template/darkfish/_head.rhtml -@@ -3,7 +3,7 @@ - <%= h @title %> - - - - -diff --git a/lib/rdoc/generator/template/darkfish/css/fonts.css b/lib/rdoc/generator/template/darkfish/css/fonts.css -index e9e7211..57302b5 100644 ---- a/lib/rdoc/generator/template/darkfish/css/fonts.css -+++ b/lib/rdoc/generator/template/darkfish/css/fonts.css -@@ -17,7 +17,7 @@ - font-weight: 400; - src: local("Source Code Pro"), - local("SourceCodePro-Regular"), -- url("fonts/SourceCodePro-Regular.ttf") format("truetype"); -+ url("../fonts/SourceCodePro-Regular.ttf") format("truetype"); - } - - @font-face { -@@ -26,7 +26,7 @@ - font-weight: 700; - src: local("Source Code Pro Bold"), - local("SourceCodePro-Bold"), -- url("fonts/SourceCodePro-Bold.ttf") format("truetype"); -+ url("../fonts/SourceCodePro-Bold.ttf") format("truetype"); - } - - /* -@@ -46,7 +46,7 @@ - font-weight: 300; - src: local("Lato Light"), - local("Lato-Light"), -- url("fonts/Lato-Light.ttf") format("truetype"); -+ url("../fonts/Lato-Light.ttf") format("truetype"); - } - - @font-face { -@@ -55,7 +55,7 @@ - font-weight: 300; - src: local("Lato Light Italic"), - local("Lato-LightItalic"), -- url("fonts/Lato-LightItalic.ttf") format("truetype"); -+ url("../fonts/Lato-LightItalic.ttf") format("truetype"); - } - - @font-face { -@@ -64,7 +64,7 @@ - font-weight: 700; - src: local("Lato Regular"), - local("Lato-Regular"), -- url("fonts/Lato-Regular.ttf") format("truetype"); -+ url("../fonts/Lato-Regular.ttf") format("truetype"); - } - - @font-face { -@@ -73,7 +73,7 @@ - font-weight: 700; - src: local("Lato Italic"), - local("Lato-Italic"), -- url("fonts/Lato-RegularItalic.ttf") format("truetype"); -+ url("../fonts/Lato-RegularItalic.ttf") format("truetype"); - } - - /* -diff --git a/lib/rdoc/servlet.rb b/lib/rdoc/servlet.rb -index ec8fd73..94c3d39 100644 ---- a/lib/rdoc/servlet.rb -+++ b/lib/rdoc/servlet.rb -@@ -114,8 +114,8 @@ def do_GET req, res - case req.path - when '/' then - root req, res -- when '/rdoc.css', '/js/darkfish.js', '/js/jquery.js', '/js/search.js', -- %r%^/images/% then -+ when '/js/darkfish.js', '/js/jquery.js', '/js/search.js', -+ %r%^/css/%, %r%^/images/%, %r%^/fonts/% then - asset :darkfish, req, res - when '/js/navigation.js', '/js/searcher.js' then - asset :json_index, req, res -@@ -202,7 +202,7 @@ def error exception, req, res - - Error - #{ERB::Util.html_escape exception.class} - -- -+ - - -

Error

-diff --git a/test/test_rdoc_servlet.rb b/test/test_rdoc_servlet.rb -index 143e2f2..acd37cf 100644 ---- a/test/test_rdoc_servlet.rb -+++ b/test/test_rdoc_servlet.rb -@@ -65,14 +65,15 @@ def teardown - - def test_asset - temp_dir do -- now = Time.now -+ FileUtils.mkdir 'css' - -- open 'rdoc.css', 'w' do |io| io.write 'h1 { color: red }' end -- File.utime now, now, 'rdoc.css' -+ now = Time.now -+ open 'css/rdoc.css', 'w' do |io| io.write 'h1 { color: red }' end -+ File.utime now, now, 'css/rdoc.css' - - @s.asset_dirs[:darkfish] = '.' - -- @req.path = 'rdoc.css' -+ @req.path = '/css/rdoc.css' - - @s.asset :darkfish, @req, @res - -@@ -94,11 +95,12 @@ def test_do_GET - - def test_do_GET_asset_darkfish - temp_dir do -- FileUtils.touch 'rdoc.css' -+ FileUtils.mkdir 'css' -+ FileUtils.touch 'css/rdoc.css' - - @s.asset_dirs[:darkfish] = '.' - -- @req.path = '/rdoc.css' -+ @req.path = '/css/rdoc.css' - - @s.do_GET @req, @res - -@@ -135,11 +137,12 @@ def test_do_GET_mount_path - @s = RDoc::Servlet.new @server, @stores, @cache, '/mount/path' - - temp_dir do -- FileUtils.touch 'rdoc.css' -+ FileUtils.mkdir 'css' -+ FileUtils.touch 'css/rdoc.css' - - @s.asset_dirs[:darkfish] = '.' - -- @req.path = '/mount/path/rdoc.css' -+ @req.path = '/mount/path/css/rdoc.css' - - @s.do_GET @req, @res - - -From cfde4f9891764439d747fb646686e76adaf4f2e4 Mon Sep 17 00:00:00 2001 -From: Alex Wood -Date: Mon, 17 Aug 2015 11:13:55 -0400 -Subject: [PATCH 2/2] Use gem search index instead of global index. - ---- - lib/rdoc/generator/template/darkfish/_head.rhtml | 1 + - lib/rdoc/generator/template/darkfish/js/darkfish.js | 14 +++++++------- - 2 files changed, 8 insertions(+), 7 deletions(-) - -diff --git a/lib/rdoc/generator/template/darkfish/_head.rhtml b/lib/rdoc/generator/template/darkfish/_head.rhtml -index 2a1d0b8..f308526 100644 ---- a/lib/rdoc/generator/template/darkfish/_head.rhtml -+++ b/lib/rdoc/generator/template/darkfish/_head.rhtml -@@ -4,6 +4,7 @@ - - - - -diff --git a/lib/rdoc/generator/template/darkfish/js/darkfish.js b/lib/rdoc/generator/template/darkfish/js/darkfish.js -index b789a65..38f877e 100644 ---- a/lib/rdoc/generator/template/darkfish/js/darkfish.js -+++ b/lib/rdoc/generator/template/darkfish/js/darkfish.js -@@ -59,7 +59,7 @@ function hookSearch() { - var html = ''; - - // TODO add relative path to