[DRE-commits] [yard] 01/04: fix TEMPLATE_ROOT when run from the system installed library

Cédric Boutillier boutil at moszumanska.debian.org
Tue Apr 1 08:07:04 UTC 2014


This is an automated email from the git hooks/post-receive script.

boutil pushed a commit to branch master
in repository yard.

commit 43eb1e53603567065f5b7d05f6d7d3ab7b210d5c
Author: Cédric Boutillier <boutil at debian.org>
Date:   Tue Apr 1 00:14:05 2014 +0200

    fix TEMPLATE_ROOT when run from the system installed library
---
 debian/patches/fix_template_root_var.patch | 22 ++++++++++++++++++++++
 debian/patches/series                      |  1 +
 2 files changed, 23 insertions(+)

diff --git a/debian/patches/fix_template_root_var.patch b/debian/patches/fix_template_root_var.patch
new file mode 100644
index 0000000..d18311d
--- /dev/null
+++ b/debian/patches/fix_template_root_var.patch
@@ -0,0 +1,22 @@
+Description: fix TEMPLATE_ROOT to take into account FHS
+ set to ../templates if running the lib from the source tree
+ and to /usr/share/yard/templates if running from the system lib
+Author: Cédric Boutillier <boutil at debian.org>
+Last-Update: 2014-04-01
+
+--- a/lib/yard.rb
++++ b/lib/yard.rb
+@@ -5,7 +5,11 @@
+   ROOT = File.expand_path(File.dirname(__FILE__))
+ 
+   # The root path for YARD builtin templates
+-  TEMPLATE_ROOT = File.join(ROOT, '..', 'templates')
++  if Dir.exists? File.expand_path('../../debian', __FILE__)
++    TEMPLATE_ROOT = File.join(ROOT, '..', 'templates')
++  else
++    TEMPLATE_ROOT = "/usr/share/yard/templates/"
++  end
+ 
+   # @deprecated Use {Config::CONFIG_DIR}
+   CONFIG_DIR = File.expand_path('~/.yard')
+
diff --git a/debian/patches/series b/debian/patches/series
index 578c886..0c7401b 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,3 +3,4 @@ set-templates-path.patch
 remove_rubygems_and_path_manipulation_from_spec.patch
 deactivate_failing_test_with_sbuild.patch
 move_yard_config_to_tmp_in_spec.patch
+fix_template_root_var.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/yard.git



More information about the Pkg-ruby-extras-commits mailing list