beginrequire'base64'rescueLoadErrorendmoduleActiveSupportifdefined?::Base64Base64=::Base64else# Ruby 1.9 doesn't provide base64, so we wrap this heremoduleBase64defself.encode64(data)[data].pack("m")enddefself.decode64(data)data.unpack("m").firstendendendend