Skip to content

Commit

Permalink
Merge commit 'rake-0.9.0'
Browse files Browse the repository at this point in the history
Conflicts:
	Rakefile
	lib/rake/version.rb
  • Loading branch information
quix committed May 21, 2011
2 parents 1ecc882 + c198186 commit 5ec32f4
Show file tree
Hide file tree
Showing 47 changed files with 511 additions and 671 deletions.
14 changes: 7 additions & 7 deletions CHANGES
@@ -1,6 +1,12 @@
= Rake Changelog

== Pre-Version 0.9.x
== Version 0.9.0

* Rake now warns when the deprecated :needs syntax used.

* Moved Rake DSL commands to top level ruby object 'main'. Rake DSL
commands are no longer private methods in Object. (Suggested by
James M. Lawrence/quix)

* Rake history is now UTF-8 encoded.

Expand All @@ -10,9 +16,6 @@
* Rake now requires (instead of loads) files in the test task. Patch by Cezary
Baginski.

* Rake now runs tasks when they have equal timestamps. Patch by James M.
Lawrence.

* Fixed typos. Patches by Sean Scot August Moon and R.T. Lechow.

* Rake now prints the Rakefile directory only when it's different from the
Expand All @@ -37,9 +40,6 @@
call 'task :xzy' in your code, include Rake::DSL into your class, or
put the code in a Rake::DSL.environment do ... end block.

* Allow single line comments immediately prior to a task to be used in
place of +desc+.

* Split rake.rb into individual files.

* Support for the --where (-W) flag for showing where a task is defined.
Expand Down
36 changes: 23 additions & 13 deletions Rakefile
Expand Up @@ -46,7 +46,7 @@ end

# Determine the current version of the software

if `ruby -Ilib ./bin/drake --version` =~ /rake, version ([0-9.]+)$/
if `ruby -Ilib ./bin/drake --version` =~ /rake, version ([0-9a-z.]+)$/
CURRENT_VERSION = $1
else
CURRENT_VERSION = "0.0.0"
Expand Down Expand Up @@ -115,16 +115,28 @@ end

begin
require 'rcov/rcovtask'
IGNORE_COVERAGE_IN = FileList[
'lib/rake/rdoctask.rb',
'lib/rake/testtask.rb',
'lib/rake/packagetask.rb',
'lib/rake/clean.rb',
]

unless File::ALT_SEPARATOR
IGNORE_COVERAGE_IN.include(
'lib/rake/alt_system.rb',
'lib/rake/win32.rb')
end

Rcov::RcovTask.new do |t|
t.libs << "test"
dot_rakes =
t.rcov_opts = [
'-xRakefile', '-xrakefile', '-xpublish.rf',
'-xlib/rake/contrib', '-x/Library',
'-xlib/rake/contrib', '-x/Library', '-x.rvm',
'--text-report',
'--sort coverage'
] + FileList['rakelib/*.rake'].pathmap("-x%p")
] + FileList['rakelib/*.rake'].pathmap("-x%p") +
IGNORE_COVERAGE_IN.map { |fn| "-x#{fn}" }
t.test_files = FileList[
'test/lib/*_test.rb',
'test/contrib/*_test.rb',
Expand All @@ -134,7 +146,9 @@ begin
t.verbose = true
end
rescue LoadError
puts "RCov is not available"
task :rcov do
puts "RCov is not available"
end
end

directory 'testdata'
Expand Down Expand Up @@ -230,7 +244,6 @@ else

s.bindir = "bin" # Use these for applications.
s.executables = ["drake"]
s.default_executable = "drake"

#### Documentation and testing.

Expand All @@ -256,7 +269,7 @@ else
# end
end

package_task = Gem::PackageTask.new(SPEC) do |pkg|
Gem::PackageTask.new(SPEC) do |pkg|
pkg.need_zip = true
pkg.need_tar = true
end
Expand Down Expand Up @@ -338,8 +351,7 @@ task :noop
#plugin "release_manager"

desc "Make a new release"
task :release, :rel, :reuse, :reltest,
:needs => [
task :release, [:rel, :reuse, :reltest] => [
:prerelease,
:clobber,
"test:all",
Expand Down Expand Up @@ -389,8 +401,7 @@ task :prerelease, :rel, :reuse, :reltest do |t, args|
end
end

task :update_version, :rel, :reuse, :reltest,
:needs => [:prerelease] do |t, args|
task :update_version, [:rel, :reuse, :reltest] => [:prerelease] do |t, args|
if args.rel == CURRENT_VERSION
announce "No version change ... skipping version update"
else
Expand All @@ -416,8 +427,7 @@ task :update_version, :rel, :reuse, :reltest,
end

desc "Tag all the CVS files with the latest release number (REL=x.y.z)"
task :tag, :rel, :reuse, :reltest,
:needs => [:prerelease] do |t, args|
task :tag, [:rel, :reuse, :reltest] => [:prerelease] do |t, args|
reltag = "REL_#{args.rel.gsub(/\./, '_')}"
reltag << args.reuse.gsub(/\./, '_') if args.reuse
announce "Tagging Repository with [#{reltag}]"
Expand Down
22 changes: 17 additions & 5 deletions doc/command_line_usage.rdoc
Expand Up @@ -89,23 +89,35 @@ Options are:
Use the project level Rakefile, ignoring the system-wide (global)
rakefiles.

[<tt>--tasks</tt> (-T)]
[<tt>--tasks</tt> <em>pattern</em> (-T)]
Display a list of the major tasks and their comments. Comments
are defined using the "desc" command.
are defined using the "desc" command. If a pattern is given, then
only tasks matching the pattern are displayed.

[<tt>--no-top-level-dsl</tt> (-X)]
Do not put the Rake DSL commands into the top level scope.

[<tt>--top-level-dsl</tt>]
Put the Rake DSL commands into the top level scope (default).

NOTE: Although currently Rake defaults to its DSL in the top level
scope, the plan is to deprecate this in the future and default ot
having the DSL commands *not* appear in the top level scope.

[<tt>--trace</tt> (-t)]
Turn on invoke/execute tracing. Also enable full backtrace on
errors.

[<tt>--usage</tt> (-h)]
Display a usage message and exit.

[<tt>--verbose</tt> (-v)]
Echo the Sys commands to standard output.

[<tt>--version</tt> (-V)]
Display the program version and exit.

[<tt>--where</tt> <em>pattern</em> (-W)]
Display tasks that match <em>pattern</em> and the file and line
number where the task is defined.

In addition, any command line option of the form
<em>VAR</em>=<em>VALUE</em> will be added to the environment hash
<tt>ENV</tt> and may be tested in the Rakefile.
45 changes: 18 additions & 27 deletions doc/rakefile.rdoc
Expand Up @@ -364,12 +364,17 @@ invoked. This make generated dependency files difficult to use. By
the time rake gets around to updating the dependencies file, it is too
late to load it.

The +import+ command addresses this by specifying a file to be loaded
_after_ the main rakefile is loaded, but _before_ any targets on the
command line are specified. In addition, if the file name matches an
explicit task, that task is invoked before loading the file. This
allows dependency files to be generated and used in a single rake
command invocation.
The +Rake.import+ command addresses this by specifying a file to be
loaded _after_ the main rakefile is loaded, but _before_ any targets
on the command line are invoked. In addition, if the file name
matches an explicit task, that task is invoked before loading the
file. This allows dependency files to be generated and used in a
single rake command invocation.

<b>NOTE:</b> Starting in Rake version 0.9.0, the top level +import+
command is deprecated and we recommend using the scoped
"+Rake.import+" command mentioned above. Future versions of Rake will
drop support for the top level +import+ command.

=== Example:

Expand All @@ -379,7 +384,7 @@ command invocation.
sh "makedepend -f- -- #{CFLAGS} -- #{t.prerequisites} > #{t.name}"
end

import ".depends.mf"
Rake.import ".depends.mf"

If ".depends" does not exist, or is out of date w.r.t. the source
files, a new ".depends" file is generated using +makedepend+ before
Expand All @@ -389,32 +394,18 @@ loading.

Standard Ruby comments (beginning with "#") can be used anywhere it is
legal in Ruby source code, including comments for tasks and rules.
A single-line comment immediately before a task (with no blank line
between it and the task) will be used as that task's description, and
the task and description will appear in the list displayed
using the "-T" switch.
However, if you wish a task to be described using the "-T" switch,
then you need to use the +desc+ command to describe the task.

=== Example:

# Create a distribution package
desc "Create a distribution package"
task :package => [ ... ] do ... end

You can also use the +desc+ command before a task to set the
description for the task. In this case, intervening blank lines
are allowed

=== Example:

desc 'Create a distribution package'

task :package => [ ... ] do ... end

The +desc+ comment takes priority over the comment for of description.

The "-T" switch (or "--tasks" if you like to spell things out) will
display a list of tasks that have a description. If you use
comments or +desc+ to describe your major tasks, you have a
semi-automatic way of generating a summary of your Rake file.
display a list of tasks that have a description. If you use +desc+ to
describe your major tasks, you have a semi-automatic way of generating
a summary of your Rake file.

traken$ rake -T
(in /home/.../rake)
Expand Down
112 changes: 112 additions & 0 deletions doc/release_notes/rake-0.9.0.rdoc
@@ -0,0 +1,112 @@
= Rake 0.9.0 Released

Rake version 0.9.0 has a number of bug fixes and enhancments (see
below for more details). Additionally, the internals have be slightly
restructured and improved.

== Changes

=== New Features / Enhancements / Bug Fixes in Version 0.9.0

* Rake now warns when the deprecated :needs syntax used (and suggests
the proper syntax in the warning).

* Moved Rake DSL commands to top level ruby object 'main'. Rake DSL
commands are no longer private methods in Object. (Suggested by
James M. Lawrence/quix)

* Rake now uses case-insensitive comparisons to find the Rakefile on Windows.
Based on patch by Roger Pack.

* Rake now requires (instead of loads) files in the test task. Patch by Cezary
Baginski.

* Fixed typos. Patches by Sean Scot August Moon and R.T. Lechow.

* Rake now prints the Rakefile directory only when it's different from the
current directory. Patch by Alex Chaffee.

* Improved rakefile_location discovery on Windows. Patch by James Tucker.

* Rake now recognizes "Windows Server" as a windows system. Patch by Matthias
Lüdtke

* Rake::RDocTask is deprecated. Use RDoc::Task from RDoc 2.4.2+ (require
'rdoc/task')

* Rake::GemPackageTask is deprecated. Use Gem::PackageTask (require
'rubygems/package_task')

* Rake now outputs various messages to $stderr instead of $stdout.

* Rake no longer emits warnings for Config. Patch by Santiago Pastorino.

* Removed Rake's DSL methods from the top level scope. If you need to
call 'task :xzy' in your code, include Rake::DSL into your class, or
put the code in a Rake::DSL.environment do ... end block.

* Split rake.rb into individual files.

* Support for the --where (-W) flag for showing where a task is defined.

* Fixed quoting in test task.
(http://onestepback.org/redmine/issues/show/44,
http://www.pivotaltracker.com/story/show/1223138)

* Fixed the silent option parsing problem.
(http://onestepback.org/redmine/issues/show/47)

* Fixed :verbose=>false flag on sh and ruby commands.

* Rake command line options may be given by default in a RAKEOPT
environment variable.

* Errors in Rake will now display the task invocation chain in effect
at the time of the error.

* Accepted change by warnickr to not expand test patterns in shell
(allowing more files in the test suite).

* Fixed that file tasks did not perform prereq lookups in scope
(Redmine #57).

== What is Rake

Rake is a build tool similar to the make program in many ways. But
instead of cryptic make recipes, Rake uses standard Ruby code to
declare tasks and dependencies. You have the full power of a modern
scripting language built right into your build tool.

== Availability

The easiest way to get and install rake is via RubyGems ...

gem install rake (you may need root/admin privileges)

Otherwise, you can get it from the more traditional places:

Home Page:: http://rake.rubyforge.org/
Download:: http://rubyforge.org/project/showfiles.php?group_id=50
GitHub:: git://github.com/jimweirich/rake.git

== Thanks

As usual, it was input from users that drove a alot of these changes. The
following people either contributed patches, made suggestions or made
otherwise helpful comments. Thanks to ...

* James M. Lawrence (quix)
* Roger Pack
* Cezary Baginski
* Sean Scot August Moon
* R.T. Lechow
* Alex Chaffee
* James Tucker
* Matthias Lüdtke
* Santiago Pastorino

Also, bit thanks to Eric Hodel for assisting with getting this release
out the door (where "assisting" includes, but is not by any means
limited to, "pushing" me to get it done).

-- Jim Weirich
5 changes: 3 additions & 2 deletions lib/rake.rb
Expand Up @@ -58,9 +58,10 @@
require 'rake/name_space'
require 'rake/task_manager'
require 'rake/application'
require 'rake/environment'

$trace = false

# Alias FileList to be available at the top level.
# Some top level Constants.

FileList = Rake::FileList
RakeFileUtils = Rake::FileUtilsExt

0 comments on commit 5ec32f4

Please sign in to comment.