error-locator 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/error-locator.rb +7 -5
- data/lib/error-locator/version.rb +1 -1
- data/test/dummy/log/development.log +234 -0
- metadata +1 -1
data/lib/error-locator.rb
CHANGED
@@ -1,11 +1,13 @@
|
|
1
1
|
module ErrorLocator
|
2
2
|
def self.call(env)
|
3
3
|
req = Rack::Request.new(env)
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
4
|
+
clicked_line = req.params['line']
|
5
|
+
#location format: 'filename:linenumber'
|
6
|
+
location = clicked_line[/[^:]+[:]\d+/]
|
7
|
+
if !location.blank?
|
8
|
+
location = File.expand_path(location)
|
9
|
+
filename = location[/[^:]/]
|
10
|
+
`$EDITOR "#{location}"` if File.exists?(filename)
|
9
11
|
end
|
10
12
|
[200, {}, [] ]
|
11
13
|
end
|
@@ -2212,3 +2212,237 @@ Started POST "/error-locator" for 127.0.0.1 at 2012-11-28 13:55:21 +0200
|
|
2212
2212
|
|
2213
2213
|
|
2214
2214
|
Started POST "/error-locator" for 127.0.0.1 at 2012-11-28 13:55:23 +0200
|
2215
|
+
|
2216
|
+
|
2217
|
+
Started GET "/" for 127.0.0.1 at 2012-11-28 14:10:30 +0200
|
2218
|
+
Processing by HomeController#index as HTML
|
2219
|
+
Completed 500 Internal Server Error in 1ms
|
2220
|
+
|
2221
|
+
RuntimeError (sample error):
|
2222
|
+
app/controllers/home_controller.rb:5:in `index'
|
2223
|
+
|
2224
|
+
Rendered /home/virtax/work/error-locator/lib/error-locator/templates/rescues/_trace.erb (3.4ms)
|
2225
|
+
Rendered /home/virtax/work/error-locator/lib/error-locator/templates/rescues/_request_and_response.erb (1.4ms)
|
2226
|
+
Rendered /home/virtax/work/error-locator/lib/error-locator/templates/rescues/diagnostics.erb within rescues/layout (8.8ms)
|
2227
|
+
|
2228
|
+
|
2229
|
+
Started GET "/assets/jquery.js?body=1" for 127.0.0.1 at 2012-11-28 14:10:30 +0200
|
2230
|
+
Served asset /jquery.js - 304 Not Modified (6ms)
|
2231
|
+
|
2232
|
+
|
2233
|
+
Started POST "/error-locator" for 127.0.0.1 at 2012-11-28 14:10:31 +0200
|
2234
|
+
|
2235
|
+
|
2236
|
+
Started POST "/error-locator" for 127.0.0.1 at 2012-11-28 14:10:38 +0200
|
2237
|
+
|
2238
|
+
|
2239
|
+
Started GET "/" for 127.0.0.1 at 2012-11-28 14:11:36 +0200
|
2240
|
+
Processing by HomeController#index as HTML
|
2241
|
+
Completed 500 Internal Server Error in 1ms
|
2242
|
+
|
2243
|
+
RuntimeError (sample error):
|
2244
|
+
app/controllers/home_controller.rb:5:in `index'
|
2245
|
+
|
2246
|
+
Rendered /home/virtax/work/error-locator/lib/error-locator/templates/rescues/_trace.erb (3.4ms)
|
2247
|
+
Rendered /home/virtax/work/error-locator/lib/error-locator/templates/rescues/_request_and_response.erb (1.4ms)
|
2248
|
+
Rendered /home/virtax/work/error-locator/lib/error-locator/templates/rescues/diagnostics.erb within rescues/layout (8.8ms)
|
2249
|
+
|
2250
|
+
|
2251
|
+
Started GET "/assets/jquery.js?body=1" for 127.0.0.1 at 2012-11-28 14:11:37 +0200
|
2252
|
+
Served asset /jquery.js - 304 Not Modified (3ms)
|
2253
|
+
|
2254
|
+
|
2255
|
+
Started POST "/error-locator" for 127.0.0.1 at 2012-11-28 14:11:38 +0200
|
2256
|
+
|
2257
|
+
|
2258
|
+
Started POST "/error-locator" for 127.0.0.1 at 2012-11-28 14:11:41 +0200
|
2259
|
+
|
2260
|
+
|
2261
|
+
Started POST "/error-locator" for 127.0.0.1 at 2012-11-28 14:11:41 +0200
|
2262
|
+
|
2263
|
+
|
2264
|
+
Started GET "/" for 127.0.0.1 at 2012-11-28 14:11:43 +0200
|
2265
|
+
Processing by HomeController#index as HTML
|
2266
|
+
Completed 500 Internal Server Error in 1ms
|
2267
|
+
|
2268
|
+
RuntimeError (sample error):
|
2269
|
+
app/controllers/home_controller.rb:5:in `index'
|
2270
|
+
|
2271
|
+
Rendered /home/virtax/work/error-locator/lib/error-locator/templates/rescues/_trace.erb (3.5ms)
|
2272
|
+
Rendered /home/virtax/work/error-locator/lib/error-locator/templates/rescues/_request_and_response.erb (1.4ms)
|
2273
|
+
Rendered /home/virtax/work/error-locator/lib/error-locator/templates/rescues/diagnostics.erb within rescues/layout (7.5ms)
|
2274
|
+
|
2275
|
+
|
2276
|
+
Started GET "/assets/jquery.js?body=1" for 127.0.0.1 at 2012-11-28 14:11:43 +0200
|
2277
|
+
Served asset /jquery.js - 304 Not Modified (0ms)
|
2278
|
+
|
2279
|
+
|
2280
|
+
Started POST "/error-locator" for 127.0.0.1 at 2012-11-28 14:11:45 +0200
|
2281
|
+
|
2282
|
+
|
2283
|
+
Started POST "/error-locator" for 127.0.0.1 at 2012-11-28 14:11:46 +0200
|
2284
|
+
|
2285
|
+
|
2286
|
+
Started POST "/error-locator" for 127.0.0.1 at 2012-11-28 14:11:47 +0200
|
2287
|
+
|
2288
|
+
|
2289
|
+
Started POST "/error-locator" for 127.0.0.1 at 2012-11-28 14:11:47 +0200
|
2290
|
+
|
2291
|
+
|
2292
|
+
Started POST "/error-locator" for 127.0.0.1 at 2012-11-28 14:11:47 +0200
|
2293
|
+
|
2294
|
+
|
2295
|
+
Started POST "/error-locator" for 127.0.0.1 at 2012-11-28 14:11:48 +0200
|
2296
|
+
|
2297
|
+
|
2298
|
+
Started POST "/error-locator" for 127.0.0.1 at 2012-11-28 14:12:08 +0200
|
2299
|
+
|
2300
|
+
|
2301
|
+
Started POST "/error-locator" for 127.0.0.1 at 2012-11-28 14:12:10 +0200
|
2302
|
+
|
2303
|
+
|
2304
|
+
Started POST "/error-locator" for 127.0.0.1 at 2012-11-28 14:12:16 +0200
|
2305
|
+
|
2306
|
+
|
2307
|
+
Started GET "/" for 127.0.0.1 at 2012-11-28 14:18:14 +0200
|
2308
|
+
Processing by HomeController#index as HTML
|
2309
|
+
Completed 500 Internal Server Error in 1ms
|
2310
|
+
|
2311
|
+
RuntimeError (sample error):
|
2312
|
+
app/controllers/home_controller.rb:5:in `index'
|
2313
|
+
|
2314
|
+
Rendered /home/virtax/work/error-locator/lib/error-locator/templates/rescues/_trace.erb (3.4ms)
|
2315
|
+
Rendered /home/virtax/work/error-locator/lib/error-locator/templates/rescues/_request_and_response.erb (1.4ms)
|
2316
|
+
Rendered /home/virtax/work/error-locator/lib/error-locator/templates/rescues/diagnostics.erb within rescues/layout (9.0ms)
|
2317
|
+
|
2318
|
+
|
2319
|
+
Started GET "/assets/jquery.js?body=1" for 127.0.0.1 at 2012-11-28 14:18:14 +0200
|
2320
|
+
Served asset /jquery.js - 304 Not Modified (7ms)
|
2321
|
+
|
2322
|
+
|
2323
|
+
Started POST "/error-locator" for 127.0.0.1 at 2012-11-28 14:18:15 +0200
|
2324
|
+
|
2325
|
+
NameError (undefined local variable or method `f' for ErrorLocator:Module):
|
2326
|
+
|
2327
|
+
|
2328
|
+
Rendered /home/virtax/work/error-locator/lib/error-locator/templates/rescues/_trace.erb (2.8ms)
|
2329
|
+
Rendered /home/virtax/work/error-locator/lib/error-locator/templates/rescues/_request_and_response.erb (1.4ms)
|
2330
|
+
Rendered /home/virtax/work/error-locator/lib/error-locator/templates/rescues/diagnostics.erb within rescues/layout (7.1ms)
|
2331
|
+
|
2332
|
+
|
2333
|
+
Started GET "/" for 127.0.0.1 at 2012-11-28 14:18:43 +0200
|
2334
|
+
Processing by HomeController#index as HTML
|
2335
|
+
Completed 500 Internal Server Error in 31ms
|
2336
|
+
|
2337
|
+
RuntimeError (sample error):
|
2338
|
+
app/controllers/home_controller.rb:5:in `index'
|
2339
|
+
|
2340
|
+
Rendered /home/virtax/work/error-locator/lib/error-locator/templates/rescues/_trace.erb (3.4ms)
|
2341
|
+
Rendered /home/virtax/work/error-locator/lib/error-locator/templates/rescues/_request_and_response.erb (1.6ms)
|
2342
|
+
Rendered /home/virtax/work/error-locator/lib/error-locator/templates/rescues/diagnostics.erb within rescues/layout (9.0ms)
|
2343
|
+
|
2344
|
+
|
2345
|
+
Started GET "/assets/jquery.js?body=1" for 127.0.0.1 at 2012-11-28 14:18:43 +0200
|
2346
|
+
Served asset /jquery.js - 304 Not Modified (3ms)
|
2347
|
+
|
2348
|
+
|
2349
|
+
Started POST "/error-locator" for 127.0.0.1 at 2012-11-28 14:18:44 +0200
|
2350
|
+
|
2351
|
+
NameError (undefined local variable or method `f' for ErrorLocator:Module):
|
2352
|
+
|
2353
|
+
|
2354
|
+
Rendered /home/virtax/work/error-locator/lib/error-locator/templates/rescues/_trace.erb (2.8ms)
|
2355
|
+
Rendered /home/virtax/work/error-locator/lib/error-locator/templates/rescues/_request_and_response.erb (1.5ms)
|
2356
|
+
Rendered /home/virtax/work/error-locator/lib/error-locator/templates/rescues/diagnostics.erb within rescues/layout (6.9ms)
|
2357
|
+
|
2358
|
+
|
2359
|
+
Started POST "/error-locator" for 127.0.0.1 at 2012-11-28 14:23:11 +0200
|
2360
|
+
|
2361
|
+
|
2362
|
+
Started POST "/error-locator" for 127.0.0.1 at 2012-11-28 14:23:14 +0200
|
2363
|
+
|
2364
|
+
|
2365
|
+
Started POST "/error-locator" for 127.0.0.1 at 2012-11-28 14:23:18 +0200
|
2366
|
+
|
2367
|
+
|
2368
|
+
Started GET "/" for 127.0.0.1 at 2012-11-28 14:24:24 +0200
|
2369
|
+
Processing by HomeController#index as HTML
|
2370
|
+
Completed 500 Internal Server Error in 1ms
|
2371
|
+
|
2372
|
+
RuntimeError (sample error):
|
2373
|
+
app/controllers/home_controller.rb:5:in `index'
|
2374
|
+
|
2375
|
+
Rendered /home/virtax/work/error-locator/lib/error-locator/templates/rescues/_trace.erb (3.4ms)
|
2376
|
+
Rendered /home/virtax/work/error-locator/lib/error-locator/templates/rescues/_request_and_response.erb (1.4ms)
|
2377
|
+
Rendered /home/virtax/work/error-locator/lib/error-locator/templates/rescues/diagnostics.erb within rescues/layout (8.8ms)
|
2378
|
+
|
2379
|
+
|
2380
|
+
Started GET "/assets/jquery.js?body=1" for 127.0.0.1 at 2012-11-28 14:24:24 +0200
|
2381
|
+
Served asset /jquery.js - 304 Not Modified (4ms)
|
2382
|
+
|
2383
|
+
|
2384
|
+
Started GET "/" for 127.0.0.1 at 2012-11-28 14:24:28 +0200
|
2385
|
+
Processing by HomeController#index as HTML
|
2386
|
+
Completed 500 Internal Server Error in 1ms
|
2387
|
+
|
2388
|
+
RuntimeError (sample error):
|
2389
|
+
app/controllers/home_controller.rb:5:in `index'
|
2390
|
+
|
2391
|
+
Rendered /home/virtax/work/error-locator/lib/error-locator/templates/rescues/_trace.erb (3.5ms)
|
2392
|
+
Rendered /home/virtax/work/error-locator/lib/error-locator/templates/rescues/_request_and_response.erb (1.5ms)
|
2393
|
+
Rendered /home/virtax/work/error-locator/lib/error-locator/templates/rescues/diagnostics.erb within rescues/layout (7.7ms)
|
2394
|
+
|
2395
|
+
|
2396
|
+
Started GET "/assets/jquery.js?body=1" for 127.0.0.1 at 2012-11-28 14:24:28 +0200
|
2397
|
+
Served asset /jquery.js - 304 Not Modified (0ms)
|
2398
|
+
|
2399
|
+
|
2400
|
+
Started POST "/error-locator" for 127.0.0.1 at 2012-11-28 14:24:30 +0200
|
2401
|
+
|
2402
|
+
NoMethodError (undefined method `expand_path!' for File:Class):
|
2403
|
+
|
2404
|
+
|
2405
|
+
Rendered /home/virtax/work/error-locator/lib/error-locator/templates/rescues/_trace.erb (2.8ms)
|
2406
|
+
Rendered /home/virtax/work/error-locator/lib/error-locator/templates/rescues/_request_and_response.erb (1.5ms)
|
2407
|
+
Rendered /home/virtax/work/error-locator/lib/error-locator/templates/rescues/diagnostics.erb within rescues/layout (6.9ms)
|
2408
|
+
|
2409
|
+
|
2410
|
+
Started GET "/" for 127.0.0.1 at 2012-11-28 14:24:43 +0200
|
2411
|
+
Processing by HomeController#index as HTML
|
2412
|
+
Completed 500 Internal Server Error in 1ms
|
2413
|
+
|
2414
|
+
RuntimeError (sample error):
|
2415
|
+
app/controllers/home_controller.rb:5:in `index'
|
2416
|
+
|
2417
|
+
Rendered /home/virtax/work/error-locator/lib/error-locator/templates/rescues/_trace.erb (34.2ms)
|
2418
|
+
Rendered /home/virtax/work/error-locator/lib/error-locator/templates/rescues/_request_and_response.erb (1.5ms)
|
2419
|
+
Rendered /home/virtax/work/error-locator/lib/error-locator/templates/rescues/diagnostics.erb within rescues/layout (40.2ms)
|
2420
|
+
|
2421
|
+
|
2422
|
+
Started GET "/assets/jquery.js?body=1" for 127.0.0.1 at 2012-11-28 14:24:44 +0200
|
2423
|
+
Served asset /jquery.js - 304 Not Modified (4ms)
|
2424
|
+
|
2425
|
+
|
2426
|
+
Started POST "/error-locator" for 127.0.0.1 at 2012-11-28 14:24:45 +0200
|
2427
|
+
|
2428
|
+
|
2429
|
+
Started POST "/error-locator" for 127.0.0.1 at 2012-11-28 14:24:48 +0200
|
2430
|
+
|
2431
|
+
|
2432
|
+
Started GET "/" for 127.0.0.1 at 2012-11-28 14:26:04 +0200
|
2433
|
+
Processing by HomeController#index as HTML
|
2434
|
+
Completed 500 Internal Server Error in 1ms
|
2435
|
+
|
2436
|
+
RuntimeError (sample error):
|
2437
|
+
app/controllers/home_controller.rb:5:in `index'
|
2438
|
+
|
2439
|
+
Rendered /home/virtax/work/error-locator/lib/error-locator/templates/rescues/_trace.erb (3.6ms)
|
2440
|
+
Rendered /home/virtax/work/error-locator/lib/error-locator/templates/rescues/_request_and_response.erb (1.4ms)
|
2441
|
+
Rendered /home/virtax/work/error-locator/lib/error-locator/templates/rescues/diagnostics.erb within rescues/layout (7.7ms)
|
2442
|
+
|
2443
|
+
|
2444
|
+
Started GET "/assets/jquery.js?body=1" for 127.0.0.1 at 2012-11-28 14:26:04 +0200
|
2445
|
+
Served asset /jquery.js - 304 Not Modified (0ms)
|
2446
|
+
|
2447
|
+
|
2448
|
+
Started POST "/error-locator" for 127.0.0.1 at 2012-11-28 14:26:06 +0200
|