mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Refined installation of gemspecs placed other than ext and lib
This commit is contained in:
parent
813fe4c256
commit
31f4dec637
1 changed files with 7 additions and 6 deletions
|
@ -701,14 +701,15 @@ module RbInstall
|
|||
when "lib"
|
||||
base = @base_dir
|
||||
prefix = base.sub(/lib\/.*?\z/, "") + "lib/"
|
||||
else
|
||||
# other/something.gemspec ->
|
||||
# [other/something.rb, other/something/foo.rb, ...]
|
||||
base = @gemspec.chomp('.gemspec')
|
||||
prefix = @base_dir
|
||||
end
|
||||
|
||||
if base
|
||||
Dir.glob("#{base}{.rb,/**/*.rb}").collect do |ruby_source|
|
||||
remove_prefix(prefix, ruby_source)
|
||||
end
|
||||
else
|
||||
[File.basename(@gemspec, '.gemspec') + '.rb']
|
||||
Dir.glob("#{base}{.rb,/**/*.rb}").collect do |ruby_source|
|
||||
remove_prefix(prefix, ruby_source)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue