Skip to content

Commit

Permalink
Ensure manifest_path is read from config properly by Assembly (#203)
Browse files Browse the repository at this point in the history
  • Loading branch information
keiththomps authored Sep 8, 2024
1 parent f06b3f9 commit f1761f2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/propshaft/assembly.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 10 additions & 0 deletions test/propshaft/assembly_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit f1761f2

Please sign in to comment.