lib/pancake/stack/bootloader.rb in pancake-0.1.12 vs lib/pancake/stack/bootloader.rb in pancake-0.1.13
- old
+ new
@@ -22,18 +22,28 @@
Dir["#{root}/mounts/*/pancake.init"].each{|f| load f if File.exists?(f)}
end
end
end
-Pancake::Stack::BootLoader.add(:load_configuration, :level => :init) do
+Pancake::Stack::BootLoader.add(:set_as_master) do
def run!
+ return unless config[:master]
+ roots = stack_class.roots.dup
+ roots.each do |root|
+ stack_class.roots << File.join(root, "master")
+ end
+ end
+end
+
+Pancake::Stack::BootLoader.add(:load_configuration) do
+ def run!
stack_class.roots.each do |root|
stack_class.paths_for(:config).each{|f| require f.join}
end
end
end
-Pancake::Stack::BootLoader.add(:load_application, :level => :init) do
+Pancake::Stack::BootLoader.add(:load_application) do
def run!
stack_class.roots.each do |root|
[:models, :controllers].each do |type|
stack_class.paths_for(type).each{|f| require f.join}
end