----- Original Message -----
From: "Jun Aruga" <jaruga(a)redhat.com>
To: "Ruby SIG mailing list" <ruby-sig(a)lists.fedoraproject.org>
Sent: Thursday, May 9, 2019 3:23:33 PM
Subject: Re: Fake libraries for gem builds?
> What if we shipped in rubygems-devel some
fake libraries, which would try to load the original library, but
silently provided the miminum mock to make the test suite pass without
the library?
You mentioned about including the logic in "rubygems-devel" RPM.
I misunderstood you mentioned about "ruby-devel".
rubygems-devel package includes below files, that have macros for
rubygems RPM packaging.
When a user install current rubygems-devel, that is not still harmful,
that's not confusing a user.
But after including the fake libraries in it, if user install the
rubygems-devel by mistake, it is harmful.
I do not see any harm done by skipping code coverage(with rubygems-devel package installed
and the code coverage gem not). IMHO in most cases, bundler(or other dependency solution)
will install the dependencies for you, when you work on that project and it will load
fine. rubygems-devel is a platform-dependent package after all and users should not have
it installed by mistake.
Additionally I'd include a message like "Code coverage skipped, please install
#{coverage_library} to enable it.".
Overall it's a good solution for me.
ruby.spec
```
%files -n rubygems-devel
%{_rpmconfigdir}/macros.d/macros.rubygems
%{_rpmconfigdir}/fileattrs/rubygems.attr
%{_rpmconfigdir}/rubygems.req
%{_rpmconfigdir}/rubygems.prov
%{_rpmconfigdir}/rubygems.con
```
--
Jun Aruga / He - His - Him
--
Pavel Valena
Software Engineer, Red Hat
Brno, Czech Republic