2009/4/8 Kyle Schmitt <kyleaschmitt / gmail.com>

> On Wed, Apr 8, 2009 at 10:28 AM, James Coglan <jcoglan / googlemail.com>
> wrote:
> >
> >
> > cat `find . -name '*.rb'` > all.rb
> >
>
> Did you get that from the new O'Reilly book, "Mastering cat"? ;)
> http://www.shlomifish.org/humour/bits/Mastering-Cat/


Hey, it's worth knowing your cat... although I really wish someone actually
would publish that book, I'd love to see how much mileage they could eke out
of it.

I slightly more robust thing to do would be to list all the files in a
config file e.g. Manifest.txt, since order can be important, then write a
build take in your Rakefile:

task :build do
  files = File.read('Manifest.txt').strip.split(/\s+/)
  code = files.map(&File.method(:read)) * "\n\n"
  File.open('build.rb', 'wb') { |f| f.write(code) }
end