From f1761f21f2cf248fcb74beb7237fd2eb64edd02b Mon Sep 17 00:00:00 2001 From: Keith Thompson Date: Sun, 8 Sep 2024 03:08:30 -0400 Subject: [PATCH] Ensure manifest_path is read from config properly by Assembly (#203) --- lib/propshaft/assembly.rb | 2 +- test/propshaft/assembly_test.rb | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/propshaft/assembly.rb b/lib/propshaft/assembly.rb index b3fa22a..f15a15e 100644 --- a/lib/propshaft/assembly.rb +++ b/lib/propshaft/assembly.rb @@ -32,7 +32,7 @@ def server def processor Propshaft::Processor.new \ - load_path: load_path, output_path: config.output_path, compilers: compilers, manifest_path: config.manifest_path.manifest_path + load_path: load_path, output_path: config.output_path, compilers: compilers, manifest_path: config.manifest_path end def compilers diff --git a/test/propshaft/assembly_test.rb b/test/propshaft/assembly_test.rb index 418feee..f04f6f4 100644 --- a/test/propshaft/assembly_test.rb +++ b/test/propshaft/assembly_test.rb @@ -33,4 +33,14 @@ class Propshaft::AssemblyTest < ActiveSupport::TestCase assert_equal assembly.resolver.object_id, assembly.resolver.object_id assert_equal assembly.load_path.object_id, assembly.load_path.object_id end + + test "instantiates a valid processor" do + assembly = Propshaft::Assembly.new(ActiveSupport::OrderedOptions.new.tap { |config| + config.output_path = Pathname.new("#{__dir__}/../fixtures/assets") + config.manifest_path = config.output_path.join(".manifest.json") + config.prefix = "/assets" + }) + + assert assembly.processor.is_a?(Propshaft::Processor) + end end