Changeset 928

Show
Ignore:
Timestamp:
11/10/07 19:11:29 (10 months ago)
Author:
iv..@gweezlebur.com
Message:

Merki: upgrade to 0.4 layout

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • apps/merki/trunk/Rakefile

    r610 r928  
    22require 'rake/rdoctask' 
    33require 'rake/testtask' 
     4require 'spec/rake/spectask' 
    45require 'fileutils' 
    56require 'rubygems' 
    6 if File.directory?( File.join(File.dirname(__FILE__), "framework")) 
    7   $:.unshift('framework') 
    8   require File.join(File.dirname(__FILE__), "framework/merb") 
    9 else   
    10   require 'merb' 
    11 end 
     7 
     8MERB_ENV = ENV['MERB_ENV'] if ENV['MERB_ENV'] 
     9 
     10require File.dirname(__FILE__)+'/config/boot.rb' 
    1211require MERB_FRAMEWORK_ROOT+'/tasks' 
    1312MERB_ROOT = File.dirname(__FILE__) 
     
    2625  require File.dirname(__FILE__)+'/config/merb_init.rb' 
    2726end   
    28  
    29 desc "Load db schema" 
    30 task :load_schema => [:merb_init] do 
    31   require File.dirname(__FILE__)+'/schema/schema.rb' 
    32 end 
    3327 
    3428task :uninstall => [:clean] do 
     
    5751end 
    5852 
     53desc "Run all specs" 
     54Spec::Rake::SpecTask.new('specs') do |t| 
     55  t.spec_opts = ["--format", "specdoc", "--colour"] 
     56  t.spec_files = Dir['spec/**/*_spec.rb'].sort 
     57end 
     58 
     59desc "Run a specific spec with TASK=xxxx" 
     60Spec::Rake::SpecTask.new('spec') do |t| 
     61  t.spec_opts = ["--format", "specdoc", "--colour"] 
     62  t.libs = ['lib', 'server/lib' ] 
     63  t.spec_files = ["spec/merb/#{ENV['TASK']}_spec.rb"] 
     64end 
     65 
     66desc "Run all specs output html" 
     67Spec::Rake::SpecTask.new('specs_html') do |t| 
     68  t.spec_opts = ["--format", "html"] 
     69  t.libs = ['lib', 'server/lib' ] 
     70  t.spec_files = Dir['spec/**/*_spec.rb'].sort 
     71end 
     72 
     73desc "RCov" 
     74Spec::Rake::SpecTask.new('rcov') do |t| 
     75  t.spec_opts = ["--format", "specdoc", "--colour"] 
     76  t.spec_files = Dir['spec/**/*_spec.rb'].sort 
     77  t.libs = ['lib', 'server/lib' ] 
     78  t.rcov = true 
     79end 
     80 
    5981desc 'Run all tests, specs and finish with rcov' 
    6082task :aok do 
  • apps/merki/trunk/app/views/exceptions/internal_server_error.html.erb

    r629 r928  
    1 <% if show_exception_details? %> 
    2         <html> 
    3           <head> 
    4             <title><%= @title %></title> 
    5             <style type="text/css"> 
    6               <!-- 
    7               table {border:0px} 
    8               tr {line-height:1.3} 
    9               td {font-size:.8em; padding:4px} 
    10               h1 {font-size:2em} 
    11               h1, td {font-family:'courier new', 'courier', monospace} 
    12               td.line {color:#000;  text-align:center} 
    13               td.method {font-weight:bold; text-align:right} 
    14               td.file a {color:#000} 
    15               td.file a:hover {color:#F00} 
    16               tr.clickable:hover {background:#FFA} 
    17               .clickable {cursor: help } 
    18               #title {float: left;} 
    19               .source  
    20               { 
    21                 border:1px #000 solid; 
    22                 margin:2px; 
    23                 padding:8px; 
    24                 background:#F0F0F0; 
    25               } 
    26        
    27               --> 
    28               <% if @coderay %> 
    29                 <%= CodeRay::Encoders[:html]::CSS.new.stylesheet %> 
    30               <% end %>   
    31             </style> 
    32             <script type="text/javascript"> 
    33             $ = function(el){ 
    34               if(el === null || el === undefined) 
    35                 throw("Argument for $() must be a domRef/domId"); 
    36               if( el.constructor === String ) 
    37                 el = document.getElementById(el); 
    38               if(el === null || !el.nodeType) 
    39                 throw("Argument for $() not found in document tree."); 
    40               return el; 
    41             } 
     1<html> 
     2<head> 
     3        <meta http-equiv="Content-type" content="text/html; charset=utf-8"> 
     4        <title><%= @exception.name.humanize %></title> 
     5        <style type="text/css" media="screen"> 
     6                body { 
     7                        font-family:arial; 
     8                        font-size:11px; 
     9                } 
     10                h1 { 
     11                        font-size:48px; 
     12                        letter-spacing:-4px; 
     13                        margin:0; 
     14                        line-height:36px; 
     15                        color:#333; 
     16                } 
     17                        h1 sup { 
     18                                font-size: 0.5em; 
     19                        } 
     20                        h1 sup.error_500, h1 sup.error_400 { 
     21                                color:#990E05; 
     22                        } 
     23                        h1 sup.error_100, h1 sup.error_200 { 
     24                                color:#00BF10; 
     25                        } 
     26                        h1 sup.error_300 { 
     27                                /* pretty sure you cant 'see' status 300  
     28                                errors but if you could I think they  
     29                                would be blue */ 
     30                                color:#1B2099; 
     31                        } 
     32                h2 { 
     33                        font-size:36px; 
     34                        letter-spacing:-3px; 
     35                        margin:0; 
     36                        line-height:28px; 
     37                        color:#444; 
     38                } 
     39                a, a:visited { 
     40                        color:#00BF10; 
     41                } 
     42                .internalError { 
     43                        width:800px; 
     44                        margin:50px auto; 
     45                } 
     46                .header { 
     47                        border-bottom:10px solid #333; 
     48                        margin-bottom:1px; 
     49                        background-image: url("data:image/gif;base64,R0lGODlhAwADAIAAAP///8zMzCH5BAAAAAAALAAAAAADAAMAAAIEBHIJBQA7"); 
     50                        padding:20px; 
     51                } 
     52                table.trace { 
     53                        width:100%; 
     54                        font-family:courier, monospace; 
     55                        letter-spacing:-1px; 
     56                        border-collapse: collapse; 
     57                        border-spacing:0; 
     58                } 
     59                table.trace tr td{ 
     60                        padding:0; 
     61                        height:26px; 
     62                        font-size:13px; 
     63                        vertical-align:middle; 
     64                } 
     65                table.trace tr.file{ 
     66                        border-top:2px solid #fff; 
     67                        background-color:#F3F3F3; 
     68                } 
     69                table.trace tr.source { 
     70                        background-color:#F8F8F8; 
     71                        display:none; 
     72                } 
     73                table.trace .open tr.source { 
     74                        display:table-row; 
     75                } 
     76                        table.trace tr.file td.expand { 
     77                                width:23px; 
     78                                background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAXCAIAAABvSEP3AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAdVJREFUeNqMVL+TwUAYxaRIOlEhlZHGDAUzzOQ61+AqXMV1lJSU7q/QRqm8KFUcJTNn5qJkaPyoKKVz7y4mF8na5Kt29tt9+/Z97/u81+vVQ4r9frdarS6Xi7ETDIZisRjxMGPfmk4niNPpZE+xLAugbPaZ53nzvtfMBe/3+/3dbuehBrAKhZdUKkVAWa9Xsiybv0CPZDJZLr/qa5/BwgwRjYqOKIvFYjQa/aNommZh0Ww2K5UqzwfoQOPxaLPZ3FAmk0+7lplMpt1u53J5OpBOR0eZEE9wHJfP5zud93g88QhluwWbjW+5VOmKBgKBer3eaDTDYeGBQF8+x7rqIYoiPgixWJazpA6HA+MSxRArkUgMh0M409g8Ho8+9wYxxCqVSq1W26EDHGM2m4HOHQrEc38f/Yn7cLmlIRhBENzcx8cVRZnPZ/YUep2BWkjTIfA+PKVpZAXR5QxsjiqCKvGEqqp443w+0dvy17swqD0HB3S73V5PpkNg1qBqt8kwGCjmPkinM0QJbIoEa7U6UG6ToVgs4V9G2g0ESoP5Aoi7KYX5oCgf8IKbkvn9/mr1LRQKESamzgJy0g0tSZIuB3nuGqRU9Vv9C4sKkUhEkp4soxvxI8AAhWrrtXa3X8EAAAAASUVORK5CYII=); 
     79                                background-position:top left; 
     80                                background-repeat:no-repeat; 
     81                        } 
     82                        table.trace .open tr.file td.expand { 
     83                                width:19px; 
     84                                background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAB1CAIAAAAqdO2mAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAXZJREFUeNrslK1ywkAUhcMOBomEOiSdqLxEBJX0NaijOsjyHGGmCGyQQYaiiiw4gktkcOmZbpsuuzQ/M5XnqJ2d3S/n3nM3rTzPLUP7/Tt0+pLcGQwG3W53OLyHzPMtjYL7q9UqSRLrD4E1Gj1orCvKYuFHUWTVkOM44/HjDcp8/lL4r6NerzeZPMm1KFw0QkDn83m5fP2lHA4fNQvRtNvtjsfDd0WzmSfb2e/fdTqdOvdh/HLJZLOn0+d2HJ+KRGzbdl23EpFlmed5cp2maRzHQq1lvQ5KMi6EUZBGfup6E1pTfd+vrGW7jbQ2C9hTt9BpqNyIWaAwAy6xg2eBz5iRC/NomiZhGN5sqmnkauo0BUGgVQoBjQ80oCACgNQdZHfTYBkF2mxCtWWAqunWpahxIDUt3QYUxIFQpJHyIWpXjinabKbbwItMHT+NyjchrP8QKaSQQgoppJBCCimkkEIKKaSQQgoppJBCCimkkEIKKaSo+hRgAEFD17X08O2NAAAAAElFTkSuQmCC); 
     85                                background-position:top left; 
     86                                background-repeat:no-repeat;                             
     87                        } 
     88                        table.trace tr.source td.collapse { 
     89                                width:19px; 
     90                                background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAB1CAIAAAAqdO2mAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAVxJREFUeNrs0zFygkAUBmBlUkgJHdABlQwVkVJKKUxBYWbkALTxMJwhltyDFkss03IF8pudIcwaDaDl/6pd2P327b7d+eHwMXs4lNkzggoVKlSoUKFChQoVKlSoUKFChQoVKlSoUKFChQqVEYqm6ft9+qiSJEkYho7jTlcw2fd9NOI4nq4gEdFwXXe1Cqco63VkWVbXRTqLhTpOwQRpF7quR1E0TgGhqvLKUFCyoQqG/rks3O6kZKW/eRFpevOCoGTXVTcMQ5EyxyDEkML1c5RzuZOICIyXqn7JBVez6282MWrx731HOv2qB8Hri2lamNk0DfpVVdV1Peodappmmua8bdvzuc7zfNprzrLMth1FnGh/X8MjCAIQv/cFz/+65PcDh7rbvYv2ZUfdj+PxsyzLgVl0hKwgTqeqKApx2LeOc7t98zyv/1FWOgvx9RPii23bmL9cetJ8Ed8CDAC6aFW8bCzFhwAAAABJRU5ErkJggg==); 
     91                                background-position:bottom left; 
     92                                background-repeat:no-repeat;     
     93                                background-color:#6F706F;                        
     94                        } 
     95                        table.trace tr td.path { 
     96                                padding-left:10px; 
     97                        } 
     98                        table.trace tr td.code { 
     99                                padding-left:35px; 
     100                                white-space: pre; 
     101                                line-height:9px; 
     102                                padding-bottom:10px;                             
     103                        } 
     104                                table.trace tr td.code em { 
     105                                        font-weight:bold; 
     106                                        color:#00BF10; 
     107                                } 
     108                                table.trace tr td.code .more { 
     109                                        color:#666; 
     110                                } 
     111                        table.trace tr td.line { 
     112                                width:30px; 
     113                                text-align:right; 
     114                                padding-right:4px; 
     115                        } 
     116                .footer { 
     117                        margin-top:5px; 
     118                        font-size:11px; 
     119                        color:#444; 
     120                        text-align:right; 
     121                } 
     122        </style> 
     123</head> 
     124<body> 
     125        <div class="internalError"> 
     126                 
     127                <div class="header"> 
     128                        <h1><%= @exception.name.humanize %> <sup class="error_<%= @exception.class::STATUS %>"><%= @exception.class::STATUS %></sup></h1> 
     129                        <% if show_details = ::Merb::Server.config[:exception_details] -%> 
     130                                <h2><%= @exception.message %></h2> 
     131                        <% else -%> 
     132                                <h2>Sorry about that...</h2> 
     133                        <% end -%> 
     134                        <h3>Parameters</h3> 
     135                        <ul> 
     136                        <% controller.params[:original_params].each do |param, value| %> 
     137                                <li><strong><%= param %>:</strong> <%= value.inspect %></li> 
     138                        <% end %> 
     139                        <%= "<li>None</li>" if controller.params[:original_params].empty? %> 
     140                        </ul> 
     141                         
     142                        <h3>Session</h3> 
     143                        <ul> 
     144                        <% controller.params[:original_session].each do |param, value| %> 
     145                                <li><strong><%= param %>:</strong> <%= value.inspect %></li> 
     146                        <% end %> 
     147                        <%= "<li>None</li>" if controller.params[:original_session].empty? %>                    
     148                        </ul> 
     149                         
     150                        <h3>Cookies</h3> 
     151                        <ul> 
     152                        <% controller.params[:original_cookies].each do |param, value| %> 
     153                                <li><strong><%= param %>:</strong> <%= value.inspect %></li> 
     154                        <% end %> 
     155                        <%= "<li>None</li>" if controller.params[:original_cookies].empty? %>                    
     156                        </ul>                    
     157                </div> 
     158                 
     159        <% if show_details %> 
     160                <table class="trace"> 
     161                        <% @exception.backtrace.each_with_index do |line, index| %> 
     162                                <tbody class="close"> 
     163                                        <tr class="file"> 
     164                                                <td class="expand"> 
     165                                                </td> 
     166                                                <td class="path"> 
     167                                                        <%= (line.match(/^([^:]+)/)[1] rescue 'unknown').sub(/\/((opt|usr)\/local\/lib\/(ruby\/)?(gems\/)?(1.8\/)?(gems\/)?|.+\/app\/)/, '') %> in "<strong><%= line.match(/:in `(.+)'$/)[1] rescue '?' %></strong>" 
     168                                                </td> 
     169                                                <td class="line"> 
     170                                                        <a href="txmt://open?url=file://<%=file = (line.match(/^([^:]+)/)[1] rescue 'unknown')%>&amp;line=<%= lineno = line.match(/:([0-9]+):/)[1] rescue '?' %>"><%=lineno%></a> 
     171                                                </td>  
     172                                        </tr> 
     173                                        <tr class="source"> 
     174                                                <td class="collapse"> 
     175                                                </td> 
     176                                                <td class="code" colspan="2"><% (__caller_lines__(file, lineno, 5) rescue []).each do |llineno, lcode, lcurrent| %> 
     177<a href="txmt://open?url=file://<%=file%>&amp;line=<%=llineno%>"><%= llineno %></a><%='<em>' if llineno==lineno.to_i %><%= lcode.size > 90 ? lcode[0..90]+'<span class="more">......</span>' : lcode %><%='</em>' if llineno==lineno.to_i %> 
     178<% end %> 
    42179 
    43             var toggle = function(el){ 
    44               el = $(el); 
    45               var visible = el.style.display != 'none';  // visible? boolean 
    46               if(visible){ 
    47                 el.style.display = 'none'; // hide 
    48               }else{ 
    49                 el.style.display = '';  // unhide 
    50               } 
    51             } 
    52             </script> 
    53           </head> 
    54           <body> 
    55             <div> 
    56               <h1><img src="data:image/jpg;base64,/9j/4AAQSkZJRgABAgAAZABkAAD/7AARRHVja3kAAQAEAAAAJQAA/+4ADkFk\nb2JlAGTAAAAAAf/bAIQADQkJCQoJDQoKDRMMCwwTFhENDREWGhUVFhUVGhkU\nFhUVFhQZGR0fIB8dGScnKionJzk4ODg5QEBAQEBAQEBAQAEODAwOEA4RDw8R\nFA4RDhQVERISERUgFRUXFRUgKB0ZGRkZHSgjJiAgICYjLCwoKCwsNzc1NzdA\nQEBAQEBAQEBA/8AAEQgAJgAtAwEiAAIRAQMRAf/EAT8AAAEFAQEBAQEBAAAA\nAAAAAAMAAQIEBQYHCAkKCwEAAQUBAQEBAQEAAAAAAAAAAQACAwQFBgcICQoL\nEAABBAEDAgQCBQcGCAUDDDMBAAIRAwQhEjEFQVFhEyJxgTIGFJGhsUIjJBVS\nwWIzNHKC0UMHJZJT8OHxY3M1FqKygyZEk1RkRcKjdDYX0lXiZfKzhMPTdePz\nRieUpIW0lcTU5PSltcXV5fVWZnaGlqa2xtbm9jdHV2d3h5ent8fX5/cRAAIC\nAQIEBAMEBQYHBwYFNQEAAhEDITESBEFRYXEiEwUygZEUobFCI8FS0fAzJGLh\ncoKSQ1MVY3M08SUGFqKygwcmNcLSRJNUoxdkRVU2dGXi8rOEw9N14/NGlKSF\ntJXE1OT0pbXF1eX1VmZ2hpamtsbW5vYnN0dXZ3eHl6e3x//aAAwDAQACEQMR\nAD8A9OVDK6xRQYa02axuEBvnB7x8Fm/W36x19HqoxmAvyswkMraHFwY2N7va\nCe/5Vy/Seu29RvdXaI2CW6EBw4OhGnZAk9Einrbuvn03Oaw1lvmCCP8ANXPW\n9Zz7shlrM9zKBLnN3Fmg1gnj8An61m14eCbAN9j4ZVWJJc5x2gQPivO3ZnUM\nXLtfY8by73sDmuHw9pPCZRPVNgdH13F+teJU51WbZpX9O4xpPEho4juug9Wr\n0vW3t9Lbv9SRt2xO7dxEL5+blW5I2W2FrdsSJJgdj4r0P1W/+Nf6Un1p9PZJ\nnf8AaPU2+P0fwThdVaLF3TlfXZvUsr63ZIpZY4Y9VDKTWwuIY5vqEe3uXFx+\nSn0XBupy9t+loqDXy1zTJLST7tefJbVDLsjLycwO9Sy/09ANQafUJP8A4IrG\nQGufXltEAjZYPA900kkeCRoXA+sHSeoTXn41xJxnB9bY3e4HRcTbVsfB2h7j\ntDWkkAT7jrPjC9FzCMfpJZU5wDGgN7wNI4HZcJdiNrvP2t+62SNg9vedxnRO\nj2WyQfZy2oOA5kbfGedF0jb8w/Uq2ra/25NcGD9F1dk6/BqrYNODY5rrve4+\n2rGpBcR3Mr0j9iVf83vscD1J3bZMep/NelM+Hsn5oqa3RG0uuf6b9j9dsCRI\n+lx4haGT9g1FgZ6nc0n/AKrSEkko/Kg7vO9XtsxzV+y6a8xjtxu+hWWwPY0f\npBMnv2XN52ZmbyLunYocCZNl1bpdENmS0wOdUkkPsT9rL6rfbf8AnJiPzvT+\nzfpPVrZ6ezb6Ttv0e26OTzC9U3uk+z88ACRu+hz8YSSR6q6P/9k=\n"/> 
    57             <%= @title %></h1> 
    58             </div> 
    59      
    60             <table class="main"> 
    61               <thead> 
    62                 <tr> 
    63                   <td class="method">Method</td> 
    64                   <td class="line">Line</td>         
    65                   <td class="file">File</td> 
    66                 </tr> 
    67               </thead> 
    68               <% @backtrace.each do |lines, hash, file, lineno, meth| %> 
    69                 <tr id="line_<%= hash %>" onclick="toggle('source_<%= hash %>'); return false"; class="clickable" style="background:rgb(250,250,<%= @colors.shift %>);"> 
    70                   <td class="method"><%= meth %></td>           
    71                   <td class="line"><%= lineno %></td> 
    72                   <td class="file"><%= file %></td>           
    73                 </tr> 
    74                 <tr id="source_<%= hash %>" <%= @coderay? " class='CodeRay' " : ''%> style="display:none;"> 
    75                   <td colspan="3"> 
    76                     <div class="source"> 
    77                       <table> 
    78                         <tr><td colspan='2'><a href='txmt://open?url=file://<%=file%>&line=<%=lineno%>'>Open in TextMate</a></td></tr> 
    79                         <% lines.each do |llineno, lcode, lcurrent| %> 
    80                           <tr class="source"<%=  'style="background:#faa;"' if lcurrent %>> 
    81                             <td><%= llineno %></td> 
    82                             <td> 
    83                               <%= @coderay ? CodeRay.scan(lcode, :ruby).html : "<pre>\#{lcode}</pre>" %> 
    84                             </td> 
    85                           </tr> 
    86                         <% end %> 
    87                       </table> 
    88                     </div> 
    89                   </td> 
    90                 </tr> 
    91               <% end %> 
    92             </table> 
    93           </body> 
    94         </html> 
    95 <% else %> 
    96         <h1>500 Internal Server Error</h1> 
    97 <% end %> 
     180</td> 
     181                                        </tr> 
     182                                </tbody> 
     183                        <% end %> 
     184                </table> 
     185                <script type="text/javascript" charset="utf-8"> 
     186                        // swop the open & closed classes 
     187                        els = document.getElementsByTagName('td'); 
     188                        for(i=0; i<els.length; i++){ 
     189                                if(els[i].className=='expand' || els[i].className=='collapse'){ 
     190                                        els[i].onclick = function(e){ 
     191                                                tbody = this.parentNode.parentNode; 
     192                                                if(tbody.className=='open'){ 
     193                                                        tbody.className='closed'; 
     194                                                }else{ 
     195                                                        tbody.className='open'; 
     196                                                } 
     197                                        } 
     198                                } 
     199                        } 
     200                </script> 
     201        <% end %> 
     202        <div class="footer"> 
     203                lots of love, from <a href="#">merb</a> 
     204        </div> 
     205        </div> 
     206</body> 
     207</html> 
  • apps/merki/trunk/app/views/exceptions/not_found.html.erb

    r610 r928  
    99    <div id="left-container"> 
    1010      <h3>Exception:</h3> 
    11       <p><%= exception %></p> 
     11      <p><%= params[:exception] %></p> 
    1212    </div> 
    1313 
  • apps/merki/trunk/app/views/layout/application.html.erb

    r610 r928  
    11<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
    2 <html xmlns="http://www.w3.org/1999/xhtml"
     2<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us" lang="en-us"
    33  <head> 
    44    <title>Fresh Merb App</title> 
    5     <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> 
     5    <meta http-equiv="content-type" content="text/html; charset=utf-8" /> 
    66    <link rel="stylesheet" href="/stylesheets/master.css" type="text/css" media="screen" charset="utf-8"> 
    77  </head> 
  • apps/merki/trunk/config/dependencies.rb

    r610 r928  
    1 puts "Loading dependencies..." 
     1# Make the app's "gems" directory a place where gems are loaded from 
     2Gem.clear_paths 
     3Gem.path.unshift(MERB_ROOT / "gems") 
    24 
    3 # Make the app's "deps" directory a place where gems are loaded from 
    4 Gem.clear_paths 
    5 Gem.path.unshift(MERB_ROOT / "deps") 
    6  
    7 # Make theh app's "lib" directory a place where ruby files get "require"d from 
     5# Make the app's "lib" directory a place where ruby files get "require"d from 
    86$LOAD_PATH.unshift(MERB_ROOT / "lib") 
    97 
    10 ### Uncomment for Sequel ORM 
    11 # dependency "merb_sequel" 
     8### Merb doesn't come with database support by default.  You need 
     9### an ORM plugin.  Install one, and uncomment one of the following lines, 
     10### if you need a database. 
     11 
     12### Uncomment for DataMapper ORM 
     13# use_orm :datamapper 
    1214 
    1315### Uncomment for ActiveRecord ORM 
    14 # dependency "merb_active_record" 
     16# use_orm :activerecord 
     17 
     18### Uncomment for Sequel ORM 
     19# use_orm :sequel 
     20 
     21 
     22### This defines which test framework the generators will use 
     23### rspec is turned on by default 
     24# use_test :test_unit 
     25use_test :rspec 
    1526 
    1627### Add your other dependencies here 
    1728 
    18 # dependencies "activerecord", "merb-form-helpers" 
     29# These are some examples of how you might specify dependencies. 
     30#  
     31# dependencies "RedCloth", "merb_helpers" 
    1932# OR 
    20 # dependency "activerecord", "> 1.2.3
     33# dependency "RedCloth", "> 3.0
    2134# OR 
    22 # dependencies "activerecord" => "> 1.2.3", "hpricot" => "= 0.5
     35# dependencies "RedCloth" => "> 3.0", "ruby-aes-cext" => "= 1.0
    2336 
    2437Merb::Server.after_app_loads do 
     
    2740  # dependency "magic_admin" # this gem uses the app's model classes 
    2841end 
    29  
    30  
    31 # We pick up any old-style plugins in deps/plugins as a last-effort 
    32 Dir["#{MERB_ROOT}/deps/plugins/*/init.rb"].each do |m|  
    33   plugin_lib = File.dirname(m) / 'lib' 
    34   $LOAD_PATH << plugin_lib if File.directory?(plugin_lib) 
    35   require m 
    36 end 
  • apps/merki/trunk/config/merb.yml

    r629 r928  
    11--- 
    22# Hostname or IP address to bind to.  
    3 :host: 127.0.0.1 
     3:host: 0.0.0.0 
    44 
    55# Port merb runs on or starting port for merb cluster. 
     
    1515 
    1616# Uncomment if you have more than one ORM or if you need to be specific about 
    17 # which memory store to use. Built-in options are: memory, cookie, or memcache 
     17# which memory store to use. Built-in options are: memory, cookie, or mem_cache 
    1818#:session_store: sequel 
     19 
     20#:memory_session_ttl: 3600 # one hour 
    1921 
    2022# A secret key is required when using the 'cookie' session store (default),  
    2123# change this value to something unique to your application and keep it private 
    22 :session_secret_key: .5498 
     24:session_secret_key: .9390 
    2325 
    24 # Uncomment to use the merb upload progress 
    25 #:config: config/upload.conf 
     26# Uncomment to use the merb upload progress. The 'path match' will be treated as 
     27# a regex for any URLs that should be considered for upload monitoring. 
     28#:upload_path_match: /files/\d 
     29#:upload_frequency: 3 
    2630 
    2731# Uncomment to cache templates in dev mode. Templates are cached 
  • apps/merki/trunk/config/upload.conf

    r610 r928  
    1 # upload progress conf 
    2 ---  
    3 #:drb: true # uncomment for drb UploadProgress if you run a merb cluster 
    4 :path_info: /files/upload 
    5 :frequency: 2 
  • apps/merki/trunk/script/destroy

    r610 r928  
    88  require 'rubigen' 
    99end 
     10 
     11require File.join(File.dirname(__FILE__), "..", 'config', 'boot') 
     12require (APP_ROOT / "config" / "merb_init" ) 
     13module Kernel 
     14  undef dependency if defined?(Kernel.dependency) 
     15end 
     16 
     17# Make the App's local gems available 
     18Gem.clear_paths 
     19Gem.path.unshift(APP_ROOT / "gems") 
     20 
    1021require 'rubigen/scripts/destroy' 
    1122 
    1223ARGV.shift if ['--help', '-h'].include?(ARGV[0]) 
    13 RubiGen::Base.use_component_sources! [:merb] 
     24 
     25# Default is to use rspec generators in gems.  To change this to 
     26# Test::Unit use [:merb, :test_unit] 
     27RubiGen::Base.use_component_sources! Merb::GENERATOR_SCOPE 
    1428RubiGen::Scripts::Destroy.new.run(ARGV) 
  • apps/merki/trunk/script/generate

    r610 r928  
    88  require 'rubigen' 
    99end 
     10 
     11require File.join(File.dirname(__FILE__), "..", 'config', 'boot') 
     12require (APP_ROOT / "config" / "merb_init" ) 
     13module Kernel 
     14  undef dependency if defined?(Kernel.dependency) 
     15end 
     16 
     17# Make the App's local gems available 
     18Gem.clear_paths 
     19Gem.path.unshift(APP_ROOT / "gems") 
     20 
    1021require 'rubigen/scripts/generate' 
    1122 
    1223ARGV.shift if ['--help', '-h'].include?(ARGV[0]) 
    13 RubiGen::Base.use_component_sources! [:merb] 
     24 
     25# Default is to use rspec generators in gems.  To change this to 
     26# Test::Unit use [:merb, :test_unit] 
     27RubiGen::Base.use_component_sources! Merb::GENERATOR_SCOPE 
    1428RubiGen::Scripts::Generate.new.run(ARGV) 
  • apps/merki/trunk/spec/spec_helper.rb

    r629 r928  
     1require File.join(File.dirname(__FILE__), "..", 'config', 'boot') 
     2 
    13$TESTING=true 
    2 require 'merb' 
    3 require "config/merb_init" 
    44 
     5require File.join(MERB_ROOT, 'config', 'merb_init') 
     6 
     7require 'merb/test/helper' 
     8require 'merb/test/rspec' 
    59 
    610### METHODS BELOW THIS LINE SHOULD BE EXTRACTED TO MERB ITSELF 
    7 require 'merb/test/helper' 
    8  
    9 # require 'merb/test/rspec'