-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Adrian Steppat
committed
Jan 14, 2019
1 parent
9e1d7b4
commit 5487950
Showing
6 changed files
with
51 additions
and
50 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
# frozen_string_literal: true | ||
|
||
module EnvironmentVariablesExample | ||
class Application < Rails::Application | ||
config.before_configuration do | ||
env_file = Rails.root.join("config", 'environment_variables.yml').to_s | ||
env_file = Rails.root.join('config', 'environment_variables.yml').to_s | ||
|
||
if File.exists?(env_file) | ||
if File.exist?(env_file) | ||
YAML.load_file(env_file)[Rails.env].each do |key, value| | ||
ENV[key.to_s] = value | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end |
2 changes: 2 additions & 0 deletions
2
db/migrate/20181216161526_add_application_name_to_requests.rb
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
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
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