Skip to content

Commit c3d678b

Browse files
Package all files in packaged .gem
1 parent 7ba1c32 commit c3d678b

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

lib/ruby_wasm/packager/file_system.rb

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,14 @@ def each_gem_content_path(&block)
115115
@packager.specs.each do |spec|
116116
next unless File.exist?(spec.full_gem_path)
117117

118-
spec.files
118+
# spec.files is only valid before the gem is packaged.
119+
if spec.source.path?
120+
relative_paths = spec.files
121+
else
122+
# All files in .gem are required.
123+
relative_paths = Dir.children(spec.full_gem_path)
124+
end
125+
relative_paths
119126
.each do |require_path|
120127
source = File.expand_path(require_path, spec.full_gem_path)
121128
next unless File.exist?(source)

0 commit comments

Comments
 (0)