figaro-ruby

Sinatra with Figaro Gem

杀马特。学长 韩版系。学妹 提交于 2019-12-12 02:45:48
问题 I m trying to use Figaro gem with Sinatra. I have installed Figaro and it created the following file/ folder... /config/application.yml On this file I have added some environment variables... ENV['GMAIL_USERNAME'] ENV['GMAIL_PASSWORD'] Then on my my "app.rb" file I am trying to include the yml file like... require 'config/application.yml' How can I have access to my "ENV['BIG_SECRET']" in my app.rb file? Mail.defaults do delivery_method :smtp, { :address => 'smtp.gmail.com', :port => '587',

Using Figaro and Secrets.yml to Manage Env Variables

南楼画角 提交于 2019-12-05 03:35:39
问题 I have a rails 4.1 app and I'm trying to organize my env variables. As of right now I have a secrets.yml file in my config/ folder. I also installed the figaro gem. My goal was to have all my env variables in the application.yml (not checked into git) file and then use the secrets.yml (checked into git) file to map the variables from appliation.yml to the application. When I print the files using Rails.application.secrets It just shows hashes that look like this: :salesforce_username=>"ENV[

Using Figaro and Secrets.yml to Manage Env Variables

为君一笑 提交于 2019-12-03 20:11:46
I have a rails 4.1 app and I'm trying to organize my env variables. As of right now I have a secrets.yml file in my config/ folder. I also installed the figaro gem. My goal was to have all my env variables in the application.yml (not checked into git) file and then use the secrets.yml (checked into git) file to map the variables from appliation.yml to the application. When I print the files using Rails.application.secrets It just shows hashes that look like this: :salesforce_username=>"ENV['SALESFORCE_USERNAME']" None of my external services are working with this env variables setup. When I

Sinatra with Figaro Gem

…衆ロ難τιáo~ 提交于 2019-12-02 11:34:40
I m trying to use Figaro gem with Sinatra. I have installed Figaro and it created the following file/ folder... /config/application.yml On this file I have added some environment variables... ENV['GMAIL_USERNAME'] ENV['GMAIL_PASSWORD'] Then on my my "app.rb" file I am trying to include the yml file like... require 'config/application.yml' How can I have access to my "ENV['BIG_SECRET']" in my app.rb file? Mail.defaults do delivery_method :smtp, { :address => 'smtp.gmail.com', :port => '587', :domain => 'mydomain.com', :user_name => ENV['GMAIL_USERNAME'], :password => ENV['GMAIL_PASSWORD'],