diff options
author | murphy <murphy@rubychan.de> | 2006-09-28 15:49:53 +0000 |
---|---|---|
committer | murphy <murphy@rubychan.de> | 2006-09-28 15:49:53 +0000 |
commit | a3af20bd6c3aef3976d18d49f407613ff7693baf (patch) | |
tree | 105f09ec27e217a09bf1b7c678a4cf484cf2182f /test/ruby/diffed.in.rb | |
parent | 6ecba0d804f995d377495997e5edd014486acf65 (diff) | |
download | coderay-a3af20bd6c3aef3976d18d49f407613ff7693baf.tar.gz |
Ruby scanner: deleted regexp highlighting (didn't work anyway)
HTML highlighter: unknown token classes now yield a CSS class with that name instead of :error
A new Ruby test
Diffstat (limited to 'test/ruby/diffed.in.rb')
-rw-r--r-- | test/ruby/diffed.in.rb | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/test/ruby/diffed.in.rb b/test/ruby/diffed.in.rb new file mode 100644 index 0000000..a1deb0f --- /dev/null +++ b/test/ruby/diffed.in.rb @@ -0,0 +1,30 @@ +## example diff [diff]
+Index: /Users/jgoebel/rails/pastie/app/controllers/pastes_controller.rb
+===================================================================
+--- /Users/jgoebel/rails/pastie/app/controllers/pastes_controller.rb (revision 1431)
++++ /Users/jgoebel/rails/pastie/app/controllers/pastes_controller.rb (revision 1437)
+@@ -1,6 +1,10 @@
++require 'login_system'
+ require 'coderay'
+
+ class PastesController < ApplicationController
++ include LoginSystem
++
++ before_filter :attempt_cookie_login
+
+ # caches_action :recent
+
+@@ -10,11 +14,7 @@
+
+ def show
+ @paste = Paste.find(params[:id])
+- if params[:key] and params[:key]==User.new(@paste.nick).magic_mojo
+- session[:login]=@paste.nick
+- return redirect_to(:action => 'show', :id => @paste.id)
+- end
+-
++ attempt_key_login if not logged_in?
+ unless @paste.asset or not @paste.body.blank?
+ render :action => "edit"
+ end
+
|