Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moved Nesta::App.root to Nesta::Env.root.
If you want to load Nesta inside another Ruby app you'll probably want to store it in a directory other than the process's current directory. To do so you'll need to set the root directory, and you have to do that before nesta/app is loaded. Given that nesta/app was what defined Nesta::App, this seemed like a daft place to store the root directory setting.
- Loading branch information
Showing
9 changed files
with
26 additions
and
12 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
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
module Nesta | ||
class Env | ||
class << self | ||
attr_accessor :root | ||
end | ||
end | ||
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 |
---|---|---|
@@ -1,11 +1,11 @@ | ||
module Nesta | ||
class Path | ||
def self.local(*args) | ||
File.expand_path(File.join(args), Nesta::App.root) | ||
File.expand_path(File.join(args), Nesta::Env.root) | ||
end | ||
|
||
def self.themes(*args) | ||
File.expand_path(File.join('themes', *args), Nesta::App.root) | ||
File.expand_path(File.join('themes', *args), Nesta::Env.root) | ||
end | ||
end | ||
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
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