summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Livingston-Gray <geeksam@gmail.com>2009-07-13 15:56:59 -0700
committerSam Livingston-Gray <geeksam@gmail.com>2009-07-13 15:56:59 -0700
commit74f5ad457a95580e7cef20fa850afd98eabaa6ed (patch)
tree106c535263c99e648e697ff8209e5e12e34e3102
parentf46a52a3344bdc8c3caf8a80c7af3ea5dec5e66b (diff)
downloadpuppet-74f5ad457a95580e7cef20fa850afd98eabaa6ed.tar.gz
puppet-74f5ad457a95580e7cef20fa850afd98eabaa6ed.tar.xz
puppet-74f5ad457a95580e7cef20fa850afd98eabaa6ed.zip
Fixed #2394 - warn once on module mount deprecation.
Signed-off-by: Sam Livingston-Gray <geeksam@gmail.com>
-rw-r--r--lib/puppet/file_serving/configuration.rb2
-rwxr-xr-xspec/unit/file_serving/configuration.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/puppet/file_serving/configuration.rb b/lib/puppet/file_serving/configuration.rb
index 6092c24e2..4f264f3c0 100644
--- a/lib/puppet/file_serving/configuration.rb
+++ b/lib/puppet/file_serving/configuration.rb
@@ -41,7 +41,7 @@ class Puppet::FileServing::Configuration
end
if mounts["modules"].environment(node).module(mount_name)
- Puppet.warning "DEPRECATION NOTICE: Found module '%s' without using the 'modules' mount; please prefix path with 'modules/'" % mount_name
+ Puppet::Util::Warnings.warn_once "DEPRECATION NOTICE: Found module '%s' without using the 'modules' mount; please prefix path with 'modules/'" % mount_name
return mounts["modules"]
end
diff --git a/spec/unit/file_serving/configuration.rb b/spec/unit/file_serving/configuration.rb
index 466c6a341..c63e3b370 100755
--- a/spec/unit/file_serving/configuration.rb
+++ b/spec/unit/file_serving/configuration.rb
@@ -128,7 +128,7 @@ describe Puppet::FileServing::Configuration do
mount.expects(:environment).with("mynode").returns env
config.stubs(:mounts).returns("modules" => mount)
- Puppet.expects(:warning)
+ Puppet::Util::Warnings.expects(:warn_once)
config.find_mount("foo", "mynode").should equal(mount)
end