diff --git a/lib/sassc/embedded.rb b/lib/sassc/embedded.rb index 5566243..d2d8195 100644 --- a/lib/sassc/embedded.rb +++ b/lib/sassc/embedded.rb @@ -3,7 +3,6 @@ require 'sassc' require 'sass-embedded' -require 'base64' require 'json' require 'uri' @@ -46,7 +45,7 @@ def render unless @source_map.nil? || omit_source_map_url? url = URL.parse(output_url || file_url) source_mapping_url = if source_map_embed? - "data:application/json;base64,#{Base64.strict_encode64(@source_map)}" + "data:application/json;base64,#{[@source_map].pack('m0')}" else URL.parse(source_map_file_url).route_from(url).to_s end diff --git a/sassc-embedded.gemspec b/sassc-embedded.gemspec index 81dfa9e..d3b375e 100644 --- a/sassc-embedded.gemspec +++ b/sassc-embedded.gemspec @@ -24,7 +24,6 @@ Gem::Specification.new do |spec| # rubocop:disable Gemspec/RequireMFA spec.required_ruby_version = '>= 3.0.0' - spec.add_runtime_dependency 'base64', '~> 0.1' spec.add_runtime_dependency 'sassc', '~> 2.0' spec.add_runtime_dependency 'sass-embedded', '~> 1.64' end