Sha256: 8a2a4a2b3a3cb7970b7e861fc414bbb08d2830aa9aff822311dedb3dbfa9f728

Contents?: true

Size: 435 Bytes

Versions: 128

Compression:

Stored size: 435 Bytes

Contents

require 'spec/runner/formatter/html_formatter'

module Spec
  module Runner
    module Formatter
      # Formats backtraces so they're clickable by TextMate
      class TextMateFormatter < HtmlFormatter
        def backtrace_line(line)
          line.gsub(/([^:]*\.rb):(\d*)/) do
            "<a href=\"txmt://open?url=file://#{File.expand_path($1)}&line=#{$2}\">#{$1}:#{$2}</a> "
          end
        end
      end
    end
  end
end

Version data entries

128 entries across 128 versions & 21 rubygems

Version Path
dchelimsky-rspec-1.1.10 lib/spec/runner/formatter/text_mate_formatter.rb
dchelimsky-rspec-1.1.11.1 lib/spec/runner/formatter/text_mate_formatter.rb
dchelimsky-rspec-1.1.11.2 lib/spec/runner/formatter/text_mate_formatter.rb
dchelimsky-rspec-1.1.11.3 lib/spec/runner/formatter/text_mate_formatter.rb
dchelimsky-rspec-1.1.11.4 lib/spec/runner/formatter/text_mate_formatter.rb
dchelimsky-rspec-1.1.11.5 lib/spec/runner/formatter/text_mate_formatter.rb
dchelimsky-rspec-1.1.11.6 lib/spec/runner/formatter/text_mate_formatter.rb
dchelimsky-rspec-1.1.11.7 lib/spec/runner/formatter/text_mate_formatter.rb
dchelimsky-rspec-1.1.11 lib/spec/runner/formatter/text_mate_formatter.rb
dchelimsky-rspec-1.1.12 lib/spec/runner/formatter/text_mate_formatter.rb
dchelimsky-rspec-1.1.99.1 lib/spec/runner/formatter/text_mate_formatter.rb
dchelimsky-rspec-1.1.99.13 lib/spec/runner/formatter/text_mate_formatter.rb
dchelimsky-rspec-1.1.99.2 lib/spec/runner/formatter/text_mate_formatter.rb
dchelimsky-rspec-1.1.99.3 lib/spec/runner/formatter/text_mate_formatter.rb
dchelimsky-rspec-1.1.99.4 lib/spec/runner/formatter/text_mate_formatter.rb
dchelimsky-rspec-1.1.99.5 lib/spec/runner/formatter/text_mate_formatter.rb
dchelimsky-rspec-1.1.99.6 lib/spec/runner/formatter/text_mate_formatter.rb
dchelimsky-rspec-1.1.99.7 lib/spec/runner/formatter/text_mate_formatter.rb
dchelimsky-rspec-1.1.99.8 lib/spec/runner/formatter/text_mate_formatter.rb
dchelimsky-rspec-1.1.99.9 lib/spec/runner/formatter/text_mate_formatter.rb