mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Revert following rbinstall.rb changes
Because unexpected names are listed in gemspec files. * "Fix gemspec only case"fc56b96b09
* "Refined installation of gemspecs placed other than ext and lib"31f4dec637
This commit is contained in:
parent
ff527e7e32
commit
504d6dc429
1 changed files with 5 additions and 11 deletions
|
@ -701,20 +701,14 @@ module RbInstall
|
|||
when "lib"
|
||||
base = @base_dir
|
||||
prefix = base.sub(/lib\/.*?\z/, "")
|
||||
else
|
||||
# other/something.gemspec ->
|
||||
# [other/something.rb, other/something/foo.rb, ...]
|
||||
base = @gemspec.chomp('.gemspec')
|
||||
prefix = @base_dir
|
||||
end
|
||||
|
||||
libs = Dir.glob("#{base}{.rb,/**/*.rb}").collect do |ruby_source|
|
||||
remove_prefix(prefix, ruby_source)
|
||||
end
|
||||
if libs.empty?
|
||||
[File.basename(@gemspec, '.gemspec') + '.rb']
|
||||
if base
|
||||
Dir.glob("#{base}{.rb,/**/*.rb}").collect do |ruby_source|
|
||||
remove_prefix(prefix, ruby_source)
|
||||
end
|
||||
else
|
||||
libs
|
||||
[File.basename(@gemspec, '.gemspec') + '.rb']
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue