sed -i 's/host: .*/host: hogefuga/' config/database.yml

でよくないっすか。

production のホストはコレで、development のホストはアレってことだと
いよいよawkの出番ですね! :)