aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <dev@blino.org>2015-11-20 01:06:47 +0100
committerOlivier Blin <dev@blino.org>2015-11-30 01:32:43 +0100
commit789a955109028cde1c32bf5f3c1dd9dfc5d02ba7 (patch)
treec5d26ff35e9ad64fdf131992dffa937893b9e11a
parent317b5a0eeab6738b86955c4ead15dc3b4bc0bcf6 (diff)
downloadpuppet-789a955109028cde1c32bf5f3c1dd9dfc5d02ba7.tar
puppet-789a955109028cde1c32bf5f3c1dd9dfc5d02ba7.tar.gz
puppet-789a955109028cde1c32bf5f3c1dd9dfc5d02ba7.tar.bz2
puppet-789a955109028cde1c32bf5f3c1dd9dfc5d02ba7.tar.xz
puppet-789a955109028cde1c32bf5f3c1dd9dfc5d02ba7.zip
facter lib_dir: remove trailing slash
Partly done by tmb
-rw-r--r--modules/facter/lib/facter/lib_dir.rb2
-rw-r--r--modules/facter/spec/unit/lib_dir.rb6
2 files changed, 4 insertions, 4 deletions
diff --git a/modules/facter/lib/facter/lib_dir.rb b/modules/facter/lib/facter/lib_dir.rb
index f612ed7e..315d7594 100644
--- a/modules/facter/lib/facter/lib_dir.rb
+++ b/modules/facter/lib/facter/lib_dir.rb
@@ -5,6 +5,6 @@ Facter.add("lib_dir") do
rescue
Facter.loadfacts()
end
- '/usr/lib' + ( Facter.value('architecture') == "x86_64" ? '64' : '') + '/'
+ '/usr/lib' + ( Facter.value('architecture') == "x86_64" ? '64' : '')
end
end
diff --git a/modules/facter/spec/unit/lib_dir.rb b/modules/facter/spec/unit/lib_dir.rb
index 1d5c4624..50049f19 100644
--- a/modules/facter/spec/unit/lib_dir.rb
+++ b/modules/facter/spec/unit/lib_dir.rb
@@ -5,14 +5,14 @@ require 'spec_helper'
describe "Lib_dir fact" do
it "should default to /usr/lib" do
Facter.fact(:architecture).stubs(:value).returns("bogus")
- Facter.fact(:lib_dir).value.should == "/usr/lib/"
+ Facter.fact(:lib_dir).value.should == "/usr/lib"
end
archs = Hash.new
# TODO add arm 64 and others
archs = {
- "i586" => "/usr/lib/",
- "x86_64" => "/usr/lib64/",
+ "i586" => "/usr/lib",
+ "x86_64" => "/usr/lib64",
}
archs.each do |arch, dir|
it "should be #{dir} on #{arch}" do