rake 0.4.11 → 0.8.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. data/CHANGES +288 -1
  2. data/README +101 -114
  3. data/Rakefile +269 -54
  4. data/TODO +1 -0
  5. data/bin/rake +26 -3
  6. data/doc/command_line_usage.rdoc +102 -0
  7. data/doc/jamis.rb +133 -106
  8. data/doc/rake.1.gz +0 -0
  9. data/doc/rakefile.rdoc +304 -4
  10. data/doc/release_notes/rake-0.4.14.rdoc +23 -0
  11. data/doc/release_notes/rake-0.4.15.rdoc +35 -0
  12. data/doc/release_notes/rake-0.5.0.rdoc +53 -0
  13. data/doc/release_notes/rake-0.5.3.rdoc +78 -0
  14. data/doc/release_notes/rake-0.5.4.rdoc +46 -0
  15. data/doc/release_notes/rake-0.6.0.rdoc +141 -0
  16. data/doc/release_notes/rake-0.7.0.rdoc +119 -0
  17. data/doc/release_notes/rake-0.7.1.rdoc +59 -0
  18. data/doc/release_notes/rake-0.7.2.rdoc +121 -0
  19. data/doc/release_notes/rake-0.7.3.rdoc +47 -0
  20. data/doc/release_notes/rake-0.8.0.rdoc +114 -0
  21. data/doc/release_notes/rake-0.8.2.rdoc +165 -0
  22. data/doc/release_notes/rake-0.8.3.rdoc +112 -0
  23. data/doc/release_notes/rake-0.8.4.rdoc +147 -0
  24. data/doc/release_notes/rake-0.8.5.rdoc +53 -0
  25. data/doc/release_notes/rake-0.8.6.rdoc +55 -0
  26. data/doc/release_notes/rake-0.8.7.rdoc +55 -0
  27. data/lib/rake/alt_system.rb +108 -0
  28. data/lib/rake/classic_namespace.rb +8 -0
  29. data/lib/rake/clean.rb +3 -1
  30. data/lib/rake/contrib/ftptools.rb +40 -26
  31. data/lib/rake/contrib/publisher.rb +1 -1
  32. data/lib/rake/contrib/rubyforgepublisher.rb +3 -3
  33. data/lib/rake/contrib/sshpublisher.rb +1 -1
  34. data/lib/rake/contrib/sys.rb +25 -23
  35. data/lib/rake/gempackagetask.rb +14 -15
  36. data/lib/rake/loaders/makefile.rb +42 -0
  37. data/lib/rake/packagetask.rb +65 -33
  38. data/lib/rake/rake_test_loader.rb +5 -0
  39. data/lib/rake/rdoctask.rb +112 -31
  40. data/lib/rake/ruby182_test_unit_fix.rb +23 -0
  41. data/lib/rake/runtest.rb +4 -4
  42. data/lib/rake/tasklib.rb +11 -12
  43. data/lib/rake/testtask.rb +67 -24
  44. data/lib/rake/win32.rb +55 -0
  45. data/lib/rake.rb +2087 -578
  46. data/test/capture_stdout.rb +26 -0
  47. data/test/check_expansion.rb +5 -0
  48. data/test/check_no_expansion.rb +5 -0
  49. data/test/data/chains/Rakefile +15 -0
  50. data/test/data/default/Rakefile +19 -0
  51. data/test/data/dryrun/Rakefile +22 -0
  52. data/test/data/file_creation_task/Rakefile +33 -0
  53. data/test/data/imports/Rakefile +19 -0
  54. data/test/data/imports/deps.mf +1 -0
  55. data/test/data/multidesc/Rakefile +17 -0
  56. data/test/data/namespace/Rakefile +57 -0
  57. data/test/data/rakelib/test1.rb +3 -0
  58. data/test/data/sample.mf +14 -0
  59. data/test/data/statusreturn/Rakefile +8 -0
  60. data/test/data/unittest/Rakefile +1 -0
  61. data/test/filecreation.rb +18 -12
  62. data/test/functional.rb +6 -73
  63. data/test/in_environment.rb +30 -0
  64. data/test/rake_test_setup.rb +24 -0
  65. data/test/reqfile.rb +3 -0
  66. data/test/reqfile2.rb +3 -0
  67. data/test/session_functional.rb +339 -0
  68. data/test/shellcommand.rb +0 -0
  69. data/test/test_application.rb +675 -0
  70. data/test/{testclean.rb → test_clean.rb} +1 -0
  71. data/test/test_definitions.rb +85 -0
  72. data/test/test_earlytime.rb +35 -0
  73. data/test/test_extension.rb +63 -0
  74. data/test/test_file_creation_task.rb +62 -0
  75. data/test/test_file_task.rb +143 -0
  76. data/test/test_filelist.rb +623 -0
  77. data/test/test_fileutils.rb +251 -0
  78. data/test/{testftp.rb → test_ftp.rb} +5 -1
  79. data/test/test_invocation_chain.rb +81 -0
  80. data/test/test_makefile_loader.rb +26 -0
  81. data/test/test_multitask.rb +45 -0
  82. data/test/test_namespace.rb +55 -0
  83. data/test/{testpackagetask.rb → test_package_task.rb} +49 -12
  84. data/test/test_pathmap.rb +210 -0
  85. data/test/test_pseudo_status.rb +26 -0
  86. data/test/test_rake.rb +41 -0
  87. data/test/test_rdoc_task.rb +88 -0
  88. data/test/test_require.rb +35 -0
  89. data/test/test_rules.rb +349 -0
  90. data/test/test_task_arguments.rb +89 -0
  91. data/test/test_task_manager.rb +173 -0
  92. data/test/test_tasklib.rb +12 -0
  93. data/test/test_tasks.rb +374 -0
  94. data/test/{testtesttask.rb → test_test_task.rb} +8 -2
  95. data/test/test_top_level_functions.rb +86 -0
  96. data/test/test_win32.rb +72 -0
  97. metadata +184 -84
  98. data/test/testfilelist.rb +0 -255
  99. data/test/testfileutils.rb +0 -83
  100. data/test/testtasks.rb +0 -371
  101. /data/test/contrib/{testsys.rb → test_sys.rb} +0 -0
data/Rakefile CHANGED
@@ -1,9 +1,9 @@
1
1
  # Rakefile for rake -*- ruby -*-
2
2
 
3
- # Copyright 2003, 2004 by Jim Weirich (jim@weirichhouse.org)
3
+ # Copyright 2003, 2004, 2005 by Jim Weirich (jim@weirichhouse.org)
4
4
  # All rights reserved.
5
5
 
6
- # This file is may be distributed under an MIT style license. See
6
+ # This file may be distributed under an MIT style license. See
7
7
  # MIT-LICENSE for details.
8
8
 
9
9
  begin
@@ -16,64 +16,109 @@ require 'rake/clean'
16
16
  require 'rake/testtask'
17
17
  require 'rake/rdoctask'
18
18
 
19
- CLEAN.include('**/*.o')
20
- CLOBBER.include('doc/example/main')
19
+ CLEAN.include('**/*.o', '*.dot', '**/.*.rbc')
20
+ CLOBBER.include('doc/example/main', 'testdata')
21
+ CLOBBER.include('test/data/**/temp_*')
22
+ CLOBBER.include('test/data/chains/play.*')
23
+ CLOBBER.include('test/data/file_creation_task/build')
24
+ CLOBBER.include('test/data/file_creation_task/src')
25
+ CLOBBER.include('TAGS')
26
+ CLOBBER.include('coverage', 'rcov_aggregate')
27
+
28
+ # Prevent OS X from including extended attribute junk in the tar output
29
+ ENV['COPY_EXTENDED_ATTRIBUTES_DISABLE'] = 'true'
30
+
31
+ def announce(msg='')
32
+ STDERR.puts msg
33
+ end
21
34
 
22
35
  # Determine the current version of the software
23
36
 
24
- if `ruby -Ilib ./bin/rake --version` =~ /\S+$/
25
- PKG_VERSION = $&
37
+ if `ruby -Ilib ./bin/rake --version` =~ /rake, version ([0-9.]+)$/
38
+ CURRENT_VERSION = $1
26
39
  else
27
- PKG_VERSION = "0.0.0"
40
+ CURRENT_VERSION = "0.0.0"
28
41
  end
29
42
 
43
+ $package_version = CURRENT_VERSION
44
+
30
45
  SRC_RB = FileList['lib/**/*.rb']
31
46
 
32
47
  # The default task is run if rake is given no explicit arguments.
33
48
 
34
49
  desc "Default Task"
35
- task :default => :test
50
+ task :default => :test_all
36
51
 
37
52
  # Test Tasks ---------------------------------------------------------
38
-
39
- Rake::TestTask.new do |t|
40
- t.test_files = FileList['test/test*.rb']
41
- t.verbose = true
53
+ task :dbg do |t|
54
+ puts "Arguments are: #{t.args.join(', ')}"
42
55
  end
43
56
 
44
- Rake::TestTask.new(:testfun) do |t|
45
- t.pattern = 'test/fun*.rb'
46
- t.verbose = true
57
+ # Common Abbreviations ...
58
+
59
+ task :ta => :test_all
60
+ task :tf => :test_functional
61
+ task :tu => :test_units
62
+ task :tc => :test_contribs
63
+ task :test => :test_units
64
+
65
+ Rake::TestTask.new(:test_all) do |t|
66
+ t.test_files = FileList[
67
+ 'test/test*.rb',
68
+ 'test/contrib/test*.rb',
69
+ 'test/fun*.rb'
70
+ ]
71
+ t.warning = true
72
+ t.verbose = false
47
73
  end
48
74
 
49
- Rake::TestTask.new(:testcontrib) do |t|
50
- t.pattern = 'test/contrib/test*.rb'
51
- t.verbose = true
75
+ Rake::TestTask.new(:test_units) do |t|
76
+ t.test_files = FileList['test/test*.rb']
77
+ t.warning = true
78
+ t.verbose = false
52
79
  end
53
80
 
54
- directory 'testdata'
55
- task :test => ['testdata']
81
+ Rake::TestTask.new(:test_functional) do |t|
82
+ t.test_files = FileList['test/fun*.rb']
83
+ t.warning = true
84
+ t.verbose = false
85
+ end
56
86
 
57
- desc "Run all test targets"
58
- task :testall => [:test, :testcontrib, :testfun]
87
+ Rake::TestTask.new(:test_contribs) do |t|
88
+ t.test_files = FileList['test/contrib/test*.rb']
89
+ t.warning = true
90
+ t.verbose = false
91
+ end
59
92
 
60
- # Abbreviations
93
+ begin
94
+ require 'rcov/rcovtask'
95
+
96
+ Rcov::RcovTask.new do |t|
97
+ t.libs << "test"
98
+ dot_rakes =
99
+ t.rcov_opts = [
100
+ '-xRakefile', '-xrakefile', '-xpublish.rf',
101
+ '-xlib/rake/contrib', '-x/Library',
102
+ '--text-report',
103
+ '--sort coverage'
104
+ ] + FileList['rakelib/*.rake'].pathmap("-x%p")
105
+ t.test_files = FileList[
106
+ 'test/test*.rb', 'test/functional.rb'
107
+ ]
108
+ t.output_dir = 'coverage'
109
+ t.verbose = true
110
+ end
111
+ rescue LoadError
112
+ puts "RCov is not available"
113
+ end
61
114
 
62
- task :ta => [:testall]
63
- task :tf => [:testfun]
64
- task :tc => [:testcontrib]
115
+ directory 'testdata'
116
+ [:test_all, :test_units, :test_contribs, :test_functional].each do |t|
117
+ task t => ['testdata']
118
+ end
65
119
 
66
120
  # CVS Tasks ----------------------------------------------------------
67
121
 
68
- desc "Tag all the CVS files with the latest release number (TAG=x)"
69
- task :tag do
70
- rel = "REL_" + PKG_VERSION.gsub(/\./, '_')
71
- rel << ENV['TAG'] if ENV['TAG']
72
- puts rel
73
- sh %{cvs commit -m 'pre-tag commit'}
74
- sh %{cvs tag #{rel}}
75
- end
76
-
77
122
  # Install rake using the standard install.rb script.
78
123
 
79
124
  desc "Install the application"
@@ -83,17 +128,30 @@ end
83
128
 
84
129
  # Create a task to build the RDOC documentation tree.
85
130
 
86
- rd = Rake::RDocTask.new("rdoc") { |rdoc|
131
+ begin
132
+ require 'darkfish-rdoc'
133
+ DARKFISH_ENABLED = true
134
+ rescue LoadError => ex
135
+ DARKFISH_ENABLED = false
136
+ end
137
+
138
+ BASE_RDOC_OPTIONS = [
139
+ '--line-numbers',
140
+ '--main', 'README',
141
+ '--title', 'Rake -- Ruby Make',
142
+ ]
143
+
144
+ rd = Rake::RDocTask.new("rdoc") do |rdoc|
87
145
  rdoc.rdoc_dir = 'html'
88
- # rdoc.template = 'kilmer'
89
- # rdoc.template = 'css2'
90
- rdoc.template = 'jamis'
146
+ rdoc.template = 'doc/jamis.rb'
91
147
  rdoc.title = "Rake -- Ruby Make"
92
- rdoc.options << '--line-numbers' << '--inline-source' << '--main' << 'README'
148
+ rdoc.options = BASE_RDOC_OPTIONS.dup
149
+ rdoc.options << '-SHN' << '-f' << 'darkfish' if DARKFISH_ENABLED
150
+
93
151
  rdoc.rdoc_files.include('README', 'MIT-LICENSE', 'TODO', 'CHANGES')
94
152
  rdoc.rdoc_files.include('lib/**/*.rb', 'doc/**/*.rdoc')
95
153
  rdoc.rdoc_files.exclude(/\bcontrib\b/)
96
- }
154
+ end
97
155
 
98
156
  # ====================================================================
99
157
  # Create a task that will package the Rake software into distributable
@@ -105,20 +163,25 @@ PKG_FILES = FileList[
105
163
  'bin/**/*',
106
164
  'lib/**/*.rb',
107
165
  'test/**/*.rb',
166
+ 'test/**/*.rf',
167
+ 'test/**/*.mf',
168
+ 'test/**/Rakefile',
169
+ 'test/**/subdir',
108
170
  'doc/**/*'
109
171
  ]
110
172
  PKG_FILES.exclude('doc/example/*.o')
173
+ PKG_FILES.exclude('TAGS')
111
174
  PKG_FILES.exclude(%r{doc/example/main$})
112
175
 
113
176
  if ! defined?(Gem)
114
177
  puts "Package Target requires RubyGEMs"
115
178
  else
116
- spec = Gem::Specification.new do |s|
179
+ SPEC = Gem::Specification.new do |s|
117
180
 
118
181
  #### Basic information.
119
182
 
120
183
  s.name = 'rake'
121
- s.version = PKG_VERSION
184
+ s.version = $package_version
122
185
  s.summary = "Ruby based make-like utility."
123
186
  s.description = <<-EOF
124
187
  Rake is a Make-like program implemented in Ruby. Tasks
@@ -150,10 +213,7 @@ else
150
213
 
151
214
  s.has_rdoc = true
152
215
  s.extra_rdoc_files = rd.rdoc_files.reject { |fn| fn =~ /\.rb$/ }.to_a
153
- s.rdoc_options <<
154
- '--title' << 'Rake -- Ruby Make' <<
155
- '--main' << 'README' <<
156
- '--line-numbers'
216
+ s.rdoc_options = BASE_RDOC_OPTIONS
157
217
 
158
218
  #### Author and project details.
159
219
 
@@ -161,12 +221,24 @@ else
161
221
  s.email = "jim@weirichhouse.org"
162
222
  s.homepage = "http://rake.rubyforge.org"
163
223
  s.rubyforge_project = "rake"
224
+ # if ENV['CERT_DIR']
225
+ # s.signing_key = File.join(ENV['CERT_DIR'], 'gem-private_key.pem')
226
+ # s.cert_chain = [File.join(ENV['CERT_DIR'], 'gem-public_cert.pem')]
227
+ # end
164
228
  end
165
229
 
166
- Rake::GemPackageTask.new(spec) do |pkg|
230
+ package_task = Rake::GemPackageTask.new(SPEC) do |pkg|
167
231
  pkg.need_zip = true
168
232
  pkg.need_tar = true
169
233
  end
234
+
235
+ file "rake.gemspec" => ["Rakefile", "lib/rake.rb"] do |t|
236
+ require 'yaml'
237
+ open(t.name, "w") { |f| f.puts SPEC.to_yaml }
238
+ end
239
+
240
+ desc "Create a stand-alone gemspec"
241
+ task :gemspec => "rake.gemspec"
170
242
  end
171
243
 
172
244
  # Misc tasks =========================================================
@@ -203,13 +275,156 @@ task :lines do
203
275
  show_line("TOTAL", total_lines, total_code)
204
276
  end
205
277
 
206
- ARCHIVEDIR = '/mnt/usb'
207
-
208
- task :archive => [:package] do
209
- cp FileList["pkg/*.tgz", "pkg/*.zip", "pkg/*.gem"], ARCHIVEDIR
210
- end
211
-
212
278
  # Define an optional publish target in an external file. If the
213
279
  # publish.rf file is not found, the publish targets won't be defined.
214
280
 
215
281
  load "publish.rf" if File.exist? "publish.rf"
282
+
283
+ # Support Tasks ------------------------------------------------------
284
+
285
+ RUBY_FILES = FileList['**/*.rb'].exclude('pkg')
286
+
287
+ desc "Look for TODO and FIXME tags in the code"
288
+ task :todo do
289
+ RUBY_FILES.egrep(/#.*(FIXME|TODO|TBD)/)
290
+ end
291
+
292
+ desc "Look for Debugging print lines"
293
+ task :dbg do
294
+ RUBY_FILES.egrep(/\bDBG|\bbreakpoint\b/)
295
+ end
296
+
297
+ desc "List all ruby files"
298
+ task :rubyfiles do
299
+ puts RUBY_FILES
300
+ puts FileList['bin/*'].exclude('bin/*.rb')
301
+ end
302
+ task :rf => :rubyfiles
303
+
304
+ desc "Create a TAGS file"
305
+ task :tags => "TAGS"
306
+
307
+ TAGS = 'xctags -e'
308
+
309
+ file "TAGS" => RUBY_FILES do
310
+ puts "Makings TAGS"
311
+ sh "#{TAGS} #{RUBY_FILES}", :verbose => false
312
+ end
313
+
314
+ # --------------------------------------------------------------------
315
+ # Creating a release
316
+
317
+ def plugin(plugin_name)
318
+ require "rake/plugins/#{plugin_name}"
319
+ end
320
+
321
+ task :noop
322
+ #plugin "release_manager"
323
+
324
+ desc "Make a new release"
325
+ task :release, :rel, :reuse, :reltest,
326
+ :needs => [
327
+ :prerelease,
328
+ :clobber,
329
+ :test_all,
330
+ :update_version,
331
+ :package,
332
+ :tag
333
+ ] do
334
+ announce
335
+ announce "**************************************************************"
336
+ announce "* Release #{$package_version} Complete."
337
+ announce "* Packages ready to upload."
338
+ announce "**************************************************************"
339
+ announce
340
+ end
341
+
342
+ # Validate that everything is ready to go for a release.
343
+ task :prerelease, :rel, :reuse, :reltest do |t, args|
344
+ $package_version = args.rel
345
+ announce
346
+ announce "**************************************************************"
347
+ announce "* Making RubyGem Release #{$package_version}"
348
+ announce "* (current version #{CURRENT_VERSION})"
349
+ announce "**************************************************************"
350
+ announce
351
+
352
+ # Is a release number supplied?
353
+ unless args.rel
354
+ fail "Usage: rake release[X.Y.Z] [REUSE=tag_suffix]"
355
+ end
356
+
357
+ # Is the release different than the current release.
358
+ # (or is REUSE set?)
359
+ if $package_version == CURRENT_VERSION && ! args.reuse
360
+ fail "Current version is #{$package_version}, must specify REUSE=tag_suffix to reuse version"
361
+ end
362
+
363
+ # Are all source files checked in?
364
+ if args.reltest
365
+ announce "Release Task Testing, skipping checked-in file test"
366
+ else
367
+ announce "Checking for unchecked-in files..."
368
+ data = `svn st`
369
+ unless data =~ /^$/
370
+ abort "svn status is not clean ... do you have unchecked-in files?"
371
+ end
372
+ announce "No outstanding checkins found ... OK"
373
+ end
374
+ end
375
+
376
+ task :update_version, :rel, :reuse, :reltest,
377
+ :needs => [:prerelease] do |t, args|
378
+ if args.rel == CURRENT_VERSION
379
+ announce "No version change ... skipping version update"
380
+ else
381
+ announce "Updating Rake version to #{args.rel}"
382
+ open("lib/rake.rb") do |rakein|
383
+ open("lib/rake.rb.new", "w") do |rakeout|
384
+ rakein.each do |line|
385
+ if line =~ /^RAKEVERSION\s*=\s*/
386
+ rakeout.puts "RAKEVERSION = '#{args.rel}'"
387
+ else
388
+ rakeout.puts line
389
+ end
390
+ end
391
+ end
392
+ end
393
+ mv "lib/rake.rb.new", "lib/rake.rb"
394
+ if args.reltest
395
+ announce "Release Task Testing, skipping commiting of new version"
396
+ else
397
+ sh %{svn commit -m "Updated to version #{args.rel}" lib/rake.rb} # "
398
+ end
399
+ end
400
+ end
401
+
402
+ desc "Tag all the CVS files with the latest release number (REL=x.y.z)"
403
+ task :tag, :rel, :reuse, :reltest,
404
+ :needs => [:prerelease] do |t, args|
405
+ reltag = "REL_#{args.rel.gsub(/\./, '_')}"
406
+ reltag << args.reuse.gsub(/\./, '_') if args.reuse
407
+ announce "Tagging Repository with [#{reltag}]"
408
+ if args.reltest
409
+ announce "Release Task Testing, skipping CVS tagging"
410
+ else
411
+ sh %{svn copy svn+ssh://rubyforge.org/var/svn/rake/trunk svn+ssh://rubyforge.org/var/svn/rake/tags/#{reltag} -m 'Commiting release #{reltag}'} ###'
412
+ end
413
+ end
414
+
415
+ desc "Install the jamis RDoc template"
416
+ task :install_jamis_template do
417
+ require 'rbconfig'
418
+ dest_dir = File.join(Config::CONFIG['rubylibdir'], "rdoc/generators/template/html")
419
+ fail "Unabled to write to #{dest_dir}" unless File.writable?(dest_dir)
420
+ install "doc/jamis.rb", dest_dir, :verbose => true
421
+ end
422
+
423
+ # Require experimental XForge/Metaproject support.
424
+
425
+ load 'xforge.rf' if File.exist?('xforge.rf')
426
+
427
+ desc "Where is the current directory. This task displays\nthe current rake directory"
428
+ task :where_am_i do
429
+ puts Rake.original_dir
430
+ end
data/TODO CHANGED
@@ -4,6 +4,7 @@ Send suggestions for this list to mailto:jim@weirichhouse.org or on
4
4
  the rake-devel@rubyforge.org mailing list.
5
5
 
6
6
  === To Do
7
+ * Need a nice API for accessing tasks in namespaces, namespaces in an app, etc.
7
8
  * Provide a way to disable -w warning mode.
8
9
  * Define a set of default rules that work in the absense of any Rakefile
9
10
  * What about cyclic dependencies?
data/bin/rake CHANGED
@@ -1,8 +1,31 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ #--
4
+ # Copyright (c) 2003, 2004, 2005, 2006, 2007 Jim Weirich
5
+ #
6
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ # of this software and associated documentation files (the "Software"), to
8
+ # deal in the Software without restriction, including without limitation the
9
+ # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10
+ # sell copies of the Software, and to permit persons to whom the Software is
11
+ # furnished to do so, subject to the following conditions:
12
+ #
13
+ # The above copyright notice and this permission notice shall be included in
14
+ # all copies or substantial portions of the Software.
15
+ #
16
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21
+ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
22
+ # IN THE SOFTWARE.
23
+ #++
24
+
1
25
  begin
2
26
  require 'rake'
3
27
  rescue LoadError
4
28
  require 'rubygems'
5
- require_gem 'rake'
29
+ require 'rake'
6
30
  end
7
- RakeApp.new.run
8
-
31
+ Rake.application.run
@@ -0,0 +1,102 @@
1
+ = Rake Command Line Usage
2
+
3
+ Rake is invoked from the command line using:
4
+
5
+ % rake [<em>options</em> ...] [<em>VAR</em>=<em>VALUE</em>] [<em>targets</em> ...]
6
+
7
+ Options are:
8
+
9
+ [<tt><em>name</em>=<em>value</em></tt>]
10
+ Set the environment variable <em>name</em> to <em>value</em>
11
+ during the execution of the <b>rake</b> command. You can access
12
+ the value by using ENV['<em>name</em>'].
13
+
14
+ [<tt>--classic-namespace</tt> (-n)]
15
+ Import the Task, FileTask, and FileCreateTask into the top-level
16
+ scope to be compatible with older versions of Rake. Alternatively
17
+ you can include the line <code>require
18
+ 'rake/classic_namespace'</code> in your Rakefile to get the
19
+ classic behavior.
20
+
21
+ [<tt>--describe</tt> _pattern_ (-D)]
22
+ Describe the tasks (matching optional PATTERN), then exit.
23
+
24
+ [<tt>--dry-run</tt> (-n)]
25
+ Do a dry run. Print the tasks invoked and executed, but do not
26
+ actually execute any of the actions.
27
+
28
+ [<tt>--execute</tt> _code_ (-e)]
29
+ Execute some Ruby code and exit.
30
+
31
+ [<tt>--execute-print</tt> _code_ (-p)]
32
+ Execute some Ruby code, print the result, and exit.
33
+
34
+ [<tt>--execute-continue</tt> _code_ (-p)]
35
+ Execute some Ruby code, then continue with normal task processing.
36
+
37
+ [<tt>--help</tt> (-H)]
38
+ Display some help text and exit.
39
+
40
+ [<tt>--libdir</tt> _directory_ (-I)]
41
+ Add _directory_ to the list of directories searched for require.
42
+
43
+ [<tt>--nosearch</tt> (-N)]
44
+ Do not search for a Rakefile in parent directories.
45
+
46
+ [<tt>--prereqs</tt> (-P)]
47
+ Display a list of all tasks and their immediate prerequisites.
48
+
49
+ [<tt>--quiet</tt> (-q)]
50
+ Do not echo commands from FileUtils.
51
+
52
+ [<tt>--rakefile</tt> _filename_ (-f)]
53
+ Use _filename_ as the name of the rakefile. The default rakefile
54
+ names are +rakefile+ and +Rakefile+ (with +rakefile+ taking
55
+ precedence). If the rakefile is not found in the current
56
+ directory, +rake+ will search parent directories for a match. The
57
+ directory where the Rakefile is found will become the current
58
+ directory for the actions executed in the Rakefile.
59
+
60
+ [<tt>--rakelibdir</tt> _rakelibdir_ (-R)]
61
+ Auto-import any .rake files in RAKELIBDIR. (default is 'rakelib')
62
+
63
+ [<tt>--require</tt> _name_ (-r)]
64
+ Require _name_ before executing the Rakefile.
65
+
66
+ [<tt>--rules</tt>]
67
+ Trace the rules resolution.
68
+
69
+ [<tt>--silent (-s)</tt>]
70
+ Like --quiet, but also suppresses the 'in directory' announcement.
71
+
72
+ [<tt>--system</tt> (-g)]
73
+ Use the system wide (global) rakefiles. The project Rakefile is
74
+ ignored. By default, the system wide rakefiles are used only if no
75
+ project Rakefile is found. On Unix-like system, the system wide
76
+ rake files are located in $HOME/.rake. On a windows system they
77
+ are stored in $APPDATA/Rake.
78
+
79
+ [<tt>--no-system</tt> (-G)]
80
+ Use the project level Rakefile, ignoring the system-wide (global)
81
+ rakefiles.
82
+
83
+ [<tt>--tasks</tt> (-T)]
84
+ Display a list of the major tasks and their comments. Comments
85
+ are defined using the "desc" command.
86
+
87
+ [<tt>--trace</tt> (-t)]
88
+ Turn on invoke/execute tracing. Also enable full backtrace on
89
+ errors.
90
+
91
+ [<tt>--usage</tt> (-h)]
92
+ Display a usage message and exit.
93
+
94
+ [<tt>--verbose</tt> (-v)]
95
+ Echo the Sys commands to standard output.
96
+
97
+ [<tt>--version</tt> (-V)]
98
+ Display the program version and exit.
99
+
100
+ In addition, any command line option of the form
101
+ <em>VAR</em>=<em>VALUE</em> will be added to the environment hash
102
+ <tt>ENV</tt> and may be tested in the Rakefile.