[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Creating a command-line Gem

Eric Marthinsen

6/25/2008 9:31:00 PM

Hi. I'm working on creating a Ruby command-line tool that I want to
distribute as a gem. Are there any examples or references on how to do
this? I'd like to create an application similar to god or rake, where
you can enter something like "god myapp.god" and be able to enter that
command anywhere and be called without calling it like "ruby god
myapp.god" or by having to call the script that is nested deep within
the gem directory. I'm starting from scratch on this and have a very low
level of knowledge, so any help on how to do this or where to find more
information would be much appreciated. Thanks in advance.

-Eric
--
Posted via http://www.ruby-....

2 Answers

Ryan Davis

6/25/2008 10:03:00 PM

0


On Jun 25, 2008, at 14:31 , Eric Marthinsen wrote:

> Hi. I'm working on creating a Ruby command-line tool that I want to
> distribute as a gem. Are there any examples or references on how to do
> this? I'd like to create an application similar to god or rake, where
> you can enter something like "god myapp.god" and be able to enter that
> command anywhere and be called without calling it like "ruby god
> myapp.god" or by having to call the script that is nested deep within
> the gem directory. I'm starting from scratch on this and have a very
> low
> level of knowledge, so any help on how to do this or where to find
> more
> information would be much appreciated. Thanks in advance.

Either use or study hoe. In hoe you put cmdline tools in a bin
directory and list them in the manifest. hoe automatically takes care
of the gem details for you.

quick start instructions:

sudo gem install hoe
sow thingy
cd thingy
poke around


Eric Marthinsen

6/25/2008 10:15:00 PM

0

Thanks. I'll check it out.
--
Posted via http://www.ruby-....