redo cururl in ruby with more options