Permalink
Browse files

Add support for controller within module.

  • Loading branch information...
1 parent c834473 commit e802591da69c83a15a63ada3e863d41808dc218f @wagner wagner committed May 2, 2011
@@ -26,7 +26,7 @@ def print(output)
@pids[pid][:buffer] << line
end
- if line =~ /Oink Action: ((\w+)#(\w+))/
+ if line =~ /Oink Action: (([\w\/]+)#(\w+))/
@pids[pid][:action] = $1
unless @pids[pid][:request_finished]
@@ -25,7 +25,7 @@ def print(output)
@pids[pid][:buffer] << line
end
- if line =~ /Oink Action: ((\w+)#(\w+))/
+ if line =~ /Oink Action: (([\w\/]+)#(\w+))/
unless @pids[pid][:request_finished]
@pids[pid][:last_memory_reading] = -1
@@ -46,6 +46,11 @@ def call(env)
get "/no_pigs", {}, {'action_dispatch.request.parameters' => {'controller' => 'oinkoink', 'action' => 'piggie'}}
log_output.string.should include("Oink Action: oinkoink#piggie")
end
+
+ it "logs the action and controller within a module" do
+ get "/no_pigs", {}, {'action_dispatch.request.parameters' => {'controller' => 'oinkoink/admin', 'action' => 'piggie'}}
+ log_output.string.should include("Oink Action: oinkoink/admin#piggie")
+ end
end
it "reports 0 totals" do

0 comments on commit e802591

Please sign in to comment.