simplecov-html 0.13.0 → 0.13.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 39f6a1e464a4a4dc7f8909490225ad044486055ae1cefe8978738c95651c9ad8
4
- data.tar.gz: b406a23cdb0e57671df0e919073aabb7147b0166521c630ac39ab3c0bf659af4
3
+ metadata.gz: ad238948a5b036d69b09b10f3e1738bcdccfb714ae4416080ac67f2977727e3c
4
+ data.tar.gz: df6f5d277fdfbc15cfca11f8d38597b8d0d0779b7ce91118de700d537542755c
5
5
  SHA512:
6
- metadata.gz: 9cecd560f071e8b9f37b7fa70354c49748704f69d318a35e844cfe03848fba01b01bdb4d4e973c5219d0aeda318e5f4abc143e78d4beaeca13b27e1ae94594b5
7
- data.tar.gz: 51b3f7d1541d4a9bddb1e05a20a0c03dc6cde3885c366b914dfd4bdb4dbdea2283a26bfd648b631e1deda38acd4cd6d91d131c3271b6fafe95e4d82272328d6f
6
+ metadata.gz: c614b1955ed30748c919d5053b8a0db0ed21c5bf61465dd3a6b881b2b6e5676445a01a8928e3d1af9ac6721f851896a0826b250c274495f2addcd4f6b4990ad6
7
+ data.tar.gz: e9b4bf13db9062642ab822132affeb5642ae8c1f197e5d5b71968f1c3cc73aeb37ffd3ad838164278cb60ce211a2b338441e4ebdcbc9c3318dfedec8a34ba48b
data/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ 0.13.2 (2025-07-16)
2
+ ==================
3
+
4
+ ## Misc
5
+ * Stop requiring cgi for Ruby 3.5 compatibility. See [#149](https://github.com/simplecov-ruby/simplecov-html/pull/149) (thanks [@Earlopain](https://github.com/Earlopain)).
6
+
7
+ 0.13.1 (2024-09-09)
8
+ ==================
9
+
10
+ ## Misc
11
+ * Drop base64 dependency. See [#144](https://github.com/simplecov-ruby/simplecov-html/pull/144) (thanks [@Earlopain](https://github.com/Earlopain)).
12
+
1
13
  0.13.0 (2024-09-08)
2
14
  ==================
3
15
 
@@ -3,7 +3,7 @@
3
3
  module SimpleCov
4
4
  module Formatter
5
5
  class HTMLFormatter
6
- VERSION = "0.13.0"
6
+ VERSION = "0.13.2"
7
7
  end
8
8
  end
9
9
  end
@@ -1,11 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "erb"
4
- require "cgi"
5
4
  require "fileutils"
6
5
  require "digest/sha1"
7
6
  require "time"
8
- require "base64"
9
7
 
10
8
  # Ensure we are using a compatible version of SimpleCov
11
9
  major, minor, patch = SimpleCov::VERSION.scan(/\d+/).first(3).map(&:to_i)
@@ -17,6 +15,14 @@ end
17
15
  module SimpleCov
18
16
  module Formatter
19
17
  class HTMLFormatter
18
+ # Only have a few content types, just hardcode them
19
+ CONTENT_TYPES = {
20
+ ".js" => "text/javascript",
21
+ ".png" => "image/png",
22
+ ".gif" => "image/gif",
23
+ ".css" => "text/css",
24
+ }.freeze
25
+
20
26
  def initialize
21
27
  @branchable_result = SimpleCov.branch_coverage?
22
28
  @templates = {}
@@ -84,17 +90,10 @@ module SimpleCov
84
90
  File.join("./assets", SimpleCov::Formatter::HTMLFormatter::VERSION, name)
85
91
  end
86
92
 
87
- # Only have a few content types, just hardcode them
88
- CONTENT_TYPES = {
89
- ".js" => "text/javascript",
90
- ".png" => "image/png",
91
- ".gif" => "image/gif",
92
- ".css" => "text/css",
93
- }.freeze
94
-
95
93
  def asset_inline(name)
96
94
  path = File.join(@public_assets_dir, name)
97
- base64_content = Base64.strict_encode64 File.read(path)
95
+ # Equivalent to `Base64.strict_encode64(File.read(path))` but without depending on Base64
96
+ base64_content = [File.read(path)].pack("m0")
98
97
 
99
98
  content_type = CONTENT_TYPES[File.extname(name)]
100
99
 
@@ -48,7 +48,7 @@
48
48
  <% end %>
49
49
  <% end %>
50
50
 
51
- <code class="ruby"><%= CGI.escapeHTML(line.src.chomp) %></code>
51
+ <code class="ruby"><%= ERB::Util.html_escape(line.src.chomp) %></code>
52
52
  </li>
53
53
  </div>
54
54
  <% end %>
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simplecov-html
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.0
4
+ version: 0.13.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christoph Olszowka
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2024-09-08 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies: []
12
12
  description: Default HTML formatter for SimpleCov code coverage tool for ruby 2.4+
13
13
  email:
@@ -17,7 +17,6 @@ extensions: []
17
17
  extra_rdoc_files: []
18
18
  files:
19
19
  - ".document"
20
- - ".tool-versions"
21
20
  - CHANGELOG.md
22
21
  - LICENSE
23
22
  - README.md
@@ -76,7 +75,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
76
75
  - !ruby/object:Gem::Version
77
76
  version: '0'
78
77
  requirements: []
79
- rubygems_version: 3.6.0.dev
78
+ rubygems_version: 3.7.0.dev
80
79
  specification_version: 4
81
80
  summary: Default HTML formatter for SimpleCov code coverage tool for ruby 2.4+
82
81
  test_files: []
data/.tool-versions DELETED
@@ -1 +0,0 @@
1
- ruby 2.7.1