xcov 0.12.4 → 0.12.5

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
  SHA1:
3
- metadata.gz: d106da45d99aa9a236efa84cd450f3d05629e6da
4
- data.tar.gz: 54e174d22410d0269b6d69b96242cd1b1999c52e
3
+ metadata.gz: 3bdbe837c78361b3aeaf31da767e58129ccd508d
4
+ data.tar.gz: 4f2f77ba7fd3921e11a89f12f974181d33e8f469
5
5
  SHA512:
6
- metadata.gz: 30488289dd3e3610f1f1d86d8abfa58f144decee8f5018d9b2c8a3d84b109644206e0447aa5f4e15313667aacd7d5cc752e7549f19c20e48c89dfd4bfa0761fa
7
- data.tar.gz: 837a0d3730f72e5d2cf81484c65531ba229e64cff19bf12db5204d63a959b61c133b4f1bdd1716a48f01269ae9d278e85121ff41feb5b14dfde97e01437706d3
6
+ metadata.gz: a8ac0d10a2ece773d76ff02f7394c244f8d992bc951826367fbaa2e4e5df9b1601a3c71c4c0a4be42221e8243c4f9237b4d55281ab79ea1bbbfb2650037322f7
7
+ data.tar.gz: 5ba1246ccfb26b870b46494848b901592c61a2e68bc1bf72a7d37977bdea6864859b7f3fcd9fef976793fbf630a78a409f6b600dd40e4602653c8dd466904726
@@ -55,8 +55,7 @@ module Xcov
55
55
  def self.map (dictionary)
56
56
  name = dictionary["name"]
57
57
  files = dictionary["files"].map { |file| Source.map(file)}
58
- files = files.sort! { |lhs, rhs| lhs.coverage <=> rhs.coverage }
59
- .sort! { |lhs, rhs| (lhs.ignored ? 1:0) <=> (rhs.ignored ? 1:0) }
58
+ files = files.sort &by_coverage_with_ignored_at_the_end
60
59
  coverage = Target.calculate_coverage(files)
61
60
 
62
61
  Target.new(name, coverage, files)
@@ -71,5 +70,18 @@ module Xcov
71
70
  coverage
72
71
  end
73
72
 
73
+ def self.by_coverage_with_ignored_at_the_end
74
+ lambda { |lhs, rhs|
75
+ if lhs.ignored == rhs.ignored
76
+ # sort by coverage if files are both ignored
77
+ # or none of them are ignored
78
+ (lhs.coverage <=> rhs.coverage)
79
+ else
80
+ # ignored files will come at the end
81
+ (lhs.ignored ? 1:0) <=> (rhs.ignored ? 1:0)
82
+ end
83
+ }
84
+ end
85
+
74
86
  end
75
87
  end
data/lib/xcov/version.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  module Xcov
2
2
 
3
- VERSION = "0.12.4"
3
+ VERSION = "0.12.5"
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: 0.12.4
4
+ version: 0.12.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Carlos Vidal
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-12-16 00:00:00.000000000 Z
11
+ date: 2016-12-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fastlane