xcov 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/lib/xcov/ignore_handler.rb +10 -5
- 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: 3e237c6cf2adb117d8ef52a834dda469ac74413d
|
4
|
+
data.tar.gz: 1f41de3cd2510bb12a3acb81675d99e31f2bb426
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a28236541164500f2a6db7110a2ee0ec347f7f7fdf66a46e57754f019dcf2226044740266e97c04fa573b7e3a3ed93c023e251eec7cf8cf9c80fd7c1e304ea53
|
7
|
+
data.tar.gz: 9bf9d031e572383bce6d7ffd53ae8a28819dd422bf8fde19d64b960892acb12d4932990b43546ee4076dde64eea888eb551397ac5a616e2bb27a89291095451f
|
data/README.md
CHANGED
@@ -90,6 +90,8 @@ Each one of the filenames you would like to ignore must be prefixed by the dash
|
|
90
90
|
- Carthage/Checkouts
|
91
91
|
```
|
92
92
|
|
93
|
+
**Note:** Ignores are handled case-insensitively. `Pods` will match any of `pods`, `PODS`, or `Pods`.
|
94
|
+
|
93
95
|
### [Fastlane](https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Actions.md)
|
94
96
|
*Fastlane 1.61.0* includes *xcov* as a custom action. You can easily create your coverage reports as follows:
|
95
97
|
```ruby
|
data/lib/xcov/ignore_handler.rb
CHANGED
@@ -5,15 +5,20 @@ module Xcov
|
|
5
5
|
attr_accessor :list
|
6
6
|
|
7
7
|
def initialize
|
8
|
-
|
8
|
+
# We downcase ignored patterns in order to simulate a case-insensitive
|
9
|
+
# comparison later
|
10
|
+
@list = IgnoreHandler.read_ignore_file.map { |file| file.downcase }
|
9
11
|
end
|
10
12
|
|
11
13
|
def should_ignore_file filename
|
12
14
|
return false if @list.empty?
|
13
|
-
|
15
|
+
|
16
|
+
# perform case-insensitive comparisons
|
17
|
+
downcased_filename = filename.downcase
|
18
|
+
return true if @list.include?(downcased_filename)
|
14
19
|
|
15
20
|
# Evaluate possible regexs
|
16
|
-
return @list.any? { |pattern|
|
21
|
+
return @list.any? { |pattern| downcased_filename =~ Regexp.new("#{pattern}$") }
|
17
22
|
end
|
18
23
|
|
19
24
|
def should_ignore_file_at_path path
|
@@ -22,8 +27,8 @@ module Xcov
|
|
22
27
|
return true if should_ignore_file(filename)
|
23
28
|
|
24
29
|
# Also ignore the files from ignored folders
|
25
|
-
relative = relative_path(path)
|
26
|
-
return @list.any? { |ignored_path|
|
30
|
+
relative = relative_path(path).downcase
|
31
|
+
return @list.any? { |ignored_path| relative.start_with? ignored_path }
|
27
32
|
end
|
28
33
|
|
29
34
|
# Static methods
|
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: 1.0.
|
4
|
+
version: 1.0.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: 2017-
|
11
|
+
date: 2017-02-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fastlane
|