Forum: Ruby Useful methods for RubyGems

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
45196398e9685000d195ec626d477f0e?d=identicon&s=25 Trans (Guest)
on 2006-03-15 04:54
(Received via mailing list)
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.
45196398e9685000d195ec626d477f0e?d=identicon&s=25 Trans (Guest)
on 2006-03-15 16:01
(Received via mailing list)
Should I send this to someone in particular instead?

T.
1e921faea19ba7b7089b2082c1ab5b4c?d=identicon&s=25 Jeffrey Dik (Guest)
on 2006-03-15 16:50
(Received via mailing list)
Wouldn't this be better off sent to the rubygems-developers mailing
list?

Hope that helps,
Jeff
45196398e9685000d195ec626d477f0e?d=identicon&s=25 Trans (Guest)
on 2006-03-15 18:56
(Received via mailing list)
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.
31ab75f7ddda241830659630746cdd3a?d=identicon&s=25 Austin Ziegler (Guest)
on 2006-03-15 19:08
(Received via mailing list)
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
45196398e9685000d195ec626d477f0e?d=identicon&s=25 Trans (Guest)
on 2006-03-15 22:41
(Received via mailing list)
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.)
66247570dbe0c350a165cdabc2769ba1?d=identicon&s=25 Paul Robinson (Guest)
on 2006-03-15 23:21
(Received via mailing list)
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! :-)
This topic is locked and can not be replied to.