From a51732eb7c2d2450b22b07bbc98cae2c29515131 Mon Sep 17 00:00:00 2001 From: Justin Coyne Date: Mon, 15 Nov 2021 09:25:20 -0600 Subject: [PATCH] Remove initializer that is no longer necessary after the upgrade to sprockets-rails 3.3.0. See https://github.com/rails/sprockets-rails/pull/476 --- app/assets/stylesheets/application.scss | 4 ++-- config/initializers/assets_url_processor.rb | 14 -------------- 2 files changed, 2 insertions(+), 16 deletions(-) delete mode 100644 config/initializers/assets_url_processor.rb diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 9cde2df95..48ce93987 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -7,7 +7,7 @@ // Here we override blacklight to wrap the $logo-image in a url() .navbar-logo { // The main logo image for the Blacklight instance - background: transparent asset-url("logo.png") no-repeat top left; + background: transparent url("logo.png") no-repeat top left; } @import 'blacklight-hierarchy/app/assets/stylesheets/blacklight/hierarchy/hierarchy'; @@ -25,4 +25,4 @@ @import "workflow_grid"; @import "throbber"; @import "tags-autocomplete"; -@import "registration" \ No newline at end of file +@import "registration" diff --git a/config/initializers/assets_url_processor.rb b/config/initializers/assets_url_processor.rb deleted file mode 100644 index 1bcfb0c2e..000000000 --- a/config/initializers/assets_url_processor.rb +++ /dev/null @@ -1,14 +0,0 @@ -# frozen_string_literal: true - -# From https://github.com/rails/cssbundling-rails/issues/22#issuecomment-923265626 -class AssetUrlProcessor - def self.call(input) - context = input[:environment].context_class.new(input) - data = input[:data].gsub(/asset-url\(["']?(.+?)["']?\)/) do |_match| - "url(#{context.asset_path(Regexp.last_match(1))})" - end - { data: data } - end -end - -Sprockets.register_postprocessor 'text/css', AssetUrlProcessor