[Rubygems-developers] What plans now?
Jim Weirich
jim at weirichhouse.org
Mon May 17 07:02:41 EDT 2004
Gavin Sinclair wrote:
>>>Also, the time might be right for an enhancement to the gemspec along
>>>these lines:
>>>
>>> spec.add_files do |fs|
>>> fs.bin << FileList['bin/*.rb']
>>> fs.lib << FileList['lib/**/*.rb']
>>> fs.doc << FileList['README', 'TODO', 'ChangeLog']
>>> end
I would suggest either
fs.bin = FileList['bin/*.rb']
or
fs.bin.include('bin/*.rb')
The first assigns a new file list to the bin attribute. The second
appends the files matching "bin/*.rb" to an existing file list. The
original suggestion appends a file list to an existing list, which is
probably not what is wanted.
>>Makes sense. It would be nice to be able to pass it an array of
>>strings *or* a FileList.
A FileList inherits from Array, so in a sense, it *is* an array of strings.
> I suppose the only way a person can use a FileList in a gem is to
> require 'rake', right?
Currently that's true. If RubyGems wants to move that direction, we can
accommodate that somehow, I'm sure.
--
-- Jim Weirich jim at weirichhouse.org http://onestepback.org
-----------------------------------------------------------------
"Beware of bugs in the above code; I have only proved it correct,
not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)
More information about the Rubygems-developers
mailing list