From a3af20bd6c3aef3976d18d49f407613ff7693baf Mon Sep 17 00:00:00 2001 From: murphy Date: Thu, 28 Sep 2006 15:49:53 +0000 Subject: 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 --- test/ruby/diffed.in.rb | 30 ++++++++++++++++++++++++++++++ test/ruby/diffed.out.raydebug | 30 ++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 test/ruby/diffed.in.rb create mode 100644 test/ruby/diffed.out.raydebug (limited to 'test/ruby') 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 + diff --git a/test/ruby/diffed.out.raydebug b/test/ruby/diffed.out.raydebug new file mode 100644 index 0000000..8881649 --- /dev/null +++ b/test/ruby/diffed.out.raydebug @@ -0,0 +1,30 @@ +comment(## example diff [diff]) +constant(Index)operator(:) regexpident(jgoebel)operator(/)ident(rails)operator(/)ident(pastie)operator(/)ident(app)operator(/)ident(controllers)operator(/)ident(pastes_controller)operator(.)ident(rb) +operator(===)operator(===)operator(===)operator(===)operator(===)operator(===)operator(===)operator(===)operator(===)operator(===)operator(===)operator(===)operator(===)operator(===)operator(===)operator(===)operator(===)operator(===)operator(===)operator(===)operator(===)operator(===)operator(=) +operator(-)operator(-)operator(-) regexpident(jgoebel)operator(/)ident(rails)operator(/)ident(pastie)operator(/)ident(app)operator(/)ident(controllers)operator(/)ident(pastes_controller)operator(.)ident(rb) operator(()ident(revision) integer(1431)operator(\)) +operator(+)operator(+)operator(+) regexpident(jgoebel)operator(/)ident(rails)operator(/)ident(pastie)operator(/)ident(app)operator(/)ident(controllers)operator(/)ident(pastes_controller)operator(.)ident(rb) operator(()ident(revision) integer(1437)operator(\)) +error(@)error(@) integer(-1)operator(,)integer(6) integer(+1)operator(,)integer(10) error(@)error(@) +operator(+)ident(require) string + ident(require) string + + reserved(class) class(PastesController) operator(<) constant(ApplicationController) +operator(+) ident(include) constant(LoginSystem) +operator(+) +operator(+) ident(before_filter) symbol(:attempt_cookie_login) + + comment(# caches_action :recent) + +error(@)error(@) integer(-10)operator(,)integer(11) integer(+14)operator(,)integer(7) error(@)error(@) + + reserved(def) method(show) + instance_variable(@paste) operator(=) constant(Paste)operator(.)ident(find)operator(()ident(params)operator([)symbol(:id)operator(])operator(\)) +operator(-) reserved(if) ident(params)operator([)symbol(:key)operator(]) reserved(and) ident(params)operator([)symbol(:key)operator(])operator(==)constant(User)operator(.)ident(new)operator(()instance_variable(@paste)operator(.)ident(nick)operator(\))operator(.)ident(magic_mojo) +operator(-) ident(session)operator([)symbol(:login)operator(])operator(=)instance_variable(@paste)operator(.)ident(nick) +operator(-) reserved(return) ident(redirect_to)operator(()symbol(:action) operator(=)operator(>) stringoperator(,) symbol(:id) operator(=)operator(>) instance_variable(@paste)operator(.)ident(id)operator(\)) +operator(-) reserved(end) +operator(-) +operator(+) ident(attempt_key_login) reserved(if) reserved(not) ident(logged_in?) + reserved(unless) instance_variable(@paste)operator(.)ident(asset) reserved(or) reserved(not) instance_variable(@paste)operator(.)ident(body)operator(.)ident(blank?) + ident(render) symbol(:action) operator(=)operator(>) string + reserved(end) + -- cgit v1.2.1