Configurable Load Paths
Reported by Matt Todd | April 29th, 2008 @ 11:07 PM | in Release 0.5.0
The hardcoded paths inside of Halcyon for file locations such as configuration, initialization, libraries, tests (for the future), controllers, etc.
These are the default locations:
-
controllers:
app/
-
configuration:
config/
-
initialization:
config/initialize
-
libs:
lib/
With this implemented, it can be trivial to expand functionality to include logging locations (aside from fully expanded locations in the configuration file) etc, but more importantly, to change locations without the internals ever knowing.
Here are some suggested changes/additions to the default paths:
-
controllers:
app/controllers/
-
models:
app/models/
-
configuration:
config/
-
initialization:
config/init
-
logs: not set, could be
log/
-
libs:
lib/
-
public files:
public/
-
specs:
spec/
-
tasks:
tasks/
Some clarifications for the above suggested list: models just provides the developer a place to put them, not necessarily indicating that Halcyon will support specific ORMs; logs could be moved to be local to the application, and deployment can have them put in /var/log/...
instead; specs are preferred (by me) but other types of testing is certainly acceptable; public files would include a simple HTML file and JavaScript or CSS files for special circumstances, like pure AJAX apps (for example, see the Guesser sample app); and tasks would simply be a place for predefined Rake tasks, making the primary Rakefile a great place for custom tasks and not have to dodge the already-existing tasks.
One related property could be load order which would be necessary for making sure that the requires are loaded before hooks (though it shouldn't really be a problem in the end, the way hooks are run).
Comments and changes to this ticket
-
Matt Todd May 7th, 2008 @ 03:15 AM
- State changed from new to resolved
(from [f2ed44c343b121e5d089874adfaa9d52e22ef102]) Added some specs for the Halcyon base class functionality and implemented configurable load paths. [#33 state:resolved]
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.