| |
@@ -1,13 +1,18 @@
|
| |
%global gem_name rspec-its
|
| |
|
| |
Name: rubygem-%{gem_name}
|
| |
- Version: 1.1.0
|
| |
- Release: 5%{?dist}
|
| |
- Summary: Provides "its" method formally part of rspec-core
|
| |
+ Version: 1.2.0
|
| |
+ Release: 1%{?dist}
|
| |
+ Summary: Provides "its" method formerly part of rspec-core
|
| |
Group: Development/Languages
|
| |
License: MIT
|
| |
URL: https://github.com/rspec/rspec-its
|
| |
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
| |
+
|
| |
+ # Fix Ruby 2.4 compatibility
|
| |
+ # https://github.com/rspec/rspec-its/pull/45
|
| |
+ Patch0: rubygem-rspec-its-1.2.0-Fix-Ruby-2.4-compatibility.patch
|
| |
+
|
| |
%if 0%{?el7}
|
| |
Requires: ruby(release)
|
| |
Requires: ruby(rubygems)
|
| |
@@ -16,13 +21,9 @@
|
| |
%endif
|
| |
BuildRequires: ruby(release)
|
| |
BuildRequires: rubygems-devel
|
| |
- BuildRequires: rubygem(rspec-core) >= 2.99.0.beta1
|
| |
- BuildRequires: rubygem(rspec-expectations) >= 2.99.0.beta1
|
| |
- # cucumber tests are non-functional during RPM build
|
| |
- #BuildRequires: rubygem(cucumber) => 1.3.8
|
| |
- #BuildRequires: rubygem(cucumber) < 1.4
|
| |
- #BuildRequires: rubygem(aruba) => 0.5
|
| |
- #BuildRequires: rubygem(aruba) < 1
|
| |
+ BuildRequires: rubygem(rspec-core)
|
| |
+ BuildRequires: rubygem(rspec-expectations)
|
| |
+ BuildRequires: rubygem(aruba)
|
| |
BuildArch: noarch
|
| |
%if 0%{?el7}
|
| |
Provides: rubygem(%{gem_name}) = %{version}
|
| |
@@ -41,27 +42,12 @@
|
| |
Documentation for %{name}.
|
| |
|
| |
%prep
|
| |
- gem unpack %{SOURCE0}
|
| |
-
|
| |
- %setup -q -D -T -n %{gem_name}-%{version}
|
| |
-
|
| |
- gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
|
| |
-
|
| |
- # Remove developer-only files.
|
| |
- for f in .gitignore .rspec .travis.yml Gemfile Rakefile \
|
| |
- script/test_all cucumber.yml; do
|
| |
- rm $f
|
| |
- sed -i "s|\"$f\",||g" %{gem_name}.gemspec
|
| |
- done
|
| |
+ %setup -q -n %{gem_name}-%{version}
|
| |
|
| |
%build
|
| |
- gem build %{gem_name}.gemspec
|
| |
-
|
| |
+ gem build ../%{gem_name}-%{version}.gemspec
|
| |
%gem_install
|
| |
|
| |
- # remove unnecessary gemspec
|
| |
- rm .%{gem_instdir}/%{gem_name}.gemspec
|
| |
-
|
| |
%install
|
| |
mkdir -p %{buildroot}%{gem_dir}
|
| |
cp -a .%{gem_dir}/* \
|
| |
@@ -69,30 +55,38 @@
|
| |
|
| |
%check
|
| |
pushd .%{gem_instdir}
|
| |
- rspec -Ilib spec
|
| |
- # cucumber tests are non-functional during RPM build
|
| |
- #cucumber -Ilib features/*.feature
|
| |
+ cat %{PATCH0} | patch -p1 -F 0
|
| |
+ rspec -Ilib spec
|
| |
+ export RUBYOPT="-I${PWD}/lib"
|
| |
+ cucumber
|
| |
popd
|
| |
|
| |
|
| |
%files
|
| |
%{!?_licensedir:%global license %%doc}
|
| |
%dir %{gem_instdir}
|
| |
- %doc %{gem_instdir}/Changelog.md
|
| |
%license %{gem_instdir}/LICENSE.txt
|
| |
- %doc %{gem_instdir}/README.md
|
| |
%{gem_libdir}
|
| |
%exclude %{gem_cache}
|
| |
+ %exclude %{gem_instdir}/.*
|
| |
%{gem_spec}
|
| |
|
| |
%files doc
|
| |
%doc %{gem_docdir}
|
| |
- %exclude %{gem_instdir}/cucumber.yml
|
| |
- %exclude %{gem_instdir}/features
|
| |
- %exclude %{gem_instdir}/spec
|
| |
-
|
| |
+ %doc %{gem_instdir}/Changelog.md
|
| |
+ %{gem_instdir}/cucumber.yml
|
| |
+ %{gem_instdir}/features
|
| |
+ %{gem_instdir}/spec
|
| |
+ %{gem_instdir}/Gemfile
|
| |
+ %{gem_instdir}/Rakefile
|
| |
+ %{gem_instdir}/script
|
| |
+ %doc %{gem_instdir}/README.md
|
| |
+ %{gem_instdir}/%{gem_name}.gemspec
|
| |
|
| |
%changelog
|
| |
+ * Tue Sep 12 2017 Pavel Valena <pvalena@redhat.com> - 1.2.0-1
|
| |
+ - Update to 1.2.0.
|
| |
+
|
| |
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-5
|
| |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
| |
|
| |
Also enhance spec file and enable cucumber tests.
https://koji.fedoraproject.org/koji/taskinfo?taskID=22070928