public
Description: All the extra stuff you could want for the Mack Framework.
Homepage: http://www.mackframework.com
Clone URL: git://github.com/markbates/mack-more.git
mack-more / mack-distributed / lib / mack-distributed.rb
100644 23 lines (19 sloc) 0.58 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
require 'drb/acl'
require 'addressable/uri'
 
base = File.join(File.dirname(__FILE__), "mack-distributed")
 
config = {
  "mack::share_routes" => false,
  "mack::share_objects" => false,
  "mack::distributed_app_name" => nil,
  "mack::distributed_site_domain" => "http://localhost:3000",
  "mack::drb_timeout" => 0
}
app_config.load_hash(config.merge(app_config.final_configuration_settings), "mack-distributed")
 
# load *.rb files
Dir.glob(File.join(base, "**", "*.rb")).each do |f|
  load(f)
end
 
# load tasks
Dir.glob(File.join(base, "tasks", "*.rake")).each do |f|
  load(f)
end