# SetupTask

**URL:** <https://www.ruby-forum.com/t/setuptask/129242>\
**Category:** Ruby\
**Created:** [February 15, 2008, 6:31pm UTC](https://www.ruby-forum.com/t/setuptask/129242 "2008-02-15T18:31:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Trans](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/dfb087/32.png) [@Trans](https://www.ruby-forum.com/u/Trans)\
**Post date:** [February 15, 2008, 6:31pm UTC](https://www.ruby-forum.com/t/setuptask/129242/1 "2008-02-15T18:31:29Z")

</div>

Hey all,

I turned setup.rb into a Rake task called SetupTask. You can check it  
out here:

[http://reap.rubyforge.org/svn/trunk/lib/reap/rake/setuptask.rb](http://reap.rubyforge.org/svn/trunk/lib/reap/rake/setuptask.rb)

While I was at it I cleaned up some parts of the code.

- I got rid of multi-packaging (b/c it’s easy to create a drill-down  
task if you really need one).
- I removed setup.rb’s testing task (since we can use rake’s, of  
course).
- I redid the options assignment so it uses a more traditional  
attributes approach, and pulls from ENV.

I decided to do this because I needed the functionality but thought it  
was silly to be lugging around two scripts all the time (Rakefile and  
setup.rb). I also decided it was better to reuse working code then do  
a complete rewrite from scratch. The plan is instead to gradually  
“rakify” it over time (after learning exactly how setup.rb works, I  
note there is plenty of room for rakification).

One major thing I am considering is removing the current hook system.  
I imagine that a better hook system could be put in place they  
utilizes rake’s tasks --but I haven’t worked out exactly how that  
could would work yet.

If any one has any ideas, suggestions and of course bug fixes, please  
drop me a line.

T.
