Switch to ruby-version and ruby-gemset
Wrap data in StringIO and use upload instead of f.puts
Keep track of the mode: production, development or test