summaryrefslogtreecommitdiffstats
path: root/lib/puppet
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2009-06-01 18:12:54 -0500
committerJames Turnbull <james@lovedthanlost.net>2009-06-03 07:34:27 +1000
commit508934b11cdad82ed1022bffcdb88e66f4d5e4d8 (patch)
treebdfb21845012673f7ce5aa71d62ac10e8b29fc9f /lib/puppet
parentfb0ed7a50bdd576bc7d0317aab32d36828e964d2 (diff)
downloadpuppet-508934b11cdad82ed1022bffcdb88e66f4d5e4d8.tar.gz
puppet-508934b11cdad82ed1022bffcdb88e66f4d5e4d8.tar.xz
puppet-508934b11cdad82ed1022bffcdb88e66f4d5e4d8.zip
Fixing a bunch of warnings
This commit should have no functional effect. Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'lib/puppet')
-rw-r--r--lib/puppet/indirector.rb8
-rw-r--r--lib/puppet/parser/scope.rb3
-rw-r--r--lib/puppet/parser/templatewrapper.rb4
-rw-r--r--lib/puppet/provider/ldap.rb2
-rw-r--r--lib/puppet/resource.rb3
-rw-r--r--lib/puppet/resource/catalog.rb2
-rw-r--r--lib/puppet/resource/reference.rb4
-rw-r--r--lib/puppet/util/cacher.rb2
-rw-r--r--lib/puppet/util/settings.rb2
9 files changed, 15 insertions, 15 deletions
diff --git a/lib/puppet/indirector.rb b/lib/puppet/indirector.rb
index 1beb68ec0..61ef2db29 100644
--- a/lib/puppet/indirector.rb
+++ b/lib/puppet/indirector.rb
@@ -44,19 +44,19 @@ module Puppet::Indirector
# Expire any cached instance.
def expire(*args)
- indirection.expire *args
+ indirection.expire(*args)
end
def find(*args)
- indirection.find *args
+ indirection.find(*args)
end
def destroy(*args)
- indirection.destroy *args
+ indirection.destroy(*args)
end
def search(*args)
- indirection.search *args
+ indirection.search(*args)
end
end
diff --git a/lib/puppet/parser/scope.rb b/lib/puppet/parser/scope.rb
index 77e7b0cfd..b1f480ca6 100644
--- a/lib/puppet/parser/scope.rb
+++ b/lib/puppet/parser/scope.rb
@@ -15,9 +15,10 @@ class Puppet::Parser::Scope
include Enumerable
include Puppet::Util::Errors
- attr_accessor :parent, :level, :parser, :source, :resource
+ attr_accessor :level, :parser, :source, :resource
attr_accessor :base, :keyword, :nodescope
attr_accessor :top, :translated, :compiler
+ attr_writer :parent
# A demeterific shortcut to the catalog.
def catalog
diff --git a/lib/puppet/parser/templatewrapper.rb b/lib/puppet/parser/templatewrapper.rb
index 00faf33a1..97b454569 100644
--- a/lib/puppet/parser/templatewrapper.rb
+++ b/lib/puppet/parser/templatewrapper.rb
@@ -3,7 +3,9 @@
require 'puppet/parser/files'
class Puppet::Parser::TemplateWrapper
- attr_accessor :scope, :file, :string
+ attr_writer :scope
+ attr_reader :file
+ attr_accessor :string
include Puppet::Util
Puppet::Util.logmethods(self)
diff --git a/lib/puppet/provider/ldap.rb b/lib/puppet/provider/ldap.rb
index 76834f94d..970ac5202 100644
--- a/lib/puppet/provider/ldap.rb
+++ b/lib/puppet/provider/ldap.rb
@@ -38,8 +38,6 @@ class Puppet::Provider::Ldap < Puppet::Provider
end
end
- attr_reader :ldap_properties
-
def manager
self.class.manager
end
diff --git a/lib/puppet/resource.rb b/lib/puppet/resource.rb
index 7082e261f..b4458e638 100644
--- a/lib/puppet/resource.rb
+++ b/lib/puppet/resource.rb
@@ -7,7 +7,8 @@ require 'puppet/resource/reference'
class Puppet::Resource
include Puppet::Util::Tagging
include Enumerable
- attr_accessor :type, :title, :file, :line, :catalog, :exported
+ attr_accessor :file, :line, :catalog, :exported
+ attr_writer :type, :title
# Proxy these methods to the parameters hash. It's likely they'll
# be overridden at some point, but this works for now.
diff --git a/lib/puppet/resource/catalog.rb b/lib/puppet/resource/catalog.rb
index 859daa654..c885c8d78 100644
--- a/lib/puppet/resource/catalog.rb
+++ b/lib/puppet/resource/catalog.rb
@@ -130,7 +130,7 @@ class Puppet::Resource::Catalog < Puppet::SimpleGraph
transaction.tags = options[:tags] if options[:tags]
transaction.ignoreschedules = true if options[:ignoreschedules]
- transaction.addtimes :config_retrieval => @retrieval_duration
+ transaction.addtimes :config_retrieval => self.retrieval_duration
begin
diff --git a/lib/puppet/resource/reference.rb b/lib/puppet/resource/reference.rb
index 968274523..b08f2a380 100644
--- a/lib/puppet/resource/reference.rb
+++ b/lib/puppet/resource/reference.rb
@@ -8,8 +8,8 @@ require 'puppet/resource'
# A simple class to canonize how we refer to and retrieve
# resources.
class Puppet::Resource::Reference
- attr_reader :type
- attr_accessor :title, :catalog
+ attr_reader :type, :title
+ attr_accessor :catalog
def ==(other)
other.respond_to?(:title) and self.type == other.type and self.title == other.title
diff --git a/lib/puppet/util/cacher.rb b/lib/puppet/util/cacher.rb
index 2996dc9c6..28786ab53 100644
--- a/lib/puppet/util/cacher.rb
+++ b/lib/puppet/util/cacher.rb
@@ -58,7 +58,7 @@ module Puppet::Util::Cacher
end
def attr_ttl(name)
- return nil unless @attr_ttls
+ return nil unless defined?(@attr_ttls) and @attr_ttls
@attr_ttls[name]
end
diff --git a/lib/puppet/util/settings.rb b/lib/puppet/util/settings.rb
index 6a94c0df2..0871ee869 100644
--- a/lib/puppet/util/settings.rb
+++ b/lib/puppet/util/settings.rb
@@ -821,8 +821,6 @@ Generated on #{Time.now}.
end
result[:value] = value.sub(/\s*$/, '')
return result
-
- return nil
end
# Convert arguments into booleans, integers, or whatever.