def replace_with_timestamp(string, marker = '{dt}', datetime = DateTime.now)
    string.gsub(marker, timestamp(datetime))
  end
def replace_with_timestamp(string, marker = '{dt}', datetime = DateTime.now)
    string.gsub(marker, timestamp(datetime))
  end
Replaces all occurrences of marker with the current date/time in
 YYYYMMDD-HHMMSS format.

 Useful for creating filespecs with static content that will differ by date,
 for example:

 replace_with_timestamp('my-app-result-{dt}.txt') => "my-app-result-2014-03-24_15-25-57.txt"