107 lines
3.3 KiB
RPMSpec
107 lines
3.3 KiB
RPMSpec
%global gem_name cucumber
|
|
%{?_with_bootstrap: %global bootstrap 1}
|
|
Name: rubygem-%{gem_name}
|
|
Version: 7.1.0
|
|
Release: 1
|
|
Summary: Tool to execute plain-text documents as functional tests
|
|
License: MIT
|
|
URL: https://cucumber.io/
|
|
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
|
Source1: https://github.com/%{gem_name}/%{gem_name}-ruby/archive/v%{version}.tar.gz
|
|
BuildRequires: ruby(release) rubygems-devel ruby
|
|
%if ! 0%{?bootstrap}
|
|
BuildRequires: rubygem(aruba)
|
|
%endif
|
|
BuildRequires: rubygem(rake) rubygem(webrick) rubygem(mime-types) rubygem(cucumber-create-meta)
|
|
BuildRequires: rubygem(builder) rubygem(bundler) rubygem(cucumber-core)
|
|
BuildRequires: rubygem-cucumber-expressions rubygem(cucumber-wire) rubygem(multi_json)
|
|
BuildRequires: rubygem(multi_test) rubygem(nokogiri) rubygem(rspec) rubygem(did_you_mean)
|
|
BuildArch: noarch
|
|
%description
|
|
Cucumber lets software development teams describe how software should behave
|
|
in plain text. The text is written in a business-readable domain-specific
|
|
language and serves as documentation, automated tests and development-aid.
|
|
|
|
%package doc
|
|
Summary: Documentation for %{name}
|
|
Requires: %{name} = %{version}-%{release}
|
|
BuildArch: noarch
|
|
%description doc
|
|
Documentation for %{name}.
|
|
|
|
%prep
|
|
%setup -q -n %{gem_name}-%{version} -b 1
|
|
|
|
%gemspec_remove_dep -g cucumber-html-formatter
|
|
|
|
%gemspec_remove_dep -g diff-lcs "~> 1.4", ">= 1.4.4"
|
|
%gemspec_add_dep -g diff-lcs ">= 1.3"
|
|
|
|
%gemspec_remove_dep -g cucumber-gherkin "~> 22.0", ">= 22.0.0"
|
|
%gemspec_add_dep -g cucumber-gherkin ">= 20.0"
|
|
|
|
%gemspec_remove_dep -g multi_test "~> 0.1", ">= 0.1.2"
|
|
%gemspec_add_dep -g multi_test ">= 0.1.2"
|
|
|
|
%gemspec_remove_dep -g cucumber-cucumber-expressions "~> 14.0", ">= 14.0.0"
|
|
%gemspec_add_dep -g cucumber-cucumber-expressions ">= 12.1"
|
|
|
|
%gemspec_remove_dep -g cucumber-messages "~> 17.1", ">= 17.1.1"
|
|
%gemspec_add_dep -g cucumber-messages ">= 17.0"
|
|
|
|
%build
|
|
gem build ../%{gem_name}-%{version}.gemspec
|
|
%gem_install
|
|
|
|
%install
|
|
mkdir -p %{buildroot}%{gem_dir}
|
|
cp -a .%{gem_dir}/* \
|
|
%{buildroot}%{gem_dir}/
|
|
mkdir -p %{buildroot}%{_bindir}
|
|
cp -pa .%{_bindir}/* \
|
|
%{buildroot}%{_bindir}/
|
|
find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x
|
|
|
|
%check
|
|
pushd .%{gem_instdir}
|
|
ln -s %{_builddir}/%{gem_name}-ruby-%{version}/cucumber.yml cucumber.yml
|
|
ln -s %{_builddir}/%{gem_name}-ruby-%{version}/spec spec
|
|
|
|
sed -i '/require.*pry/ s/^/#/' spec/spec_helper.rb
|
|
|
|
rspec -Ilib spec
|
|
|
|
%if %{without bootstrap}
|
|
ln -s %{_builddir}/%{gem_name}-ruby-%{version}/features features
|
|
|
|
sed -i -e '/^ Scenario: output html to stdout$/i @skip' \
|
|
features/docs/formatters/html.feature
|
|
RUBYOPT=-Ilib cucumber --tags 'not @skip'
|
|
%endif
|
|
popd
|
|
|
|
%files
|
|
%dir %{gem_instdir}
|
|
%{_bindir}/cucumber
|
|
%license %{gem_instdir}/LICENSE
|
|
%{gem_instdir}/bin
|
|
%{gem_libdir}
|
|
%exclude %{gem_cache}
|
|
%{gem_spec}
|
|
|
|
%files doc
|
|
%doc %{gem_docdir}
|
|
%doc %{gem_instdir}/CONTRIBUTING.md
|
|
%doc %{gem_instdir}/README.md
|
|
%doc %{gem_instdir}/CHANGELOG.md
|
|
|
|
%changelog
|
|
* Mon Jan 9 2023 liyanan <liyanan32@h-partners.com> - 7.1.0-1
|
|
- Update to 7.1.0
|
|
|
|
* Tue Mar 01 2022 baizhonggui <baizhonggui@huawei.com> - 3.1.2-2
|
|
- Add ruby 3.0 support for fixing build error
|
|
|
|
* Wed Aug 19 2020 fanjiachen <fanjiachen3@huawei.com> - 3.1.2-1
|
|
- package init
|