Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > add binary to gem spec?

Reply
Thread Tools

add binary to gem spec?

 
 
Giles Bowkett
Guest
Posts: n/a
 
      11-21-2007
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.blogspot.com
Blog: http://gilesbowkett.blogspot.com
Portfolio: http://www.gilesgoatboy.org
Tumblelog: http://giles.tumblr.com

 
Reply With Quote
 
 
 
 
Luis Lavena
Guest
Posts: n/a
 
      11-21-2007
On Nov 21, 3:15 pm, Giles Bowkett <(E-Mail Removed)> 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#executables

 
Reply With Quote
 
 
 
 
Giles Bowkett
Guest
Posts: n/a
 
      11-21-2007
> > Any pointers to relevant docs? Couldn't find it in the Pickaxe.
>
> http://docs.rubygems.org/read/chapter/20#executables


Awesome! Thank you.

--
Giles Bowkett

Podcast: http://hollywoodgrit.blogspot.com
Blog: http://gilesbowkett.blogspot.com
Portfolio: http://www.gilesgoatboy.org
Tumblelog: http://giles.tumblr.com

 
Reply With Quote
 
Jeremy McAnally
Guest
Posts: n/a
 
      11-22-2007
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 <(E-Mail Removed)> 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.blogspot.com
> Blog: http://gilesbowkett.blogspot.com
> Portfolio: http://www.gilesgoatboy.org
> Tumblelog: http://giles.tumblr.com
>
>




--
http://www.jeremymcanally.com/

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

My free Ruby e-book
http://www.humblelittlerubybook.com/

My blogs:
http://www.mrneighborly.com/
http://www.rubyinpractice.com/

 
Reply With Quote
 
Luis Lavena
Guest
Posts: n/a
 
      11-22-2007
On Nov 22, 1:06 am, Jeremy McAnally <(E-Mail Removed)> 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
 
Reply With Quote
 
Giles Bowkett
Guest
Posts: n/a
 
      11-22-2007
> > 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.blogspot.com
Blog: http://gilesbowkett.blogspot.com
Portfolio: http://www.gilesgoatboy.org
Tumblelog: http://giles.tumblr.com

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Missing the mysql2 gem. Add it to your Gemfile: gem 'mysql2' Jakub Flaška Ruby 0 03-02-2011 11:04 PM
RubyGems 0.9.1 calling a gem with gem '<gem>' Austin 7873 Ruby 5 01-27-2007 10:05 PM
[GEM PATCH] allow gem to install bin file to different location Ara.T.Howard Ruby 0 10-26-2005 11:52 PM
ERROR: While executing gem ... (Gem::GemNotFoundException) Could not find rubygems-upodate (> 0) in the repository han Ruby 1 10-24-2005 10:28 PM
[ANN] Getopt-Declare 1.12 (gem/zip) and GGEnv (gem/zip) gga Ruby 0 07-18-2005 03:21 PM



Advertisments