Bug 1267340 - Review Request: rubygem-minitest-around - Around block for minitest
Review Request: rubygem-minitest-around - Around block for minitest
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: Package Review (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Vít Ondruch
Fedora Extras Quality Assurance
:
Depends On:
Blocks: 1267342
  Show dependency treegraph
 
Reported: 2015-09-29 13:13 EDT by Ilya Gradina
Modified: 2016-12-10 21:23 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-12-10 19:28:15 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
vondruch: fedora‑review+


Attachments (Terms of Use)

  None (edit)
Description Ilya Gradina 2015-09-29 13:13:56 EDT
Spec URL: https://github.com/ilgrad/fedora-packages/blob/master/rubygems/rubygem-minitest-around.spec
SRPM URL: https://github.com/ilgrad/fedora-packages/blob/master/rubygems/rubygem-minitest-around-0.3.2-1.fc24.src.rpm
Description: Alternative for setup/teardown dance.
Fedora Account System Username: ilgrad
Comment 2 Vít Ondruch 2016-10-31 08:19:46 EDT
I'm taking this for a review.


* Update to the latest version
  - There seems to be 0.4.0 version available upstream. Please update the package
    to the latest version.

* Integration test suite
  - You have 'rubygem(cucumber)' among your build dependencies, but you don't
    later execute the integration test suite using it. In theory, it should be
    as easy as calling "cucumber" in the %check section. If this is not possible,
    please remove the dependency and explain the reasons.
  - The "features" directory is actually source code of the integration tests
    suite, it should not be required for runtime and hance it belong to -doc
    subpackage (actually you exclude the "test" directory from the package, so
    you probably want to exclude "features" directory as well).
  - The "config" directory looks to be used just by integration test suite, so it
    should follow the same fate as the "features" and "test" directories.

Otherwise the package looks sane. I'll finish the review as soon as you'll update to the latest version.
Comment 3 Ilya Gradina 2016-11-05 09:49:28 EDT
spec url: https://github.com/ilgrad/fedora-packages/raw/master/rubygems/rubygem-minitest-around.spec 
srpm url: https://github.com/ilgrad/fedora-packages/raw/master/rubygems/rubygem-minitest-around-0.4.0-1.fc25.src.rpm

- updated to version 0.4.0
- removed from BuildRequires rubygem-cucumber(with cucumber not pass the tests).
Comment 4 Vít Ondruch 2016-11-07 09:10:47 EST
(In reply to Ilya Gradina from comment #3)
> - updated to version 0.4.0

Thx

> - removed from BuildRequires rubygem-cucumber(with cucumber not pass the
> tests).

Actually you can run the cucumber test suite. This is the diff I tested:

```
--- rubygem-minitest-around.spec	2016-11-07 14:50:38.050724282 +0100
+++ rubygem-minitest-around.spec.back	2016-11-07 14:49:26.946770370 +0100
@@ -11,6 +11,7 @@
 BuildRequires: ruby(release)
 BuildRequires: rubygems-devel
 BuildRequires: rubygem(minitest)
+BuildRequires: rubygem(cucumber)
 BuildArch: noarch
 
 %description
@@ -54,6 +55,8 @@
 pushd .%{gem_instdir}
   sed -i "/require 'bundler/ s/^/#/" test/helper.rb
   ruby -Ilib -e 'Dir.glob "./test/*_test.rb", &method(:require)'
+
+  RUBYOPT=-Ilib cucumber --tag ~@todo --tag ~@rspec
 popd
 
 %files
```

There are excluded some parts, but these corresponds to the Rakefile [1].

And actually, there are also test/*_spec.rb files which could be executed, so the final patch according to my testing should be:

```
--- rubygem-minitest-around.spec.orig	2016-11-07 15:05:01.312144585 +0100
+++ rubygem-minitest-around.spec	2016-11-07 15:04:43.281157338 +0100
@@ -11,6 +11,7 @@
 BuildRequires: ruby(release)
 BuildRequires: rubygems-devel
 BuildRequires: rubygem(minitest)
+BuildRequires: rubygem(cucumber)
 BuildArch: noarch
 
 %description
@@ -53,7 +54,9 @@
 %check
 pushd .%{gem_instdir}
   sed -i "/require 'bundler/ s/^/#/" test/helper.rb
-  ruby -Ilib -e 'Dir.glob "./test/*_test.rb", &method(:require)'
+  RUBYOPT=-Ilib ruby -e 'Dir.glob "./test/*_{test,spec}.rb", &method(:require)'
+
+  RUBYOPT=-Ilib cucumber --tag ~@todo --tag ~@rspec
 popd
 
 %files
```

The RUBYOPT export is required, -Ilib is not enough, since there are spawned some testing sub processes. In upstream, Bundler takes care about it, but without Bundler, we have to workaround it.


Otherwise the package looks sane => APPROVED but please make sure to enable as much tests as possible.


[1] https://github.com/splattael/minitest-around/blob/master/Rakefile#L37
Comment 6 Vít Ondruch 2016-11-08 10:46:21 EST
(In reply to Ilya Gradina from comment #5)
> - added run rdoc

Would you mind to elaborate the purpose of this?
Comment 7 Ilya Gradina 2016-11-09 16:26:08 EST
(In reply to Vít Ondruch from comment #6)
> (In reply to Ilya Gradina from comment #5)
> > - added run rdoc
> 
> Would you mind to elaborate the purpose of this?

Sorry,
I generated the documentation, which is not. Actually this is not the desired action. 

new spec: https://github.com/ilgrad/fedora-packages/raw/master/rubygems/rubygem-minitest-around.spec
new srpm: https://github.com/ilgrad/fedora-packages/raw/master/rubygems/rubygem-minitest-around-0.4.0-3.fc26.src.rpm
Comment 8 Gwyn Ciesla 2016-11-09 17:38:22 EST
Package request has been approved: https://admin.fedoraproject.org/pkgdb/package/rpms/rubygem-minitest-around
Comment 9 Vít Ondruch 2016-11-10 11:13:14 EST
(In reply to Ilya Gradina from comment #7)
> I generated the documentation, which is not. Actually this is not the
> desired action. 

I thought so. Thx for fixing it :)
Comment 10 Fedora Update System 2016-11-29 15:29:00 EST
rubygem-minitest-around-0.4.0-3.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-c132f800e5
Comment 11 Fedora Update System 2016-11-29 15:29:08 EST
rubygem-minitest-around-0.4.0-3.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-74a98a3cd8
Comment 12 Fedora Update System 2016-12-02 23:32:01 EST
rubygem-minitest-around-0.4.0-3.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-74a98a3cd8
Comment 13 Fedora Update System 2016-12-03 00:39:29 EST
rubygem-minitest-around-0.4.0-3.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-c132f800e5
Comment 14 Fedora Update System 2016-12-10 19:28:15 EST
rubygem-minitest-around-0.4.0-3.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.
Comment 15 Fedora Update System 2016-12-10 21:23:00 EST
rubygem-minitest-around-0.4.0-3.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.