зеркало из https://github.com/github/ruby.git
[ruby/optparse] Fix ls-files matching regexp
As splitting by NUL means to allow the file names to contain newlines, path names should match at beginning-of-string instead of beginning-of-line. https://github.com/ruby/optparse/commit/df3933aa2b
This commit is contained in:
Родитель
098e8c2873
Коммит
ba99eae2a5
|
@ -21,9 +21,9 @@ Gem::Specification.new do |spec|
|
|||
spec.metadata["source_code_uri"] = spec.homepage
|
||||
|
||||
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
||||
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
||||
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{\A(?:test|spec|features)/}) }
|
||||
end
|
||||
spec.bindir = "exe"
|
||||
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
||||
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
||||
spec.require_paths = ["lib"]
|
||||
end
|
||||
|
|
Загрузка…
Ссылка в новой задаче