On Fri, Dec 07, 2018 at 08:14:12AM +0100, Matijs van Zuijlen wrote:
> On 07/12/2018 03:53, Hideki Yamane wrote:
> > On Wed, 5 Dec 2018 18:02:11 +0900
> > dai@debian.org wrote:
> >> I always create patch that replaces them with like:
> >>
> >>> `Dir['**/*'].reject { |f| f =~ %r{^debian/} }`
> >>
> >> ref. https://lists.debian.org/debian-ruby/2017/12/msg00005.html
> >
> > Thanks, then, how about to send it to upstream (bundler)?
> > In "lib/bundler/templates/newgem/newgem.gemspec.tt"
> >
> >> spec.files = `git ls-files -z`.split("\x0").reject do |f|
> >> f.match(%r{^(test|spec|features)/})
> >> end
> >
> > or is there any reason not to do so?
>
> When preparing a gem for release, you don't want random development
> artifacts that are ignored by git to be included in the gem. That is the
> reason for this complicated construction. Also, gems are considered
> non-source distributions, which is why the tests are left out.
Besides that, during the Debian build the absense of `git` is already
handled by gem2deb. This specific case is only a problem for you because
there is a _test_ that evaluates the gemspec, and that cannot be handled
in a generic way.
Attachment:
signature.asc
Description: PGP signature