[DRE-commits] [yard] 01/02: [patch] move global config dir out of HOME for specs (Closes: #738409)
Cédric Boutillier
boutil at moszumanska.debian.org
Thu Feb 13 16:35:07 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 40eef1ac00f977e84aa48d9dc8b6f56fbd4e262c
Author: Cédric Boutillier <boutil at debian.org>
Date: Thu Feb 13 17:12:42 2014 +0100
[patch] move global config dir out of HOME for specs (Closes: #738409)
---
.../patches/move_yard_config_to_tmp_in_spec.patch | 39 ++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 40 insertions(+)
diff --git a/debian/patches/move_yard_config_to_tmp_in_spec.patch b/debian/patches/move_yard_config_to_tmp_in_spec.patch
new file mode 100644
index 0000000..424207b
--- /dev/null
+++ b/debian/patches/move_yard_config_to_tmp_in_spec.patch
@@ -0,0 +1,39 @@
+Description: move YARD global configuration directory to tmp/ during specs
+ The specs try to write in this directory. The default location is in $HOME
+ which is undefined and causes build failures with sbuild.
+Forwarded: no
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=738409
+Author: Cédric Boutillier <boutil at debian.org>
+Last-Update: 2014-02-13
+
+--- a/spec/config_spec.rb
++++ b/spec/config_spec.rb
+@@ -1,8 +1,21 @@
+ require File.join(File.dirname(__FILE__), "spec_helper")
+
+ require 'yaml'
++require 'tmpdir'
+
+ describe YARD::Config do
++ before :all do
++ YARD::Config::CONFIG_DIR=Dir.mktmpdir
++ YARD::Config::CONFIG_FILE=File.join(CONFIG_DIR, 'config')
++ end
++
++ after :all do
++ Dir.rmdir(YARD::Config::CONFIG_DIR)
++ YARD::Config::CONFIG_DIR=File.expand_path('~/.yard')
++ YARD::Config::CONFIG_FILE=File.join(CONFIG_DIR, 'config')
++ end
++
++
+ describe '.load' do
+ before do
+ File.should_receive(:file?).twice.with(CLI::Yardoc::DEFAULT_YARDOPTS_FILE).and_return(false)
+@@ -173,4 +186,4 @@
+ YARD::Config.load_plugins.should == false
+ end
+ end
+-end
+\ No newline at end of file
++end
diff --git a/debian/patches/series b/debian/patches/series
index f981d52..578c886 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@ require-in-executables.patch
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
--
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