Skip to content

Commit f1761f2

Browse files
authored
Ensure manifest_path is read from config properly by Assembly (#203)
1 parent f06b3f9 commit f1761f2

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

lib/propshaft/assembly.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def server
3232

3333
def processor
3434
Propshaft::Processor.new \
35-
load_path: load_path, output_path: config.output_path, compilers: compilers, manifest_path: config.manifest_path.manifest_path
35+
load_path: load_path, output_path: config.output_path, compilers: compilers, manifest_path: config.manifest_path
3636
end
3737

3838
def compilers

test/propshaft/assembly_test.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,14 @@ class Propshaft::AssemblyTest < ActiveSupport::TestCase
3333
assert_equal assembly.resolver.object_id, assembly.resolver.object_id
3434
assert_equal assembly.load_path.object_id, assembly.load_path.object_id
3535
end
36+
37+
test "instantiates a valid processor" do
38+
assembly = Propshaft::Assembly.new(ActiveSupport::OrderedOptions.new.tap { |config|
39+
config.output_path = Pathname.new("#{__dir__}/../fixtures/assets")
40+
config.manifest_path = config.output_path.join(".manifest.json")
41+
config.prefix = "/assets"
42+
})
43+
44+
assert assembly.processor.is_a?(Propshaft::Processor)
45+
end
3646
end

0 commit comments

Comments
 (0)