[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

add binary to gem spec?

Giles Bowkett

11/21/2007 6:16:00 PM

Hi all - I want to add a Ruby script to a gem, so that users of the
gem get not just the gem itself but also a script in /opt/local/bin
that they can run which packages up some of the functionality on the
command line. Very much like s3sh in the Amazon S3 gem (gem install
aws-s3).

Any pointers to relevant docs? Couldn't find it in the Pickaxe.

--
Giles Bowkett

Podcast: http://hollywoodgrit.bl...
Blog: http://gilesbowkett.bl...
Portfolio: http://www.gilesg...
Tumblelog: http://giles....

5 Answers

Luis Lavena

11/21/2007 6:52:00 PM

0

On Nov 21, 3:15 pm, Giles Bowkett <gil...@gmail.com> wrote:
> Hi all - I want to add a Ruby script to a gem, so that users of the
> gem get not just the gem itself but also a script in /opt/local/bin
> that they can run which packages up some of the functionality on the
> command line. Very much like s3sh in the Amazon S3 gem (gem install
> aws-s3).
>
> Any pointers to relevant docs? Couldn't find it in the Pickaxe.

http://docs.rubygems.org/read/chapter/20#e...

Giles Bowkett

11/21/2007 11:26:00 PM

0

> > Any pointers to relevant docs? Couldn't find it in the Pickaxe.
>
> http://docs.rubygems.org/read/chapter/20#e...

Awesome! Thank you.

--
Giles Bowkett

Podcast: http://hollywoodgrit.bl...
Blog: http://gilesbowkett.bl...
Portfolio: http://www.gilesg...
Tumblelog: http://giles....

Jeremy McAnally

11/22/2007 4:06:00 AM

0

Why not just use something like newgem or hoe to build your gem that
will handle this sort of stuff for you?

--Jeremy

On Nov 21, 2007 1:15 PM, Giles Bowkett <gilesb@gmail.com> wrote:
> Hi all - I want to add a Ruby script to a gem, so that users of the
> gem get not just the gem itself but also a script in /opt/local/bin
> that they can run which packages up some of the functionality on the
> command line. Very much like s3sh in the Amazon S3 gem (gem install
> aws-s3).
>
> Any pointers to relevant docs? Couldn't find it in the Pickaxe.
>
> --
> Giles Bowkett
>
> Podcast: http://hollywoodgrit.bl...
> Blog: http://gilesbowkett.bl...
> Portfolio: http://www.gilesg...
> Tumblelog: http://giles....
>
>



--
http://www.jeremymca...

My books:
Ruby in Practice
http://www.manning.com...

My free Ruby e-book
http://www.humblelittlerub...

My blogs:
http://www.mrneigh...
http://www.rubyinpra...

Luis Lavena

11/22/2007 12:10:00 PM

0

On Nov 22, 1:06 am, Jeremy McAnally <jeremymcana...@gmail.com> wrote:
> Why not just use something like newgem or hoe to build your gem that
> will handle this sort of stuff for you?
>

Because at the end of the day, you outsource all the core of getting
things working to external tools.

What happen if they are broken? How can you get the picture and maybe
provide a patch to fix the "misbehaving" function?

Having the understanding to do it helps more than letting "magic
happens" for you all the time.

--
Luis Lavena
Multimedia systems
-
Leaders are made, they are not born. They are made by hard effort,
which is the price which all of us must pay to achieve any goal that
is worthwhile.
Vince Lombardi

Giles Bowkett

11/22/2007 6:08:00 PM

0

> > Why not just use something like newgem or hoe to build your gem that
> > will handle this sort of stuff for you?
>
> Because at the end of the day, you outsource all the core of getting
> things working to external tools.
>
> What happen if they are broken? How can you get the picture and maybe
> provide a patch to fix the "misbehaving" function?
>
> Having the understanding to do it helps more than letting "magic
> happens" for you all the time.

I agree with that, but I used Hoe to generate the file structure. I
think I got to a point where Hoe stopped being obvious, and then I
thought, well, if I have to learn something, it's probably faster to
learn Gems.

--
Giles Bowkett

Podcast: http://hollywoodgrit.bl...
Blog: http://gilesbowkett.bl...
Portfolio: http://www.gilesg...
Tumblelog: http://giles....