gem help!

A

Ara.T.Howard

i have the somewhat standard lib dir hiearchy which looks like

lib/
lib/foo.rb
lib/foo/
lib/foo/a.rb
lib/foo/b.rb

here foo.rb obviously does a relative require of both foo/a.rb and foo/b.rb.

my gemspec has something like

spec.files = Dir[ File::join("{lib,bin}", "*") ]

but, for some reason, the foo/ directory is not included in the gem! any
thoughts on how to do this?

cheers.

-a
--
===============================================================================
| ara [dot] t [dot] howard [at] gmail [dot] com
| all happiness comes from the desire for others to be happy. all misery
| comes from the desire for oneself to be happy.
| -- bodhicaryavatara
===============================================================================
 
S

Stefan Lang

i have the somewhat standard lib dir hiearchy which looks like

lib/
lib/foo.rb
lib/foo/
lib/foo/a.rb
lib/foo/b.rb

here foo.rb obviously does a relative require of both foo/a.rb and
foo/b.rb.

my gemspec has something like

spec.files = Dir[ File::join("{lib,bin}", "*") ]

but, for some reason, the foo/ directory is not included in the
gem! any thoughts on how to do this?

Try this:

spec.files = Dir[ File::join("{lib,bin}", "**", "*") ]

Which is as well as:

spec.files = Dir[ "{lib,bin}/**/*" ]

It builds a list of all entries under lib/ and bin/, also recursing
into subdirectories.

HTH,
Stefan
 
A

Ara.T.Howard

i have the somewhat standard lib dir hiearchy which looks like

lib/
lib/foo.rb
lib/foo/
lib/foo/a.rb
lib/foo/b.rb

here foo.rb obviously does a relative require of both foo/a.rb and
foo/b.rb.

my gemspec has something like

spec.files = Dir[ File::join("{lib,bin}", "*") ]

but, for some reason, the foo/ directory is not included in the
gem! any thoughts on how to do this?

Try this:

spec.files = Dir[ File::join("{lib,bin}", "**", "*") ]

Which is as well as:

spec.files = Dir[ "{lib,bin}/**/*" ]

It builds a list of all entries under lib/ and bin/, also recursing
into subdirectories.

yeah - that's what i ended up doing. strange that Gem::Specification silently
ignores directories though...

-a
--
===============================================================================
| ara [dot] t [dot] howard [at] gmail [dot] com
| all happiness comes from the desire for others to be happy. all misery
| comes from the desire for oneself to be happy.
| -- bodhicaryavatara
===============================================================================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,197
Messages
2,571,040
Members
47,634
Latest member
RonnyBoelk

Latest Threads

Top