Accept env.json for the app environment file, if the $system_name.json is not found.
This commit is contained in:
@@ -38,14 +38,14 @@ feature {NONE} -- Initialization
|
|||||||
end
|
end
|
||||||
|
|
||||||
make_with_path (p: PATH)
|
make_with_path (p: PATH)
|
||||||
-- Create a layour based on a path `p'.
|
-- Create a layout based on a path `p'.
|
||||||
do
|
do
|
||||||
path := p.absolute_path.canonical_path
|
path := p.absolute_path.canonical_path
|
||||||
initialize_name
|
initialize_name
|
||||||
end
|
end
|
||||||
|
|
||||||
make_with_directory_name (a_dirname: READABLE_STRING_GENERAL)
|
make_with_directory_name (a_dirname: READABLE_STRING_GENERAL)
|
||||||
-- Create a layour based on a path `p'.
|
-- Create a layout based on directory name `a_dirname'.
|
||||||
do
|
do
|
||||||
make_with_path (create {PATH}.make_from_string (a_dirname))
|
make_with_path (create {PATH}.make_from_string (a_dirname))
|
||||||
end
|
end
|
||||||
@@ -105,11 +105,18 @@ feature -- Access: internal
|
|||||||
application_config_path: PATH
|
application_config_path: PATH
|
||||||
-- Database Configuration file path.
|
-- Database Configuration file path.
|
||||||
local
|
local
|
||||||
p: detachable PATH
|
p,p_dft: detachable PATH
|
||||||
|
fut: FILE_UTILITIES
|
||||||
do
|
do
|
||||||
p := internal_application_config_path
|
p := internal_application_config_path
|
||||||
if p = Void then
|
if p = Void then
|
||||||
p := config_path.extended (name + ".json")
|
p := config_path.extended (name + ".json")
|
||||||
|
if not fut.file_path_exists (p) then
|
||||||
|
p_dft := config_path.extended ("env.json")
|
||||||
|
if fut.file_path_exists (p_dft) then
|
||||||
|
p := p_dft
|
||||||
|
end
|
||||||
|
end
|
||||||
internal_application_config_path := p
|
internal_application_config_path := p
|
||||||
end
|
end
|
||||||
Result := p
|
Result := p
|
||||||
@@ -206,6 +213,6 @@ feature {NONE} -- Implementation
|
|||||||
-- Directory for templates (HTML, etc).
|
-- Directory for templates (HTML, etc).
|
||||||
|
|
||||||
;note
|
;note
|
||||||
copyright: "2011-2015, Javier Velilla, Jocelyn Fiat, Eiffel Software and others"
|
copyright: "2011-2017, Javier Velilla, Jocelyn Fiat, Eiffel Software and others"
|
||||||
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
|
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user