0

I just integrated an encrypted shopping cart to my Rails(4.2) app for use with Paypal. Currently, my app reads the SSL cert & key files into constants which are then used during encryption. This works fine, but I'd prefer not to publish those files to github. The app uses the figaro gem to manage the environment variables in the application.yml file. Is there a way to incorporate the SSL certs into application.yml as environment variables instead of reading the files?

Thanks in advance,

Brendan

Brendan O'Brien
  • 55
  • 1
  • 10
  • Found a solution that worked. Every line of the PEM file (including the Begin and End statements) has to be terminated with \n, then edited into a single line in the application.yml file. – Brendan O'Brien Aug 25 '17 at 09:52
  • I created a ruby class to handle this automatically. For anyone interested you can find it here: https://gist.github.com/titanium-cranium/b96c751f15dd84fc40e8c4306ada565d – Brendan O'Brien Aug 30 '17 at 00:23

0 Answers0