diff options
author | Luke Kanies <luke@madstop.com> | 2005-05-16 17:54:09 +0000 |
---|---|---|
committer | Luke Kanies <luke@madstop.com> | 2005-05-16 17:54:09 +0000 |
commit | d0d8df94927e4da9e8539d3f038636c32ab2e87a (patch) | |
tree | 11a4e894a3c9a9a92183e4af0fdab6c14adaefda | |
parent | 3a07a4d2f5a66b3919958c6bc8269b09c333cc8d (diff) | |
download | puppet-d0d8df94927e4da9e8539d3f038636c32ab2e87a.tar.gz puppet-d0d8df94927e4da9e8539d3f038636c32ab2e87a.tar.xz puppet-d0d8df94927e4da9e8539d3f038636c32ab2e87a.zip |
final fixes on passing methods through to types
git-svn-id: https://reductivelabs.com/svn/puppet/library/trunk@255 980ebf18-57e1-0310-9a29-db15c13687c0
-rw-r--r-- | lib/blink/transportable.rb | 6 | ||||
-rw-r--r-- | lib/blink/type/service.rb | 9 |
2 files changed, 8 insertions, 7 deletions
diff --git a/lib/blink/transportable.rb b/lib/blink/transportable.rb index 35f76ca7a..48dee6423 100644 --- a/lib/blink/transportable.rb +++ b/lib/blink/transportable.rb @@ -85,7 +85,11 @@ module Blink @evalcount += 0 if type = Blink::Type.type(self.type) # call the settings - if type.allowedmethod(self.name) + name = self.name + unless name.is_a?(Symbol) + name = name.intern + end + if type.allowedmethod(name) type.send(self.name,self.args) else Blink.error("%s does not respond to %s" % [self.type,self.name]) diff --git a/lib/blink/type/service.rb b/lib/blink/type/service.rb index d55efe76f..0aa90cda1 100644 --- a/lib/blink/type/service.rb +++ b/lib/blink/type/service.rb @@ -100,7 +100,7 @@ module Blink ] @functions = [ - :addpath + :setpath ] @name = :service @@ -129,12 +129,13 @@ module Blink def Service.setpath(*ary) # verify each of the paths exists + ary.flatten! @searchpaths = ary.find_all { |dir| retvalue = false begin retvalue = ::File.stat(dir).directory? rescue => detail - Blink.notice("Directory %s does not exist: %s" % [dir,detail]) + Blink.verbose("Directory %s does not exist: %s" % [dir,detail]) # just ignore it end # disallow relative paths @@ -143,10 +144,6 @@ module Blink #end retvalue } - #unless @searchpaths.include?(path) - # # XXX should we check to see if the path exists? - # @searchpaths.push(path) - #end end # it'd be nice if i didn't throw the output away... |