Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Ruby
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
spec
.gitignore
Backtrace_Array.gemspec
Gemfile
README.md
Rakefile

README.md

Backtrace_Array

A Ruby gem to alter structure of a backtrace:

Original Backtrace:

[ String, String, String ]

New Array:

[
   [ unique file 1, [ [line, code], [line, code], ... ] ]
   [ unique file 2, [ [line, code], [line, code], ... ] ]
   [ unique file 3, [ [line, code], [line, code], ... ] ]

]

This lets you present it in your views as:

  unique file 1
  line: code
  line: code
  line: code

  unique file 2
  line: code
  line: code
  line: code
  

Installation

gem install Backtrace_Array

Usage

require "Backtrace_Array"

# Pass it an Array
Backtrace_Array my_exception.backtrace

# ... or a String
Backtrace_Array %~
  file1:1: in `new'
  file2:2: in `<main>'
  file3:3: in `eval'
~

Run Tests

git clone git@github.com:da99/Backtrace_Array.git
cd Backtrace_Array
bundle update
bundle exec bacon spec/lib/main.rb

"I hate writing."

If you know of existing software that makes the above redundant, please tell me. The last thing I want to do is maintain code.

Something went wrong with that request. Please try again.