PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.lang.ruby > add binary to gem spec?
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
add binary to gem spec?

Réponse
 
LinkBack Outils de la discussion
Vieux 21/11/2007, 18h15   #1
Giles Bowkett
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut add binary to gem spec?

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

  Réponse avec citation
Vieux 21/11/2007, 18h52   #2
Luis Lavena
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: add binary to gem spec?

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#executables

  Réponse avec citation
Vieux 21/11/2007, 23h26   #3
Giles Bowkett
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: add binary to gem spec?

> > 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

  Réponse avec citation
Vieux 22/11/2007, 04h06   #4
Jeremy McAnally
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: add binary to gem spec?

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.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/

  Réponse avec citation
Vieux 22/11/2007, 12h09   #5
Luis Lavena
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: add binary to gem spec?

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 s 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
  Réponse avec citation
Vieux 22/11/2007, 18h07   #6
Giles Bowkett
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: add binary to gem spec?

> > 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 s 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

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 03h52.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,14359 seconds with 14 queries