slather 2.8.3 → 2.8.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +5 -1
- data/CHANGELOG.md +11 -1
- data/lib/slather/project.rb +25 -11
- data/lib/slather/version.rb +1 -1
- data/slather.gemspec +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5b2390d1df8d9295fc1239bcaba55dcc176a8d31a755fab5e4e1185ee27bc1a7
|
4
|
+
data.tar.gz: 3f85d92eaf943f25c799b70798b7f86f2196e51e44470ba84ea4adc02b919d52
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d47d53bd5a72e09598140ff646dcd7cde3581387433edbd4d30d49ff468956f446d85fe9a4800092b54ab133b95ac8738c79168836f1562b7c394a9696c71bf0
|
7
|
+
data.tar.gz: 85da0669f94911b362e2d5dd23789a540762e2c3b40cd880ac8b274aa253249bb71525735d5ec72289ecb8926755a7b4067d2b7803f42e9a7a2ec3d38f4fc439
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,16 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
-
## v2.8.
|
3
|
+
## v2.8.4
|
4
|
+
|
5
|
+
* Don't crash when 0% coverage is causing empty JSON
|
6
|
+
[jarrodlombardo-EventBase](https://github.com/jarrodlombardo-EventBase)
|
7
|
+
[#570](https://github.com/SlatherOrg/slather/pull/570)
|
8
|
+
|
9
|
+
* Xcode 16 compatibility (as of beta 5)
|
10
|
+
[ksuther](https://github.com/ksuther)
|
11
|
+
[#568](https://github.com/SlatherOrg/slather/pull/568)
|
12
|
+
|
13
|
+
## v2.8.3
|
4
14
|
|
5
15
|
* Fix coverage_file.source_file_pathname
|
6
16
|
[alfredofernandes](https://github.com/alfredofernandes)
|
data/lib/slather/project.rb
CHANGED
@@ -132,21 +132,26 @@ module Slather
|
|
132
132
|
|
133
133
|
def pathnames_per_binary(binary_path)
|
134
134
|
coverage_json_string = llvm_cov_export_output(binary_path)
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
135
|
+
if coverage_json_string.strip != ""
|
136
|
+
# JSON.parse will crash on an empty string, so just skip everything if the string is empty.
|
137
|
+
coverage_json = JSON.parse(coverage_json_string)
|
138
|
+
coverage_json["data"].reduce([]) do |result, chunk|
|
139
|
+
result.concat(chunk["files"].map do |file|
|
140
|
+
filename = file["filename"]
|
141
|
+
path = Pathname(filename)
|
142
|
+
# Don't crash if the file doesn't exist on disk.
|
143
|
+
# This may happen for autogenerated files that have been deleted.
|
144
|
+
filename = path.exist? ? path.realpath : filename
|
145
|
+
{"filename" => filename, "segments" => file["segments"]}
|
146
|
+
end)
|
147
|
+
end
|
145
148
|
end
|
146
149
|
end
|
147
150
|
private :pathnames_per_binary
|
148
151
|
|
149
152
|
def create_coverage_files_for_binary(binary_path, pathnames_per_binary)
|
153
|
+
return [] unless pathnames_per_binary != nil
|
154
|
+
|
150
155
|
coverage_files = []
|
151
156
|
|
152
157
|
begin
|
@@ -482,7 +487,16 @@ module Slather
|
|
482
487
|
def find_binary_file_in_bundle(bundle_file)
|
483
488
|
if File.directory? bundle_file
|
484
489
|
bundle_file_noext = File.basename(bundle_file, File.extname(bundle_file))
|
485
|
-
|
490
|
+
|
491
|
+
# Search for .debug.dylib binaries
|
492
|
+
# See https://developer.apple.com/documentation/xcode/build-settings-reference#Enable-Debug-Dylib-Support for details
|
493
|
+
debug_dylib_matches = Dir["#{bundle_file}/**/#{bundle_file_noext}.debug.dylib"]
|
494
|
+
|
495
|
+
if debug_dylib_matches.length() > 0
|
496
|
+
debug_dylib_matches.first
|
497
|
+
else
|
498
|
+
Dir["#{bundle_file}/**/#{bundle_file_noext}"].first
|
499
|
+
end
|
486
500
|
else
|
487
501
|
bundle_file
|
488
502
|
end
|
data/lib/slather/version.rb
CHANGED
data/slather.gemspec
CHANGED
@@ -28,7 +28,7 @@ Gem::Specification.new do |spec|
|
|
28
28
|
spec.add_development_dependency 'equivalent-xml', '~> 0.6'
|
29
29
|
|
30
30
|
spec.add_dependency 'clamp', '~> 1.3'
|
31
|
-
spec.add_dependency 'xcodeproj', '~> 1.
|
31
|
+
spec.add_dependency 'xcodeproj', '~> 1.25'
|
32
32
|
spec.add_dependency 'nokogiri', '>= 1.14.3'
|
33
33
|
spec.add_dependency 'CFPropertyList', '>= 2.2', '< 4'
|
34
34
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: slather
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.8.
|
4
|
+
version: 2.8.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark Larsen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-09-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -156,14 +156,14 @@ dependencies:
|
|
156
156
|
requirements:
|
157
157
|
- - "~>"
|
158
158
|
- !ruby/object:Gem::Version
|
159
|
-
version: '1.
|
159
|
+
version: '1.25'
|
160
160
|
type: :runtime
|
161
161
|
prerelease: false
|
162
162
|
version_requirements: !ruby/object:Gem::Requirement
|
163
163
|
requirements:
|
164
164
|
- - "~>"
|
165
165
|
- !ruby/object:Gem::Version
|
166
|
-
version: '1.
|
166
|
+
version: '1.25'
|
167
167
|
- !ruby/object:Gem::Dependency
|
168
168
|
name: nokogiri
|
169
169
|
requirement: !ruby/object:Gem::Requirement
|
@@ -341,7 +341,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
341
341
|
- !ruby/object:Gem::Version
|
342
342
|
version: '0'
|
343
343
|
requirements: []
|
344
|
-
rubygems_version: 3.5.
|
344
|
+
rubygems_version: 3.5.18
|
345
345
|
signing_key:
|
346
346
|
specification_version: 4
|
347
347
|
summary: Test coverage reports for Xcode projects
|