No commit activity in last 3 years
No release in over 3 years
Parses various build metrics from builds logs (Rspec, Test::Unit, etc)
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 10
~> 2.13
~> 0.8

Runtime

 Project Readme

build_log_parser

Fetch metrics from build logs: tests, duration, coverage, etc.

Build Status Code Climate

Installation

Install via rubygems:

gem install build_log_parser

Or with bundler:

gem "build_log_parser"

Usage

Build log parser library provides an ability to fetch various metrics from build logs. Supports tests, coverage and duration metrics from frameworks:

  • RSpec (Ruby)
  • Test::Unit (Ruby)
  • NPM (Node.js)
  • PHPUnit (PHP)
  • Istanbul (Javascript)

Example log output:

Finished in 2 minutes 23.4 seconds
1169 examples, 0 failures, 17 pending
Coverage report generated for RSpec to /app/coverage. 3816 / 4835 LOC (78.92%) covered.

Example usage:

require "build_log_parser"

# Initialize parser
parser = BuildLogParser::Parser.new(str)

# Get tests metrics
parser.tests
# => {:count=>1169, :failures=>0, :pending=>17}

# Get coverage metrics
parser.coverage
# => {:lines_covered=>3816, :lines_total=>4835, :coverage_percent=>78.92}

# Get duration
parser.duration
# => 143.4 (in seconds)

Alternative usage:

str = "your build log"

BuildLogParser.tests(str)
BuildLogParser.coverage(str)
BuildLogParser.duration(str)

Tests

Execute test suite by running the following command:

bundle exec rake test

License

The MIT License

Copyright (c) 2014 Magnum CI