slather 2.6.0 → 2.7.2
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/.travis.yml +2 -0
- data/CHANGELOG.md +53 -0
- data/assets/slather.css +2 -1
- data/lib/slather/coverage_service/coveralls.rb +56 -1
- data/lib/slather/coverage_service/html_output.rb +51 -2
- data/lib/slather/profdata_coverage_file.rb +42 -2
- data/lib/slather/project.rb +36 -4
- data/lib/slather/version.rb +1 -1
- data/slather.gemspec +2 -2
- data/spec/fixtures/FixtureFramework/FixtureFramework.h +19 -0
- data/spec/fixtures/FixtureFramework/FlashExperiment.swift +7 -0
- data/spec/fixtures/FixtureFramework/Info.plist +24 -0
- data/spec/fixtures/FixtureFrameworkTests/FixtureFrameworkTests.swift +34 -0
- data/spec/fixtures/FixtureFrameworkTests/FlashExperimentTests.swift +9 -0
- data/spec/fixtures/FixtureFrameworkTests/Info.plist +22 -0
- data/spec/fixtures/cobertura.xml +157 -37
- data/spec/fixtures/fixtures.xcodeproj/project.pbxproj +222 -0
- data/spec/fixtures/fixtures.xcodeproj/xcshareddata/xcschemes/fixtures.xcscheme +21 -5
- data/spec/fixtures/fixtures.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- data/spec/slather/coverage_service/html_output_spec.rb +2 -2
- data/spec/slather/profdata_coverage_spec.rb +16 -0
- data/spec/slather/project_spec.rb +10 -6
- metadata +20 -6
@@ -26,7 +26,18 @@
|
|
26
26
|
buildConfiguration = "Debug"
|
27
27
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
28
28
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
29
|
-
shouldUseLaunchSchemeArgsEnv = "YES"
|
29
|
+
shouldUseLaunchSchemeArgsEnv = "YES"
|
30
|
+
codeCoverageEnabled = "YES"
|
31
|
+
onlyGenerateCoverageForSpecifiedTargets = "YES">
|
32
|
+
<CodeCoverageTargets>
|
33
|
+
<BuildableReference
|
34
|
+
BuildableIdentifier = "primary"
|
35
|
+
BlueprintIdentifier = "B1E6980125F96B670086A3E2"
|
36
|
+
BuildableName = "FixtureFramework.framework"
|
37
|
+
BlueprintName = "FixtureFramework"
|
38
|
+
ReferencedContainer = "container:fixtures.xcodeproj">
|
39
|
+
</BuildableReference>
|
40
|
+
</CodeCoverageTargets>
|
30
41
|
<Testables>
|
31
42
|
<TestableReference
|
32
43
|
skipped = "NO">
|
@@ -39,8 +50,6 @@
|
|
39
50
|
</BuildableReference>
|
40
51
|
</TestableReference>
|
41
52
|
</Testables>
|
42
|
-
<AdditionalOptions>
|
43
|
-
</AdditionalOptions>
|
44
53
|
</TestAction>
|
45
54
|
<LaunchAction
|
46
55
|
buildConfiguration = "Debug"
|
@@ -61,8 +70,6 @@
|
|
61
70
|
ReferencedContainer = "container:fixtures.xcodeproj">
|
62
71
|
</BuildableReference>
|
63
72
|
</MacroExpansion>
|
64
|
-
<AdditionalOptions>
|
65
|
-
</AdditionalOptions>
|
66
73
|
</LaunchAction>
|
67
74
|
<ProfileAction
|
68
75
|
buildConfiguration = "Release"
|
@@ -70,6 +77,15 @@
|
|
70
77
|
savedToolIdentifier = ""
|
71
78
|
useCustomWorkingDirectory = "NO"
|
72
79
|
debugDocumentVersioning = "YES">
|
80
|
+
<MacroExpansion>
|
81
|
+
<BuildableReference
|
82
|
+
BuildableIdentifier = "primary"
|
83
|
+
BlueprintIdentifier = "8C9A202C195965F10013B6B3"
|
84
|
+
BuildableName = "libfixtures.a"
|
85
|
+
BlueprintName = "fixtures"
|
86
|
+
ReferencedContainer = "container:fixtures.xcodeproj">
|
87
|
+
</BuildableReference>
|
88
|
+
</MacroExpansion>
|
73
89
|
</ProfileAction>
|
74
90
|
<AnalyzeAction
|
75
91
|
buildConfiguration = "Debug">
|
@@ -185,8 +185,8 @@ describe Slather::CoverageService::HtmlOutput do
|
|
185
185
|
end
|
186
186
|
|
187
187
|
allow(fixtures_project).to receive(:input_format).and_return("profdata")
|
188
|
-
allow(fixtures_project).to receive(:
|
189
|
-
|
188
|
+
allow(fixtures_project).to receive(:pathnames_per_binary).and_return([{"filename" => Pathname.new("./spec/fixtures/fixtures/other_fixtures.m"), "segments" => []}])
|
189
|
+
allow(fixtures_project).to receive(:profdata_llvm_cov_output).and_return("1| |//
|
190
190
|
2| |// other_fixtures.m
|
191
191
|
3| |// fixtures
|
192
192
|
4| |//
|
@@ -157,6 +157,22 @@ describe Slather::ProfdataCoverageFile do
|
|
157
157
|
end
|
158
158
|
end
|
159
159
|
|
160
|
+
describe "#branch_coverage_data" do
|
161
|
+
it "should have branch data for line 19" do
|
162
|
+
# these segments correspond to the only statement on line 19
|
163
|
+
profdata_coverage_file.segments = [[19, 9, 0, true, false], [19, 20, 1, true, false]]
|
164
|
+
expect(profdata_coverage_file.branch_coverage_data[19]).to eq([0,1])
|
165
|
+
end
|
166
|
+
it "should have missing region data for line 19" do
|
167
|
+
profdata_coverage_file.segments = [[19, 9, 0, true, false], [19, 20, 1, true, false]]
|
168
|
+
expect(profdata_coverage_file.branch_region_data[19]).to eq([[8,11]])
|
169
|
+
end
|
170
|
+
it "should have two missing region data for line 19" do
|
171
|
+
profdata_coverage_file.segments = [[19, 9, 0, true, false], [19, 20, 1, true, false], [19, 30, 0, true, false], [19, 40, 1, true, true]]
|
172
|
+
expect(profdata_coverage_file.branch_region_data[19]).to eq([[8,11], [29,10]])
|
173
|
+
end
|
174
|
+
end
|
175
|
+
|
160
176
|
describe "#ignored" do
|
161
177
|
|
162
178
|
before(:each) {
|
@@ -243,8 +243,9 @@ describe Slather::Project do
|
|
243
243
|
allow(fixtures_project).to receive(:scheme).and_return("fixtures")
|
244
244
|
fixtures_project.send(:configure_binary_file)
|
245
245
|
binary_file_location = fixtures_project.send(:binary_file)
|
246
|
-
expect(binary_file_location.count).to eq(
|
247
|
-
expect(binary_file_location.first).to end_with("Debug/
|
246
|
+
expect(binary_file_location.count).to eq(2)
|
247
|
+
expect(binary_file_location.first).to end_with("Debug/FixtureFramework.framework/Versions/A/FixtureFramework")
|
248
|
+
expect(binary_file_location.last).to end_with("Debug/fixturesTests.xctest/Contents/MacOS/fixturesTests")
|
248
249
|
end
|
249
250
|
|
250
251
|
it "should find the product path provided a workspace and scheme" do
|
@@ -252,8 +253,9 @@ describe Slather::Project do
|
|
252
253
|
allow(fixtures_project).to receive(:scheme).and_return("fixtures")
|
253
254
|
fixtures_project.send(:configure_binary_file)
|
254
255
|
binary_file_location = fixtures_project.send(:binary_file)
|
255
|
-
expect(binary_file_location.count).to eq(
|
256
|
-
expect(binary_file_location.first).to end_with("Debug/
|
256
|
+
expect(binary_file_location.count).to eq(2)
|
257
|
+
expect(binary_file_location.first).to end_with("Debug/FixtureFramework.framework/Versions/A/FixtureFramework")
|
258
|
+
expect(binary_file_location.last).to end_with("Debug/fixturesTests.xctest/Contents/MacOS/fixturesTests")
|
257
259
|
end
|
258
260
|
|
259
261
|
it "should find the product path for a scheme with no buildable products" do
|
@@ -664,10 +666,12 @@ describe Slather::Project do
|
|
664
666
|
{
|
665
667
|
"files":[
|
666
668
|
{
|
667
|
-
"filename":"spec/fixtures/fixtures/fixtures.m"
|
669
|
+
"filename":"spec/fixtures/fixtures/fixtures.m",
|
670
|
+
"segments": []
|
668
671
|
},
|
669
672
|
{
|
670
|
-
"filename":"spec/fixtures/fixturesTwo/fixturesTwo.m"
|
673
|
+
"filename":"spec/fixtures/fixturesTwo/fixturesTwo.m",
|
674
|
+
"segments": []
|
671
675
|
}
|
672
676
|
]
|
673
677
|
}
|
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.
|
4
|
+
version: 2.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark Larsen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-10-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -156,28 +156,28 @@ dependencies:
|
|
156
156
|
requirements:
|
157
157
|
- - "~>"
|
158
158
|
- !ruby/object:Gem::Version
|
159
|
-
version: '1.
|
159
|
+
version: '1.21'
|
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.21'
|
167
167
|
- !ruby/object:Gem::Dependency
|
168
168
|
name: nokogiri
|
169
169
|
requirement: !ruby/object:Gem::Requirement
|
170
170
|
requirements:
|
171
171
|
- - "~>"
|
172
172
|
- !ruby/object:Gem::Version
|
173
|
-
version: '1.
|
173
|
+
version: '1.12'
|
174
174
|
type: :runtime
|
175
175
|
prerelease: false
|
176
176
|
version_requirements: !ruby/object:Gem::Requirement
|
177
177
|
requirements:
|
178
178
|
- - "~>"
|
179
179
|
- !ruby/object:Gem::Version
|
180
|
-
version: '1.
|
180
|
+
version: '1.12'
|
181
181
|
- !ruby/object:Gem::Dependency
|
182
182
|
name: CFPropertyList
|
183
183
|
requirement: !ruby/object:Gem::Requirement
|
@@ -255,6 +255,12 @@ files:
|
|
255
255
|
- lib/slather/project.rb
|
256
256
|
- lib/slather/version.rb
|
257
257
|
- slather.gemspec
|
258
|
+
- spec/fixtures/FixtureFramework/FixtureFramework.h
|
259
|
+
- spec/fixtures/FixtureFramework/FlashExperiment.swift
|
260
|
+
- spec/fixtures/FixtureFramework/Info.plist
|
261
|
+
- spec/fixtures/FixtureFrameworkTests/FixtureFrameworkTests.swift
|
262
|
+
- spec/fixtures/FixtureFrameworkTests/FlashExperimentTests.swift
|
263
|
+
- spec/fixtures/FixtureFrameworkTests/Info.plist
|
258
264
|
- spec/fixtures/cobertura.xml
|
259
265
|
- spec/fixtures/fixtures.xcodeproj/project.pbxproj
|
260
266
|
- spec/fixtures/fixtures.xcodeproj/project.xcworkspace/contents.xcworkspacedata
|
@@ -264,6 +270,7 @@ files:
|
|
264
270
|
- spec/fixtures/fixtures.xcodeproj/xcshareddata/xcschemes/fixturesTestsSecond.xcscheme
|
265
271
|
- spec/fixtures/fixtures.xcodeproj/xcshareddata/xcschemes/fixturesTwo.xcscheme
|
266
272
|
- spec/fixtures/fixtures.xcworkspace/contents.xcworkspacedata
|
273
|
+
- spec/fixtures/fixtures.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
|
267
274
|
- spec/fixtures/fixtures.xcworkspace/xcshareddata/xcschemes/fixturesTestsWorkspace.xcscheme
|
268
275
|
- spec/fixtures/fixtures/Fixtures.swift
|
269
276
|
- spec/fixtures/fixtures/Supporting Files/fixtures-Prefix.pch
|
@@ -339,6 +346,12 @@ signing_key:
|
|
339
346
|
specification_version: 4
|
340
347
|
summary: Test coverage reports for Xcode projects
|
341
348
|
test_files:
|
349
|
+
- spec/fixtures/FixtureFramework/FixtureFramework.h
|
350
|
+
- spec/fixtures/FixtureFramework/FlashExperiment.swift
|
351
|
+
- spec/fixtures/FixtureFramework/Info.plist
|
352
|
+
- spec/fixtures/FixtureFrameworkTests/FixtureFrameworkTests.swift
|
353
|
+
- spec/fixtures/FixtureFrameworkTests/FlashExperimentTests.swift
|
354
|
+
- spec/fixtures/FixtureFrameworkTests/Info.plist
|
342
355
|
- spec/fixtures/cobertura.xml
|
343
356
|
- spec/fixtures/fixtures.xcodeproj/project.pbxproj
|
344
357
|
- spec/fixtures/fixtures.xcodeproj/project.xcworkspace/contents.xcworkspacedata
|
@@ -348,6 +361,7 @@ test_files:
|
|
348
361
|
- spec/fixtures/fixtures.xcodeproj/xcshareddata/xcschemes/fixturesTestsSecond.xcscheme
|
349
362
|
- spec/fixtures/fixtures.xcodeproj/xcshareddata/xcschemes/fixturesTwo.xcscheme
|
350
363
|
- spec/fixtures/fixtures.xcworkspace/contents.xcworkspacedata
|
364
|
+
- spec/fixtures/fixtures.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
|
351
365
|
- spec/fixtures/fixtures.xcworkspace/xcshareddata/xcschemes/fixturesTestsWorkspace.xcscheme
|
352
366
|
- spec/fixtures/fixtures/Fixtures.swift
|
353
367
|
- spec/fixtures/fixtures/Supporting Files/fixtures-Prefix.pch
|