summaryrefslogtreecommitdiffstats
path: root/lib/puppet
diff options
context:
space:
mode:
authorPaul Berry <paul@puppetlabs.com>2010-11-29 14:52:26 -0800
committerPaul Berry <paul@puppetlabs.com>2010-11-30 12:03:57 -0800
commit3063000155ddc475d1703d10cfc13770f687c3b2 (patch)
tree2e362240c15037ddac6e9f5cfbed9dd68b1e0a8d /lib/puppet
parent29a68730e4157a780f568529fbf32c9907f48731 (diff)
downloadpuppet-3063000155ddc475d1703d10cfc13770f687c3b2.tar.gz
puppet-3063000155ddc475d1703d10cfc13770f687c3b2.tar.xz
puppet-3063000155ddc475d1703d10cfc13770f687c3b2.zip
Maint: Swap the order of arguments to Indirection#save
The first argument was often nil, and the second was mandatory.
Diffstat (limited to 'lib/puppet')
-rw-r--r--lib/puppet/indirector.rb2
-rw-r--r--lib/puppet/indirector/indirection.rb2
-rwxr-xr-xlib/puppet/node/facts.rb2
3 files changed, 3 insertions, 3 deletions
diff --git a/lib/puppet/indirector.rb b/lib/puppet/indirector.rb
index b0cabab8a..d3455c014 100644
--- a/lib/puppet/indirector.rb
+++ b/lib/puppet/indirector.rb
@@ -36,7 +36,7 @@ module Puppet::Indirector
module InstanceMethods
def save(key = nil)
- self.class.indirection.save key, self
+ self.class.indirection.save self, key
end
end
end
diff --git a/lib/puppet/indirector/indirection.rb b/lib/puppet/indirector/indirection.rb
index 9095e48f8..eb0aa8aee 100644
--- a/lib/puppet/indirector/indirection.rb
+++ b/lib/puppet/indirector/indirection.rb
@@ -247,7 +247,7 @@ class Puppet::Indirector::Indirection
# Save the instance in the appropriate terminus. This method is
# normally an instance method on the indirected class.
- def save(key, instance = nil)
+ def save(instance, key = nil)
request = request(:save, key, instance)
terminus = prepare(request)
diff --git a/lib/puppet/node/facts.rb b/lib/puppet/node/facts.rb
index 612dc3239..fd99adc3b 100755
--- a/lib/puppet/node/facts.rb
+++ b/lib/puppet/node/facts.rb
@@ -15,7 +15,7 @@ class Puppet::Node::Facts
# We want to expire any cached nodes if the facts are saved.
module NodeExpirer
- def save(key, instance)
+ def save(instance, key)
Puppet::Node.indirection.expire(instance.name)
super
end