Skip to content

Instantly share code, notes, and snippets.

@neilmiddleton
Created January 6, 2013 22:43
Show Gist options
  • Save neilmiddleton/4470806 to your computer and use it in GitHub Desktop.
Save neilmiddleton/4470806 to your computer and use it in GitHub Desktop.
Parse S3 URL for credentials
require 'uri'
if ENV.has_key? "BUCKET_URL"
uri = URI.parse(ENV["BUCKET_URL"])
ENV["S3_ACCESS_KEY"] = uri.user
ENV["S3_ACCESS_SECRET"] = uri.password
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment