Created
June 14, 2013 13:43
-
-
Save Sutto/5781893 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
require 'rubygems' | |
# Set up gems listed in the Gemfile. | |
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) | |
require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE']) | |
# Uses forman to boostrap ENV from a .env environment. | |
# This is mostly useful since it means we can then use it from | |
# things other than foreman (passenger, our own scripts) with easy. | |
envfile_path = File.expand_path('../../.env', __FILE__) | |
if File.exists?(envfile_path) | |
require 'foreman/env' | |
STDERR.puts "Loading foreman environment file." | |
Foreman::Env.new(envfile_path).entries do |key, value| | |
ENV[key] = value | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment