Skip to content

Commit b86310c

Browse files
committed
Fix Sprockets deprecation warning
Compressors should respond to `call` otherwise Sprockets will print a deprecation warning about legacy processing interfaces.
1 parent c388c28 commit b86310c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

test/test_railtie.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,12 @@ def test_compressors
156156
end
157157

158158
def test_custom_compressors
159-
compressor = Class.new
159+
compressor = Class.new do
160+
def self.call(input)
161+
{ data: input[:data] }
162+
end
163+
end
164+
160165
app.configure do
161166
config.assets.configure do |env|
162167
env.register_compressor "application/javascript", :test_js, compressor

0 commit comments

Comments
 (0)