rubygem-capybara/rubygem-capybara.spec

92 lines
2.8 KiB
RPMSpec
Raw Normal View History

2020-08-28 11:46:43 +08:00
%global gem_name capybara
Name: rubygem-%{gem_name}
2021-12-03 02:17:44 +00:00
Version: 3.34.0
2023-01-17 10:33:41 +08:00
Release: 2
2020-08-28 11:46:43 +08:00
Summary: Capybara aims to simplify the process of integration testing Rack applications
License: MIT
URL: https://github.com/teamcapybara/capybara
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
2021-12-03 02:17:44 +00:00
# git clone https://github.com/teamcapybara/capybara.git --no-checkout
# cd capybara && git archive -v -o capybara-3.34.0-tests.txz 3.34.0 features/
Source1: %{gem_name}-%{version}-tests.txz
2023-01-17 10:33:41 +08:00
#https://github.com/teamcapybara/capybara/pull/2471
Patch0001: Use-Psych-safe-load-in-tests.patch
Patch0002: Add-matrix-as-a-dependency-for-Ruby-3.1-compatibility.patch
2020-08-28 11:46:43 +08:00
BuildRequires: ruby(release) rubygems-devel ruby rubygem(selenium-webdriver) rubygem(sinatra)
BuildRequires: rubygem(rspec) rubygem(launchy) rubygem(minitest) rubygem(puma)
BuildRequires: rubygem(nokogiri) rubygem(xpath) rubygem(rack-test) rubygem(mini_mime)
2023-01-17 10:33:41 +08:00
BuildRequires: rubygem(cucumber) rubygem(regexp_parser) rubygem(matrix)
2020-08-28 11:46:43 +08:00
BuildArch: noarch
%description
Capybara is an integration testing tool for rack based web applications. It
simulates how a user would interact with a website.
%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
2021-12-03 02:17:44 +00:00
%gemspec_remove_dep -g regexp_parser ['~>1.5']
%gemspec_add_dep -g regexp_parser ['>=1.5', '<3.0']
2020-08-28 11:46:43 +08:00
2023-01-17 10:33:41 +08:00
%patch0001 -p1
pushd %_builddir
%patch0002 -p1
popd
2020-08-28 11:46:43 +08:00
%build
gem build ../%{gem_name}-%{version}.gemspec
%gem_install
%install
mkdir -p %{buildroot}%{gem_dir}
cp -a .%{gem_dir}/* \
%{buildroot}%{gem_dir}/
%check
pushd .%{gem_instdir}
2021-12-03 02:17:44 +00:00
ln -s %{_builddir}/features features
sed -i '/^require..selenium_statistics.$/ s/^/#/' spec/spec_helper.rb
sed -i '/SeleniumStatistics/ s/^/#/g' ./spec/spec_helper.rb
2021-12-03 02:17:44 +00:00
2020-08-28 11:46:43 +08:00
sed -i '/end.to raise_error(EOFError)/ s/EOFError/Net::ReadTimeout/' \
spec/server_spec.rb
rspec spec
sed -i "/^require 'bundler/ s/^/#/g" \
features/support/env.rb
cucumber
popd
%files
%dir %{gem_instdir}
%license %{gem_instdir}/License.txt
%{gem_libdir}
%exclude %{gem_cache}
%exclude %{gem_instdir}/.*
2020-08-28 11:46:43 +08:00
%{gem_spec}
%files doc
%doc %{gem_docdir}
%doc %{gem_instdir}/History.md
%doc %{gem_instdir}/README.md
%{gem_instdir}/spec
%changelog
2023-01-17 10:33:41 +08:00
* Thu Jan 5 2023 liyanan <liyanan32@h-partners.com> - 3.34.0-2
- fix build error with ruby 3.1
2021-12-03 02:17:44 +00:00
* Tue Mar 29 2022 liyanan <liyanan32@huawei.com> - 3.34.0-1
- update to 3.34.0
* Thu Dec 02 2021 houyingchao <houyingchao@huawei.com> - 3.33.0-1
- Upgrade to 3.33.0 version
- fix the compilation failed of rubygem-capybara
2020-08-28 11:46:43 +08:00
* Wed Aug 19 2020 fanjiachen <fanjiachen3@huawei.com> - 3.8.1-1
- package init