Skip to content

Commit f98b50c

Browse files
Include only files listed in gemspec.files in the package
1 parent 704150a commit f98b50c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/ruby_wasm/packager/file_system.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ def ruby_root
9898
def each_gem_require_path(&block)
9999
each_gem_extension_path(&block)
100100
@packager.specs.each do |spec|
101+
# Use raw_require_paths to exclude extensions
101102
spec.raw_require_paths.each do |require_path|
102103
source = File.expand_path(require_path, spec.full_gem_path)
103104
next unless File.exist?(source)
@@ -114,8 +115,7 @@ def each_gem_content_path(&block)
114115
@packager.specs.each do |spec|
115116
next unless File.exist?(spec.full_gem_path)
116117

117-
Dir
118-
.children(spec.full_gem_path)
118+
spec.files
119119
.each do |require_path|
120120
source = File.expand_path(require_path, spec.full_gem_path)
121121
next unless File.exist?(source)

0 commit comments

Comments
 (0)