Created
June 1, 2014 16:56
-
-
Save TechFounder/1eaa0d5bbea33dab5289 to your computer and use it in GitHub Desktop.
secret - Figaro Gem vs Rails 4.1 These two files shows the difference in configuration between the two methods of keeping environment variables secret.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# figaro gem | |
# config/application.yml | |
stripe_publishable_key: pk_test_TLr0qqdKhm0yX1bZtKC4kFAC | |
stripe_secret_key: sk_test_Qbppb2nkFEzPoquOdBym0JL2 | |
# rails 4.1 | |
# config/secrets.yml | |
stripe_publishable_key: pk_test_TLr0qqdKhm0yX1bZtKC4kFAC | |
stripe_secret_key: sk_test_Qbppb2nkFEzPoquOdBym0JL2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# figaro gem | |
# config/initializers/stripe.rb | |
Stripe.api_key = ENV["stripe_secret_key"] | |
# rails 4.1 | |
# config/initializers/stripe.rb | |
Stripe.api_key = Rails.application.secrets.stripe_secret_key |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment