xcov 1.7.2 → 1.7.3

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: 26a95dd7fca658d03af6e66ed91e0892274d21141685ca695c24f9dee3bcfa38
4
- data.tar.gz: 8ccfbbb3a937049a2d84c27647ddc176287481498d12e6278132c498b8e36cca
3
+ metadata.gz: 8334d64118f7acb99400f0ca4b47b0eacde9a830a8c8bd9ac81ff4916728657c
4
+ data.tar.gz: 07ca92f5c64f17614f5bb18704b54b639fe78c1e73eabe1f877daa417aff7e9e
5
5
  SHA512:
6
- metadata.gz: bd194fb275c79d1abae0620698c7f22b8e1e8d641df7866cc8c8806ae0008dae9bc411ab0505835ddbc79e8f847d41ef7d8adabb9cc0e77f8d299edf103b3303
7
- data.tar.gz: 9cf2182f5603b65e9b42c65e909c15a88c41ed8f2c35f10c3b8363466094dfa986f6474085c7993220594b75ec3d9d22dba6fe6cc663855152b5bbf576b34f25
6
+ metadata.gz: 75f59b32db70506c183bebffded904dd90fff1513d72324dfea65618f4b86541da2d9075dc287bf8621310a6f73699b96dbfd733530d8271570fd87d8b21f417
7
+ data.tar.gz: e0426b9b98e3c93908e9a43224ee9676bf40a97357c37feb16a203f23f414f1deef509033326a54045506a0ed8da9f535a176bb14c98a9771984a27086114fea
Binary file
@@ -35,6 +35,8 @@ module Xcov
35
35
  submit_to_coveralls(report)
36
36
  tmp_dir = File.join(Xcov.config[:output_directory], 'tmp')
37
37
  FileUtils.rm_rf(tmp_dir) if File.directory?(tmp_dir)
38
+
39
+ json_report
38
40
  end
39
41
 
40
42
  def parse_xccoverage
@@ -8,14 +8,18 @@ module Xcov
8
8
  attr_accessor :type
9
9
  attr_accessor :ignored
10
10
  attr_accessor :coverage
11
+ attr_accessor :coveredLines
12
+ attr_accessor :executableLines
11
13
  attr_accessor :functions
12
14
  attr_accessor :function_templates
13
15
  attr_accessor :lines
14
16
 
15
- def initialize(name, location, coverage, functions, lines = nil)
17
+ def initialize(name, location, coverage, coveredLines, executableLines, functions, lines = nil)
16
18
  @name = CGI::escapeHTML(name)
17
19
  @location = CGI::escapeHTML(location)
18
20
  @coverage = coverage
21
+ @coveredLines = coveredLines
22
+ @executableLines = executableLines
19
23
  @functions = functions
20
24
  @ignored = Xcov.ignore_handler.should_ignore_file_at_path(location)
21
25
  @displayable_coverage = self.create_displayable_coverage
@@ -68,9 +72,11 @@ module Xcov
68
72
  name = dictionary["name"]
69
73
  location = dictionary["location"]
70
74
  coverage = dictionary["coverage"]
75
+ coveredLines = dictionary["coveredLines"]
76
+ executableLines = dictionary["executableLines"]
71
77
  functions = dictionary["functions"].map { |function| Function.map(function)}
72
78
  lines = map_lines(dictionary["lines"])
73
- Source.new(name, location, coverage, functions, lines)
79
+ Source.new(name, location, coverage, coveredLines, executableLines, functions, lines)
74
80
  end
75
81
 
76
82
  def self.map_lines(dictionaries)
@@ -10,7 +10,9 @@ module Xcov
10
10
  def initialize(name, files)
11
11
  @name = CGI::escapeHTML(name)
12
12
  @files = files
13
- @coverage = files.count == 0 ? 0.0 : files.reduce(0) { |acc, file| acc + file.coverage.to_f } / files.count
13
+ totalCoveredLines = files.reduce(0) { |acc, file| acc + file.coveredLines }
14
+ totalExecutableLines = files.reduce(0) { |acc, file| acc + file.executableLines }
15
+ @coverage = files.count == 0 || totalExecutableLines == 0 ? 0.0 : totalCoveredLines.to_f / totalExecutableLines.to_f
14
16
  @displayable_coverage = self.create_displayable_coverage
15
17
  @coverage_color = self.create_coverage_color
16
18
  @id = Target.create_id(name)
@@ -1,6 +1,6 @@
1
1
  module Xcov
2
2
 
3
- VERSION = "1.7.2"
3
+ VERSION = "1.7.3"
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.2
4
+ version: 1.7.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Carlos Vidal
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-01-30 00:00:00.000000000 Z
11
+ date: 2020-04-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fastlane