Forum: Ruby gem help!

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.
Cb48ca5059faf7409a5ab3745a964696?d=identicon&s=25 ara.t.howard (Guest)
on 2005-11-21 02:45
(Received via mailing list)
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
2d532341317628fbb2cb22ec427a1d62?d=identicon&s=25 langstefan (Guest)
on 2005-11-21 09:19
(Received via mailing list)
On Monday 21 November 2005 02:44, Ara.T.Howard wrote:
>
> 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
Cb48ca5059faf7409a5ab3745a964696?d=identicon&s=25 ara.t.howard (Guest)
on 2005-11-21 15:39
(Received via mailing list)
On Mon, 21 Nov 2005, Stefan Lang wrote:

>> foo/b.rb.
>    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
This topic is locked and can not be replied to.