Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure manifest_path is read from config properly by Assembly #203

Merged
merged 1 commit into from
Sep 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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