1 <?xml version="1.0" encoding="utf-8"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
6 <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
8 <title>Module: MCollective::PluginPackager</title>
10 <link rel="stylesheet" href="../rdoc.css" type="text/css" media="screen" />
12 <script src="../js/jquery.js" type="text/javascript"
13 charset="utf-8"></script>
14 <script src="../js/thickbox-compressed.js" type="text/javascript"
15 charset="utf-8"></script>
16 <script src="../js/quicksearch.js" type="text/javascript"
17 charset="utf-8"></script>
18 <script src="../js/darkfish.js" type="text/javascript"
19 charset="utf-8"></script>
25 <div id="file-metadata">
26 <div id="file-list-section" class="section">
27 <h3 class="section-header">In Files</h3>
28 <div class="section-body">
31 <li><a href="../lib/mcollective/pluginpackager_rb.html?TB_iframe=true&height=550&width=785"
32 class="thickbox" title="lib/mcollective/pluginpackager.rb">lib/mcollective/pluginpackager.rb</a></li>
34 <li><a href="../lib/mcollective/pluginpackager/standard_definition_rb.html?TB_iframe=true&height=550&width=785"
35 class="thickbox" title="lib/mcollective/pluginpackager/standard_definition.rb">lib/mcollective/pluginpackager/standard_definition.rb</a></li>
37 <li><a href="../lib/mcollective/pluginpackager/agent_definition_rb.html?TB_iframe=true&height=550&width=785"
38 class="thickbox" title="lib/mcollective/pluginpackager/agent_definition.rb">lib/mcollective/pluginpackager/agent_definition.rb</a></li>
47 <div id="class-metadata">
52 <!-- Namespace Contents -->
54 <div id="namespace-list-section" class="section">
55 <h3 class="section-header">Namespace</h3>
56 <ul class="link-list">
58 <li><span class="type">CLASS</span> <a href="PluginPackager/AgentDefinition.html">MCollective::PluginPackager::AgentDefinition</a></li>
60 <li><span class="type">CLASS</span> <a href="PluginPackager/StandardDefinition.html">MCollective::PluginPackager::StandardDefinition</a></li>
66 <!-- Method Quickref -->
68 <div id="method-list-section" class="section">
69 <h3 class="section-header">Methods</h3>
70 <ul class="link-list">
72 <li><a href="#M000034">::[]</a></li>
74 <li><a href="#M000036">::check_dir_present</a></li>
76 <li><a href="#M000038">::command_available?</a></li>
78 <li><a href="#M000037">::execute_verbosely</a></li>
80 <li><a href="#M000040">::filter_dependencies</a></li>
82 <li><a href="#M000035">::get_metadata</a></li>
84 <li><a href="#M000033">::load_packagers</a></li>
86 <li><a href="#M000039">::safe_system</a></li>
92 <!-- Included Modules -->
96 <div id="project-metadata">
99 <div id="fileindex-section" class="section project-section">
100 <h3 class="section-header">Files</h3>
103 <li class="file"><a href="../COPYING.html">COPYING</a></li>
105 <li class="file"><a href="../Gemfile.html">Gemfile</a></li>
107 <li class="file"><a href="../README.html">README</a></li>
109 <li class="file"><a href="../Rakefile.html">Rakefile</a></li>
111 <li class="file"><a href="../etc/client_cfg_dist.html">client.cfg.dist</a></li>
113 <li class="file"><a href="../etc/data-help_erb.html">data-help.erb</a></li>
115 <li class="file"><a href="../etc/discovery-help_erb.html">discovery-help.erb</a></li>
117 <li class="file"><a href="../etc/facts_yaml_dist.html">facts.yaml.dist</a></li>
119 <li class="file"><a href="../etc/metadata-help_erb.html">metadata-help.erb</a></li>
121 <li class="file"><a href="../etc/msg-help_erb.html">msg-help.erb</a></li>
123 <li class="file"><a href="../etc/rpc-help_erb.html">rpc-help.erb</a></li>
125 <li class="file"><a href="../etc/server_cfg_dist.html">server.cfg.dist</a></li>
127 <li class="file"><a href="../etc/ssl/PLACEHOLDER.html">PLACEHOLDER</a></li>
129 <li class="file"><a href="../etc/ssl/clients/PLACEHOLDER.html">PLACEHOLDER</a></li>
131 <li class="file"><a href="../lib/mcollective/generators/templates/action_snippet_erb.html">action_snippet.erb</a></li>
133 <li class="file"><a href="../lib/mcollective/generators/templates/data_input_snippet_erb.html">data_input_snippet.erb</a></li>
135 <li class="file"><a href="../lib/mcollective/generators/templates/ddl_erb.html">ddl.erb</a></li>
137 <li class="file"><a href="../lib/mcollective/generators/templates/plugin_erb.html">plugin.erb</a></li>
139 <li class="file"><a href="../lib/mcollective/locales/en_yml.html">en.yml</a></li>
141 <li class="file"><a href="../mcollective_init.html">mcollective.init</a></li>
147 <div id="classindex-section" class="section project-section">
148 <h3 class="section-header">Class Index
149 <span class="search-toggle"><img src="../images/find.png"
150 height="16" width="16" alt="[+]"
151 title="show/hide quicksearch" /></span></h3>
152 <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
154 <legend>Quicksearch</legend>
155 <input type="text" name="quicksearch" value=""
156 class="quicksearch-field" />
160 <ul class="link-list">
162 <li><a href="../MCollective.html">MCollective</a></li>
164 <li><a href="../MCollective/Agent.html">MCollective::Agent</a></li>
166 <li><a href="../MCollective/Agents.html">MCollective::Agents</a></li>
168 <li><a href="../MCollective/Aggregate.html">MCollective::Aggregate</a></li>
170 <li><a href="../MCollective/Aggregate/Base.html">MCollective::Aggregate::Base</a></li>
172 <li><a href="../MCollective/Aggregate/Result.html">MCollective::Aggregate::Result</a></li>
174 <li><a href="../MCollective/Aggregate/Result/Base.html">MCollective::Aggregate::Result::Base</a></li>
176 <li><a href="../MCollective/Aggregate/Result/CollectionResult.html">MCollective::Aggregate::Result::CollectionResult</a></li>
178 <li><a href="../MCollective/Aggregate/Result/NumericResult.html">MCollective::Aggregate::Result::NumericResult</a></li>
180 <li><a href="../MCollective/Application.html">MCollective::Application</a></li>
182 <li><a href="../MCollective/Applications.html">MCollective::Applications</a></li>
184 <li><a href="../MCollective/Cache.html">MCollective::Cache</a></li>
186 <li><a href="../MCollective/Client.html">MCollective::Client</a></li>
188 <li><a href="../MCollective/CodedError.html">MCollective::CodedError</a></li>
190 <li><a href="../MCollective/Config.html">MCollective::Config</a></li>
192 <li><a href="../MCollective/Connector.html">MCollective::Connector</a></li>
194 <li><a href="../MCollective/Connector/Base.html">MCollective::Connector::Base</a></li>
196 <li><a href="../MCollective/DDL.html">MCollective::DDL</a></li>
198 <li><a href="../MCollective/DDL/AgentDDL.html">MCollective::DDL::AgentDDL</a></li>
200 <li><a href="../MCollective/DDL/Base.html">MCollective::DDL::Base</a></li>
202 <li><a href="../MCollective/DDL/DataDDL.html">MCollective::DDL::DataDDL</a></li>
204 <li><a href="../MCollective/DDL/DiscoveryDDL.html">MCollective::DDL::DiscoveryDDL</a></li>
206 <li><a href="../MCollective/DDL/ValidatorDDL.html">MCollective::DDL::ValidatorDDL</a></li>
208 <li><a href="../MCollective/DDLValidationError.html">MCollective::DDLValidationError</a></li>
210 <li><a href="../MCollective/Data.html">MCollective::Data</a></li>
212 <li><a href="../MCollective/Data/Base.html">MCollective::Data::Base</a></li>
214 <li><a href="../MCollective/Data/Result.html">MCollective::Data::Result</a></li>
216 <li><a href="../MCollective/Discovery.html">MCollective::Discovery</a></li>
218 <li><a href="../MCollective/Facts.html">MCollective::Facts</a></li>
220 <li><a href="../MCollective/Facts/Base.html">MCollective::Facts::Base</a></li>
222 <li><a href="../MCollective/Generators.html">MCollective::Generators</a></li>
224 <li><a href="../MCollective/Generators/AgentGenerator.html">MCollective::Generators::AgentGenerator</a></li>
226 <li><a href="../MCollective/Generators/Base.html">MCollective::Generators::Base</a></li>
228 <li><a href="../MCollective/Generators/DataGenerator.html">MCollective::Generators::DataGenerator</a></li>
230 <li><a href="../MCollective/InvalidRPCData.html">MCollective::InvalidRPCData</a></li>
232 <li><a href="../MCollective/Log.html">MCollective::Log</a></li>
234 <li><a href="../MCollective/Logger.html">MCollective::Logger</a></li>
236 <li><a href="../MCollective/Logger/Base.html">MCollective::Logger::Base</a></li>
238 <li><a href="../MCollective/Logger/Console_logger.html">MCollective::Logger::Console_logger</a></li>
240 <li><a href="../MCollective/Logger/File_logger.html">MCollective::Logger::File_logger</a></li>
242 <li><a href="../MCollective/Logger/Syslog_logger.html">MCollective::Logger::Syslog_logger</a></li>
244 <li><a href="../MCollective/Matcher.html">MCollective::Matcher</a></li>
246 <li><a href="../MCollective/Matcher/Parser.html">MCollective::Matcher::Parser</a></li>
248 <li><a href="../MCollective/Matcher/Scanner.html">MCollective::Matcher::Scanner</a></li>
250 <li><a href="../MCollective/Message.html">MCollective::Message</a></li>
252 <li><a href="../MCollective/MissingRPCData.html">MCollective::MissingRPCData</a></li>
254 <li><a href="../MCollective/MsgDoesNotMatchRequestID.html">MCollective::MsgDoesNotMatchRequestID</a></li>
256 <li><a href="../MCollective/MsgTTLExpired.html">MCollective::MsgTTLExpired</a></li>
258 <li><a href="../MCollective/NotTargettedAtUs.html">MCollective::NotTargettedAtUs</a></li>
260 <li><a href="../MCollective/Optionparser.html">MCollective::Optionparser</a></li>
262 <li><a href="../MCollective/PluginManager.html">MCollective::PluginManager</a></li>
264 <li><a href="../MCollective/PluginPackager.html">MCollective::PluginPackager</a></li>
266 <li><a href="../MCollective/PluginPackager/AgentDefinition.html">MCollective::PluginPackager::AgentDefinition</a></li>
268 <li><a href="../MCollective/PluginPackager/StandardDefinition.html">MCollective::PluginPackager::StandardDefinition</a></li>
270 <li><a href="../MCollective/RPC.html">MCollective::RPC</a></li>
272 <li><a href="../MCollective/RPC/ActionRunner.html">MCollective::RPC::ActionRunner</a></li>
274 <li><a href="../MCollective/RPC/Agent.html">MCollective::RPC::Agent</a></li>
276 <li><a href="../MCollective/RPC/Audit.html">MCollective::RPC::Audit</a></li>
278 <li><a href="../MCollective/RPC/Client.html">MCollective::RPC::Client</a></li>
280 <li><a href="../MCollective/RPC/Helpers.html">MCollective::RPC::Helpers</a></li>
282 <li><a href="../MCollective/RPC/Progress.html">MCollective::RPC::Progress</a></li>
284 <li><a href="../MCollective/RPC/Reply.html">MCollective::RPC::Reply</a></li>
286 <li><a href="../MCollective/RPC/Request.html">MCollective::RPC::Request</a></li>
288 <li><a href="../MCollective/RPC/Result.html">MCollective::RPC::Result</a></li>
290 <li><a href="../MCollective/RPC/Stats.html">MCollective::RPC::Stats</a></li>
292 <li><a href="../MCollective/RPCAborted.html">MCollective::RPCAborted</a></li>
294 <li><a href="../MCollective/RPCError.html">MCollective::RPCError</a></li>
296 <li><a href="../MCollective/Registration.html">MCollective::Registration</a></li>
298 <li><a href="../MCollective/Registration/Base.html">MCollective::Registration::Base</a></li>
300 <li><a href="../MCollective/Runner.html">MCollective::Runner</a></li>
302 <li><a href="../MCollective/RunnerStats.html">MCollective::RunnerStats</a></li>
304 <li><a href="../MCollective/SSL.html">MCollective::SSL</a></li>
306 <li><a href="../MCollective/Security.html">MCollective::Security</a></li>
308 <li><a href="../MCollective/Security/Base.html">MCollective::Security::Base</a></li>
310 <li><a href="../MCollective/SecurityValidationFailed.html">MCollective::SecurityValidationFailed</a></li>
312 <li><a href="../MCollective/Shell.html">MCollective::Shell</a></li>
314 <li><a href="../MCollective/Translatable.html">MCollective::Translatable</a></li>
316 <li><a href="../MCollective/UnixDaemon.html">MCollective::UnixDaemon</a></li>
318 <li><a href="../MCollective/UnknownRPCAction.html">MCollective::UnknownRPCAction</a></li>
320 <li><a href="../MCollective/UnknownRPCError.html">MCollective::UnknownRPCError</a></li>
322 <li><a href="../MCollective/Util.html">MCollective::Util</a></li>
324 <li><a href="../MCollective/Validator.html">MCollective::Validator</a></li>
326 <li><a href="../MCollective/ValidatorError.html">MCollective::ValidatorError</a></li>
328 <li><a href="../MCollective/WindowsDaemon.html">MCollective::WindowsDaemon</a></li>
330 <li><a href="../Array.html">Array</a></li>
332 <li><a href="../Dir.html">Dir</a></li>
334 <li><a href="../Object.html">Object</a></li>
336 <li><a href="../String.html">String</a></li>
338 <li><a href="../Symbol.html">Symbol</a></li>
341 <div id="no-class-search-results" style="display: none;">No matching classes.</div>
348 <div id="documentation">
349 <h1 class="module">MCollective::PluginPackager</h1>
351 <div id="description">
363 <div id="public-class-method-details" class="method-section section">
364 <h3 class="section-header">Public Class Methods</h3>
367 <div id="--method" class="method-detail ">
368 <a name="M000034"></a>
370 <div class="method-heading">
372 <span class="method-name">[]</span><span
373 class="method-args">(klass)</span>
374 <span class="method-click-advice">click to toggle source</span>
378 <div class="method-description">
380 <p class="missing-docs">(Not documented)</p>
384 <div class="method-source-code"
387 <span class="ruby-comment cmt"># File lib/mcollective/pluginpackager.rb, line 12</span>
388 12: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-operator">[]</span>(<span class="ruby-identifier">klass</span>)
389 13: <span class="ruby-identifier">const_get</span>(<span class="ruby-node">"#{klass}"</span>)
390 14: <span class="ruby-keyword kw">end</span></pre>
399 <div id="check-dir-present-method" class="method-detail ">
400 <a name="M000036"></a>
402 <div class="method-heading">
404 <span class="method-name">check_dir_present</span><span
405 class="method-args">(path)</span>
406 <span class="method-click-advice">click to toggle source</span>
410 <div class="method-description">
413 Checks if a directory is present and not empty
418 <div class="method-source-code"
419 id="check-dir-present-source">
421 <span class="ruby-comment cmt"># File lib/mcollective/pluginpackager.rb, line 31</span>
422 31: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">check_dir_present</span>(<span class="ruby-identifier">path</span>)
423 32: (<span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-identifier">path</span>) <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span><span class="ruby-constant">Dir</span>.<span class="ruby-identifier">glob</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">path</span>, <span class="ruby-value str">"*"</span>)).<span class="ruby-identifier">empty?</span>)
424 33: <span class="ruby-keyword kw">end</span></pre>
433 <div id="command-available--method" class="method-detail ">
434 <a name="M000038"></a>
436 <div class="method-heading">
438 <span class="method-name">command_available?</span><span
439 class="method-args">(build_tool)</span>
440 <span class="method-click-advice">click to toggle source</span>
444 <div class="method-description">
447 Checks if a build tool is present on the system
452 <div class="method-source-code"
453 id="command-available--source">
455 <span class="ruby-comment cmt"># File lib/mcollective/pluginpackager.rb, line 54</span>
456 54: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">command_available?</span>(<span class="ruby-identifier">build_tool</span>)
457 55: <span class="ruby-constant">ENV</span>[<span class="ruby-value str">"PATH"</span>].<span class="ruby-identifier">split</span>(<span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-constant">PATH_SEPARATOR</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">path</span><span class="ruby-operator">|</span>
458 56: <span class="ruby-identifier">builder</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">path</span>, <span class="ruby-identifier">build_tool</span>)
459 57: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span>(<span class="ruby-identifier">builder</span>)
460 58: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span>
461 59: <span class="ruby-keyword kw">end</span>
462 60: <span class="ruby-keyword kw">end</span>
463 61: <span class="ruby-keyword kw">false</span>
464 62: <span class="ruby-keyword kw">end</span></pre>
473 <div id="execute-verbosely-method" class="method-detail ">
474 <a name="M000037"></a>
476 <div class="method-heading">
478 <span class="method-name">execute_verbosely</span><span
479 class="method-args">(verbose, &block)</span>
480 <span class="method-click-advice">click to toggle source</span>
484 <div class="method-description">
487 Quietly calls a block if verbose parameter is false
492 <div class="method-source-code"
493 id="execute-verbosely-source">
495 <span class="ruby-comment cmt"># File lib/mcollective/pluginpackager.rb, line 36</span>
496 36: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">execute_verbosely</span>(<span class="ruby-identifier">verbose</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
497 37: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">verbose</span>
498 38: <span class="ruby-identifier">old_stdout</span> = <span class="ruby-identifier">$stdout</span>.<span class="ruby-identifier">clone</span>
499 39: <span class="ruby-identifier">$stdout</span>.<span class="ruby-identifier">reopen</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">"/dev/null"</span>, <span class="ruby-value str">"w"</span>))
500 40: <span class="ruby-keyword kw">begin</span>
501 41: <span class="ruby-identifier">block</span>.<span class="ruby-identifier">call</span>
502 42: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Exception</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">e</span>
503 43: <span class="ruby-identifier">$stdout</span>.<span class="ruby-identifier">reopen</span> <span class="ruby-identifier">old_stdout</span>
504 44: <span class="ruby-identifier">raise</span> <span class="ruby-identifier">e</span>
505 45: <span class="ruby-keyword kw">ensure</span>
506 46: <span class="ruby-identifier">$stdout</span>.<span class="ruby-identifier">reopen</span> <span class="ruby-identifier">old_stdout</span>
507 47: <span class="ruby-keyword kw">end</span>
508 48: <span class="ruby-keyword kw">else</span>
509 49: <span class="ruby-identifier">block</span>.<span class="ruby-identifier">call</span>
510 50: <span class="ruby-keyword kw">end</span>
511 51: <span class="ruby-keyword kw">end</span></pre>
520 <div id="filter-dependencies-method" class="method-detail ">
521 <a name="M000040"></a>
523 <div class="method-heading">
525 <span class="method-name">filter_dependencies</span><span
526 class="method-args">(prefix, dependencies)</span>
527 <span class="method-click-advice">click to toggle source</span>
531 <div class="method-description">
534 Filter out platform specific dependencies Given a list of dependencies
535 named - debian::foo redhat::bar <a
536 href="PluginPackager.html#M000040">PluginPackager.filter_dependencies</a>(‘debian’,
537 dependencies) will return foo.
542 <div class="method-source-code"
543 id="filter-dependencies-source">
545 <span class="ruby-comment cmt"># File lib/mcollective/pluginpackager.rb, line 74</span>
546 74: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">filter_dependencies</span>(<span class="ruby-identifier">prefix</span>, <span class="ruby-identifier">dependencies</span>)
547 75: <span class="ruby-identifier">dependencies</span>.<span class="ruby-identifier">map</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">dependency</span><span class="ruby-operator">|</span>
548 76: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">dependency</span>[<span class="ruby-identifier">:name</span>] <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/^(\w+)::(\w+)/</span>
549 77: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">prefix</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">$1</span>
550 78: <span class="ruby-identifier">dependency</span>[<span class="ruby-identifier">:name</span>] = <span class="ruby-identifier">$2</span>
551 79: <span class="ruby-identifier">dependency</span>
552 80: <span class="ruby-keyword kw">else</span>
553 81: <span class="ruby-keyword kw">nil</span>
554 82: <span class="ruby-keyword kw">end</span>
555 83: <span class="ruby-keyword kw">else</span>
556 84: <span class="ruby-identifier">dependency</span>
557 85: <span class="ruby-keyword kw">end</span>
558 86: <span class="ruby-keyword kw">end</span>.<span class="ruby-identifier">reject</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">dependency</span><span class="ruby-operator">|</span> <span class="ruby-identifier">dependency</span> <span class="ruby-operator">==</span> <span class="ruby-keyword kw">nil</span> }
559 87: <span class="ruby-keyword kw">end</span></pre>
568 <div id="get-metadata-method" class="method-detail ">
569 <a name="M000035"></a>
571 <div class="method-heading">
573 <span class="method-name">get_metadata</span><span
574 class="method-args">(path, type)</span>
575 <span class="method-click-advice">click to toggle source</span>
579 <div class="method-description">
582 Fetch and return metadata from plugin <a href="DDL.html">DDL</a>
587 <div class="method-source-code"
588 id="get-metadata-source">
590 <span class="ruby-comment cmt"># File lib/mcollective/pluginpackager.rb, line 17</span>
591 17: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">get_metadata</span>(<span class="ruby-identifier">path</span>, <span class="ruby-identifier">type</span>)
592 18: <span class="ruby-identifier">ddl</span> = <span class="ruby-constant">DDL</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">"package"</span>, <span class="ruby-identifier">type</span>.<span class="ruby-identifier">to_sym</span>, <span class="ruby-keyword kw">false</span>)
594 20: <span class="ruby-keyword kw">begin</span>
595 21: <span class="ruby-identifier">ddl_file</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">read</span>(<span class="ruby-constant">Dir</span>.<span class="ruby-identifier">glob</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">path</span>, <span class="ruby-identifier">type</span>, <span class="ruby-value str">"*.ddl"</span>)).<span class="ruby-identifier">first</span>)
596 22: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Exception</span>
597 23: <span class="ruby-identifier">raise</span> <span class="ruby-node">"failed to load ddl file in plugin directory : #{File.join(path, type)}"</span>
598 24: <span class="ruby-keyword kw">end</span>
599 25: <span class="ruby-identifier">ddl</span>.<span class="ruby-identifier">instance_eval</span> <span class="ruby-identifier">ddl_file</span>
601 27: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">ddl</span>.<span class="ruby-identifier">meta</span>, <span class="ruby-identifier">ddl</span>.<span class="ruby-identifier">requirements</span>[<span class="ruby-identifier">:mcollective</span>]
602 28: <span class="ruby-keyword kw">end</span></pre>
611 <div id="load-packagers-method" class="method-detail ">
612 <a name="M000033"></a>
614 <div class="method-heading">
616 <span class="method-name">load_packagers</span><span
617 class="method-args">()</span>
618 <span class="method-click-advice">click to toggle source</span>
622 <div class="method-description">
625 Package implementation plugins
630 <div class="method-source-code"
631 id="load-packagers-source">
633 <span class="ruby-comment cmt"># File lib/mcollective/pluginpackager.rb, line 8</span>
634 8: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">load_packagers</span>
635 9: <span class="ruby-constant">PluginManager</span>.<span class="ruby-identifier">find_and_load</span>(<span class="ruby-value str">"pluginpackager"</span>)
636 10: <span class="ruby-keyword kw">end</span></pre>
645 <div id="safe-system-method" class="method-detail ">
646 <a name="M000039"></a>
648 <div class="method-heading">
650 <span class="method-name">safe_system</span><span
651 class="method-args">(*args)</span>
652 <span class="method-click-advice">click to toggle source</span>
656 <div class="method-description">
658 <p class="missing-docs">(Not documented)</p>
662 <div class="method-source-code"
663 id="safe-system-source">
665 <span class="ruby-comment cmt"># File lib/mcollective/pluginpackager.rb, line 64</span>
666 64: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">safe_system</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
667 65: <span class="ruby-identifier">raise</span>(<span class="ruby-constant">RuntimeError</span>, <span class="ruby-node">"Failed: #{args.join(' ')}"</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">system</span> <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>
668 66: <span class="ruby-keyword kw">end</span></pre>
683 <div id="rdoc-debugging-section-dump" class="debugging-section">
685 <p>Disabled; run with --debug to generate this.</p>
689 <div id="validator-badges">
690 <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
691 <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
692 Rdoc Generator</a> 1.1.6</small>.</p>