slather 2.7.3 → 2.7.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
  SHA256:
3
- metadata.gz: f178bd0539ca115a1da1191be8870c014198bfd19f0932e0c0aa4bbc4cde4ef4
4
- data.tar.gz: e2e94ab2f8e93febbd583980e83bbf356a298b2e8f466a2a076b4ecd7ed1c969
3
+ metadata.gz: 2c4a1059a1eae7156ac2c98e509e9cc267e6dd29fbd18332155e94b81c56c3de
4
+ data.tar.gz: b4d09bcb4d70d24e482268791c1a86f80f62a5f9206b3188931dabd1e8673b30
5
5
  SHA512:
6
- metadata.gz: ffb1ae462f2f66a648f7353a327bfa42451f41bee1ffbd391f1de4089efa2a110908070e63b4a3aef4d55297afb10c615b2c4c173d135ec520522dc0ff3fb0fe
7
- data.tar.gz: cf6c0763f817a72e9908cc899b22f03ca343016e29bdc696a87d04577836dd395fb8c975d2533a845ea649779b580aa9ba405125a026b7f6f993911c6e444497
6
+ metadata.gz: 2a526985aec8bbf888ccdf584c3638c97349eddaff3b905df334a88ec42e865f1012c928aa520a3471ad6aadf911e60894576f018230da63aceeb27939a00921
7
+ data.tar.gz: fa77a74cef513c27b2e09101f20b0357c1cf163c1f94b273137a0738fd163bce9700f4e48b76bdfcd2a12e72ba4c3baaf24f0ce86738143f23f87f5a806fcda5
data/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## v2.7.5
4
+
5
+ * Add `--cdn-assets` flag
6
+ [sushant-here](https://github.com/sushant-here)
7
+ [#537](https://github.com/SlatherOrg/slather/pull/537)
8
+
9
+ * Update nokogiri version
10
+
11
+ ## v2.7.4
12
+
13
+ * Support Ruby 3.2.0
14
+ [crazymanish](https://github.com/crazymanish)
15
+ [#532](https://github.com/SlatherOrg/slather/pull/532)
16
+
3
17
  ## v2.7.3
4
18
 
5
19
  * Support Coveralls parallel runs
data/README.md CHANGED
@@ -134,13 +134,14 @@ test:
134
134
 
135
135
  ### Usage with Coveralls
136
136
 
137
- Login to [Coveralls](https://coveralls.io/) and enable your repository. Right now, `slather` supports Coveralls via [Travis CI](https://travis-ci.org) and [CircleCI](https://circleci.com).
137
+ Login to [Coveralls](https://coveralls.io/) and enable your repository. Right now, `slather` supports Coveralls via [Travis CI](https://travis-ci.org), [CircleCI](https://circleci.com), [Jenkins](https://www.jenkins.io/), [Teamcity](https://www.jetbrains.com/teamcity/), [Buildkite](https://buildkite.com/), and [Bitrise](https://bitrise.io/).
138
138
 
139
- Make a `.slather.yml` file:
139
+ Make a `.slather.yml` file and specify the CI Service you're using:
140
140
 
141
141
  ```yml
142
142
  # .slather.yml
143
143
 
144
+ ci_service: circleci | travis_ci | travis_pro | jenkins | buildkite | teamcity
144
145
  coverage_service: coveralls
145
146
  xcodeproj: path/to/project.xcodeproj
146
147
  scheme: YourXcodeSchemeName
@@ -233,6 +234,8 @@ $ slather coverage --html --scheme YourXcodeSchemeName path/to/project.xcodeproj
233
234
 
234
235
  This will make a directory named `html` in your root directory (unless `--output-directory` is specified) and will generate all the reports as static html pages inside the directory. It will print out the report's path by default, but you can also specify `--show` flag to open it in your browser automatically.
235
236
 
237
+ By default, the generated HTML will reference locally hosted assets (js, css). You can specify the `--cdn-assets` to specify that you prefer for the generated HTML to use externally hosted assets. This can be useful if publishing the HTML file as a build artifact.
238
+
236
239
  ### TeamCity Reporting
237
240
 
238
241
  To report the coverage statistics to TeamCity:
@@ -19,6 +19,7 @@ class CoverageCommand < Clamp::Command
19
19
  option ["--json"], :flag, "Output coverage results as simple JSON"
20
20
  option ["--html"], :flag, "Output coverage results as static html pages"
21
21
  option ["--show"], :flag, "Indicate that the static html pages will open automatically"
22
+ option ["--cdn-assets"], :flag, "Indicate that the static html pages will load assets from a CDN"
22
23
 
23
24
  option ["--build-directory", "-b"], "BUILD_DIRECTORY", "The directory where gcno files will be written to. Defaults to derived data."
24
25
  option ["--source-directory"], "SOURCE_DIRECTORY", "The directory where your source files are located."
@@ -126,6 +127,7 @@ class CoverageCommand < Clamp::Command
126
127
  elsif html?
127
128
  project.coverage_service = :html
128
129
  project.show_html = show?
130
+ project.cdn_assets = cdn_assets?
129
131
  elsif json?
130
132
  project.coverage_service = :json
131
133
  elsif sonarqube_xml?
@@ -51,7 +51,7 @@ module Slather
51
51
  gcov_files_created = gcov_output.scan(/creating '(.+\..+\.gcov)'/)
52
52
 
53
53
  gcov_file_name = "./#{source_file_pathname.basename}.gcov"
54
- if File.exists?(gcov_file_name)
54
+ if File.exist?(gcov_file_name)
55
55
  gcov_data = File.new(gcov_file_name).read
56
56
  else
57
57
  gcov_data = ""
@@ -233,10 +233,17 @@ module Slather
233
233
  end
234
234
 
235
235
  def generate_html_template(title, is_index, is_file_empty)
236
- logo_path = "logo.jpg"
237
- css_path = "slather.css"
238
- highlight_js_path = "highlight.pack.js"
239
- list_js_path = "list.min.js"
236
+ if cdn_assets
237
+ logo_path = "https://cdn.jsdelivr.net/gh/SlatherOrg/slather/docs/logo.jpg"
238
+ css_path = "https://cdn.jsdelivr.net/gh/SlatherOrg/slather/assets/slather.css"
239
+ highlight_js_path = "https://cdn.jsdelivr.net/gh/SlatherOrg/slather/assets/highlight.pack.js"
240
+ list_js_path = "https://cdn.jsdelivr.net/gh/SlatherOrg/slather/assets/list.min.js"
241
+ else
242
+ logo_path = "logo.jpg"
243
+ css_path = "slather.css"
244
+ highlight_js_path = "highlight.pack.js"
245
+ list_js_path = "list.min.js"
246
+ end
240
247
 
241
248
  builder = Nokogiri::HTML::Builder.new do |doc|
242
249
  doc.html {
@@ -44,7 +44,7 @@ module Slather
44
44
  class Project < Xcodeproj::Project
45
45
 
46
46
  attr_accessor :build_directory, :ignore_list, :ci_service, :coverage_service, :coverage_access_token, :source_directory,
47
- :output_directory, :xcodeproj, :show_html, :verbose_mode, :input_format, :scheme, :workspace, :binary_file, :binary_basename, :arch, :source_files,
47
+ :output_directory, :xcodeproj, :show_html, :cdn_assets, :verbose_mode, :input_format, :scheme, :workspace, :binary_file, :binary_basename, :arch, :source_files,
48
48
  :decimals, :llvm_version, :configuration
49
49
 
50
50
  alias_method :setup_for_coverage, :slather_setup_for_coverage
@@ -208,7 +208,7 @@ module Slather
208
208
 
209
209
  def profdata_coverage_dir
210
210
  @profdata_coverage_dir ||= begin
211
- raise StandardError, "The specified build directory (#{self.build_directory}) does not exist" unless File.exists?(self.build_directory)
211
+ raise StandardError, "The specified build directory (#{self.build_directory}) does not exist" unless File.exist?(self.build_directory)
212
212
  dir = nil
213
213
  if self.scheme
214
214
  dir = Dir[File.join(build_directory,"/**/CodeCoverage/#{self.scheme}")].first
@@ -503,7 +503,7 @@ module Slather
503
503
  end
504
504
  end
505
505
 
506
- raise StandardError, "No scheme named '#{self.scheme}' found in #{self.path}" unless File.exists? xcscheme_path
506
+ raise StandardError, "No scheme named '#{self.scheme}' found in #{self.path}" unless File.exist? xcscheme_path
507
507
 
508
508
  xcscheme = Xcodeproj::XCScheme.new(xcscheme_path)
509
509
 
@@ -1,3 +1,3 @@
1
1
  module Slather
2
- VERSION = '2.7.3' unless defined?(Slather::VERSION)
2
+ VERSION = '2.7.5' unless defined?(Slather::VERSION)
3
3
  end
data/slather.gemspec CHANGED
@@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
29
29
 
30
30
  spec.add_dependency 'clamp', '~> 1.3'
31
31
  spec.add_dependency 'xcodeproj', '~> 1.21'
32
- spec.add_dependency 'nokogiri', '>= 1.13.9'
32
+ spec.add_dependency 'nokogiri', '>= 1.14.3'
33
33
  spec.add_dependency 'CFPropertyList', '>= 2.2', '< 4'
34
34
 
35
35
  spec.add_runtime_dependency 'activesupport'
@@ -45,7 +45,7 @@ describe Slather::CoverageService::CoberturaXmlOutput do
45
45
  fixtures_project.post
46
46
 
47
47
  filepath = "#{fixtures_project.output_directory}/cobertura.xml"
48
- expect(File.exists?(filepath)).to be_truthy
48
+ expect(File.exist?(filepath)).to be_truthy
49
49
 
50
50
  FileUtils.rm_rf(fixtures_project.output_directory)
51
51
  end
@@ -35,7 +35,7 @@ describe Slather::CoverageService::JsonOutput do
35
35
  fixtures_project.post
36
36
 
37
37
  filepath = "#{fixtures_project.output_directory}/report.json"
38
- expect(File.exists?(filepath)).to be_truthy
38
+ expect(File.exist?(filepath)).to be_truthy
39
39
 
40
40
  FileUtils.rm_rf(fixtures_project.output_directory)
41
41
  end
@@ -38,7 +38,7 @@ describe Slather::CoverageService::LlvmCovOutput do
38
38
  fixtures_project.post
39
39
 
40
40
  filepath = "#{fixtures_project.output_directory}/report.llcov"
41
- expect(File.exists?(filepath)).to be_truthy
41
+ expect(File.exist?(filepath)).to be_truthy
42
42
 
43
43
  FileUtils.rm_rf(fixtures_project.output_directory)
44
44
  end
@@ -38,7 +38,7 @@ describe Slather::CoverageService::SonarqubeXmlOutput do
38
38
  fixtures_project.post
39
39
 
40
40
  filepath = "#{fixtures_project.output_directory}/sonarqube-generic-coverage.xml"
41
- expect(File.exists?(filepath)).to be_truthy
41
+ expect(File.exist?(filepath)).to be_truthy
42
42
 
43
43
  FileUtils.rm_rf(fixtures_project.output_directory)
44
44
  end
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.7.3
4
+ version: 2.7.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Larsen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-11-20 00:00:00.000000000 Z
11
+ date: 2023-10-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -170,14 +170,14 @@ dependencies:
170
170
  requirements:
171
171
  - - ">="
172
172
  - !ruby/object:Gem::Version
173
- version: 1.13.9
173
+ version: 1.14.3
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.13.9
180
+ version: 1.14.3
181
181
  - !ruby/object:Gem::Dependency
182
182
  name: CFPropertyList
183
183
  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.2.22
344
+ rubygems_version: 3.4.10
345
345
  signing_key:
346
346
  specification_version: 4
347
347
  summary: Test coverage reports for Xcode projects