buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ed Smiley <>
Subject Re: Running Buildr from inside Ruby code
Date Mon, 01 Aug 2011 16:07:20 GMT
Thanks Alex,

It's not on the top of my priorities, but I'd like to be able to incorporate
builds and Maven repo manipulation into Ruby programs (like Chef).  If I
come up with something interesting I'll let you know.


On Fri, Jul 29, 2011 at 6:39 AM, Alex Boisvert <>wrote:

> On Thu, Jul 28, 2011 at 4:03 PM, Ed Smiley <> wrote:
> > Haven't been too active on the list lately.  Buildr has been behaving
> > itself
> > very well.
> >
> > I have an advanced question.
> > This may have been covered, it seems obvious, but I haven't really seen
> > this
> > one discussed.
> >
> > I want to be able to have the option of running Buildr from within a Ruby
> > application, Chef recipe etc.
> > And yes, obviously I can exec it off as another process, but that seems
> > really lame since Buildr is in Ruby.
> I think executing as another process is fairly idiomatic Ruby (the "Ruby is
> Unix/Posix" philosophy) though I understand your desire...
> Right now, executing from Ruby code isn't well support because there's a
> few
> assumptions in the bootstrap process that sort of break.   Buildr assumes
> there's a buildfile somewhere to be read, it uses your current directory to
> find it, buildr will also read other files like build.yaml and try to
> enable
> gems, etc.   It's certainly possible to run it but it requires either
> monkeying Buildr::Application or duplicating some code to achieve correct
> initialization without these assumptions.
> If you want to pursue this, I would recommend opening
> lib/core/application.rb, copying whichever code your application needs for
> initialization into a separate module and using that for bootstrap.   (If
> you get there and want to share your work, I think there'd be interest in
> putting this back into Buildr for others to embed).
> alex

Ed Smiley, Software Architect Sr
*e*brary | 410 Cambridge Avenue| Palo Alto, CA 94306 USA |
*e*brary is a member of the ProQuest family of companies.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message