[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Useful methods for RubyGems

Trans

3/15/2006 3:52:00 AM

Please, could these be added to the next version of Gems?

module Gem

# Is gem active?
def active?(gemname)
@loaded_specs ||= Hash.new
@loaded_specs.key? gemname
end

# Return gemspec of active gem
def gemspec(gemname)
@loaded_specs[gemname] if active?(gemname)
end

# Return path of active gem
def gempath(gemname)
@loaded_specs[gemname].full_gem_path if active?(gemname)
end

end

I use this to get data files like so:

DATADIR = File.join(Gem.gempath('calibre'), 'data', 'calibre',
'units')

Thanks,
T.

11 Answers

Trans

3/15/2006 2:56:00 PM

0

Should I send this to someone in particular instead?

T.

Jeffrey Dik

3/15/2006 3:50:00 PM

0

Wouldn't this be better off sent to the rubygems-developers mailing
list?

Hope that helps,
Jeff

On Wed, Mar 15, 2006 at 11:58:46PM +0900, Trans wrote:
> Should I send this to someone in particular instead?
>
> T.
>
>
>


Trans

3/15/2006 5:53:00 PM

0

True. True. I just don't want to subscribe to the list. But maybe a
message will get thru w/o me subscribing. I'll try that.

Thanks,
T.

Austin Ziegler

3/15/2006 6:05:00 PM

0

On 3/14/06, Trans <transfire@gmail.com> wrote:> Please, could these be added to the next version of Gems?Why not submit a feature request on RubyForge?-austin--Austin Ziegler * halostatue@gmail.com * Alternate: austin@halostatue.ca

Trans

3/15/2006 9:38:00 PM

0

Thanks Austin.

Unfortunately, from the looks of it, there's absolutely no follow-up to
those postings. Of course, so far, there seems to absolutely no follow
up. Well, I'll try to be patient and hopefully hear back eventually.

Thanks,
T.

(hmm... maybe Gems could use a boost of spirit. Here's a thought. Might
Gems ultimately morph into a general purpose package manager, suitable
to any project no matter the language involved? Maybe one of those
other killer apps Ruby needs.)

Paul Robinson

3/15/2006 10:21:00 PM

0

On 15 Mar 2006, at 21:38, Trans wrote:

> (hmm... maybe Gems could use a boost of spirit. Here's a thought.
> Might
> Gems ultimately morph into a general purpose package manager, suitable
> to any project no matter the language involved? Maybe one of those
> other killer apps Ruby needs.)

Well, FreeBSD has /usr/ports and that gets really useful if you run
portupgrade from time to time. Wonder what that is written in... oh
yeah, Ruby! :-)


someone-who-knows

8/22/2013 9:04:00 PM

0

In article <ba8441b5-e104-4c45-a0fe-039206306852@googlegroups.com>,
plainolamerican <plainolamerican@gmail.com> wrote:

> only religious myth believers persecute gays.

Tell it to Walter Hampton... he wants to kill them.

> now ... go fuck yourself and your dead mother really hard, bitch!

Now, now.

plainolamerican

8/22/2013 9:16:00 PM

0

On Thursday, August 22, 2013 4:04:03 PM UTC-5, someone-who-knows wrote:
> In article <ba8441b5-e104-4c45-a0fe-039206306852@googlegroups.com>,
>
> plainolamerican <plainolamerican@gmail.com> wrote:
>
>
>
> > only religious myth believers persecute gays.
>
>
>
> Tell it to Walter Hampton... he wants to kill them.
>
>
>
> > now ... go fuck yourself and your dead mother really hard, bitch!
>
>
>
> Now, now.

yes ... now!!!

NEMO

8/22/2013 10:52:00 PM

0

Kissy - kissy, plainolgayunamerican!

Michael Baldwin, Bruce

8/22/2013 11:40:00 PM

0



"plainolamerican" <plainolamerican@gmail.com> wrote in message
news:87d6744d-cb06-49e5-926d-620cfac1186c@googlegroups.com...
> On Thursday, August 22, 2013 4:04:03 PM UTC-5, someone-who-knows wrote:
>> In article <ba8441b5-e104-4c45-a0fe-039206306852@googlegroups.com>,
>>
>> plainolamerican <plainolamerican@gmail.com> wrote:
>>
>>
>>
>> > only religious myth believers persecute gays.
>>
>>
>>
>> Tell it to Walter Hampton... he wants to kill them.
>>
>>
>>
>> > now ... go fuck yourself and your dead mother really hard, bitch!
>>
>>
>>
>> Now, now.
>
> yes ... now!!!

How did you get to be such a dumbass at such an early age?