Andy McKay

Jun 26, 2007

Scary code


Just saw this code and it instantly sent shivers down my spine.

namespace :rubaidh do
  task :tag_layout_with_release_info, :roles => :app do
    [snipped by me]
    run "perl -p -i -e 's??#{release_info}?' #{layout}"
  end
end

A rake task for rails that contains a shell out to perl which then outputs HTML. Could as well be done in Make file, ugh.

Sorry for the delay on posting, been a busy few weeks and sat down at the browser with complete writers block. Odd consider the normal quality of my posting.