Obtain list of common files
# File lib/mcollective/pluginpackager/standard_definition.rb, line 44 def common common = {:files => [], :dependencies => ["mcolelctive-common"], :description => "Common libraries for #{@name} connector plugin"} commondir = File.join(@path, "util") if PluginPackager.check_dir_present commondir common[:files] = Dir.glob(File.join(commondir, "*")) return common else return nil end end
Identify present packages and populate the packagedata hash
# File lib/mcollective/pluginpackager/standard_definition.rb, line 21 def identify_packages @packagedata[:common] = common @packagedata[@plugintype] = plugin end
Obtain standard plugin files and dependencies
# File lib/mcollective/pluginpackager/standard_definition.rb, line 27 def plugin plugindata = {:files => [], :dependencies => ["mcollective"], :description => "#{@name} #{@plugintype} plugin for the Marionette Collective."} plugindir = File.join(@path, @plugintype.to_s) if PluginPackager.check_dir_present plugindir plugindata[:files] = Dir.glob(File.join(plugindir, "*")) else return nil end plugindata[:dependencies] <<"mcollective-#{@metadata[:name]}-common" if @packagedata[:common] plugindata end
# File lib/mcollective/pluginpackager/standard_definition.rb, line 7 def initialize(path, name, vendor, postinstall, iteration, plugintype) @plugintype = plugintype @path = path @packagedata = {} @iteration = iteration || 1 @postinstall = postinstall @vendor = vendor || "Puppet Labs" @target_path = File.expand_path(@path) @metadata = PluginPackager.get_metadata(@path, @plugintype) @metadata[:name] = (name || @metadata[:name]).downcase.gsub(" ", "_") identify_packages end
Generated with the Darkfish Rdoc Generator 2.