mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Load gemspec file at that directory
Gemspec files generated by old bundler run `git` without changing the working directory. Or some gemspec files expect an owned file at the top exists ath the current working directory.
This commit is contained in:
parent
661536ab16
commit
5791171201
Notes:
git
2022-08-05 13:00:55 +09:00
1 changed files with 2 additions and 2 deletions
|
@ -15,8 +15,8 @@ module BundledGem
|
||||||
end
|
end
|
||||||
|
|
||||||
def copy(path, *rest)
|
def copy(path, *rest)
|
||||||
spec = Gem::Specification.load(path)
|
path, n = File.split(path)
|
||||||
path = File.dirname(path)
|
spec = Dir.chdir(path) {Gem::Specification.load(n)} or raise "Cannot load #{path}"
|
||||||
prepare_test(spec, *rest) do |dir|
|
prepare_test(spec, *rest) do |dir|
|
||||||
FileUtils.rm_rf(dir)
|
FileUtils.rm_rf(dir)
|
||||||
files = spec.files.reject {|f| f.start_with?(".git")}
|
files = spec.files.reject {|f| f.start_with?(".git")}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue