Finding the path to a sprouts tool

4 views
Skip to first unread message

Simon Gregory

unread,
Sep 29, 2011, 8:05:12 AM9/29/11
to project...@googlegroups.com
I'm trying to harmonise the setup of my project so developers have an easy time getting up and running. The project is using sprouts to build and cucumber + melomel for functional testing. On the cucumber side we need to source and run ADL, and I'd like to be automatically discovering where sprouts is storing the binary.

In my cucumber support classes (so Rake isn't involved) creating an instance of FlashSDK::ADL.new and inspecting it's properties isn't proving very fruitful. Does anyone have any idea of how I could get to the path I'm after?

Thanks,
Simon

Luke Bayes

unread,
Sep 29, 2011, 7:19:57 PM9/29/11
to project...@googlegroups.com
Hey Simon,

I think you're looking for 'binary_path'.

As long as you're in Ruby, you should be able to do something like:

    require 'flashsdk'

    puts "Path: #{FlashSDK::ADL.new().binary_path}"

The answer was hiding in 'executable/base.rb' here:




Thanks!

Luke





--
You received this message because you are subscribed to the Google Groups "ProjectSprouts" group.
To post to this group, send email to project...@googlegroups.com
To unsubscribe from this group, send email to projectsprout...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/projectsprouts?hl=en

For other info you can visit our project at: http://projectsprouts.org, or on Github at: http://github.com/lukebayes/project-sprouts

Simon Gregory

unread,
Sep 30, 2011, 8:12:43 AM9/30/11
to project...@googlegroups.com
Thanks Luke,

That's spot on :)

There's no excuse for me not finding that myself. I scanned to the 'private' at

https://github.com/lukebayes/project-sprouts/blob/master/lib/sprout/executable/base.rb#L82

And just didn't read any further (even though I know you can declare public anywhere, or dig in with send etc). Ended up spending half an hour with ruby-debug trying to inspect a adl instance before I figured the advice of someone wiser was needed. I guess it was one of those code blind moments you get from time to time.

Cheers,
Simon

On Friday, 30 September 2011 at 00:19, Luke Bayes wrote:

> Hey Simon,
>
> I think you're looking for 'binary_path'.
>
> As long as you're in Ruby, you should be able to do something like:
>
> require 'flashsdk'
>
> puts "Path: #{FlashSDK::ADL.new().binary_path}"
>
> The answer was hiding in 'executable/base.rb' here:
>
> https://github.com/lukebayes/project-sprouts/blob/master/lib/sprout/executable/base.rb#L380
>
>
>
> Thanks!
>
> Luke
>
>
>
>
> On Thu, Sep 29, 2011 at 5:05 AM, Simon Gregory <abstract...@gmail.com (mailto:abstract...@gmail.com)> wrote:
> > I'm trying to harmonise the setup of my project so developers have an easy time getting up and running. The project is using sprouts to build and cucumber + melomel for functional testing. On the cucumber side we need to source and run ADL, and I'd like to be automatically discovering where sprouts is storing the binary.
> >
> > In my cucumber support classes (so Rake isn't involved) creating an instance of FlashSDK::ADL.new and inspecting it's properties isn't proving very fruitful. Does anyone have any idea of how I could get to the path I'm after?
> >
> > Thanks,
> > Simon
> >
> > --
> > You received this message because you are subscribed to the Google Groups "ProjectSprouts" group.

> > To post to this group, send email to project...@googlegroups.com (mailto:project...@googlegroups.com)
> > To unsubscribe from this group, send email to projectsprout...@googlegroups.com (mailto:projectsprout...@googlegroups.com)


> > For more options, visit this group at http://groups.google.com/group/projectsprouts?hl=en
> >
> > For other info you can visit our project at: http://projectsprouts.org, or on Github at: http://github.com/lukebayes/project-sprouts
>

> --
> You received this message because you are subscribed to the Google Groups "ProjectSprouts" group.

> To post to this group, send email to project...@googlegroups.com (mailto:project...@googlegroups.com)
> To unsubscribe from this group, send email to projectsprout...@googlegroups.com (mailto:projectsprout...@googlegroups.com)

Luke Bayes

unread,
Oct 3, 2011, 1:40:11 PM10/3/11
to project...@googlegroups.com
Sorry for the confusion. I fully concede that it's very bad style to put public junk after private junk. I would have stopped reading there too.

If you're interested in cleaning that up, I'd be happy to take a pull request.

Thanks for your ongoing patience!

lb.
Reply all
Reply to author
Forward
0 new messages