<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>elibs/frameworks/rails_framework.erl</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -43,11 +43,12 @@ init([]) -&gt;
       {ok, DocRoot} = application:get_env(docroot),
       SSL = ssl_config(),
       ResponderModule = figure_responder(),
+      FrameworkModule = figure_framework_module(),
       AppModSpecs = process_appmods(application:get_env(appmods)),
   
       case application:get_env(http_server) of
-        {ok, mochiweb} -&gt; mochiweb_frontend:start(IP, Port, DocRoot, SSL, ResponderModule, AppModSpecs);
-        _ -&gt; yaws_frontend:start(IP, Port, DocRoot, SSL, ResponderModule, AppModSpecs)
+        {ok, mochiweb} -&gt; mochiweb_frontend:start(IP, Port, DocRoot, SSL, ResponderModule, FrameworkModule, AppModSpecs);
+        _ -&gt; yaws_frontend:start(IP, Port, DocRoot, SSL, ResponderModule, FrameworkModule, AppModSpecs)
       end
   end,
   
@@ -94,6 +95,12 @@ figure_responder() -&gt;
       Module;
     undefined -&gt; frontend_responder
   end.
+  
+figure_framework_module() -&gt;
+  {ok, Framework} = application:get_env(framework),
+  FrameworkString = atom_to_list(Framework),
+  FrameworkModuleString = FrameworkString ++ &quot;_framework&quot;,
+  list_to_atom(FrameworkModuleString).
       
 process_appmods(undefined) -&gt; [];
 process_appmods({ok, V}) -&gt; V.
\ No newline at end of file</diff>
      <filename>elibs/fuzed_frontend_supervisor.erl</filename>
    </modified>
    <modified>
      <diff>@@ -2,10 +2,10 @@
 
 -module(mochiweb_frontend).
 -author(&quot;Abhay Kumar &lt;abhay@opensynapse.net&gt;&quot;).
--export([start/6]).
+-export([start/7]).
 -export([request_loop/4]).
 
-start(IP, Port, DocRoot, _SSL, ResponderModule, AppModSpecs) -&gt;
+start(IP, Port, DocRoot, _SSL, ResponderModule, _FrameworkModule, AppModSpecs) -&gt;
   ReqLoopFun = fun(Req) -&gt; ?MODULE:request_loop(Req, DocRoot, ResponderModule, AppModSpecs) end,
   mochiweb_http:start([{name, ?MODULE}, {ip, IP}, {port, Port}, {loop, ReqLoopFun}]).
 </diff>
      <filename>elibs/servers/mochiweb/mochiweb_frontend.erl</filename>
    </modified>
    <modified>
      <diff>@@ -1,9 +1,9 @@
 -module(yaws_frontend).
--export([start/6, start/1]).
+-export([start/7, start/1]).
 -include(&quot;yaws.hrl&quot;).
 
-start(IP, Port, DocRoot, SSL, ResponderModule, AppModSpecs) -&gt;
-  {GC, SC} = yaws_global_configs(IP, Port, DocRoot, SSL, ResponderModule, AppModSpecs),
+start(IP, Port, DocRoot, SSL, ResponderModule, FrameworkModule, AppModSpecs) -&gt;
+  {GC, SC} = yaws_global_configs(IP, Port, DocRoot, SSL, ResponderModule, FrameworkModule, AppModSpecs),
   application:set_env(yaws, embedded, true),
   application:start(yaws),
   yaws_api:setconf(GC, [[SC]]).
@@ -39,7 +39,7 @@ yaws_gc() -&gt;
              },
   GC.
 
-yaws_global_configs(IP, Port, DocRoot, SSL, ResponderModule, AppModSpecs) -&gt;
+yaws_global_configs(IP, Port, DocRoot, SSL, ResponderModule, FrameworkModule, AppModSpecs) -&gt;
   {AppModModules, Opaques} = prepare_appmod_data(AppModSpecs),
   % io:format(&quot;DEBUG:~n~p~n---~n~p~n&quot;, [AppModModules, Opaques]),
   GC = yaws_gc(),
@@ -48,6 +48,7 @@ yaws_global_configs(IP, Port, DocRoot, SSL, ResponderModule, AppModSpecs) -&gt;
               listen = IP,
               docroot = DocRoot, 
               errormod_404 = ResponderModule,
+              errormod_crash = FrameworkModule,
               appmods = AppModModules,
               opaque = Opaques},
   case SSL of</diff>
      <filename>elibs/servers/yaws/yaws_frontend.erl</filename>
    </modified>
    <modified>
      <diff>@@ -52,6 +52,11 @@ OptionParser.new do |opts|
     options[:http_server] = server
   end
   
+  opts.on(&quot;--framework FRAMEWORK&quot;, &quot;Framework to use. Choices are: rails&quot;) do |framework|
+    $stderr.puts &quot;Unknown framework type. Using rails.&quot; unless %w[framework].include?(framework)
+    options[:framework] = framework
+  end
+  
   opts.on(&quot;--conf CONF&quot;, &quot;Configuration file&quot;) do |conf|
     options[:conf] = conf
   end
@@ -101,6 +106,7 @@ OptionParser.new do |opts|
 end.parse!
 
 http_server = options[:http_server] || DEFAULT_HTTP_SERVER
+framework = options[:framework] || 'rails'
 detached = options[:detached] ? '-detached' : ''
 master = options[:master_name] || DEFAULT_MASTER_NODE
 nodename = options[:name] || DEFAULT_NODE_NAME
@@ -165,6 +171,7 @@ else
                -fuzed_frontend http_server '#{http_server}' \
                -fuzed_frontend details #{details} \
                -fuzed_frontend docroot '&quot;#{docroot}&quot;' \
+               -fuzed_frontend framework #{framework} \
                #{ssl_details} \
                -fuzed_frontend port #{port} \
                #{fuzed_appspecs} \</diff>
      <filename>rlibs/cli/frontend.rb</filename>
    </modified>
    <modified>
      <diff>@@ -109,6 +109,7 @@ cmd = %Q{erl -boot start_sasl \
              -fuzed_node master &quot;'#{master}'&quot; \
              -fuzed_node spec '#{spec}' \
              -fuzed_node num_nodes #{num_nodes} \
+             -fuzed_node framework 'rails' \
              #{inet} \
              -config '#{FUZED_ROOT}/conf/fuzed_base' \
              -run fuzed_node start}.squeeze(' ')</diff>
      <filename>rlibs/cli/rails.rb</filename>
    </modified>
    <modified>
      <diff>@@ -41,6 +41,10 @@ class MainController &lt; ApplicationController
     render :text =&gt; request.remote_ip.to_s
   end
   
+  def fail
+    raise &quot;failboat&quot;
+  end
+  
   protected
 
   def authenticate</diff>
      <filename>test/app/app/controllers/main_controller.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>b5ae846ccea12fd2b3c1a646449e9463c32c4e46</id>
    </parent>
  </parents>
  <author>
    <name>Tom Preston-Werner</name>
    <email>tom@mojombo.com</email>
  </author>
  <url>http://github.com/KirinDave/fuzed/commit/e1f91c9bda7a3ee3f23074c28551196e0194a5f5</url>
  <id>e1f91c9bda7a3ee3f23074c28551196e0194a5f5</id>
  <committed-date>2008-06-27T22:07:30-07:00</committed-date>
  <authored-date>2008-06-27T21:56:40-07:00</authored-date>
  <message>support 500s for rails and introduce framework specific modules</message>
  <tree>ce1ab13fa4a67925d9ac46c1d2d8d58b6ccef0ce</tree>
  <committer>
    <name>Tom Preston-Werner</name>
    <email>tom@mojombo.com</email>
  </committer>
</commit>
