[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

rake task library

Martin DeMello

11/29/2003 7:01:00 AM

Is there any effort underway to compile a rake task library, the way ant
does?

martin
5 Answers

Gavin Sinclair

11/29/2003 8:40:00 AM

0

On Saturday, November 29, 2003, 6:02:10 PM, Martin wrote:

> Is there any effort underway to compile a rake task library, the way ant
> does?

Rake has a few tasks built in and a "secondary" area where new tasks
are tried out.

What exactly do you mean - plugins?

Gavin



Martin DeMello

11/29/2003 9:34:00 AM

0

Gavin Sinclair <gsinclair@soyabean.com.au> wrote:
> On Saturday, November 29, 2003, 6:02:10 PM, Martin wrote:
>
>> Is there any effort underway to compile a rake task library, the way ant
>> does?
>
> Rake has a few tasks built in and a "secondary" area where new tasks
> are tried out.
>
> What exactly do you mean - plugins?

See http://ant.apache.org/manual/... - it allows a lot of common
tasks to be written declaratively. For instance we could have an
installer package generated by saying

make-installer (
:src => src_dir,
:lib => lib_dir,
:doc => doc_dir,
:installer => 'install.rb'
)

The make-installer method might be complicated, and involve all sorts of
corner cases and tests, but once it's written using it is trivial. Not
so much plugins as a library of common tasks, one to a method, and a
central site where they're maintained.

martin

Jim Weirich

11/29/2003 9:40:00 AM

0

Martin DeMello wrote:
> Is there any effort underway to compile a rake task library, the way ant
> does?

There is no organized effort with the specific intention of building a
task library for Rake. However, I consider a well rounded task library
essential for the ultimate success of the project.

The latest release of Rake (release 0.3.0) contains a number of library
tasks for building packages, running tests and building rdocs. The type
of stuff you might need in any Ruby project, which is where I am using
Rake the most right now.

If you have an idea for a task library, I welcome you to sound it out,
either here or on the rake-devel@rubyforge.org mailing list.

--
-- Jim Weirich jweirich@one.net http://onest...
-----------------------------------------------------------------
"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)


Jim Weirich

11/29/2003 9:51:00 AM

0

Martin DeMello wrote:

>>What exactly do you mean - plugins?
>
> See http://ant.apache.org/manual/... - it allows a lot of common
> tasks to be written declaratively. For instance we could have an
> installer package generated by saying
>
> make-installer (
> :src => src_dir,
> :lib => lib_dir,
> :doc => doc_dir,
> :installer => 'install.rb'
> )

Here's an Rakefile example that creates a set of related tasks (named
:package, :repackage, :clobber_package, etc). The task will create both
a zip file and a gzipped tar file.

Rake::PackageTask.new("myprogram", "0.0.1") do |p|
p.package_files.include("lib/**/*.rb", "doc/**/*", "Rakefile")
p.package_files.exclude(/\bCVS\b)
p.need_zip = true
p.need_tar = true
end

See http://rake.ruby... and check out classes named
Rake::XxxxTask for task library classes.

--
-- Jim Weirich jweirich@one.net http://onest...
-----------------------------------------------------------------
"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)


Martin DeMello

11/30/2003 6:07:00 AM

0

Jim Weirich <jweirich@one.net> wrote:
>
> If you have an idea for a task library, I welcome you to sound it out,
> either here or on the rake-devel@rubyforge.org mailing list.

I have some nebulous ideas; I'll work them into a proper post when I
have some free time (regrettably scarce right now :-/).

martin