Skip to content

Commit 70301b8

Browse files
committed
Fix template files location
The template files should be globbed from the location of gemspec, as well as the library files at 109e8b3.
1 parent fcfab0f commit 70301b8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

rdoc.gemspec

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,10 @@ RDoc includes the +rdoc+ and +ri+ tools for generating and displaying documentat
5353
"man/ri.1",
5454
"rdoc.gemspec",
5555
]
56-
template_files = Dir.glob("lib/rdoc/generator/template/**/*")
57-
lib_files = Dir.glob("lib/**/*.{rb,kpeg,ry}", base: File.expand_path('..', __FILE__))
56+
base = __dir__
57+
not_dir = ->(path) {!File.directory?(File.join(base, path))}
58+
template_files = Dir.glob("lib/rdoc/generator/template/**/*", base: base).select(&not_dir)
59+
lib_files = Dir.glob("lib/**/*.{rb,kpeg,ry}", base: base).select(&not_dir)
5860

5961
s.files = (non_lib_files + template_files + lib_files).uniq
6062

0 commit comments

Comments
 (0)