forked from civiccc/modesty
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use Rails' environment if it's present
- Loading branch information
Kristjan Petursson
committed
Apr 26, 2010
1 parent
3b7982a
commit a962e71
Showing
2 changed files
with
6 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
Modesty.root = File.join(Rails.root, 'modesty') | ||
Modesty.config_path = File.join(Rails.root, 'config/modesty.yml') | ||
Modesty.environment = Rails.env | ||
|
||
Rails.configuration.after_initialize do | ||
Modesty.load! | ||
end |
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 |
---|---|---|
|
@@ -23,6 +23,10 @@ def self.configuration | |
self | ||
end | ||
|
||
def self.env | ||
'test' | ||
end | ||
|
||
def self.after_initialize | ||
yield | ||
end | ||
|