simplecov-lcov 0.2.0 → 0.2.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 34cd28b3146b636fe1e78b3c19b73f575b223a93
4
- data.tar.gz: db1b370802df784c9d861930195785b140d64ffa
3
+ metadata.gz: e3a0fb9ae11e72faa2bd751ac2f665175d75f4f3
4
+ data.tar.gz: 52ec3110dfebe84b8190f87ecb5167e5f70ce5af
5
5
  SHA512:
6
- metadata.gz: c949498594b903c6f8be29e0c52579764cca1e88da563c55f4c9534c3b6ae33590fbc38dd6fdba76ed31c646a910f8a4a4c6bc2ced874fae83c560ecec6e2fb2
7
- data.tar.gz: b1b8c0f889eb52df9453544bb992f56d3e859d8d4e16bb452b43924162f8b89ea82e45039a521e8a0427f33fa56cb8c9367fb71ac2188ef3f4da0abcc0e2c2d2
6
+ metadata.gz: 24814ec68025fff24603c9ba713f9fc92a8f701083dae4cac08dfeb75392bea72a9f518175895e8f3803681d45946fc6da703cb02cc9da11b91bfc368b9534cf
7
+ data.tar.gz: 785aa1ba6061cc616b9ebf8e1c98f2a776a910d34e629d44579556fc6481520f96bf3ab7cf9a53dfa4e70e66683f520b7aea044e64722421ceb490bb51d11c2d
data/README.markdown CHANGED
@@ -5,6 +5,9 @@ Custom SimpleCov formatter to generate a lcov style coverage.
5
5
  [![Build Status](https://travis-ci.org/fortissimo1997/simplecov-lcov.svg?branch=master)](https://travis-ci.org/fortissimo1997/simplecov-lcov)
6
6
  [![Coverage Status](https://img.shields.io/coveralls/fortissimo1997/simplecov-lcov.svg)](https://coveralls.io/r/fortissimo1997/simplecov-lcov)
7
7
  [![Gem Version](https://badge.fury.io/rb/simplecov-lcov.svg)](http://badge.fury.io/rb/simplecov-lcov)
8
+ [![Inline docs](http://inch-ci.org/github/fortissimo1997/simplecov-lcov.svg?branch=master)](http://inch-ci.org/github/fortissimo1997/simplecov-lcov)
9
+ [![Code Climate](https://codeclimate.com/github/fortissimo1997/simplecov-lcov.png)](https://codeclimate.com/github/fortissimo1997/simplecov-lcov)
10
+ [![Dependency Status](https://gemnasium.com/fortissimo1997/simplecov-lcov.svg)](https://gemnasium.com/fortissimo1997/simplecov-lcov)
8
11
 
9
12
  ## Usage
10
13
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.0
1
+ 0.2.1
@@ -68,13 +68,21 @@ module SimpleCov
68
68
  end
69
69
 
70
70
  def format_file(file)
71
- "SF:#{file.filename}\n".tap do |content|
72
- file.lines.reject(&:never?).reject(&:skipped?)
73
- .each do |line|
74
- content << "DA:#{line.number},#{line.coverage}\n"
75
- end
76
- content << "end_of_record\n"
77
- end
71
+ "SF:#{file.filename}\n#{format_lines(file)}\nend_of_record\n"
72
+ end
73
+
74
+ def format_lines(file)
75
+ filtered_lines(file)
76
+ .map { |line| format_line(line) }
77
+ .join("\n")
78
+ end
79
+
80
+ def filtered_lines(file)
81
+ file.lines.reject(&:never?).reject(&:skipped?)
82
+ end
83
+
84
+ def format_line(line)
85
+ "DA:#{line.number},#{line.coverage}"
78
86
  end
79
87
  end
80
88
  end
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "simplecov-lcov"
8
- s.version = "0.2.0"
8
+ s.version = "0.2.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["fortissimo1997"]
12
- s.date = "2014-06-02"
12
+ s.date = "2014-06-25"
13
13
  s.description = "Custom SimpleCov formatter to generate a lcov style coverage."
14
14
  s.email = "fortissimo1997@gmail.com"
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simplecov-lcov
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - fortissimo1997
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-02 00:00:00.000000000 Z
11
+ date: 2014-06-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec