Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Accept files without the .rb extension

  • Loading branch information...
commit de321b868298e47a73f659c0117e4ca2083a2706 1 parent a17fb9c
@regularfry regularfry authored committed
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/amalgalite/packer.rb
View
5 lib/amalgalite/packer.rb
@@ -211,7 +211,10 @@ def make_manifest( file_list )
STDERR.puts "Unable to add #{f} to the manifest, cannot find the file on disk"
next
end
- m.require_path = m.require_path.to_s[ /\A(.*)\.rb\Z/, 1]
+ # Make sure that we can handle files without the .rb extension
+ # if we have to. This means bin/foo works as a require path
+ # without requiring bin/foo to actually be bin/foo.rb
+ m.require_path = m.require_path.to_s.sub(/\.rb\Z/,'')
manifest << m
end
return manifest
Please sign in to comment.
Something went wrong with that request. Please try again.