The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
HOWTO Rake (or) pls keep going jim!

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Red Handed

Posts: 1158
Nickname: redhanded
Registered: Dec, 2004

Red Handed is a Ruby-focused group blog.
HOWTO Rake (or) pls keep going jim! Posted: Apr 11, 2005 6:39 AM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Red Handed.
Original Post: HOWTO Rake (or) pls keep going jim!
Feed Title: RedHanded
Feed URL: http://redhanded.hobix.com/index.xml
Feed Description: sneaking Ruby through the system
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Red Handed
Latest Posts From RedHanded

Advertisement

You should learn to Rake. I’ve been meaning to switch everything over for some time now. Rake can currently automate building of gems and documentation from your libraries. And now that’s it’s a hugely popular gem, you can feel safe moving away from setup.rb/install.rb.

Jim Weirich’s started a series of tutorials (Getting Started and Handling Common Tasks) explaining the visceral details of Raking. Not that it’s an involved process—his tutorials are brief. But he gives a lot of specific examples you can rip off. The 2nd article is particularly tasteful.

Rake can automatically generate file based tasks according to some simple pattern matching rules.

For example, we can capture the above logic in a single rule … no need to find all the source files and iterate through them.

  rule '.o' => '.c' do |t|
    sh "cc -c -o #{t.name} #{t.source}" 
  end

The above rule says that if you want to generate a file ending in .o, then you if you have a file with the same base name, but ending in .c, then you can generate the .o from the .c.

Read: HOWTO Rake (or) pls keep going jim!

Topic: Jon Udell discovers Ruby on Rails Previous Topic   Next Topic Topic: Rails rides to Finland

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use