[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

"Support Files" in Rubygems

Manuel Holtgrewe

2/16/2007 8:36:00 PM

Hi

Is it possible to include files in rubygems that are neither .rb nor
documentation files? I would like to publish Mozilla's cacert.pem in
my gem but seemingly, rubygems does not include the pem file in the
build gem.

You can find the Rakefile used to build the gem here:

http://preview.tinyurl....

Thanks in advance,

Manuel Holtgrewe

5 Answers

Austin Ziegler

2/16/2007 8:44:00 PM

0

On 2/16/07, Manuel Holtgrewe <zyklenfrei@googlemail.com> wrote:
> Is it possible to include files in rubygems that are neither .rb nor
> documentation files? I would like to publish Mozilla's cacert.pem in
> my gem but seemingly, rubygems does not include the pem file in the
> build gem.
>
> You can find the Rakefile used to build the gem here:
>
> http://preview.tinyurl....
>
> Thanks in advance,

Yes. See PDF::Writer and various others for how to do this.

RubyGems doesn't really care what you include; it just wants you to
enumerate it.

-austin
--
Austin Ziegler * halostatue@gmail.com * http://www.halo...
* austin@halostatue.ca * http://www.halo...feed/
* austin@zieglers.ca

Jeremy Hinegardner

2/16/2007 9:05:00 PM

0

On Sat, Feb 17, 2007 at 05:40:06AM +0900, Manuel Holtgrewe wrote:
> Hi
>
> Is it possible to include files in rubygems that are neither .rb nor
> documentation files? I would like to publish Mozilla's cacert.pem in
> my gem but seemingly, rubygems does not include the pem file in the
> build gem.
>
> You can find the Rakefile used to build the gem here:
>
> http://preview.tinyurl....
>

Feel free to take a look at the Rakefile for keybox, I have a 'data'
directory that gets included. FileList is your friend.

Here's a patch to google4r HEAD that I think does what you want.

You'll probably want to take advantage of spec.rdoc_options to make sure
that when the rdoc is generated from the gem that your 'README' is the
main document.

Something like :

spec.rdoc_options = ["--line-numbers",
"--inline-source",
"--main","README"]

You can also add a task :debug_gem (from hoe) which can help debug
issues.

task :debug_gem do
puts spec.to_ruby
end

enjoy,

-jeremy

--
========================================================================
Jeremy Hinegardner jeremy@hinegardner.org

Eric Hodel

2/16/2007 9:12:00 PM

0

On Feb 16, 2007, at 13:05, Jeremy Hinegardner wrote:

> You'll probably want to take advantage of spec.rdoc_options to make
> sure
> that when the rdoc is generated from the gem that your 'README' is the
> main document.
>
> You can also add a task :debug_gem (from hoe) which can help debug
> issues.

Or you could just use Hoe and let somebody else (me) take care of
these things.

Jeremy Hinegardner

2/16/2007 9:26:00 PM

0

On Sat, Feb 17, 2007 at 06:12:02AM +0900, Eric Hodel wrote:
> On Feb 16, 2007, at 13:05, Jeremy Hinegardner wrote:
>
> >You'll probably want to take advantage of spec.rdoc_options to make
> >sure
> >that when the rdoc is generated from the gem that your 'README' is the
> >main document.
> >
> >You can also add a task :debug_gem (from hoe) which can help debug
> >issues.
>
> Or you could just use Hoe and let somebody else (me) take care of
> these things.

Yup, that would work too, hoe makes the common stuff pretty easy, and
your publication to rubyforge and announcements and such.

-jeremy

--
========================================================================
Jeremy Hinegardner jeremy@hinegardner.org


Manuel Holtgrewe

2/17/2007 12:35:00 AM

0

Hi

Thank you all for your kind suggestions - they all solve my problem =)

I will certainly have a look at Hoe since it seems to be what I am
trying to duplicate (although I could not find much documentation on
it on the net).

Kind Regards,

Manuel