xcov 1.7.0 → 1.7.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0b96135c42bcad3bc99bd0a7bd8a703311df3455e99c8c3b303bc20b7b43d1fe
4
- data.tar.gz: af66a0c17ae43ced2ddce57187c7baf9764e48d90f2c9836f01e371a11265adb
3
+ metadata.gz: 18dce8e7c8f0139148548de4cc8ac57523f382e72a32bbcb09054a4856c87a8e
4
+ data.tar.gz: dd95fa78b0bc924dbb7cb457a58cc7f4bcc1462be98ebc805a7b249f1574ae9f
5
5
  SHA512:
6
- metadata.gz: 2ecbcbdd82fd7abaef6c34c2f7631ca88af1482d77c85074e2a6e7c07bce6fab54dc25bddaf7c676794e8203bf4fe8937b4ee03449577926eb03d11a96f422da
7
- data.tar.gz: b185daa8cb390aab36b322bb8b127668f036a0ebba509d43aa43c1ae8228845e54e69a18e6fa1bd207470c2e9a0f5d39c52005982404b2ace02364a85d3564d6
6
+ metadata.gz: 4cbdcd8b07f093acd7e3af63b4c7a95df603b93464694265aa233a0d765e517f2c7ee61dd1e21babcd827491f484fc3f83720857ca32d3d2dde7344628b9d8ad
7
+ data.tar.gz: a0c47d29fa3ba3604dac5e22dbd3049053a6bac20a99f9a18bc5b52ded4692c5488f1c37d860ad1b2f73f2419d8b615d7e555d3701260b27d55be5615cd2de6c
@@ -7,10 +7,10 @@ module Xcov
7
7
  attr_accessor :files
8
8
  attr_accessor :file_templates
9
9
 
10
- def initialize(name, coverage, files)
10
+ def initialize(name, files)
11
11
  @name = CGI::escapeHTML(name)
12
12
  @files = files
13
- @coverage = coverage
13
+ @coverage = files.count == 0 ? 0.0 : files.reduce(0) { |acc, file| acc + file.coverage.to_f } / files.count
14
14
  @displayable_coverage = self.create_displayable_coverage
15
15
  @coverage_color = self.create_coverage_color
16
16
  @id = Target.create_id(name)
@@ -53,12 +53,11 @@ module Xcov
53
53
 
54
54
  def self.map(dictionary)
55
55
  name = dictionary["name"]
56
- coverage = dictionary["coverage"]
57
56
  files = dictionary["files"].map { |file| Source.map(file)}
58
57
  files = files.sort &by_coverage_with_ignored_at_the_end
59
58
  non_ignored_files = Target.select_non_ignored_files(files)
60
59
 
61
- Target.new(name, coverage, non_ignored_files)
60
+ Target.new(name, non_ignored_files)
62
61
  end
63
62
 
64
63
  def self.by_coverage_with_ignored_at_the_end
@@ -1,6 +1,6 @@
1
1
  module Xcov
2
2
 
3
- VERSION = "1.7.0"
3
+ VERSION = "1.7.1"
4
4
  DESCRIPTION = "xcov is a friendly visualizer for Xcode's code coverage files"
5
5
 
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xcov
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.0
4
+ version: 1.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Carlos Vidal
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-10-30 00:00:00.000000000 Z
11
+ date: 2020-01-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fastlane
@@ -209,8 +209,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
209
209
  - !ruby/object:Gem::Version
210
210
  version: '0'
211
211
  requirements: []
212
- rubyforge_project:
213
- rubygems_version: 2.7.6
212
+ rubygems_version: 3.0.3
214
213
  signing_key:
215
214
  specification_version: 4
216
215
  summary: xcov is a friendly visualizer for Xcode's code coverage files