[Rake-devel] including .specification files (or other "dot" files) in Rake Package on Linux/Mac OS X

Nathan Beyer nbeyer at gmail.com
Tue Nov 17 23:07:35 EST 2009


On Tue, Nov 17, 2009 at 12:16 AM, Assaf Arkin <assaf at labnotes.org> wrote:
> On Mon, Nov 16, 2009 at 8:10 PM, Nathan Beyer <nbeyer at gmail.com> wrote:
>>
>> I've found that my instantiation of the Rake Package task for
>> packaging up a Rails app isn't including the '.specification' files in
>> the '/vendor/gems/**/*' pattern. I've recreated this on Linux and Mac
>> OS X.
>>
>> It seems the issue is that the files, which are copied from their
>> origin to the target folder, are missing the files. I'm guessing this
>> is because of the underlying copy commands, but haven't dug into it
>> yet.
>
> FileList (also Dir.glob, File.fnmatch) does not match dot files when you use
> the pattern "*".  That's by design, dot files are hidden, so the default
> behavior is to not match them.  You can use the option File::FNM_DOTMATCH,
> or change the pattern to match "{.*,*}".

I assumed it was default behavior, i just didn't know how to get it
changed in this case.

Is the use of curly braces in the FileList [] method documented
somewhere, I haven't seen that before? Is "{.*,*}" the same as two
separate patterns ".*" and "*" in the same FileList[]?

Thanks for the help.
-Nathan

> Assaf Arkin
> Blogging at labnotes.org
>
>>
>> Has anyone else run into this? Is there anyway to get Rake to pickup
>> '.specification' or any other "dot" files?
>> _______________________________________________
>> Rake-devel mailing list
>> Rake-devel at rubyforge.org
>> http://rubyforge.org/mailman/listinfo/rake-devel
>
>
> _______________________________________________
> Rake-devel mailing list
> Rake-devel at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rake-devel
>


More information about the Rake-devel mailing list