Skip to content

Commit 45362b4

Browse files
authored
Merge pull request #144 from Earlopain/drop-base64
Drop `base64` dependency, resolve Ruby warning
2 parents 7d38ee9 + 11c8c0f commit 45362b4

File tree

3 files changed

+1
-5
lines changed

3 files changed

+1
-5
lines changed

Gemfile

-1
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,4 @@ group :development do
2828
gem "uglifier"
2929
end
3030

31-
gem "base64" if RUBY_VERSION >= "3.3"
3231
gem "logger" if RUBY_VERSION >= "3.4"

Gemfile.lock

-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ GEM
1616
remote: https://rubygems.org/
1717
specs:
1818
ast (2.4.2)
19-
base64 (0.2.0)
2019
concurrent-ruby (1.3.4)
2120
docile (1.4.1)
2221
execjs (2.9.1)
@@ -75,7 +74,6 @@ PLATFORMS
7574
universal-java-1.8
7675

7776
DEPENDENCIES
78-
base64
7977
logger
8078
minitest
8179
rake (>= 11)

lib/simplecov-html.rb

+1-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
require "fileutils"
66
require "digest/sha1"
77
require "time"
8-
require "base64"
98

109
# Ensure we are using a compatible version of SimpleCov
1110
major, minor, patch = SimpleCov::VERSION.scan(/\d+/).first(3).map(&:to_i)
@@ -94,7 +93,7 @@ def assets_path(name)
9493

9594
def asset_inline(name)
9695
path = File.join(@public_assets_dir, name)
97-
base64_content = Base64.strict_encode64 File.read(path)
96+
base64_content = [File.read(path)].pack("m0")
9897

9998
content_type = CONTENT_TYPES[File.extname(name)]
10099

0 commit comments

Comments
 (0)