xcov 0.12.4 → 0.12.5
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 +4 -4
- data/lib/xcov/model/target.rb +14 -2
- data/lib/xcov/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3bdbe837c78361b3aeaf31da767e58129ccd508d
|
4
|
+
data.tar.gz: 4f2f77ba7fd3921e11a89f12f974181d33e8f469
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a8ac0d10a2ece773d76ff02f7394c244f8d992bc951826367fbaa2e4e5df9b1601a3c71c4c0a4be42221e8243c4f9237b4d55281ab79ea1bbbfb2650037322f7
|
7
|
+
data.tar.gz: 5ba1246ccfb26b870b46494848b901592c61a2e68bc1bf72a7d37977bdea6864859b7f3fcd9fef976793fbf630a78a409f6b600dd40e4602653c8dd466904726
|
data/lib/xcov/model/target.rb
CHANGED
@@ -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
|
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
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
|
+
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-
|
11
|
+
date: 2016-12-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fastlane
|