<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,16 +1,12 @@
 base = File.join(File.dirname(__FILE__), &quot;mack-distributed&quot;)
 
-config = {
-  &quot;mack::share_routes&quot; =&gt; false,
-  &quot;mack::share_objects&quot; =&gt; false,
-  &quot;mack::distributed_app_name&quot; =&gt; nil,
-  &quot;mack::distributed_site_domain&quot; =&gt; &quot;http://localhost:3000&quot;,
-  &quot;mack::drb_timeout&quot; =&gt; 0
-}
-
+config = {}
+config[&quot;mack::share_routes&quot;] = false if app_config.mack.share_routes.nil?
+config[&quot;mack::share_objects&quot;] = false if app_config.mack.share_objects.nil?
+config[&quot;mack::distributed_app_name&quot;] = String.randomize(10) if app_config.mack.distributed_app_name.nil?
+config[&quot;mack::distributed_site_domain&quot;] = &quot;http://localhost:3000&quot; if app_config.mack.distributed_site_domain.nil?
+config[&quot;mack::drb_timeout&quot;] = 0 if app_config.mack.drb_timeout.nil?
 app_config.load_hash(config, &quot;mack-distributed&quot;)
-app_config.load_hash(app_config.final_configuration_settings, &quot;original settings&quot;)
-# app_config.reload
 
 # load *.rb files
 Dir.glob(File.join(base, &quot;**&quot;, &quot;*.rb&quot;)).each do |f|</diff>
      <filename>mack-distributed/lib/mack-distributed.rb</filename>
    </modified>
    <modified>
      <diff>@@ -32,6 +32,51 @@ module Mack
       
     end # Routes
   end # Distributed
+  
+  module Routes # :nodoc:
+    module Urls
+      # Retrieves a distributed route from a DRb server.
+      # 
+      # Example:
+      #   droute_url(:app_1, :home_page_url)
+      #   droute_url(:registration_app, :signup_url, {:from =&gt; :google})
+      def droute_url(app_name, route_name, options = {})
+        if app_config.mack.share_routes
+          d_urls = Mack::Distributed::Routes::Urls.get(app_name)
+          # return d_urls.send(route_name, options)
+          # ivar_cache(&quot;droute_url_hash&quot;) do
+          #   {}
+          # end
+          # d_urls = @droute_url_hash[app_name.to_sym]
+          # if d_urls.nil?
+          #   d_urls = Mack::Distributed::Routes::UrlCache.get(app_name.to_sym)
+          #   @droute_url_hash[app_name.to_sym] = d_urls
+          #   if d_urls.nil?
+          #     raise Mack::Distributed::Errors::UnknownApplication.new(app_name)
+          #   end
+          # end
+          route_name = route_name.to_s
+          if route_name.match(/_url$/)
+            unless route_name.match(/_distributed_url$/)
+              route_name.gsub!(&quot;_url&quot;, &quot;_distributed_url&quot;)
+            end
+          else
+            route_name &lt;&lt; &quot;_distributed_url&quot;
+          end
+          raise Mack::Distributed::Errors::UnknownRouteName.new(app_name, route_name) unless d_urls.respond_to?(route_name)
+          return d_urls.run(route_name, options)
+          # if d_urls.run.respond_to?(route_name)
+          #   return d_urls.run.send(route_name, options)
+          # else
+          #   raise Mack::Distributed::Errors::UnknownRouteName.new(app_name, route_name)
+          # end
+        else
+          return nil
+        end
+      end # droute_url
+    end # Urls
+  end # Routes
+  
 end # Mack
 
 Mack::Routes.after_class_method(:build) do</diff>
      <filename>mack-distributed/lib/mack-distributed/routes/urls.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>d1f8d3cc46fe4d472431b6d44ff0779149985cc2</id>
    </parent>
  </parents>
  <author>
    <name>Mark Bates</name>
    <email>mark@mackframework.com</email>
  </author>
  <url>http://github.com/markbates/mack-more/commit/fa64e5f6e217a9b8a4a33cfb09a5a41f846c32b4</url>
  <id>fa64e5f6e217a9b8a4a33cfb09a5a41f846c32b4</id>
  <committed-date>2008-08-06T11:56:11-07:00</committed-date>
  <authored-date>2008-08-06T11:56:11-07:00</authored-date>
  <message>Just a few more tests to go with renaming use_distributed_routes to share_routes. [#79]</message>
  <tree>65266ae3ef137064408a5b85d2377de691751ed8</tree>
  <committer>
    <name>Mark Bates</name>
    <email>mark@mackframework.com</email>
  </committer>
</commit>
