Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Using Rake to Build Gem

Reply
Thread Tools

Using Rake to Build Gem

 
 
Bryan Richardson
Guest
Posts: n/a
 
      04-17-2008
[Note: parts of this message were removed to make it a legal post.]

Hello all,

I'm using Rake to build a gem for my Ruby application and I was wondering if
there's a way to exclude certain files and/or directories from rdoc
generation.

--
Thanks!
Bryan

 
Reply With Quote
 
 
 
 
Phillip Gawlowski
Guest
Posts: n/a
 
      04-17-2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Bryan Richardson wrote:
| Hello all,
|
| I'm using Rake to build a gem for my Ruby application and I was
wondering if
| there's a way to exclude certain files and/or directories from rdoc
| generation.

Here's an example from the Rakefile I use for one of my projects:
~ g.files = FileList['lib/**/*.rb', '[A-Z]*',
'test/**/*'].exclude('smtp_tls.rb').to_a

#exclude from Rake's FileList makes sure that 'smtp_tls.rb' isn't used.

AFAIK, #exclude can use an Array, too, if you want to exclude multiple
files (I don't know about globs, though).

- --
Phillip Gawlowski
Twitter: twitter.com/cynicalryan

~ "To make a bad day worse, spend it wishing for the impossible." -Calvin
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkgHa7YACgkQbtAgaoJTgL+C0ACgojLcMzhwfe pSsB+aCRVfMNc5
I6IAn06WndJ0WekjY1VbddfOJwIlNdB1
=P1mS
-----END PGP SIGNATURE-----

 
Reply With Quote
 
 
 
 
Tim Pease
Guest
Posts: n/a
 
      04-17-2008

On Apr 17, 2008, at 8:50 AM, Bryan Richardson wrote:
> Hello all,
>
> I'm using Rake to build a gem for my Ruby application and I was
> wondering if
> there's a way to exclude certain files and/or directories from rdoc
> generation.
>


Take a look at Mr Bones. It provides a skeleton for Ruby projects, and
it is not viral -- you won't have to include Mr Bones as a dependency
to use your gem. The project skeleton has a collection of rake tasks
for managing your project including building a gem. You can explicitly
include or exclude files for rdoc generation ...

PROJ.rdoc.exclude = %w[^some/dir/ \.tmp$]
PROJ.rdoc.include = %w[\.txt$]

the syntax here is just an array of regexp snippets specifying the
file types you want to ignore or include.

http://bones.rubyforge.org/

If you just want the rake tasks and Rakefile, create a throw away
project using the "bones" command line. Copy the "tasks" folder and
the Rakefile to your project.

Blessings,
TwP

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
multiple rake build files? large rake files thufir Ruby 3 04-12-2008 07:28 AM
Rake and rake aborted! Rake aborted! undefined method `gem' for main:Object peppermonkey Ruby 1 02-10-2007 04:43 AM
RubyGems 0.9.1 calling a gem with gem '<gem>' Austin 7873 Ruby 5 01-27-2007 10:05 PM
Rake 0.7.0 breaks "rake engine_migrate"? Joe Van Dyk Ruby 2 01-31-2006 12:11 AM
SWsoft Acronis Disk Director Suite 9.0 Build 508, Acronis OS Selector 8.0 Build 917, Acronis Partition Expert 2003 Build 292, Acronis Power Utilities 2004 Build 502, F-SECURE.ANTI vIRUS.PROXY v1.10.17.WINALL, F-SECURE.ANTI vIRUS v5.50.10260 for CITRI vvcd Computer Support 0 09-25-2004 01:38 AM



Advertisments