<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>controller/account.rb</filename>
    </added>
    <added>
      <filename>view/account/login.haml</filename>
    </added>
    <added>
      <filename>view/spam/list_spammy.haml</filename>
    </added>
    <added>
      <filename>view/spam/search.haml</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -11,8 +11,9 @@ class PasteController &lt; Ramaze::Controller
   engine :Haml
   layout :layout
 
+  # Creating new paste
   def index
-    @syntaxes = $rapaste[:syntaxes]
+    @syntaxes = $rapaste_syntaxes
 
     if @fork = request[:fork]
       @paste = paste_for(@fork, digest = nil, redirect = false)
@@ -21,12 +22,39 @@ class PasteController &lt; Ramaze::Controller
     @paste ||= Paste.new
   end
 
+  # TODO: choose a faster hashing method?
+  def save
+    syntax, text, private = request[:syntax, :text, :private]
+    private = !!private # force to boolean for sequel
+
+    if request.post? and text and $rapaste_syntaxes[syntax]
+      paste = Paste.create(:text =&gt; text, :syntax =&gt; syntax,
+        :private =&gt; private, :ip =&gt; request.ip)
+
+      redirect paste.link(:href)
+    end
+
+    redirect_referrer
+  end
+
+  # Listing pastes
+
   def list
     @pastes = paste_list
     @pager = paginate(@pastes, :limit =&gt; $rapaste[:pager])
-    @total = @pastes.count
+    @title = &quot;Listing #{@pager.count} of #{@pastes.count} pastes&quot;
   end
 
+  def search
+    return unless @needle = request['substring'] and not @needle.empty?
+    @pastes = paste_list.filter(:text.like(&quot;%#{@needle}%&quot;))
+    limit = $rapaste[:pager]
+    @pager = paginate(@pastes, :limit =&gt; limit)
+    @title = &quot;Listing #{@pager.count} of #{@pastes.count} results for '#{h(@needle)}'&quot;
+  end
+
+  # Operations on single paste
+
   def view(id, digest = nil)
     @paste, @digest = paste_for(id, digest)
   end
@@ -39,51 +67,19 @@ class PasteController &lt; Ramaze::Controller
     respond paste_for(id, digest).text, 200, 'Content-Type' =&gt; 'text/html'
   end
 
-  # TODO: choose a faster hashing method?
-  def save
-    syntax, text, private = request[:syntax, :text, :private]
-    private = !!private # force to boolean for sequel
-
-    if request.post? and text and $rapaste[:syntaxes][syntax]
-      paste = Paste.create(
-        :category =&gt; BAYES.classify(text),
-        :created  =&gt; Time.now,
-        :private  =&gt; private,
-        :syntax   =&gt; syntax,
-        :digest   =&gt; Digest::SHA1.hexdigest(text),
-        :text     =&gt; text,
-        :ip       =&gt; request.ip
-      )
-
-      session[:pastes] ||= Set.new
-      session[:pastes] &lt;&lt; paste.id
-
-      redirect paste.link(:href)
-    end
-
-    redirect_referrer
-  end
-
-
   # TODO: the behaviour of forking a private paste isn't implemented yet,
   #       suggestions welcome
   def fork(id, digest = nil)
     redirect Rs(:fork =&gt; id, :digest =&gt; digest)
   end
 
-  # TODO: implement this using the session[:pastes]
+  # TODO: implement this using something like session[:pastes]
   def delete(id, digest = nil)
     redirect_referrer unless request.post?
     paste = paste_for(id, digest)
   end
 
-  def search
-    return unless @needle = request['substring'] and not @needle.empty?
-    needle = &quot;%#{@needle}%&quot;
-    @pastes = Paste.filter(:text.like(needle) &amp; ({:archive =&gt; true, :private =&gt; false, :category =&gt; 'ham'} | {:ip =&gt; request.ip}))
-    @total = @pastes.count
-    @pager = paginate(@pastes, :limit =&gt; $rapaste[:pager])
-  end
+  # Utility methods
 
   def paste_list
     Paste.order(:id.desc).filter({:archive =&gt; true, :private =&gt; false, :category =&gt; 'ham'} | {:ip =&gt; request.ip})</diff>
      <filename>controller/paste.rb</filename>
    </modified>
    <modified>
      <diff>@@ -4,15 +4,13 @@ class SpamController &lt; Ramaze::Controller
   engine :Haml
   layout '/layout'
 
-  def list_pending
-    @pastes = Paste.filter({:private =&gt; false, :approved =&gt; nil} &amp; ({:category =&gt; 'spam'} | {:category =&gt; nil}))
-    @pager  = paginate(@pastes, :limit =&gt; $rapaste[:pager])
-    @count  = @pastes.count
+  before_all do
+    redirect_referrer unless session[:openid]
   end
 
-  def list_spammy
-    @pastes = Paste.filter(:private =&gt; false, :spammy =&gt; true)
-    @pager  = paginate(@pastes, :limit =&gt; $rapaste[:pager])
+  def list_pending
+    @pastes = Paste.filter({:private =&gt; false, :approved =&gt; nil} &amp; ({:category =&gt; 'spam'} | {:category =&gt; nil}))
+    @pager  = paginate(@pastes, :limit =&gt; ($rapaste[:pager] * 3))
     @count  = @pastes.count
   end
 
@@ -53,4 +51,24 @@ class SpamController &lt; Ramaze::Controller
 
     redirect_referrer
   end
+
+  def search
+    query = request[:q]
+
+    @pastes = Paste.filter({:private =&gt; false, :approved =&gt; nil} &amp; ({:category =&gt; 'spam'} | {:category =&gt; nil}) &amp; :text.like(&quot;%#{query}%&quot;))
+    @pager  = paginate(@pastes, :limit =&gt; ($rapaste[:pager] * 3))
+    @count  = @pastes.count
+  end
+
+  def list_spammy
+    query = request[:q]
+
+    suspect = Paste.filter({:private =&gt; false, :approved =&gt; nil} &amp; {:category =&gt; nil})
+    spammy = []
+    suspect.each{|paste| paste.categorize! }
+
+    @pastes = Paste.filter({:private =&gt; false, :approved =&gt; nil} &amp; ({:category =&gt; 'spam'}))
+    @pager  = paginate(@pastes, :limit =&gt; ($rapaste[:pager] * 3))
+    @count  = @pastes.count
+  end
 end</diff>
      <filename>controller/spam.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,16 +1,43 @@
 $rapaste = {
-  :engine   =&gt; :coderay, # :uv or :coderay
-  :fragment =&gt; 10, # how many lines to show per paste in preview
-  :pager    =&gt; 9, # how many pastes to show in the list view on one page
-  :priority =&gt; %w[ ruby plain_text plaintext html css javascript java_script yaml diff ],
-  :theme    =&gt; 'iplastic', # only used by uv
-  :title    =&gt; 'RaPaste', # title of page
-  :admins   =&gt; { # hash of username and password for spamhunters
-    'manveru' =&gt; 'letmein'
-  },
+  # Use :uv or :coderay for highlighting
+  :engine =&gt; :coderay,
+
+  # How many pastes to show in the list view on one page
+  :pager    =&gt; 12,
+
+  # How many lines to show per paste in preview
+  :fragment =&gt; 10,
+
+  # Priority of syntaxes listed in the drop-down menu
+  # Note that highlighting engines usually differ in the names, see the readme
+  # for more details.
+  :priority =&gt; %w[
+    ruby
+    plain_text plaintext
+    html
+    css
+    javascript java_script
+    yaml
+    diff
+  ],
+
+  # only used by uv
+  :theme    =&gt; 'iplastic',
+
+  # title of page
+  :title    =&gt; 'RaPaste',
+
+  # list of openids that may login
+  :users    =&gt; [
+    'http://manveru.myopenid.com',
+  ],
 
   # You might want to edit start.rb directly.
-  :ramaze =&gt; { :port =&gt; 7000, :host =&gt; '0.0.0.0' }
+  :ramaze =&gt; {
+    :port =&gt; 7000,
+    :host =&gt; '0.0.0.0',
+    :adapter =&gt; :thin
+  }
 }
 
 DB = Sequel.sqlite(__DIR__/'db/rapaste.db') #, :logger =&gt; Ramaze::Log)</diff>
      <filename>env.rb</filename>
    </modified>
    <modified>
      <diff>@@ -15,6 +15,21 @@ class Paste &lt; Sequel::Model
     boolean :approved                    # should be listed and ain't spam
   end
 
+  validations.clear
+  validates do
+    presence_of :text, :syntax, :ip
+    format_of :text, :with =&gt; /\A.*\S+.*\Z/m, :message =&gt; 'is empty'
+    format_of :syntax, :with =&gt; /\A.*\S+.*\Z/m, :message =&gt; 'is empty'
+  end
+
+  hooks.clear
+  before_create{
+    self.created  = Time.now
+    self.digest   = self.hashify
+    self.category = self.categorize
+  }
+#   after_create{}
+
   def text_fragment
     Highlight.new.fragment(self)
   end
@@ -24,7 +39,8 @@ class Paste &lt; Sequel::Model
   end
 
   def syntax_description
-    $rapaste[:syntaxes][syntax]
+    p $rapaste_syntaxes
+    p syntax =&gt; $rapaste_syntaxes[syntax]
   end
 
   include Ramaze::Helper::Link
@@ -45,6 +61,12 @@ class Paste &lt; Sequel::Model
     end
   end
 
+  def hashify
+    Digest::SHA1.hexdigest(text)
+  end
+
+  # Interaction with Bayesian filter
+
   def classify
     BAYES.classify(text)
   end
@@ -66,9 +88,13 @@ class Paste &lt; Sequel::Model
   end
 
   def categorize!
-    self.category = BAYES.classify(text).to_s
+    categorize
     save
   end
 
+  def categorize
+    self.category = BAYES.classify(text).to_s
+  end
+
   create_table unless table_exists?
 end</diff>
      <filename>model/paste.rb</filename>
    </modified>
    <modified>
      <diff>@@ -14,6 +14,7 @@ require 'model/paste'
 require 'controller/css'
 require 'controller/paste'
 require 'controller/spam'
+require 'controller/account'
 
 class Highlight
   def default_options
@@ -23,7 +24,7 @@ class Highlight
 
   mod = EXTEND[$rapaste[:engine]]
   mod.setup(__DIR__)
-  $rapaste[:syntaxes] = mod.syntaxes($rapaste[:priority])
+  $rapaste_syntaxes = mod.syntaxes($rapaste[:priority])
 end
 
 # The Bayes database contains information about the ham and spam rating of</diff>
      <filename>start.rb</filename>
    </modified>
    <modified>
      <diff>@@ -120,12 +120,6 @@ class Highlight
       options
     end
 
-    def self.setup(dir = nil)
-      puts &quot;Initializing Coderay&quot;
-      require 'coderay'
-      return self
-    end
-
     STYLE_NAME = {
       'c'           =&gt; 'C',
       'css'         =&gt; 'CSS',
@@ -137,6 +131,7 @@ class Highlight
       'json'        =&gt; 'JSON',
       'nitro_xhtml' =&gt; 'Nitro XHTML',
       'plaintext'   =&gt; 'Plain Text',
+      'plain_text'  =&gt; 'Plain Text',
       'rhtml'       =&gt; 'ERB',
       'ruby'        =&gt; 'Ruby',
       'scheme'      =&gt; 'Scheme',
@@ -144,6 +139,15 @@ class Highlight
       'xml'         =&gt; 'XML',
     }
 
+    def self.setup(dir = nil)
+      puts &quot;Initializing Coderay&quot;
+      require 'coderay'
+
+      # commonly used, but UV and CodeRay have different names for it
+      CodeRay::Scanners.map :plain_text =&gt; :plaintext
+      return self
+    end
+
     # TODO: generate automatically
     def self.syntaxes(priority = [])
       dict = Ramaze::Dictionary.new
@@ -157,4 +161,177 @@ class Highlight
       return dict
     end
   end
+
+  # This is a dump of:
+  #
+  #   require 'uv'
+  #   Uv.init_syntaxes
+  #   syntaxes = Uv.instance_variable_get('@syntaxes')
+  #   hash = Hash[*syntaxes.map{|k,v| [k, v.name] }.flatten]
+  #   puts hash.sort_by{|k,v| k }.map{|k,v| &quot;%-34p =&gt; %-p,&quot; % [k, v] }
+  #
+  # We put this here to be able to display the correct name of a syntax in case
+  # an engine is used that doesn't support all.
+
+  SYNTAX_NAME = {
+    &quot;actionscript&quot;                     =&gt; &quot;ActionScript&quot;,
+    &quot;active4d&quot;                         =&gt; &quot;Active4D&quot;,
+    &quot;active4d_html&quot;                    =&gt; &quot;HTML (Active4D)&quot;,
+    &quot;active4d_ini&quot;                     =&gt; &quot;Active4D Config&quot;,
+    &quot;active4d_library&quot;                 =&gt; &quot;Active4D Library&quot;,
+    &quot;ada&quot;                              =&gt; &quot;Ada&quot;,
+    &quot;antlr&quot;                            =&gt; &quot;ANTLR&quot;,
+    &quot;apache&quot;                           =&gt; &quot;Apache&quot;,
+    &quot;applescript&quot;                      =&gt; &quot;AppleScript&quot;,
+    &quot;asp&quot;                              =&gt; &quot;ASP&quot;,
+    &quot;asp_vb.net&quot;                       =&gt; &quot;ASP vb.NET&quot;,
+    &quot;bibtex&quot;                           =&gt; &quot;BibTeX&quot;,
+    &quot;blog_html&quot;                        =&gt; &quot;Blog \342\200\224 HTML&quot;,
+    &quot;blog_markdown&quot;                    =&gt; &quot;Blog \342\200\224 Markdown&quot;,
+    &quot;blog_text&quot;                        =&gt; &quot;Blog \342\200\224 Text&quot;,
+    &quot;blog_textile&quot;                     =&gt; &quot;Blog \342\200\224 Textile&quot;,
+    &quot;build&quot;                            =&gt; &quot;NAnt Build File&quot;,
+    &quot;bulletin_board&quot;                   =&gt; &quot;Bulletin Board&quot;,
+    &quot;c&quot;                                =&gt; &quot;C&quot;,
+    &quot;c++&quot;                              =&gt; &quot;C++&quot;,
+    &quot;cake&quot;                             =&gt; &quot;Cake&quot;,
+    &quot;camlp4&quot;                           =&gt; &quot;camlp4&quot;,
+    &quot;cm&quot;                               =&gt; &quot;CM&quot;,
+    &quot;coldfusion&quot;                       =&gt; &quot;ColdFusion&quot;,
+    &quot;context_free&quot;                     =&gt; &quot;Context Free&quot;,
+    &quot;cs&quot;                               =&gt; &quot;C#&quot;,
+    &quot;css&quot;                              =&gt; &quot;CSS&quot;,
+    &quot;css_experimental&quot;                 =&gt; &quot;CSS v3 beta&quot;,
+    &quot;csv&quot;                              =&gt; &quot;CSV&quot;,
+    &quot;d&quot;                                =&gt; &quot;D&quot;,
+    &quot;diff&quot;                             =&gt; &quot;Diff&quot;,
+    &quot;dokuwiki&quot;                         =&gt; &quot;DokuWiki&quot;,
+    &quot;dot&quot;                              =&gt; &quot;Graphviz (DOT)&quot;,
+    &quot;doxygen&quot;                          =&gt; &quot;Doxygen&quot;,
+    &quot;dylan&quot;                            =&gt; &quot;Dylan&quot;,
+    &quot;eiffel&quot;                           =&gt; &quot;Eiffel&quot;,
+    &quot;erlang&quot;                           =&gt; &quot;Erlang&quot;,
+    &quot;f-script&quot;                         =&gt; &quot;F-Script&quot;,
+    &quot;fortran&quot;                          =&gt; &quot;Fortran&quot;,
+    &quot;fxscript&quot;                         =&gt; &quot;FXScript&quot;,
+    &quot;greasemonkey&quot;                     =&gt; &quot;Greasemonkey&quot;,
+    &quot;gri&quot;                              =&gt; &quot;Gri&quot;,
+    &quot;groovy&quot;                           =&gt; &quot;Groovy&quot;,
+    &quot;gtd&quot;                              =&gt; &quot;GTD&quot;,
+    &quot;gtdalt&quot;                           =&gt; &quot;GTDalt&quot;,
+    &quot;haml&quot;                             =&gt; &quot;Haml&quot;,
+    &quot;haskell&quot;                          =&gt; &quot;Haskell&quot;,
+    &quot;html&quot;                             =&gt; &quot;HTML&quot;,
+    &quot;html-asp&quot;                         =&gt; &quot;HTML (ASP)&quot;,
+    &quot;html_django&quot;                      =&gt; &quot;HTML (Django)&quot;,
+    &quot;html_for_asp.net&quot;                 =&gt; &quot;HTML (ASP.net)&quot;,
+    &quot;html_mason&quot;                       =&gt; &quot;HTML (Mason)&quot;,
+    &quot;html_rails&quot;                       =&gt; &quot;HTML (Rails)&quot;,
+    &quot;html_tcl&quot;                         =&gt; &quot;HTML (Tcl)&quot;,
+    &quot;icalendar&quot;                        =&gt; &quot;iCalendar&quot;,
+    &quot;inform&quot;                           =&gt; &quot;Inform&quot;,
+    &quot;ini&quot;                              =&gt; &quot;Ini&quot;,
+    &quot;installer_distribution_script&quot;    =&gt; &quot;Installer Distribution Script&quot;,
+    &quot;io&quot;                               =&gt; &quot;Io&quot;,
+    &quot;java&quot;                             =&gt; &quot;Java&quot;,
+    &quot;javaproperties&quot;                   =&gt; &quot;Java Properties&quot;,
+    &quot;javascript&quot;                       =&gt; &quot;JavaScript&quot;,
+    &quot;javascript_+_prototype&quot;           =&gt; &quot;Prototype &amp; Script.aculo.us (JavaScript)&quot;,
+    &quot;javascript_+_prototype_bracketed&quot; =&gt; &quot;Prototype &amp; Script.aculo.us (JavaScript) Bracketed&quot;,
+    &quot;jquery_javascript&quot;                =&gt; &quot;jQuery (JavaScript)&quot;,
+    &quot;json&quot;                             =&gt; &quot;JSON&quot;,
+    &quot;languagedefinition&quot;               =&gt; &quot;Language Grammar&quot;,
+    &quot;latex&quot;                            =&gt; &quot;LaTeX&quot;,
+    &quot;latex_beamer&quot;                     =&gt; &quot;LaTeX Beamer&quot;,
+    &quot;latex_log&quot;                        =&gt; &quot;LaTeX Log&quot;,
+    &quot;latex_memoir&quot;                     =&gt; &quot;LaTeX Memoir&quot;,
+    &quot;lexflex&quot;                          =&gt; &quot;Lex/Flex&quot;,
+    &quot;lighttpd&quot;                         =&gt; &quot;Lighttpd&quot;,
+    &quot;lilypond&quot;                         =&gt; &quot;Lilypond&quot;,
+    &quot;lisp&quot;                             =&gt; &quot;Lisp&quot;,
+    &quot;literate_haskell&quot;                 =&gt; &quot;Literate Haskell&quot;,
+    &quot;logo&quot;                             =&gt; &quot;Logo&quot;,
+    &quot;logtalk&quot;                          =&gt; &quot;Logtalk&quot;,
+    &quot;lua&quot;                              =&gt; &quot;Lua&quot;,
+    &quot;m&quot;                                =&gt; &quot;MATLAB&quot;,
+    &quot;macports_portfile&quot;                =&gt; &quot;MacPorts Portfile&quot;,
+    &quot;mail&quot;                             =&gt; &quot;Mail&quot;,
+    &quot;makefile&quot;                         =&gt; &quot;Makefile&quot;,
+    &quot;man&quot;                              =&gt; &quot;Man&quot;,
+    &quot;markdown&quot;                         =&gt; &quot;Markdown&quot;,
+    &quot;mediawiki&quot;                        =&gt; &quot;Mediawiki&quot;,
+    &quot;mel&quot;                              =&gt; &quot;MEL&quot;,
+    &quot;mips&quot;                             =&gt; &quot;MIPS Assembler&quot;,
+    &quot;mod_perl&quot;                         =&gt; &quot;mod_perl&quot;,
+    &quot;modula-3&quot;                         =&gt; &quot;Modula-3&quot;,
+    &quot;moinmoin&quot;                         =&gt; &quot;MoinMoin&quot;,
+    &quot;mootools&quot;                         =&gt; &quot;MooTools&quot;,
+    &quot;movable_type&quot;                     =&gt; &quot;Movable Type&quot;,
+    &quot;multimarkdown&quot;                    =&gt; &quot;MultiMarkdown&quot;,
+    &quot;objective-c&quot;                      =&gt; &quot;Objective-C&quot;,
+    &quot;objective-c++&quot;                    =&gt; &quot;Objective-C++&quot;,
+    &quot;ocaml&quot;                            =&gt; &quot;OCaml&quot;,
+    &quot;ocamllex&quot;                         =&gt; &quot;OCamllex&quot;,
+    &quot;ocamlyacc&quot;                        =&gt; &quot;OCamlyacc&quot;,
+    &quot;opengl&quot;                           =&gt; &quot;OpenGL&quot;,
+    &quot;pascal&quot;                           =&gt; &quot;Pascal&quot;,
+    &quot;perl&quot;                             =&gt; &quot;Perl&quot;,
+    &quot;php&quot;                              =&gt; &quot;PHP&quot;,
+    &quot;plain_text&quot;                       =&gt; &quot;Plain Text&quot;,
+    &quot;pmwiki&quot;                           =&gt; &quot;PmWiki&quot;,
+    &quot;postscript&quot;                       =&gt; &quot;Postscript&quot;,
+    &quot;processing&quot;                       =&gt; &quot;Processing&quot;,
+    &quot;prolog&quot;                           =&gt; &quot;Prolog&quot;,
+    &quot;property_list&quot;                    =&gt; &quot;Property List&quot;,
+    &quot;python&quot;                           =&gt; &quot;Python&quot;,
+    &quot;python_django&quot;                    =&gt; &quot;Python (Django)&quot;,
+    &quot;qmake_project&quot;                    =&gt; &quot;qmake Project file&quot;,
+    &quot;qt_c++&quot;                           =&gt; &quot;Qt C++&quot;,
+    &quot;quake3_config&quot;                    =&gt; &quot;Quake Style .cfg&quot;,
+    &quot;r&quot;                                =&gt; &quot;R&quot;,
+    &quot;r_console&quot;                        =&gt; &quot;R Console&quot;,
+    &quot;ragel&quot;                            =&gt; &quot;Ragel&quot;,
+    &quot;rd_r_documentation&quot;               =&gt; &quot;Rd (R Documentation)&quot;,
+    &quot;regexp&quot;                           =&gt; &quot;Regular Expression&quot;,
+    &quot;regular_expressions_oniguruma&quot;    =&gt; &quot;Regular Expressions (Oniguruma)&quot;,
+    &quot;regular_expressions_python&quot;       =&gt; &quot;Regular Expressions (Python)&quot;,
+    &quot;release_notes&quot;                    =&gt; &quot;Release Notes&quot;,
+    &quot;remind&quot;                           =&gt; &quot;Remind&quot;,
+    &quot;restructuredtext&quot;                 =&gt; &quot;reStructuredText&quot;,
+    &quot;rez&quot;                              =&gt; &quot;Rez&quot;,
+    &quot;ruby&quot;                             =&gt; &quot;Ruby&quot;,
+    &quot;ruby_experimental&quot;                =&gt; &quot;Ruby Experimental&quot;,
+    &quot;ruby_on_rails&quot;                    =&gt; &quot;Ruby on Rails&quot;,
+    &quot;s5&quot;                               =&gt; &quot;S5 Slide Show&quot;,
+    &quot;scheme&quot;                           =&gt; &quot;Scheme&quot;,
+    &quot;scilab&quot;                           =&gt; &quot;Scilab&quot;,
+    &quot;setext&quot;                           =&gt; &quot;Setext&quot;,
+    &quot;shell-unix-generic&quot;               =&gt; &quot;Shell Script (Bash)&quot;,
+    &quot;slate&quot;                            =&gt; &quot;Slate&quot;,
+    &quot;smarty&quot;                           =&gt; &quot;Smarty&quot;,
+    &quot;sql&quot;                              =&gt; &quot;SQL&quot;,
+    &quot;sql_rails&quot;                        =&gt; &quot;SQL (Rails)&quot;,
+    &quot;ssh-config&quot;                       =&gt; &quot;SSH Config&quot;,
+    &quot;standard_ml&quot;                      =&gt; &quot;Standard ML&quot;,
+    &quot;strings_file&quot;                     =&gt; &quot;Strings File&quot;,
+    &quot;subversion_commit_message&quot;        =&gt; &quot;svn-commit.tmp&quot;,
+    &quot;sweave&quot;                           =&gt; &quot;SWeave&quot;,
+    &quot;swig&quot;                             =&gt; &quot;SWIG&quot;,
+    &quot;tcl&quot;                              =&gt; &quot;Tcl&quot;,
+    &quot;template_toolkit&quot;                 =&gt; &quot;Template Toolkit&quot;,
+    &quot;tex&quot;                              =&gt; &quot;TeX&quot;,
+    &quot;tex_math&quot;                         =&gt; &quot;TeX Math&quot;,
+    &quot;textile&quot;                          =&gt; &quot;Textile&quot;,
+    &quot;tsv&quot;                              =&gt; &quot;TSV&quot;,
+    &quot;twiki&quot;                            =&gt; &quot;Twiki&quot;,
+    &quot;txt2tags&quot;                         =&gt; &quot;Txt2tags&quot;,
+    &quot;vectorscript&quot;                     =&gt; &quot;Vectorscript&quot;,
+    &quot;xhtml_1.0&quot;                        =&gt; &quot;XHTML 1.0 Strict&quot;,
+    &quot;xml&quot;                              =&gt; &quot;XML&quot;,
+    &quot;xml_strict&quot;                       =&gt; &quot;XML strict&quot;,
+    &quot;xsl&quot;                              =&gt; &quot;XSL&quot;,
+    &quot;yaml&quot;                             =&gt; &quot;YAML&quot;,
+    &quot;yui_javascript&quot;                   =&gt; &quot;Javascript YUI&quot;,
+}
+
 end</diff>
      <filename>vendor/highlight.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,22 +1,21 @@
 body
-  :background #fff
+  :background #000
 
 *
   :padding 0
   :margin 0
 
 a
-  :color #33f
+  :color #fa3
 a:visited
-  :color #66f
+  :color #fa3
 a:hover, a:active, a:focus
-  :color #00f
 
 // Layout
 
 #head
   :background #339
-  :height 2.2em
+  :height 2.4em
   :color #fa3
   #logo
     :float left
@@ -30,16 +29,13 @@ a:hover, a:active, a:focus
       :margin 0
       :line-height 1em
   a
-    :color #fa3
     :text-decoration none
     :background #117
     :padding 0.2em
     :margin 0.2em
-    :line-height 2em
-  a:visited
-    :color #e92
+    :line-height 2.2em
+    :font-size 1.2em
   a:hover, a:active, a:focus
-    :color #fa3
     :background #228
     :text-decoration underline
 
@@ -53,6 +49,36 @@ a:hover, a:active, a:focus
       :color #fa3
       :border 1px solid #000
 
+#content
+  :color #fff
+
+#footer
+  :text-align center
+  :clear both
+  :font-size 0.8em
+  :margin-top 1em
+  :color #fff
+  a
+    // :color #fff
+    :font-weight bold
+    :text-decoration none
+
+.sub_menu
+  :clear both
+  :margin-bottom 0.5em
+  :text-align center
+  a
+    :color #fa3
+    :text-decoration none
+    :background #117
+    :padding 0.2em
+    :font-size 1.1em
+
+.warning
+  :color #f00
+  :padding 0.5em
+  :text-align center
+
 .pager
   :clear both
   :text-align center
@@ -66,18 +92,6 @@ a:hover, a:active, a:focus
   .grey
     :color #aaa
 
-#footer
-  :text-align center
-  :clear both
-  :font-size 0.8em
-  :margin-top 1em
-  :background #aaf
-  :color #fff
-  a
-    :color #fff
-    :font-weight bold
-    :text-decoration none
-
 // New
 
 #new_paste
@@ -90,25 +104,15 @@ a:hover, a:active, a:focus
     :clear both
     :width 100%
     :height 35em
+    :margin-bottom 1em
 
 // View
 
-#paste_menu
-  :clear both
-  :background #339
-  :margin-bottom 0.5em
-  :text-align center
-  a
-    :color #fa3
-    :text-decoration none
-    :background #117
-    :padding 0.2em
-
-#paste_date
+.paste_date
   :text-align center
   :padding-right 0.5em
 
-#paste_body
+.paste_body
   :clear both
   :padding 0.5em
   pre
@@ -125,7 +129,7 @@ a:hover, a:active, a:focus
       :background #339
   .item
     :float left
-    :width 30%
+    :width 31%
     :overflow hidden
     :margin 1%
     .item_meta, .more
@@ -155,11 +159,35 @@ pre
   :font-family &quot;Courier New&quot;, &quot;Terminal&quot;, monospace
   :font-size 10pt
 
-.foobar
-  :text-align left
-  :margin 0.25em
-  :border 1px solid #00f
-  :float left
-  :width 45%
-  :overflow hidden
-  :background #fff
+.login
+  :margin-left auto
+  :margin-right auto
+  :text-align center
+  :min-height 30em
+  :width 33em
+  :font-family &quot;Times New Roman&quot;
+  form
+    :text-align center
+    fieldset
+      :border 1px solid #eee
+      :background #fff
+      legend
+        :font-size 1.5em
+      label
+      input
+        :font-family &quot;Times New Roman&quot;
+        :font-size 1.5em
+        :width 80%
+        :background #fafafa
+        :border 2px solid #eee
+        :margin 0.2em
+        :padding 0.2em
+        :color #000
+        :text-align center
+      input.submit
+        :text-align center
+        // :background #111
+        // :color #fff
+        :margin 1em
+        :border 1px outset #333
+        :width 40%</diff>
      <filename>view/css/screen.sass</filename>
    </modified>
    <modified>
      <diff>@@ -19,6 +19,8 @@
           %input{:type =&gt; :text, :name =&gt; :substring}
         %a{:href =&gt; '/'} New
         %a{:href =&gt; '/list'} List
+        %a{:href =&gt; R(AccountController, :login)} Login
+      #flash= flashbox
     #content= @content
     #footer
       &amp;copy;</diff>
      <filename>view/layout.haml</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,6 @@
-= @pager.navigation
+.sub_menu= @pager.navigation
 
-.list_head= &quot;Pastes total: #@total&quot;
+.list_head= @title
 
 .list
   - @pager.each do |paste|</diff>
      <filename>view/list.haml</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,6 @@
-= @pager.navigation
+.sub_menu= @pager.navigation
 
-.list_head= &quot;Results for '#{h(@needle)}' total: #@total&quot;
+.list_head= @title
 
 .list
   - @pager.each do |paste|</diff>
      <filename>view/search.haml</filename>
    </modified>
    <modified>
      <diff>@@ -3,6 +3,11 @@
 .flashbox= flashbox
 
 = &quot;There are #@count unapproved pastes&quot;
+%a{:href =&gt; Rs(:list_spammy)} Search for obvious spam (slow)
+
+%form{:method =&gt; :GET, :action =&gt; Rs(:search)}
+  Search this list:
+  %input{:type =&gt; :input, :name =&gt; :q}
 
 %form{:method =&gt; :POST, :action =&gt; Rs(:mark)}
   %table{:style =&gt; 'margin-left: auto; margin-right: auto;'}
@@ -10,13 +15,13 @@
       %td Spam
       %td Ham
 
-      / %td Category
-      / %td [Spam | Ham | Delta]
+      %td Category
+      %td [Spam | Ham | Delta]
 
       %td Paste
     - @pager.each do |paste|
       - rating, classification = BAYES.classify_info(paste.text)
-      - is_spam = rating == 'spam'
+      - is_spam = rating == :spam
       - color = is_spam ? '#faa' : '#afa'
       - spam_name, ham_name = &quot;spam[#{paste.id}]&quot;, &quot;ham[#{paste.id}]&quot;
       %tr{:style =&gt; &quot;background: #{color};&quot;}
@@ -30,9 +35,9 @@
             %input{:type =&gt; :radio, :name =&gt; paste.id, :value =&gt; :ham}
           - else
             %input{:style =&gt; 'display: block;', :type =&gt; :radio, :name =&gt; paste.id, :value =&gt; :ham, :checked =&gt; :checked}
-        / %td= rating
-        / - spammy, hammy = classification[:spam].to_f, classification[:ham].to_f
-        / %td= &quot;%.2f | %.2f | %.2f&quot; % [spammy, hammy, (spammy - hammy).abs]
+        %td= rating
+        - spammy, hammy = classification[:spam].to_f, classification[:ham].to_f
+        %td= &quot;%.2f | %.2f | %.2f&quot; % [spammy, hammy, (spammy - hammy).abs]
         %td{:style =&gt; 'width: 92%'}
           %pre{:style =&gt; 'width: 80em; overflow: auto;'}= paste.text_fragment
   %input{:type =&gt; :submit, :value =&gt; 'Categorize this list'}</diff>
      <filename>view/spam/list_pending.haml</filename>
    </modified>
    <modified>
      <diff>@@ -1,12 +1,13 @@
-#paste
-  #paste_menu
-    = @paste.link(:fork)
-    = @paste.link(:html)
-    = @paste.link(:txt)
-    = @paste.link(:rb)
-    - if session[:pastes] and session[:pastes].include?(@paste.id)
-      = @paste.link(:delete)
-  #paste_date
-    Created:
-    = @paste.created.utc
-  %pre#paste_body~ @paste.text_full
+.sub_menu
+  = @paste.link(:fork)
+  = @paste.link(:html)
+  = @paste.link(:txt)
+  = @paste.link(:rb)
+  - if session[:pastes] and session[:pastes].include?(@paste.id)
+    = @paste.link(:delete)
+.paste_date
+  Created:
+  = @paste.created.utc
+- if @paste.category == 'spam'
+  .warning This paste is considered spam, watch out
+%pre.paste_body~ @paste.text_full</diff>
      <filename>view/view.haml</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>643cfd0ce0f75c817eb6481af08160ea2be5599d</id>
    </parent>
  </parents>
  <author>
    <name>Michael Fellinger</name>
    <email>m.fellinger@gmail.com</email>
  </author>
  <url>http://github.com/manveru/rapaste/commit/840c13350ded0814349450e6a14a196f5b8d73fd</url>
  <id>840c13350ded0814349450e6a14a196f5b8d73fd</id>
  <committed-date>2008-10-29T02:40:16-07:00</committed-date>
  <authored-date>2008-10-29T02:40:16-07:00</authored-date>
  <message>New checkpoint, almost done integrating new spam fighting interface</message>
  <tree>81bf1986218df4c87a024e9e36ace1b74d15a6e5</tree>
  <committer>
    <name>Michael Fellinger</name>
    <email>m.fellinger@gmail.com</email>
  </committer>
</commit>
