Sha256: ff5fba2f5cca572d1da73cebee8e674f698a21a277e8deeafd375335117f008a

Contents?: true

Size: 807 Bytes

Versions: 2

Compression:

Stored size: 807 Bytes

Contents

class SpecFormat < RequestLogAnalyzer::FileFormat::Base

  format_definition.first do |line|
    line.header = true
    line.teaser = /processing /
    line.regexp = /processing request (\d+)/
    line.captures = [{ :name => :request_no, :type => :integer, :anonymize => :slightly }]    
  end
  
  format_definition.test do |line|
    line.teaser = /testing /
    line.regexp = /testing is (\w+)/
    line.captures = [{ :name => :test_capture, :type => :string, :anonymize => true}]
  end
  
  format_definition.last do |line|
    line.footer = true
    line.teaser = /finishing /
    line.regexp = /finishing request (\d+)/
    line.captures = [{ :name => :request_no, :type => :integer}]
  end
  
  report do |analyze|
    analyze.category :test_capture, :title => 'What is testing exactly?'
  end
  
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
wvanbergen-request-log-analyzer-1.1.1 spec/file_formats/spec_format.rb
request-log-analyzer-1.1.1 spec/file_formats/spec_format.rb