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">
5 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7 <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
9 <title>File: Rakefile [mcollective version 2.3.3]</title>
11 <link type="text/css" media="screen" href="./rdoc.css" rel="stylesheet" />
13 <script src="./js/jquery.js" type="text/javascript"
14 charset="utf-8"></script>
15 <script src="./js/thickbox-compressed.js" type="text/javascript"
16 charset="utf-8"></script>
17 <script src="./js/quicksearch.js" type="text/javascript"
18 charset="utf-8"></script>
19 <script src="./js/darkfish.js" type="text/javascript"
20 charset="utf-8"></script>
25 <div id="project-metadata">
28 <div id="fileindex-section" class="section project-section">
29 <h3 class="section-header">Files</h3>
32 <li class="file"><a href="./COPYING.html">COPYING</a></li>
34 <li class="file"><a href="./Gemfile.html">Gemfile</a></li>
36 <li class="file"><a href="./README.html">README</a></li>
38 <li class="file"><a href="./Rakefile.html">Rakefile</a></li>
40 <li class="file"><a href="./etc/client_cfg_dist.html">client.cfg.dist</a></li>
42 <li class="file"><a href="./etc/data-help_erb.html">data-help.erb</a></li>
44 <li class="file"><a href="./etc/discovery-help_erb.html">discovery-help.erb</a></li>
46 <li class="file"><a href="./etc/facts_yaml_dist.html">facts.yaml.dist</a></li>
48 <li class="file"><a href="./etc/metadata-help_erb.html">metadata-help.erb</a></li>
50 <li class="file"><a href="./etc/msg-help_erb.html">msg-help.erb</a></li>
52 <li class="file"><a href="./etc/rpc-help_erb.html">rpc-help.erb</a></li>
54 <li class="file"><a href="./etc/server_cfg_dist.html">server.cfg.dist</a></li>
56 <li class="file"><a href="./etc/ssl/PLACEHOLDER.html">PLACEHOLDER</a></li>
58 <li class="file"><a href="./etc/ssl/clients/PLACEHOLDER.html">PLACEHOLDER</a></li>
60 <li class="file"><a href="./lib/mcollective/generators/templates/action_snippet_erb.html">action_snippet.erb</a></li>
62 <li class="file"><a href="./lib/mcollective/generators/templates/data_input_snippet_erb.html">data_input_snippet.erb</a></li>
64 <li class="file"><a href="./lib/mcollective/generators/templates/ddl_erb.html">ddl.erb</a></li>
66 <li class="file"><a href="./lib/mcollective/generators/templates/plugin_erb.html">plugin.erb</a></li>
68 <li class="file"><a href="./lib/mcollective/locales/en_yml.html">en.yml</a></li>
70 <li class="file"><a href="./mcollective_init.html">mcollective.init</a></li>
76 <div id="classindex-section" class="section project-section">
77 <h3 class="section-header">Class Index
78 <span class="search-toggle"><img src="./images/find.png"
79 height="16" width="16" alt="[+]"
80 title="show/hide quicksearch" /></span></h3>
81 <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
83 <legend>Quicksearch</legend>
84 <input type="text" name="quicksearch" value=""
85 class="quicksearch-field" />
89 <ul class="link-list">
91 <li><a href="./MCollective.html">MCollective</a></li>
93 <li><a href="./MCollective/Agent.html">MCollective::Agent</a></li>
95 <li><a href="./MCollective/Agents.html">MCollective::Agents</a></li>
97 <li><a href="./MCollective/Aggregate.html">MCollective::Aggregate</a></li>
99 <li><a href="./MCollective/Aggregate/Base.html">MCollective::Aggregate::Base</a></li>
101 <li><a href="./MCollective/Aggregate/Result.html">MCollective::Aggregate::Result</a></li>
103 <li><a href="./MCollective/Aggregate/Result/Base.html">MCollective::Aggregate::Result::Base</a></li>
105 <li><a href="./MCollective/Aggregate/Result/CollectionResult.html">MCollective::Aggregate::Result::CollectionResult</a></li>
107 <li><a href="./MCollective/Aggregate/Result/NumericResult.html">MCollective::Aggregate::Result::NumericResult</a></li>
109 <li><a href="./MCollective/Application.html">MCollective::Application</a></li>
111 <li><a href="./MCollective/Applications.html">MCollective::Applications</a></li>
113 <li><a href="./MCollective/Cache.html">MCollective::Cache</a></li>
115 <li><a href="./MCollective/Client.html">MCollective::Client</a></li>
117 <li><a href="./MCollective/CodedError.html">MCollective::CodedError</a></li>
119 <li><a href="./MCollective/Config.html">MCollective::Config</a></li>
121 <li><a href="./MCollective/Connector.html">MCollective::Connector</a></li>
123 <li><a href="./MCollective/Connector/Base.html">MCollective::Connector::Base</a></li>
125 <li><a href="./MCollective/DDL.html">MCollective::DDL</a></li>
127 <li><a href="./MCollective/DDL/AgentDDL.html">MCollective::DDL::AgentDDL</a></li>
129 <li><a href="./MCollective/DDL/Base.html">MCollective::DDL::Base</a></li>
131 <li><a href="./MCollective/DDL/DataDDL.html">MCollective::DDL::DataDDL</a></li>
133 <li><a href="./MCollective/DDL/DiscoveryDDL.html">MCollective::DDL::DiscoveryDDL</a></li>
135 <li><a href="./MCollective/DDL/ValidatorDDL.html">MCollective::DDL::ValidatorDDL</a></li>
137 <li><a href="./MCollective/DDLValidationError.html">MCollective::DDLValidationError</a></li>
139 <li><a href="./MCollective/Data.html">MCollective::Data</a></li>
141 <li><a href="./MCollective/Data/Base.html">MCollective::Data::Base</a></li>
143 <li><a href="./MCollective/Data/Result.html">MCollective::Data::Result</a></li>
145 <li><a href="./MCollective/Discovery.html">MCollective::Discovery</a></li>
147 <li><a href="./MCollective/Facts.html">MCollective::Facts</a></li>
149 <li><a href="./MCollective/Facts/Base.html">MCollective::Facts::Base</a></li>
151 <li><a href="./MCollective/Generators.html">MCollective::Generators</a></li>
153 <li><a href="./MCollective/Generators/AgentGenerator.html">MCollective::Generators::AgentGenerator</a></li>
155 <li><a href="./MCollective/Generators/Base.html">MCollective::Generators::Base</a></li>
157 <li><a href="./MCollective/Generators/DataGenerator.html">MCollective::Generators::DataGenerator</a></li>
159 <li><a href="./MCollective/InvalidRPCData.html">MCollective::InvalidRPCData</a></li>
161 <li><a href="./MCollective/Log.html">MCollective::Log</a></li>
163 <li><a href="./MCollective/Logger.html">MCollective::Logger</a></li>
165 <li><a href="./MCollective/Logger/Base.html">MCollective::Logger::Base</a></li>
167 <li><a href="./MCollective/Logger/Console_logger.html">MCollective::Logger::Console_logger</a></li>
169 <li><a href="./MCollective/Logger/File_logger.html">MCollective::Logger::File_logger</a></li>
171 <li><a href="./MCollective/Logger/Syslog_logger.html">MCollective::Logger::Syslog_logger</a></li>
173 <li><a href="./MCollective/Matcher.html">MCollective::Matcher</a></li>
175 <li><a href="./MCollective/Matcher/Parser.html">MCollective::Matcher::Parser</a></li>
177 <li><a href="./MCollective/Matcher/Scanner.html">MCollective::Matcher::Scanner</a></li>
179 <li><a href="./MCollective/Message.html">MCollective::Message</a></li>
181 <li><a href="./MCollective/MissingRPCData.html">MCollective::MissingRPCData</a></li>
183 <li><a href="./MCollective/MsgDoesNotMatchRequestID.html">MCollective::MsgDoesNotMatchRequestID</a></li>
185 <li><a href="./MCollective/MsgTTLExpired.html">MCollective::MsgTTLExpired</a></li>
187 <li><a href="./MCollective/NotTargettedAtUs.html">MCollective::NotTargettedAtUs</a></li>
189 <li><a href="./MCollective/Optionparser.html">MCollective::Optionparser</a></li>
191 <li><a href="./MCollective/PluginManager.html">MCollective::PluginManager</a></li>
193 <li><a href="./MCollective/PluginPackager.html">MCollective::PluginPackager</a></li>
195 <li><a href="./MCollective/PluginPackager/AgentDefinition.html">MCollective::PluginPackager::AgentDefinition</a></li>
197 <li><a href="./MCollective/PluginPackager/StandardDefinition.html">MCollective::PluginPackager::StandardDefinition</a></li>
199 <li><a href="./MCollective/RPC.html">MCollective::RPC</a></li>
201 <li><a href="./MCollective/RPC/ActionRunner.html">MCollective::RPC::ActionRunner</a></li>
203 <li><a href="./MCollective/RPC/Agent.html">MCollective::RPC::Agent</a></li>
205 <li><a href="./MCollective/RPC/Audit.html">MCollective::RPC::Audit</a></li>
207 <li><a href="./MCollective/RPC/Client.html">MCollective::RPC::Client</a></li>
209 <li><a href="./MCollective/RPC/Helpers.html">MCollective::RPC::Helpers</a></li>
211 <li><a href="./MCollective/RPC/Progress.html">MCollective::RPC::Progress</a></li>
213 <li><a href="./MCollective/RPC/Reply.html">MCollective::RPC::Reply</a></li>
215 <li><a href="./MCollective/RPC/Request.html">MCollective::RPC::Request</a></li>
217 <li><a href="./MCollective/RPC/Result.html">MCollective::RPC::Result</a></li>
219 <li><a href="./MCollective/RPC/Stats.html">MCollective::RPC::Stats</a></li>
221 <li><a href="./MCollective/RPCAborted.html">MCollective::RPCAborted</a></li>
223 <li><a href="./MCollective/RPCError.html">MCollective::RPCError</a></li>
225 <li><a href="./MCollective/Registration.html">MCollective::Registration</a></li>
227 <li><a href="./MCollective/Registration/Base.html">MCollective::Registration::Base</a></li>
229 <li><a href="./MCollective/Runner.html">MCollective::Runner</a></li>
231 <li><a href="./MCollective/RunnerStats.html">MCollective::RunnerStats</a></li>
233 <li><a href="./MCollective/SSL.html">MCollective::SSL</a></li>
235 <li><a href="./MCollective/Security.html">MCollective::Security</a></li>
237 <li><a href="./MCollective/Security/Base.html">MCollective::Security::Base</a></li>
239 <li><a href="./MCollective/SecurityValidationFailed.html">MCollective::SecurityValidationFailed</a></li>
241 <li><a href="./MCollective/Shell.html">MCollective::Shell</a></li>
243 <li><a href="./MCollective/Translatable.html">MCollective::Translatable</a></li>
245 <li><a href="./MCollective/UnixDaemon.html">MCollective::UnixDaemon</a></li>
247 <li><a href="./MCollective/UnknownRPCAction.html">MCollective::UnknownRPCAction</a></li>
249 <li><a href="./MCollective/UnknownRPCError.html">MCollective::UnknownRPCError</a></li>
251 <li><a href="./MCollective/Util.html">MCollective::Util</a></li>
253 <li><a href="./MCollective/Validator.html">MCollective::Validator</a></li>
255 <li><a href="./MCollective/ValidatorError.html">MCollective::ValidatorError</a></li>
257 <li><a href="./MCollective/WindowsDaemon.html">MCollective::WindowsDaemon</a></li>
259 <li><a href="./Array.html">Array</a></li>
261 <li><a href="./Dir.html">Dir</a></li>
263 <li><a href="./Object.html">Object</a></li>
265 <li><a href="./String.html">String</a></li>
267 <li><a href="./Symbol.html">Symbol</a></li>
270 <div id="no-class-search-results" style="display: none;">No matching classes.</div>
277 <div id="documentation">
279 RAKE_ROOT = File.expand_path(File.dirname(<em>FILE</em>))
282 # Allow override of RELEASE using BUILD_NUMBER ENV[“RELEASE”] =
283 ENV[“BUILD_NUMBER“] if ENV[“BUILD_NUMBER“]
289 load File.join(RAKE_ROOT, 'ext', 'packaging.rake')
295 def announce(msg=’’)
298 STDERR.puts "================"
300 STDERR.puts "================"
306 def safe_system *args
309 raise RuntimeError, "Failed: #{args.join(' ')}" unless system(*args)
318 unless File.directory?(File.join(RAKE_ROOT, 'ext', 'packaging'))
319 Rake::Task["package:bootstrap"].invoke
321 load File.join(RAKE_ROOT, 'ext', 'packaging.rake')
323 STDERR.puts "Could not load packaging tools. exiting"
335 mv("pkg", "build")
341 desc “Cleanup” task :clean do
344 rm_rf "build"
345 rm_rf "doc"
351 desc “Create the .debs” task :deb => :clean do
355 announce("Building debian packages for #{@build.project}-#{@build.version}-#{@build.release}")
356 Rake::Task["package:deb"].invoke
358 if ENV['SIGNED'] == '1'
359 deb_flag = "-k#{ENV['SIGNWITH']}" if ENV['SIGNWITH']
360 safe_system %{/usr/bin/debsign #{deb_flag} pkg/deb/*.changes}
368 desc “Build documentation” task :doc => :clean do
372 Rake::Task["package:doc"].invoke
378 desc “Build a gem” task :gem => :clean do
382 Rake::Task["gem"].reenable
383 Rake::Task["package:gem"].invoke
389 desc “Create a tarball for this release” task :package =>
394 announce "Creating #{@build.project}-#{@build.version}.tar.gz"
395 Rake::Task["package:tar"].invoke
402 desc “Creates a RPM” task :rpm => :clean do
406 announce("Building RPM for #{@build.project}-#{@build.version}-#{@build.release}")
407 Rake::Task["package:rpm"].invoke
408 Rake::Task["package:srpm"].invoke
409 if ENV['SIGNED'] == '1'
410 safe_system %{/usr/bin/rpm --sign pkg/**/*.rpm}
418 desc “Run spec tests” task :test do
421 sh "cd spec && rake"
427 desc “Creates the website as a tarball” task :website => :clean
431 FileUtils.mkdir_p("build/marionette-collective.org/html")
433 Dir.chdir("website") do
434 safe_system("jekyll ../build/marionette-collective.org/html")
437 unless File.exist?("build/marionette-collective.org/html/index.html")
438 raise "Failed to build website"
441 Dir.chdir("build") do
442 safe_system("tar -cvzf marionette-collective-org-#{Time.now.to_i}.tgz marionette-collective.org")
449 desc “Update the website error code reference based on current
450 local” task :update_msgweb do
453 mcollective_dir = File.join(File.dirname(__FILE__))
455 $:.insert(0, File.join(mcollective_dir, "lib"))
457 require 'mcollective'
459 messages = YAML.load_file(File.join(mcollective_dir, "lib", "mcollective", "locales", "en.yml"))
461 webdir = File.join(mcollective_dir, "website", "messages")
463 I18n.load_path = Dir[File.join(mcollective_dir, "lib", "mcollective", "locales", "*.yml")]
466 messages["en"].keys.each do |msg_code|
467 md_file = File.join(webdir, "#{msg_code}.md")
469 puts "....writing %s" % md_file
471 File.open(md_file, "w") do |md|
472 md.puts "---"
473 md.puts "layout: default"
474 md.puts "title: Message detail for %s" % msg_code
475 md.puts "toc: false"
476 md.puts "---"
478 md.puts "Example Message"
479 md.puts "---------------"
481 md.puts " %s" % (MCollective::Util.t("%s.example" % msg_code, :raise => true) rescue MCollective::Util.t("%s.pattern" % msg_code))
483 md.puts "Additional Information"
484 md.puts "----------------------"
486 md.puts MCollective::Util.t("%s.expanded" % msg_code, :raise => true)
496 <div id="validator-badges">
497 <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
498 <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
499 Rdoc Generator</a> 1.1.6</small>.</p>