nathancolgate / s3-swf-upload-plugin

A rails 3 gem which allow user upload files to S3 through an embedded flash directly. All UI has been moved out of flex and can be controlled by CSS and JavaScript callbacks.
http://www.nathancolgate.com
MIT License
317 stars 74 forks source link

Add support for parsing variables in the config file #32

Closed johnrees closed 13 years ago

johnrees commented 13 years ago

Hey Nathan,

This is my first ever fork so sorry if I've done something wrong!

I use heroku and want to make my apps open source so instead of storing the sensitive s3 data in the amazon_s3.yml file I prefer to do this -

production:
  bucket: <%= ENV['S3_BUCKET'] %>
  access_key_id: <%= ENV['S3_KEY'] %>
  secret_access_key: <%= ENV['S3_SECRET'] %>
  max_file_size: <%= ENV['S3_MAX_FILESIZE'].to_i %>
  acl: <%= ENV['S3_ACL'] %>

This way I can keep my credentials safe using Heroku's config vars as described on this page http://docs.heroku.com/config-vars

The change I have made doesn't affect the current functionality at all, it just adds this functionality

Thanks,

John

chrissearle commented 13 years ago

Exact same issue - open source projects - so don't want the keys in a file on github - but the only way to populate heroku is via a commit or the environment. This would solve the issue and make this plugin usable for me ;)

nathancolgate commented 13 years ago

Sorry for the delay on this. I finally got around to pulling a request for this parsing. You should all be good to go!