Full review (do not merge)

You can replace the above with faster:

    >> OpenSSL::Random.random_bytes(20).unpack('H*').join
    => "2f3ff53dd712ba2303a573d9f9a8c1dbc1942d28"

Works fine with Ruby 1.8+. You can also generate base64 separators using similar technique I think.