buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <>
Subject Re: Using Buildr in other applications
Date Fri, 19 Apr 2013 23:07:00 GMT

On Fri, Apr 19, 2013 at 6:41 PM, Khristian Schönrock
<> wrote:
> I wrote a small ruby app that works as a "artifact repository" of sorts,
> and allows me to query my local repository and/or to download artifacts on
> demand. I'm using Buildr to access and manipulate the artifacts.
> I've got the "query" part down, but the "download on demand" bit is giving
> me a bit of trouble. What I tried is:
> -----------------
> require 'rubygems'
> require 'buildr'
> def search_for_artifact(spec)
>   art=Buildr.artifact(spec)
>   art.invoke unless art==nil
> end
> -----------------
> This works when the artifact is already present, but fails when it must be
> downloaded with "Internal Error: attempting to access local setting before
> buildfile located". How can I use this functionality without a buildfile?

The ugliest way is to set a private variable inside the buildr
application so it works around the lack of a build file. An example of
this in action is at;


Peter Donald

View raw message