Brian C. wrote:
I think a summary of the problem is: you want rdoc to process a file as
if it were ruby source, but where it has no extension.
I want rdoc to process a file as if it were ruby source regardless of
its file extension when it is explicitly specify as a command-line
argument. For example, this should work:
ln foo.rb foo.exe
rdoc foo.exe # should treat foo.exe as a ruby source file
rdoc put_odd_name_here # should treat as ruby source file
In other words, rdoc should not discriminate files (specified as
command-line arguments) based on their (possibly nonexistent) file
extension. Just think of how cat(1) processes files indiscriminately.
As for directories, rdoc’s behavior of ignoring non *.rb files whilst
automatically regressing directories is acceptable. Though, it might be
nice to specify a file-path glob that rdoc would process whilst
regressing:
rdoc some_project/lib/ --allow ‘[Rr]akefile’ --allow
‘**/*.{rake,ruby}’
Or: rdoc doesn’t let you specify on a file-by-file basis whether it’s
plain text or ruby source.
I would not like this alternative because would require far too much
typing:
rdoc foo.exe --allow foo.exe bar.exe --allow bar.exe …
If the basis were more coarse grained (say, by file-path glob) then it
might be more managable:
rdoc foo.exe bar.exe --allow ‘*.exe’ …
Nevertheless, I highly prefer no file-extension based discrimination,
because it is simple and straightforward, over these
special-case-provision alternatives.