I'm wondering about how to handle things like the Rakefile, or /spec, or /test directories in rubygem packages. My inclination is to leave these out of the package to keep it slimmer, but I see that some rubygems do include them in the package (or at least the -doc subpackage). The example on the Ruby packaging guidelines also includes these in -doc.
Are these files really that useful to ship to end users?
- Ken
Hi Ken,
On specs, tests, etc, we apply documentation packaging guidelines [1] and this is quote from reviewers guide:
*MUST*: If a package includes something as %doc, it must not affect the runtime of the application. To summarize: If it is in %doc, the program must run properly if it is not present.
I interpret is in this way: specs, tests, etc are not essential for package runtime, therefore I place them in -doc subpackage. Typical user is not installing -doc subpackage, so he does not waste his disk space. Also, test suite may help in better understanding how the library works, therefore it might be view as as documentation. So if there is test suite, keep it, if there is non, do nod add it. Its question to upstream if you have different opinion.
The inclusion of test suite in gem is more generic question for Ruby community. For example Rails does not include its test suite and I find it correct. On the other hand, there is some infrastructure in RubyGems which should allow to execute the test suite of gem during installation, but I never tried it personally, I don't believe it will work reasonably.
Vit
[1] http://fedoraproject.org/wiki/Packaging/Guidelines#PackageDocumentation
Dne 26.4.2012 00:49, Ken Dreyer napsal(a):
I'm wondering about how to handle things like the Rakefile, or /spec, or /test directories in rubygem packages. My inclination is to leave these out of the package to keep it slimmer, but I see that some rubygems do include them in the package (or at least the -doc subpackage). The example on the Ruby packaging guidelines also includes these in -doc.
Are these files really that useful to ship to end users?
- Ken
ruby-sig mailing list ruby-sig@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/ruby-sig
One more addition from me: I have run into few gems, that had a VERSION file out of the lib directory, so it looked it's just a doc with the version, but it was actually read by files from lib and used in runtime (so if not present, the gem didn't work). So careful with files like this, you mustn't mark them as %doc nor put them in the doc subpackage.
----- Original Message -----
Hi Ken,
On specs, tests, etc, we apply documentation packaging guidelines [1] and this is quote from reviewers guide:
MUST : If a package includes something as %doc, it must not affect the runtime of the application. To summarize: If it is in %doc, the program must run properly if it is not present.
I interpret is in this way: specs, tests, etc are not essential for package runtime, therefore I place them in -doc subpackage. Typical user is not installing -doc subpackage, so he does not waste his disk space. Also, test suite may help in better understanding how the library works, therefore it might be view as as documentation. So if there is test suite, keep it, if there is non, do nod add it. Its question to upstream if you have different opinion.
The inclusion of test suite in gem is more generic question for Ruby community. For example Rails does not include its test suite and I find it correct. On the other hand, there is some infrastructure in RubyGems which should allow to execute the test suite of gem during installation, but I never tried it personally, I don't believe it will work reasonably.
Vit
[1] http://fedoraproject.org/wiki/Packaging/Guidelines#PackageDocumentation
Dne 26.4.2012 00:49, Ken Dreyer napsal(a):
I'm wondering about how to handle things like the Rakefile, or /spec,
or /test directories in rubygem packages. My inclination is to leave
these out of the package to keep it slimmer, but I see that some
rubygems do include them in the package (or at least the -doc
subpackage). The example on the Ruby packaging guidelines also
includes these in -doc.
Are these files really that useful to ship to end users?
- Ken
ruby-sig mailing list ruby-sig@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/ruby-sig
ruby-sig mailing list ruby-sig@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/ruby-sig
On Thu, Apr 26, 2012 at 10:23:00AM +0200, Vít Ondruch wrote:
Hi Ken,
On specs, tests, etc, we apply documentation packaging guidelines [1] and this is quote from reviewers guide:
*MUST*: If a package includes something as %doc, it must not affect the runtime of the application. To summarize: If it is in %doc, the program must run properly if it is not present.
I interpret is in this way: specs, tests, etc are not essential for package runtime, therefore I place them in -doc subpackage. Typical user is not installing -doc subpackage, so he does not waste his disk space. Also, test suite may help in better understanding how the library works, therefore it might be view as as documentation. So if there is test suite, keep it, if there is non, do nod add it. Its question to upstream if you have different opinion.
The inclusion of test suite in gem is more generic question for Ruby community. For example Rails does not include its test suite and I find it correct. On the other hand, there is some infrastructure in RubyGems which should allow to execute the test suite of gem during installation, but I never tried it personally, I don't believe it will work reasonably.
I think this is very logical. The test suite is more for development use and not for runtime. At best I would include them in a -devel package, but would side on not packaging them at all since they're more volatile.
Their benefit, WRT packaging, is in executing them during the package's build to ensure the code being packaged works as expected.
On Wed, Apr 25, 2012 at 04:49:07PM -0600, Ken Dreyer wrote:
I'm wondering about how to handle things like the Rakefile, or /spec, or /test directories in rubygem packages. My inclination is to leave these out of the package to keep it slimmer, but I see that some rubygems do include them in the package (or at least the -doc subpackage). The example on the Ruby packaging guidelines also includes these in -doc.
Are these files really that useful to ship to end users?
Speaking from experience, and from the feedback I've received on a package I'm getting through review now, I'd suggest leaving things like tests, the Rakefile, etc. out of the RPM since they're not necessary.
If you want to package them, perhaps include a -devel package that bundles them.
If you have examples, Rdoc files, etc. then those would go into the -doc package.
ruby-sig@lists.fedoraproject.org