<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,12 +1,14 @@
 base = File.join(File.dirname(__FILE__), &quot;mack-distributed&quot;)
 
-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;)
+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
+}
+app_config.load_hash(config.merge(app_config.final_configuration_settings), &quot;mack-distributed&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>@@ -43,18 +43,6 @@ module Mack
       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$/)
@@ -65,16 +53,29 @@ module Mack
           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
+    
+    class RouteMap
+      alias_method :normal_connect_with_named_route, :connect_with_named_route
+      
+      def connect_with_named_route(n_route, pattern, options = {})
+        n_route = n_route.methodize
+        normal_connect_with_named_route(n_route, pattern, options)
+        if app_config.mack.share_routes
+          Mack::Routes::Urls.class_eval %{
+            def #{n_route}_distributed_url(options = {})
+              (@dsd || app_config.mack.distributed_site_domain) + #{n_route}_url(options)
+            end
+          }
+        end
+      end # connect_with_named_route
+      
+    end # RouteMap
+    
   end # Routes
   
 end # Mack</diff>
      <filename>mack-distributed/lib/mack-distributed/routes/urls.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>fa64e5f6e217a9b8a4a33cfb09a5a41f846c32b4</id>
    </parent>
  </parents>
  <author>
    <name>Mark Bates</name>
    <email>mark@mackframework.com</email>
  </author>
  <url>http://github.com/markbates/mack-more/commit/c8e93fc4ae67fa03c5a444fb0395ac3ff6d2569e</url>
  <id>c8e93fc4ae67fa03c5a444fb0395ac3ff6d2569e</id>
  <committed-date>2008-08-06T12:33:09-07:00</committed-date>
  <authored-date>2008-08-06T12:33:09-07:00</authored-date>
  <message>Got all the tests passing for renaming use_distributed_routes to share_routes [#79]</message>
  <tree>1f70d6b01349c8b6322920ca522b562f394dd1df</tree>
  <committer>
    <name>Mark Bates</name>
    <email>mark@mackframework.com</email>
  </committer>
</commit>
