diff --git a/config/initializers/mail.rb b/config/initializers/mail.rb index 4a6f8a4..6692c24 100644 --- a/config/initializers/mail.rb +++ b/config/initializers/mail.rb @@ -1,11 +1,16 @@ +# Use config vars to get your Gmail credentials onto Heroku. +# They will be automatically picked up by this file in production. + +# heroku config:add GMAIL_EMAIL=dcroak@example.com GMAIL_PASSWORD=password + require 'smtp-tls' ActionMailer::Base.smtp_settings = { :address => "smtp.gmail.com", :port => "587", :authentication => :plain, - :user_name => "YOUREMAIL", - :password => "YOURPASSWORD" + :user_name => ENV['GMAIL_EMAIL'], + :password => ENV['GMAIL_PASSWORD'] } DO_NOT_REPLY = "donotreply@example.com" diff --git a/config/s3.yml b/config/s3.yml index 1df48a0..05a56d6 100644 --- a/config/s3.yml +++ b/config/s3.yml @@ -1,8 +1,14 @@ -# Use Heroku's config vars to get your S3 account keys into the cloud: +# Use config vars to get your S3 credentials onto Heroku. +# They will be automatically picked up by this file in production. # heroku config:add S3_KEY=8N029N81 S3_SECRET=9s83109d3+583493190 -# They are then automatically picked up by this file. +# Use the following example as your guide for S3 with Paperclip. + +# has_attached_file :avatar, +# :styles => { :thumbnail => "150x150" }, +# :path => ":attachment/:id/:style.:extension", +# :s3_credentials => "#{RAILS_ROOT}/config/s3.yml", development: &default access_key_id: <%= ENV['S3_KEY'] %> @@ -17,10 +23,3 @@ production: <<: *default bucket: CHANGME_production -# Use S3 with Paperclip using the following example as your guide. - -# has_attached_file :avatar, -# :styles => { :thumbnail => "150x150" }, -# :path => ":attachment/:id/:style.:extension", -# :s3_credentials => "#{RAILS_ROOT}/config/s3.yml", - -- libgit2 0.21.2