Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Rake 0.6.0 Released

6 views
Skip to first unread message

Jim Weirich

unread,
Sep 5, 2005, 8:44:43 PM9/5/05
to
= Rake 0.6.0 Released

Its time for some long requested enhancements and lots of bug fixes
.. And a whole new web page.

== New Web Page

The primary documentation for rake has moved from the RubyForge based
wiki to its own Hieraki based web site. Constant spam on the wiki
made it a difficult to keep clean. The new site will be easier to
update and organize.

Check out the new documentation at: http://docs.rubyrake.org

We will be adding new documentation to the site as time goes on.

In addition to the new docs page, make sure you check out Martin
Fowlers article on rake at http://martinfowler.com/articles/rake.html

== Changes

=== New Features

* Multiple prerequisites on Rake rules now allowed. However, keep the
following in mind:

1. All the prerequisites of a rule must be available before a rule
is triggered, where "enabled" means (a) an existing file, (b) a
defined rule, or (c) another rule which also must be
trigger-able.
2. Rules are checked in order of definition, so it is important to
order your rules properly. If a file can be created by two
different rules, put the more specific rule first (otherwise the
more general rule will trigger first and the specific one will
never be triggered).
3. The <tt>source</tt> method now returns the name of the first
prerequisite listed in the rule. <tt>sources</tt> returns the
names of all the rule prerequisites, ordered as they are defined
in the rule. If the task has other prerequisites not defined in
the rule (but defined in an explicit task definition), then they
will _not_ be included in the sources list.

* FileLists may now use the egrep command. This popular enhancement
is now a core part of the FileList object. If you want to get a
list of all your to-dos, fixmes and TBD comments, add the following
to your Rakefile.

desc "Look for TODO and FIXME tags in the code"
task :todo do
FileList['**/*.rb'].egrep /#.*(FIXME|TODO|TBD)/
end

* The <tt>investigation</tt> method was added to task object to dump
out some important values. This makes it a bit easier to debug Rake
tasks.

For example, if you are having problems with a particular task, just
print it out:

task :huh do
puts Rake::Task['huh'].investigation
end

* The Rake::TestTask class now supports a "ruby_opts" option to pass
arbitrary ruby options to a test subprocess.

=== Some Incompatibilities

* When using the <tt>ruby</tt> command to start a Ruby subprocess, the
Ruby interpreter that is currently running rake is used by default.
This makes it easier to use rake in an environment with multiple
ruby installation. (Previously, the first ruby command found in the
PATH was used).

If you wish to chose a different Ruby interpreter, you can
explicitly choose the interpreter via the <tt>sh</tt> command.

* The major rake classes (Task, FileTask, FileCreationTask, RakeApp)
have been moved out of the toplevel scope and are now accessible as
Rake::Task, Rake::FileTask, Rake::FileCreationTask and
Rake::Application. If your Rakefile
directly references any one of these tasks, you may:

1. Update your Rakefile to use the new classnames
2. Use the --classic-namespace option on the rake command to get the
old behavior,
3. Add <code>require 'rake/classic_namespace'</code> to the
Rakefile to get the old behavior.

<tt>rake</tt> will print a rather annoying warning whenever a
deprecated class name is referenced without enabling classic
namespace.

=== Bug Fixes

* Several unit tests and functional tests were fixed to run better
under windows.

* Directory tasks are now a specialized version of a File task. A
directory task will only be triggered if it doesn't exist. It will
not be triggered if it is out of date w.r.t. any of its
prerequisites.

* Fixed a bug in the Rake::GemPackageTask class so that the gem now
properly contains the platform name.

* Fixed a bug where a prerequisite on a <tt>file</tt> task would cause
an exception if the prerequisite did not exist.

== 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

== 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 ...

* Greg Fast (better ruby_opt test options)
* Kelly Felkins (requested by better namespace support)
* Martin Fowler (suggested Task.investigation)
* Stuart Jansen (send initial patch for multiple prerequisites).
* Masao Mutch (better support for non-ruby Gem platforms)
* Philipp Neubeck (patch for file task exception fix)

--
-- Jim Weirich j...@weirichhouse.org http://onestepback.org
-----------------------------------------------------------------
"Beware of bugs in the above code; I have only proved it correct,
not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)


Joel VanderWerf

unread,
Sep 6, 2005, 12:00:36 AM9/6/05
to
Jim Weirich wrote:
> = Rake 0.6.0 Released

Trying to update my gems from 0.5.7, but I get this:

$ gem update
Upgrading installed gems...
Updating Gem source index for: http://gems.rubyforge.org
Attempting remote upgrade of rake
Attempting remote installation of 'rake'
ERROR: While executing gem ... (Gem::Exception)
SSL is not installed on this system

I do have libssl 0.9.7 installed, and the earlier rake installed ok.
What could be causing this?

--
vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407


Jim Weirich

unread,
Sep 6, 2005, 12:47:46 AM9/6/05
to
On Tuesday 06 September 2005 12:00 am, Joel VanderWerf wrote:
> I do have libssl 0.9.7 installed, and the earlier rake installed ok.
> What could be causing this?

Sounds like a gem issue. The Rake gem is signed, but RubyGems is pretty
careful about continuing even when the ssl libraries are not available.

Try running the gem command with the --backtrace option so we can get a
stacktrace and locate the code causing the error.

Joel VanderWerf

unread,
Sep 6, 2005, 1:21:22 AM9/6/05
to
Jim Weirich wrote:
> On Tuesday 06 September 2005 12:00 am, Joel VanderWerf wrote:
>
>>I do have libssl 0.9.7 installed, and the earlier rake installed ok.
>>What could be causing this?
>
>
> Sounds like a gem issue. The Rake gem is signed, but RubyGems is pretty
> careful about continuing even when the ssl libraries are not available.
>
> Try running the gem command with the --backtrace option so we can get a
> stacktrace and locate the code causing the error.
>

$ gem update --backtrace


Upgrading installed gems...
Updating Gem source index for: http://gems.rubyforge.org
Attempting remote upgrade of rake
Attempting remote installation of 'rake'
ERROR: While executing gem ... (Gem::Exception)
SSL is not installed on this system

/usr/local/lib/ruby/site_ruby/1.8/rubygems/gem_openssl.rb:21:in
`ensure_ssl_available'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/package.rb:512:in `initialize'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/package.rb:481:in `each_entry'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/package.rb:439:in `loop'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/package.rb:439:in `each_entry'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/package.rb:424:in `each'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/package.rb:481:in `initialize'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `new'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `new'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/package.rb:580:in `open_from_io'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/package.rb:799:in `open_from_io'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/format.rb:53:in `from_io'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/format.rb:41:in
`from_file_by_path'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/installer.rb:57:in `install'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/remote_installer.rb:407:in
`install'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/gem_commands.rb:195:in `execute'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/gem_commands.rb:153:in `each'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/gem_commands.rb:153:in `execute'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/gem_commands.rb:781:in `execute'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/gem_commands.rb:777:in `each'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/gem_commands.rb:777:in `execute'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/command.rb:49:in `invoke'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/cmd_manager.rb:94:in
`process_args'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/cmd_manager.rb:67:in `run'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/gem_runner.rb:13:in `run'
/usr/local/bin/gem:17

Jim Weirich

unread,
Sep 6, 2005, 7:42:54 AM9/6/05
to
On Tuesday 06 September 2005 01:21 am, Joel VanderWerf wrote:
> Jim Weirich wrote:
> > On Tuesday 06 September 2005 12:00 am, Joel VanderWerf wrote:
> >>I do have libssl 0.9.7 installed, and the earlier rake installed ok.
> >>What could be causing this?
> >
> > Sounds like a gem issue. The Rake gem is signed, but RubyGems is pretty
> > careful about continuing even when the ssl libraries are not available.
> >
> > Try running the gem command with the --backtrace option so we can get a
> > stacktrace and locate the code causing the error.

Yeah, its the fact that the gem is signed and RubyGems is insisting on having
SSL available. I think it should only do that if the security policy
requires it, but that's a gems issue that needs looking into.

So, what to do?

(1) If you thought you had SSL, and you don't, then you probably should look
into that.

(2) If you want the latest rake no matter what, I put out an unsigned version
of the gem on my betagem site labelled version 0.6.1. You can get it with:

gem install rake --source http://onestepback.org/betagems

Dominik Schlütter

unread,
Sep 6, 2005, 8:29:49 AM9/6/05
to
Hi,

Jim Weirich <j...@weirichhouse.org> wrote:

> Sounds like a gem issue. The Rake gem is signed, but RubyGems is pretty
> careful about continuing even when the ssl libraries are not available.

I got the same problem here on a Debian/MIPSel (a Buffalo LinkStation)
box. SSL is installed, but I was missing the Ruby/SSL bindings. Doing an
'apt-get install libopenssl-ruby' did help (although it complained about
the rdoc).

On my Mac (10.4.2 Tiger) I didn't run into any problems with Ruby
installed via DarwinPorts.


Regards,

Dominik.

Stu George

unread,
Sep 6, 2005, 9:53:12 AM9/6/05
to
On Tue, 6 Sep 2005 09:44:43 +0900, Jim Weirich <j...@weirichhouse.org>
wrote:

>= Rake 0.6.0 Released
>
>Its time for some long requested enhancements and lots of bug fixes
>.. And a whole new web page.
>

hiya, a dumb question, what is the difference between rant and rake?
they look the same?

- Stu : Email via http://public.xdi.org/=stu

Christian Neukirchen

unread,
Sep 6, 2005, 11:17:46 AM9/6/05
to
Jim Weirich <j...@weirichhouse.org> writes:

> = Rake 0.6.0 Released
>
> Its time for some long requested enhancements and lots of bug fixes

> ... And a whole new web page.

Wonderful, and thank you for developing it.

Since updating to 0.6.0, I have some problems with TestTask.
This is the code that defines it:

desc "Run all the tests"
Rake::TestTask.new do |t|
t.libs << "test"
t.test_files = FileList['test_*.rb']
t.verbose = true
t.loader = XXX
end

For various values of XXX:

:rake results in:

/usr/local/bin/ruby -Ilib:test \
"/usr/local/lib/ruby/site_ruby/1.8/rake/rake_test_loader.rb" \
"test_dissident.rb" "test_lifecycle.rb"
Loaded suite /usr/local/lib/ruby/site_ruby/1.8/rake/rake_test_loader
Started
...................
Finished in 0.277981 seconds.

19 tests, 116 assertions, 0 failures, 0 errors

This is the method that works, but it shows the wrong "loaded suite".

:testrb results in:

/usr/local/bin/ruby -Ilib:test "-S testrb \
/usr/local/lib/ruby/site_ruby/1.8/rake/ruby182_test_unit_fix.rb" \
"test_dissident.rb" "test_lifecycle.rb"
/usr/local/bin/ruby: invalid option - (-h will show valid options)
rake aborted!

I don't know exactly whats happening here, but "testrb test_*.rb"
works when called directly.

For :direct, I get:

/usr/local/bin/ruby -Ilib:test "-e 'ARGV.each{|f| load f}'" \
"test_dissident.rb" "test_lifecycle.rb"

And no further output. It works when I manually call

/usr/local/bin/ruby -e 'ARGV.each{|f| load f}' \
"test_dissident.rb" "test_lifecycle.rb"

on the shell, though.

The TestTask worked with my previous version of rake, which I think
was 0.4.15.

BTW, I think rake is a good tool every Ruby user benefits from, it
would be great if it was included in future versions of the Ruby
standard library.

> -- Jim Weirich
--
Christian Neukirchen <chneuk...@gmail.com> http://chneukirchen.org


Joel VanderWerf

unread,
Sep 6, 2005, 11:39:04 PM9/6/05
to
Jim Weirich wrote:
> Yeah, its the fact that the gem is signed and RubyGems is insisting on having
> SSL available. I think it should only do that if the security policy
> requires it, but that's a gems issue that needs looking into.
>
> So, what to do?
>
> (1) If you thought you had SSL, and you don't, then you probably should look
> into that.

That's it. My openssl.so was not installed correctly. It built ok in
ext/openssl, but I had to disable the RUBYOPT=rubygems for it to install
(and then gem update was able to install rake-0.6.0). With
RUBYOPT=rubygems, I was getting this:

$ make install
/usr/local/lib/ruby/site_ruby/1.8/rubygems/security.rb:18: uninitialized
constant OpenSSL::Digest::SHA1 (NameError)
from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:397:in `require'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:397
from /usr/local/lib/ruby/site_ruby/1.8/ubygems.rb:4:in `require'
from /usr/local/lib/ruby/site_ruby/1.8/ubygems.rb:4
make: *** [/usr/local/lib/ruby/site_ruby/1.8/i686-linux/openssl.so] Error 1

Jim Weirich

unread,
Sep 7, 2005, 12:04:06 AM9/7/05
to

Thanks for the feedback. RubyGems assumes that if you can successfully
require the openssl library, then ssl is available. Unfortunately, in the
half installed state you were in, the openssl.so library was available but
not the ruby portion (openssl.rb). So the require succeeded, fooling
RubyGems into thinking the entire ssl infrastructure was in place when it was
not.

I'll put a fix in for that.

Chris Martin

unread,
Sep 7, 2005, 3:33:41 PM9/7/05
to

To clarify for the slow and/or nubys who might get this error when
installing and/or updating gems for rails.

The ruby openssl library needs to be installed. eg, debian needs
libopenssl-ruby1.8

May be the error could be made clearer, I was sitting there going,
"but it IS installed!" in much more expletive words. ;)
I even read this thread last night, but your explanation didn't click
until I double checked it today.

--
Chris Martin
Web Developer
Open Source & Web Standards Advocate
http://www.chriscodes.com/


Joel VanderWerf

unread,
Sep 7, 2005, 6:22:21 PM9/7/05
to
Chris Martin wrote:
..

> To clarify for the slow and/or nubys who might get this error when
> installing and/or updating gems for rails.
>
> The ruby openssl library needs to be installed. eg, debian needs
> libopenssl-ruby1.8

If you're not using packages and are building ruby from source, you can do

export RUBYOPT=

in your shell before building ruby. Then, if you have openssl installed
(not the ruby binding--the real openssl lib), the ruby openssl extension
in the ext/ dir will build and install. Then you can have

export RUBYOPT=rubygems

or whatever.

But I think Jim's fix to RubyGems will get around this entirely.

Jim Weirich

unread,
Sep 7, 2005, 6:37:44 PM9/7/05
to

Joel VanderWerf said:
> Chris Martin wrote:
> ...

>> To clarify for the slow and/or nubys who might get this error when
>> installing and/or updating gems for rails.
>>
>> The ruby openssl library needs to be installed. eg, debian needs
>> libopenssl-ruby1.8
>
> If you're not using packages and are building ruby from source, you can do
>
> export RUBYOPT=
>
> in your shell before building ruby. Then, if you have openssl installed
> (not the ruby binding--the real openssl lib), the ruby openssl extension
> in the ext/ dir will build and install. Then you can have
>
> export RUBYOPT=rubygems
>
> or whatever.
>
> But I think Jim's fix to RubyGems will get around this entirely.

The patch in RubyGems CVS will address this exact problem. We still need
to fix the gem command so that it can install signed gems without SSL
installed ... but I don't think that will be a hard problem.

Stefan Lang

unread,
Sep 10, 2005, 2:38:16 PM9/10/05
to
On Tuesday 06 September 2005 15:56, Stu George wrote:
> On Tue, 6 Sep 2005 09:44:43 +0900, Jim Weirich
> <j...@weirichhouse.org>
>
> wrote:
> >= Rake 0.6.0 Released
> >
> >Its time for some long requested enhancements and lots of bug
> > fixes .. And a whole new web page.
>
> hiya, a dumb question, what is the difference between rant and
> rake? they look the same?

Sorry for replying so late. Generally, it's possible to convert
a Rakefile to an Rantfile without much work. AFAIK Rant has
all major features of Rake plus:

* Optional use of MD5 checksums instead of timestamps.
* Easy and portable tgz/zip file creation on Linux/MacOS X/Windows
(and probably most other platforms where ruby runs).
* Create a script, tailored to the needs of a project, which
can be used instead of an Rant installation
=> Distribute this script with your project and users
and other developers don't need an Rant installation.
* It is possible to split up the build specification into
multiple files in different directories.
(=> no such thing as "recursive make" necessary).
This feature will be highly improved with the next release.
* and a few more...

Kind regards,
Stefan


stu

unread,
Sep 11, 2005, 10:05:31 PM9/11/05
to
Thanks for the reply. I only asked as I currently use rant, and I
wondered since they seem so similar.

the recursive thing / subdirs thing had some big bugs in the early
0.4.something bus 0.4.4 has been great so far.. didnt know about he
md5 thing.. as I've hit a nasty rant timestamp bug that caused me to
change the way I do a build on my current project. :/

i better go look it up...

-Stu

Stefan Lang

unread,
Sep 12, 2005, 3:51:51 PM9/12/05
to

Please write a bug report! If I can reproduce the bug, I can fix
it for the next release.

> i better go look it up...

To use it, just put

import "md5"

at the top of an Rantfile to use MD5 checksums instead of timestamps.

Kind regards,
Stefan


Han Holl

unread,
Sep 15, 2005, 6:11:48 AM9/15/05
to
Hi Jim (and list),

[ cut ]

> Check out the new documentation at: http://docs.rubyrake.org


This site seems to be down (two days already)


> * The <tt>investigation</tt> method was added to task object to dump
> out some important values. This makes it a bit easier to debug Rake
> tasks.


Is there a reason not to call that inspect ?

Cheers,

Han Holl

Jim Weirich

unread,
Sep 15, 2005, 8:04:33 AM9/15/05
to
On Thursday 15 September 2005 06:11 am, Han Holl wrote:
> Hi Jim (and list),
>
> [ cut ]
>
> > Check out the new documentation at: http://docs.rubyrake.org
>
> This site seems to be down (two days already)

Sorry ... it seems that the database was wedged ... It is up and running
again.

Scott Mathieson

unread,
Sep 15, 2005, 8:17:40 AM9/15/05
to
Can somebody please tell me how to unsubscribe from this list?

Brian Schröder

unread,
Sep 19, 2005, 6:33:58 AM9/19/05
to
On 15/09/05, Scott Mathieson <uber...@uberkorp.co.uk> wrote:
> Can somebody please tell me how to unsubscribe from this list?
>
>

From the ML Helpfile:

| To unsubscribe ML <ruby...@ruby-lang.org>, send "unsubscribe" in
the mail body
| to the address <ruby-t...@ruby-lang.org>.

hth,

brian

--
http://ruby.brian-schroeder.de/

Stringed instrument chords: http://chordlist.brian-schroeder.de/


0 new messages