Class: Puppet::FileServing::Mount::Plugins
- Inherits:
-
Puppet::FileServing::Mount
- Object
- Network::AuthStore
- Puppet::FileServing::Mount
- Puppet::FileServing::Mount::Plugins
- Defined in:
- lib/vendor/puppet/file_serving/mount/plugins.rb
Overview
Find files in the modules’ plugins directories. This is a very strange mount because it merges many directories into one.
Instance Attribute Summary
Attributes inherited from Puppet::FileServing::Mount
Instance Method Summary collapse
-
#find(relative_path, request) ⇒ Object
Return an instance of the appropriate class.
- #search(relative_path, request) ⇒ Object
- #valid? ⇒ Boolean
Methods inherited from Puppet::FileServing::Mount
Methods included from Util::Logging
#clear_deprecation_warnings, #deprecation_warning, #send_log
Methods inherited from Network::AuthStore
#allow, #allowed?, #deny, #empty?, #globalallow?, #initialize, #interpolate, #reset_interpolation, #to_s
Constructor Details
This class inherits a constructor from Puppet::FileServing::Mount
Instance Method Details
#find(relative_path, request) ⇒ Object
Return an instance of the appropriate class.
8 9 10 11 12 13 14 |
# File 'lib/vendor/puppet/file_serving/mount/plugins.rb', line 8 def find(relative_path, request) return nil unless mod = request.environment.modules.find { |mod| mod.plugin(relative_path) } path = mod.plugin(relative_path) path end |
#search(relative_path, request) ⇒ Object
16 17 18 19 20 21 |
# File 'lib/vendor/puppet/file_serving/mount/plugins.rb', line 16 def search(relative_path, request) # We currently only support one kind of search on plugins - return # them all. paths = request.environment.modules.find_all { |mod| mod.plugins? }.collect { |mod| mod.plugin_directory } return(paths.empty? ? nil : paths) end |
#valid? ⇒ Boolean
23 24 25 |
# File 'lib/vendor/puppet/file_serving/mount/plugins.rb', line 23 def valid? true end |