[SCM] patch-parser packaging branch, master, updated. 1905d5928d8a7d44cb61e303f22968684118997d

Harald Sitter apachelogger-guest at moszumanska.debian.org
Mon May 4 10:19:06 UTC 2015


Gitweb-URL: http://git.debian.org/?p=pkg-kde/patch-parser.git;a=commitdiff;h=1905d59

The following commit has been merged in the master branch:
commit 1905d5928d8a7d44cb61e303f22968684118997d
Author: Harald Sitter <sitter at kde.org>
Date:   Mon May 4 12:19:03 2015 +0200

    put relative path resolution into a method
---
 render.rb | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/render.rb b/render.rb
index 3512188..3202c05 100644
--- a/render.rb
+++ b/render.rb
@@ -9,6 +9,10 @@ require_relative 'lib/repo'
 
 BRANCHES = %w(kubuntu_vivid_archive kubuntu_unstable)
 
+def abs_relative(path)
+  File.expand_path(path, File.dirname(__FILE__))
+end
+
 @log = Logger.new(STDOUT)
 @log.progname = 'render'
 
@@ -47,15 +51,15 @@ Dir.chdir('cache') do
       repos << Repo.new(repo, patches)
     end
     repos.sort_by!(&:name)
-    template_path = File.expand_path('views/patches.html.haml', __FILE__)
+    template_path = abs_relative('views/patches.html.haml')
     html = Haml::Engine.new(File.read(template_path)).render(repos)
-    output_path = File.expand_path("#{branch}.html", __FILE__)
+    output_path = abs_relative("#{branch}.html")
     @log.info "Writing #{branch} list to #{output_path}"
     File.write(output_path, html)
   end
 end
 
-template_path = File.expand_path('views/index.html.haml', __FILE__)
+template_path = abs_relative('views/index.html.haml')
 html = Haml::Engine.new(template_path).render(BRANCHES)
 File.write('index.html', html)
 

-- 
patch-parser packaging



More information about the pkg-kde-commits mailing list