simplecov-json 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +5 -5
  2. data/lib/simplecov-json.rb +5 -1
  3. metadata +4 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: 5d984a5390c3d3ad94ac2e5210faf257bb64958336119afc20e8f2c11e4aa2b2
4
- data.tar.gz: 4d04e4ee89e583b2f1a8a4e5434454e8697cbbd9084cd871b0ee9e213744b96a
2
+ SHA1:
3
+ metadata.gz: 6c6d2e2f58b8e16bd7838a59972404006a22f56e
4
+ data.tar.gz: 28f152456fcb9579f5bc89bfd47dcac9a0186135
5
5
  SHA512:
6
- metadata.gz: 52d7be5f199a2c7915c8670be49c7589df1036600fc622aa6de812ade1a6ff10a54180f381bd1586824218f01371a2dfaead73c27ff5d435463d55f085573f7c
7
- data.tar.gz: 479f6a00fee190421e56067d2ebd8a93b784e385d16ebb3904d3f70704e8a4ced822384110dec38961458625054564f9ba2ce8895dd7cf49f1e94ded8e02081c
6
+ metadata.gz: 40e7895fc9fc62a1aba597b497c6f55468ad146af489bbd9fc2491329be57880449aad3d65be70a4ce79ecf4ee2214a2cb78b89579ea3cbba7e8e21812a1a01d
7
+ data.tar.gz: 2835a6d410778cc2ce5978cdd3640e16c3897bafdbb8e56099b53a334a1bdbc877ad39cd49b42a0384b8a6dd8a778d4c0a6686416798238e24269c355c2c0e45
@@ -10,10 +10,14 @@ class SimpleCov::Formatter::JSONFormatter
10
10
  data[:files] = []
11
11
  result.files.each do |sourceFile|
12
12
  next unless result.filenames.include? sourceFile.filename
13
+
14
+ # Compatible with older versions of simplecov.
15
+ coverage_data = (defined? sourceFile.coverage) ? sourceFile.coverage : sourceFile.coverage_data
16
+
13
17
  data[:files] << {
14
18
  filename: sourceFile.filename,
15
19
  covered_percent: sourceFile.covered_percent,
16
- coverage: sourceFile.coverage_data,
20
+ coverage: coverage_data,
17
21
  covered_strength: sourceFile.covered_strength.nan? ? 0.0 : sourceFile.covered_strength,
18
22
  covered_lines: sourceFile.covered_lines.count,
19
23
  lines_of_code: sourceFile.lines_of_code,
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simplecov-json
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vicent Llongo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-24 00:00:00.000000000 Z
11
+ date: 2020-10-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: simplecov
@@ -80,7 +80,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
80
80
  - !ruby/object:Gem::Version
81
81
  version: '0'
82
82
  requirements: []
83
- rubygems_version: 3.0.3
83
+ rubyforge_project: simplecov-json
84
+ rubygems_version: 2.5.2.3
84
85
  signing_key:
85
86
  specification_version: 4
86
87
  summary: JSON formatter for SimpleCov code coverage tool for ruby 1.9+