[DRE-commits] [ohai] 06/14: Create patch that removes relative references of source code in tests

Lucas Kanashiro kanashiro.duarte at gmail.com
Fri Mar 4 17:49:20 UTC 2016


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

kanashiro-guest pushed a commit to branch master
in repository ohai.

commit 95c1fb924f02ed00e826fb853a0455abcc2b0e77
Author: Lucas Kanashiro <kanashiro.duarte at gmail.com>
Date:   Fri Mar 4 11:46:52 2016 -0300

    Create patch that removes relative references of source code in tests
---
 debian/changelog                                   |  1 +
 .../0003-Remove-relative-require-from-tests.patch  | 31 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 3 files changed, 33 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index af18fbd..d2c94d4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,7 @@ ohai (8.10.0-1) UNRELEASED; urgency=medium
     upstream
   * debian/control: depends (build and runtime) on ruby-chef-config
   * debian/patches: update 0001-Drop-dependency-on-wmi-lite.patch
+  * Create patch that removes relative references of source code in tests
 
  -- Lucas Kanashiro <kanashiro.duarte at gmail.com>  Thu, 03 Mar 2016 18:58:48 -0300
 
diff --git a/debian/patches/0003-Remove-relative-require-from-tests.patch b/debian/patches/0003-Remove-relative-require-from-tests.patch
new file mode 100644
index 0000000..e54dd5d
--- /dev/null
+++ b/debian/patches/0003-Remove-relative-require-from-tests.patch
@@ -0,0 +1,31 @@
+Description: Remove relative references for source code in tests
+Author: Lucas Kanashiro <kanashiro.duarte at gmail.com>
+Last-Updated: 2016-03-04
+
+--- a/spec/unit/plugins/root_group_spec.rb
++++ b/spec/unit/plugins/root_group_spec.rb
+@@ -17,7 +17,7 @@
+ #
+ 
+ require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper.rb')
+-require File.expand_path(File.dirname(__FILE__) + '/../../../lib/ohai/util/win32/group_helper.rb')
++require 'ohai/util/win32/group_helper.rb'
+ 
+ describe Ohai::System, 'root_group' do
+   before(:each) do
+--- a/spec/spec_helper.rb
++++ b/spec/spec_helper.rb
+@@ -12,7 +12,12 @@ require 'spec/support/integration_helper
+ require 'ohai'
+ Ohai.config[:log_level] = :error
+ 
+-PLUGIN_PATH = File.expand_path("../../lib/ohai/plugins", __FILE__)
++if ENV['ADTTMP']
++  PLUGIN_PATH = '/usr/lib/ruby/vendor_ruby/ohai/plugins/'
++else
++  PLUGIN_PATH = File.expand_path("../../lib/ohai/plugins", __FILE__)
++end
++
+ SPEC_PLUGIN_PATH = File.expand_path("../data/plugins", __FILE__)
+ 
+ RSpec.configure do |config|
diff --git a/debian/patches/series b/debian/patches/series
index 8e72fd8..d6def11 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 0001-Drop-dependency-on-wmi-lite.patch
 0002-Avoid-dependency-on-rspec-collection_matchers.patch
+0003-Remove-relative-require-from-tests.patch

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



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