Skip to content

Instantly share code, notes, and snippets.

@deepthawtz
Created March 17, 2009 06:56
Show Gist options
  • Select an option

  • Save deepthawtz/80365 to your computer and use it in GitHub Desktop.

Select an option

Save deepthawtz/80365 to your computer and use it in GitHub Desktop.
def build_framework
if File.exists?(Merb.root / "config" / "framework.rb")
require Merb.root / "config" / "framework"
elsif File.exists?(Merb.root / "framework.rb")
require Merb.root / "framework"
else
Merb::BootLoader.default_framework
end
(Merb::Config[:framework] || {}).each do |name, path|
path = Array(path)
Merb.push_path(name, path.first, path.length == 2 ? path[1] : "**/*.rb")
end
nil
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment